From a45b5ca71fd6f96b932daf9ace548b425709ff85 Mon Sep 17 00:00:00 2001 From: codchen Date: Tue, 22 Oct 2024 17:43:54 +0800 Subject: [PATCH 01/33] Bump sei-cosmos to integrate with DeliverTxHook change (#1900) * Bump sei-cosmos to integrate with DeliverTxHook change * fix tests * bump sei-cosmos * fund integration tests accounts more * exp * fix integration tests --- app/receipt.go | 8 +++--- contracts/test/ERC721toCW721PointerTest.js | 14 +++++----- contracts/test/EVMCompatabilityTest.js | 30 +++++++++++----------- contracts/test/lib.js | 4 +-- go.mod | 2 +- go.sum | 4 +-- 6 files changed, 30 insertions(+), 32 deletions(-) diff --git a/app/receipt.go b/app/receipt.go index 32fa46d2fc..127444ba61 100644 --- a/app/receipt.go +++ b/app/receipt.go @@ -32,10 +32,8 @@ type AllowanceResponse struct { Expires json.RawMessage `json:"expires"` } -func (app *App) AddCosmosEventsToEVMReceiptIfApplicable(ctx sdk.Context, tx sdk.Tx, checksum [32]byte, response abci.ResponseDeliverTx) { - if response.Code > 0 { - return - } +func (app *App) AddCosmosEventsToEVMReceiptIfApplicable(ctx sdk.Context, tx sdk.Tx, checksum [32]byte, response sdk.DeliverTxHookInput) { + // hooks will only be called if DeliverTx is successful wasmEvents := GetEventsOfType(response, wasmtypes.WasmModuleEventType) if len(wasmEvents) == 0 { return @@ -283,7 +281,7 @@ func (app *App) GetEvmAddressAttribute(ctx sdk.Context, event abci.Event, attrib return EmptyHash } -func GetEventsOfType(rdtx abci.ResponseDeliverTx, ty string) (res []abci.Event) { +func GetEventsOfType(rdtx sdk.DeliverTxHookInput, ty string) (res []abci.Event) { for _, event := range rdtx.Events { if event.Type == ty { res = append(res, event) diff --git a/contracts/test/ERC721toCW721PointerTest.js b/contracts/test/ERC721toCW721PointerTest.js index c8026e8c74..b871af9d98 100644 --- a/contracts/test/ERC721toCW721PointerTest.js +++ b/contracts/test/ERC721toCW721PointerTest.js @@ -83,7 +83,7 @@ describe("ERC721 to CW721 Pointer", function () { describe("write", function(){ it("approve", async function () { const blockNumber = await ethers.provider.getBlockNumber(); - const approvedTxResp = await pointerAcc0.approve(accounts[1].evmAddress, 2) + const approvedTxResp = await pointerAcc0.approve(accounts[1].evmAddress, 2, { gasPrice: ethers.parseUnits('100', 'gwei') }) await approvedTxResp.wait() const approved = await pointerAcc0.getApproved(2); expect(approved).to.equal(accounts[1].evmAddress); @@ -113,14 +113,14 @@ describe("ERC721 to CW721 Pointer", function () { }); it("cannot approve token you don't own", async function () { - await expect(pointerAcc0.approve(accounts[1].evmAddress, 1)).to.be.reverted; + await expect(pointerAcc0.approve(accounts[1].evmAddress, 1, { gasPrice: ethers.parseUnits('100', 'gwei') })).to.be.reverted; }); it("transfer from", async function () { // accounts[0] should transfer token id 2 to accounts[1] await mine(pointerAcc0.approve(accounts[1].evmAddress, 2)); const blockNumber = await ethers.provider.getBlockNumber(); - transferTxResp = await pointerAcc1.transferFrom(accounts[0].evmAddress, accounts[1].evmAddress, 2); + transferTxResp = await pointerAcc1.transferFrom(accounts[0].evmAddress, accounts[1].evmAddress, 2, { gasPrice: ethers.parseUnits('100', 'gwei') }); const receipt = await transferTxResp.wait(); const filter = { fromBlock: '0x' + blockNumber.toString(16), @@ -147,9 +147,9 @@ describe("ERC721 to CW721 Pointer", function () { expect(balance1).to.equal(2); // do same for eth_getBlockReceipts and sei_getBlockReceipts - const ethBlockReceipts = await ethers.provider.send('eth_getBlockReceipts', ['0x' + blockNumber.toString(16)]); + const ethBlockReceipts = await ethers.provider.send('eth_getBlockReceipts', ['0x' + receipt.blockNumber.toString(16)]); expect(ethBlockReceipts.length).to.equal(1); - const seiBlockReceipts = await ethers.provider.send('sei_getBlockReceipts', ['0x' + blockNumber.toString(16)]); + const seiBlockReceipts = await ethers.provider.send('sei_getBlockReceipts', ['0x' + receipt.blockNumber.toString(16)]); expect(seiBlockReceipts.length).to.equal(1); const ethTx = await ethers.provider.send('eth_getTransactionReceipt', [receipt.hash]); @@ -165,11 +165,11 @@ describe("ERC721 to CW721 Pointer", function () { }); it("cannot transfer token you don't own", async function () { - await expect(pointerAcc0.transferFrom(accounts[0].evmAddress, accounts[1].evmAddress, 3)).to.be.reverted; + await expect(pointerAcc0.transferFrom(accounts[0].evmAddress, accounts[1].evmAddress, 3, { gasPrice: ethers.parseUnits('100', 'gwei') })).to.be.reverted; }); it("set approval for all", async function () { - const setApprovalForAllTxResp = await pointerAcc0.setApprovalForAll(accounts[1].evmAddress, true); + const setApprovalForAllTxResp = await pointerAcc0.setApprovalForAll(accounts[1].evmAddress, true, { gasPrice: ethers.parseUnits('100', 'gwei') }); await setApprovalForAllTxResp.wait(); await expect(setApprovalForAllTxResp) .to.emit(pointerAcc0, 'ApprovalForAll') diff --git a/contracts/test/EVMCompatabilityTest.js b/contracts/test/EVMCompatabilityTest.js index 79f666ec9e..070eadaff5 100644 --- a/contracts/test/EVMCompatabilityTest.js +++ b/contracts/test/EVMCompatabilityTest.js @@ -130,7 +130,7 @@ describe("EVM Test", function () { describe("Contract Factory", function() { it("should deploy a second contract from createToken", async function () { - const txResponse = await evmTester.createToken("TestToken", "TTK"); + const txResponse = await evmTester.createToken("TestToken", "TTK", { gasPrice: ethers.parseUnits('100', 'gwei') }); const testerAddress = await evmTester.getAddress(); const receipt = await txResponse.wait(); const newTokenAddress = receipt.logs[0].address; @@ -215,7 +215,7 @@ describe("EVM Test", function () { it("Should set the address correctly and emit an event", async function () { // Call setAddress await delay() - const txResponse = await evmTester.setAddressVar(); + const txResponse = await evmTester.setAddressVar({ gasPrice: ethers.parseUnits('100', 'gwei') }); await txResponse.wait(); // Wait for the transaction to be mined await expect(txResponse) .to.emit(evmTester, 'AddressSet') @@ -225,7 +225,7 @@ describe("EVM Test", function () { it("Should set the bool correctly and emit an event", async function () { // Call setBoolVar await delay() - const txResponse = await evmTester.setBoolVar(true); + const txResponse = await evmTester.setBoolVar(true, { gasPrice: ethers.parseUnits('100', 'gwei') }); await txResponse.wait(); // Wait for the transaction to be mined debug(JSON.stringify(txResponse)) @@ -241,7 +241,7 @@ describe("EVM Test", function () { it("Should set the uint256 correctly and emit an event", async function () { // Call setBoolVar await delay() - const txResponse = await evmTester.setUint256Var(12345); + const txResponse = await evmTester.setUint256Var(12345, { gasPrice: ethers.parseUnits('100', 'gwei') }); await txResponse.wait(); // Wait for the transaction to be mined debug(JSON.stringify(txResponse)) @@ -279,7 +279,7 @@ describe("EVM Test", function () { it("Should trace a call with timestamp", async function () { await delay() - const txResponse = await evmTester.setTimestamp(); + const txResponse = await evmTester.setTimestamp({ gasPrice: ethers.parseUnits('100', 'gwei') }); const receipt = await txResponse.wait(); // Wait for the transaction to be mined // get the timestamp that was saved off during setTimestamp() @@ -315,7 +315,7 @@ describe("EVM Test", function () { it("Should set the string correctly and emit an event", async function () { await delay() - const txResponse = await evmTester.setStringVar("test"); + const txResponse = await evmTester.setStringVar("test", { gasPrice: ethers.parseUnits('100', 'gwei') }); const receipt = await txResponse.wait(); // Wait for the transaction to be mined const cosmosTx = await getCosmosTx(ethers.provider, receipt.hash) @@ -332,7 +332,7 @@ describe("EVM Test", function () { it("Should set the bytes correctly and emit an event", async function () { await delay() - const txResponse = await evmTester.setBytesVar(ethers.toUtf8Bytes("test")); + const txResponse = await evmTester.setBytesVar(ethers.toUtf8Bytes("test"), { gasPrice: ethers.parseUnits('100', 'gwei') }); await txResponse.wait(); await expect(txResponse) @@ -347,7 +347,7 @@ describe("EVM Test", function () { await delay() // Send the transaction and wait for it to be confirmed - const txResponse = await evmTester.setBalance(owner.address, testAmount); + const txResponse = await evmTester.setBalance(owner.address, testAmount, { gasPrice: ethers.parseUnits('100', 'gwei') }); await txResponse.wait(); await delay() // Now check the balance @@ -358,7 +358,7 @@ describe("EVM Test", function () { it("Should store and retrieve a private var correctly", async function () { const testAmount = 12345; await delay() - const txResponse = await evmTester.storeData(testAmount); + const txResponse = await evmTester.storeData(testAmount, { gasPrice: ethers.parseUnits('100', 'gwei') }); await txResponse.wait(); // Wait for the transaction to be mined await delay() const retrievedAmount = await evmTester.retrieveData(); @@ -379,7 +379,7 @@ describe("EVM Test", function () { describe("Assembly", function(){ it("Should add numbers correctly", async function () { - expect(await evmTester.addNumbers(10, 20)).to.equal(30); + expect(await evmTester.addNumbers(10, 20, { gasPrice: ethers.parseUnits('100', 'gwei') })).to.equal(30); }); it("Should return the current balance of the contract", async function () { @@ -392,7 +392,7 @@ describe("EVM Test", function () { it("Should return correct value from readFromStorage(index)", async function () { const testAmount = 12345; await delay() - const txResponse = await evmTester.storeData(testAmount); + const txResponse = await evmTester.storeData(testAmount, { gasPrice: ethers.parseUnits('100', 'gwei') }); await delay() await txResponse.wait(); // Wait for the transaction to be mined @@ -697,7 +697,7 @@ describe("EVM Test", function () { const numberOfEvents = 5; // check receipt - const txResponse = await evmTester.emitMultipleLogs(numberOfEvents); + const txResponse = await evmTester.emitMultipleLogs(numberOfEvents, { gasPrice: ethers.parseUnits('100', 'gwei') }); const receipt = await txResponse.wait(); expect(receipt.logs.length).to.equal(numberOfEvents) for(let i=0; i github.com/sei-protocol/sei-wasmd v0.2.4 github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 - github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.37-0.20240923023912-aa7a702d42cc + github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.39 github.com/cosmos/iavl => github.com/sei-protocol/sei-iavl v0.2.0 github.com/cosmos/ibc-go/v3 => github.com/sei-protocol/sei-ibc-go/v3 v3.3.2 github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.13.5-sei-23 diff --git a/go.sum b/go.sum index ecb9399e9d..9e29d9773d 100644 --- a/go.sum +++ b/go.sum @@ -1347,8 +1347,8 @@ github.com/sei-protocol/go-ethereum v1.13.5-sei-23 h1:rkgeOHC56QTco4mIyGd6cZHtlo github.com/sei-protocol/go-ethereum v1.13.5-sei-23/go.mod h1:kcRZmuzRn1lVejiFNTz4l4W7imnpq1bDAnuKS/RyhbQ= github.com/sei-protocol/goutils v0.0.2 h1:Bfa7Sv+4CVLNM20QcpvGb81B8C5HkQC/kW1CQpIbXDA= github.com/sei-protocol/goutils v0.0.2/go.mod h1:iYE2DuJfEnM+APPehr2gOUXfuLuPsVxorcDO+Tzq9q8= -github.com/sei-protocol/sei-cosmos v0.3.37-0.20240923023912-aa7a702d42cc h1:srWLbsoS0NYBIl8OjZOFuPmIeqf+fJTkfsK39MmG3+k= -github.com/sei-protocol/sei-cosmos v0.3.37-0.20240923023912-aa7a702d42cc/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk= +github.com/sei-protocol/sei-cosmos v0.3.39 h1:EaAoJNyN11MJCkgZG5D92UGXLy0X2NAPz0HltOHEBxk= +github.com/sei-protocol/sei-cosmos v0.3.39/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk= github.com/sei-protocol/sei-db v0.0.44 h1:HMgcyDTQlmXdJysHJxmIo66EKeXn1CSQT9qXDnxjJgI= github.com/sei-protocol/sei-db v0.0.44/go.mod h1:F/ZKZA8HJPcUzSZPA8yt6pfwlGriJ4RDR4eHKSGLStI= github.com/sei-protocol/sei-iavl v0.2.0 h1:OisPjXiDT+oe+aeckzDEFgkZCYuUjHgs/PP8DPicN+I= From 81c0d5f017f921e7b41ec8094b157900e8f318e1 Mon Sep 17 00:00:00 2001 From: Jeremy Wei Date: Wed, 23 Oct 2024 02:05:35 -0400 Subject: [PATCH 02/33] EIP-1559: Be resilient to target gas used 0 and cap gas used to gas limit (#1885) * eip-1559 fixes * fix * add test for capping gas used * fix linter * try to fix one insufficient fee * comment out other integration tests * Revert "comment out other integration tests" This reverts commit ac0a0e67b62c915248bc54bf63954a70792c56d9. * fix insufficient fee issue * fix insufficient fee issue * fix syntax issue --- contracts/test/ERC20toCW20PointerTest.js | 18 +++++++-------- .../contracts/evm/bindings/erc20/erc20.go | 1 - .../bindings/univ2_swapper/univ2_swapper.go | 1 - x/evm/keeper/fee.go | 10 +++++++- x/evm/keeper/fee_test.go | 23 +++++++++++++++++++ x/evm/types/params.go | 16 +------------ 6 files changed, 42 insertions(+), 27 deletions(-) diff --git a/contracts/test/ERC20toCW20PointerTest.js b/contracts/test/ERC20toCW20PointerTest.js index e64e088521..f19884e133 100644 --- a/contracts/test/ERC20toCW20PointerTest.js +++ b/contracts/test/ERC20toCW20PointerTest.js @@ -86,7 +86,7 @@ describe("ERC20 to CW20 Pointer", function () { }); describe("transfer()", function () { - it.only("should transfer", async function () { + it("should transfer", async function () { let sender = accounts[0]; let recipient = accounts[1]; @@ -194,7 +194,7 @@ describe("ERC20 to CW20 Pointer", function () { it("should lower approval", async function () { const owner = accounts[0].evmAddress; const spender = accounts[1].evmAddress; - const tx = await pointer.approve(spender, 0); + const tx = await pointer.approve(spender, 0, { gasPrice: ethers.parseUnits('100', 'gwei') }); await tx.wait(); const allowance = await pointer.allowance(owner, spender); expect(Number(allowance)).to.equal(0); @@ -204,21 +204,21 @@ describe("ERC20 to CW20 Pointer", function () { const owner = accounts[0].evmAddress; const spender = accounts[1].evmAddress; const maxUint128 = new BigNumber("0xffffffffffffffffffffffffffffffff", 16); - const tx = await pointer.approve(spender, maxUint128.toFixed()); + const tx = await pointer.approve(spender, maxUint128.toFixed(), { gasPrice: ethers.parseUnits('100', 'gwei') }); await tx.wait(); const allowance = await pointer.allowance(owner, spender); expect(allowance).to.equal(maxUint128.toFixed()); // approving uint128 max int + 1 should work but only approve uint128 const maxUint128Plus1 = maxUint128.plus(1); - const tx128plus1 = await pointer.approve(spender, maxUint128Plus1.toFixed()); + const tx128plus1 = await pointer.approve(spender, maxUint128Plus1.toFixed(), { gasPrice: ethers.parseUnits('100', 'gwei') }); await tx128plus1.wait(); const allowance128plus1 = await pointer.allowance(owner, spender); expect(allowance128plus1).to.equal(maxUint128.toFixed()); // approving uint256 should also work but only approve uint128 const maxUint256 = new BigNumber("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", 16); - const tx256 = await pointer.approve(spender, maxUint256.toFixed()); + const tx256 = await pointer.approve(spender, maxUint256.toFixed(), { gasPrice: ethers.parseUnits('100', 'gwei') }); await tx256.wait(); const allowance256 = await pointer.allowance(owner, spender); expect(allowance256).to.equal(maxUint128.toFixed()); @@ -244,7 +244,7 @@ describe("ERC20 to CW20 Pointer", function () { expect(Number(allowanceBefore)).to.be.greaterThanOrEqual(amountToTransfer); // transfer - const tfTx = await pointer.connect(spender.signer).transferFrom(owner.evmAddress, recipient.evmAddress, amountToTransfer); + const tfTx = await pointer.connect(spender.signer).transferFrom(owner.evmAddress, recipient.evmAddress, amountToTransfer, { gasPrice: ethers.parseUnits('100', 'gwei') }); const receipt = await tfTx.wait(); // capture balances after @@ -280,12 +280,12 @@ describe("ERC20 to CW20 Pointer", function () { const owner = accounts[0]; const spender = accounts[1]; - const tx = await pointer.approve(spender.evmAddress, 10); + const tx = await pointer.approve(spender.evmAddress, 10, { gasPrice: ethers.parseUnits('100', 'gwei') }); await tx.wait(); - await expect(pointer.connect(spender.signer).transferFrom(owner.evmAddress, recipient.evmAddress, 20)).to.be.revertedWith("CosmWasm execute failed"); + await expect(pointer.connect(spender.signer).transferFrom(owner.evmAddress, recipient.evmAddress, 20, { gasPrice: ethers.parseUnits('100', 'gwei') })).to.be.revertedWith("CosmWasm execute failed"); // put it back - await (await pointer.approve(spender.evmAddress, 0)).wait() + await (await pointer.approve(spender.evmAddress, 0, { gasPrice: ethers.parseUnits('100', 'gwei') })).wait() }); }); }); diff --git a/loadtest/contracts/evm/bindings/erc20/erc20.go b/loadtest/contracts/evm/bindings/erc20/erc20.go index 5f225c93f2..41e41bd729 100644 --- a/loadtest/contracts/evm/bindings/erc20/erc20.go +++ b/loadtest/contracts/evm/bindings/erc20/erc20.go @@ -757,4 +757,3 @@ func (_Erc20 *Erc20Filterer) ParseTransfer(log types.Log) (*Erc20Transfer, error event.Raw = log return event, nil } - diff --git a/loadtest/contracts/evm/bindings/univ2_swapper/univ2_swapper.go b/loadtest/contracts/evm/bindings/univ2_swapper/univ2_swapper.go index abd7c47f58..abebc6abf4 100644 --- a/loadtest/contracts/evm/bindings/univ2_swapper/univ2_swapper.go +++ b/loadtest/contracts/evm/bindings/univ2_swapper/univ2_swapper.go @@ -324,4 +324,3 @@ func (_Univ2Swapper *Univ2SwapperSession) Swap() (*types.Transaction, error) { func (_Univ2Swapper *Univ2SwapperTransactorSession) Swap() (*types.Transaction, error) { return _Univ2Swapper.Contract.Swap(&_Univ2Swapper.TransactOpts) } - diff --git a/x/evm/keeper/fee.go b/x/evm/keeper/fee.go index f53631c02d..b00e7912a7 100644 --- a/x/evm/keeper/fee.go +++ b/x/evm/keeper/fee.go @@ -11,10 +11,18 @@ func (k *Keeper) AdjustDynamicBaseFeePerGas(ctx sdk.Context, blockGasUsed uint64 return nil } currentBaseFee := k.GetDynamicBaseFeePerGas(ctx) + targetGasUsed := sdk.NewDec(int64(k.GetTargetGasUsedPerBlock(ctx))) + if targetGasUsed.IsZero() { + return ¤tBaseFee + } minimumFeePerGas := k.GetParams(ctx).MinimumFeePerGas blockGasLimit := sdk.NewDec(ctx.ConsensusParams().Block.MaxGas) blockGasUsedDec := sdk.NewDec(int64(blockGasUsed)) - targetGasUsed := sdk.NewDec(int64(k.GetTargetGasUsedPerBlock(ctx))) + + // cap block gas used to block gas limit + if blockGasUsedDec.GT(blockGasLimit) { + blockGasUsedDec = blockGasLimit + } var newBaseFee sdk.Dec if blockGasUsedDec.GT(targetGasUsed) { diff --git a/x/evm/keeper/fee_test.go b/x/evm/keeper/fee_test.go index 83f3e2fb07..981a4b2bb5 100644 --- a/x/evm/keeper/fee_test.go +++ b/x/evm/keeper/fee_test.go @@ -109,6 +109,29 @@ func TestAdjustBaseFeePerGas(t *testing.T) { targetGasUsed: 500000, expectedBaseFee: 99, // Should not go below the minimum fee }, + { + name: "target gas used is 0", + currentBaseFee: 10000, + minimumFee: 10, + blockGasUsed: 0, + blockGasLimit: 1000000, + upwardAdj: sdk.NewDecWithPrec(5, 1), + downwardAdj: sdk.NewDecWithPrec(5, 1), + targetGasUsed: 0, + expectedBaseFee: 10000, + }, + { + name: "cap block gas used to block gas limit", + // block gas used is 1.5x block gas limit + currentBaseFee: 10000, + minimumFee: 10, + blockGasUsed: 1500000, + blockGasLimit: 1000000, + upwardAdj: sdk.NewDecWithPrec(5, 1), + downwardAdj: sdk.NewDecWithPrec(5, 1), + targetGasUsed: 500000, + expectedBaseFee: 15000, + }, } for _, tc := range testCases { diff --git a/x/evm/types/params.go b/x/evm/types/params.go index 946bfb4675..905f9234b7 100644 --- a/x/evm/types/params.go +++ b/x/evm/types/params.go @@ -64,7 +64,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyMinFeePerGas, &p.MinimumFeePerGas, validateMinFeePerGas), paramtypes.NewParamSetPair(KeyWhitelistedCwCodeHashesForDelegateCall, &p.WhitelistedCwCodeHashesForDelegateCall, validateWhitelistedCwHashesForDelegateCall), paramtypes.NewParamSetPair(KeyDeliverTxHookWasmGasLimit, &p.DeliverTxHookWasmGasLimit, validateDeliverTxHookWasmGasLimit), - paramtypes.NewParamSetPair(KeyTargetGasUsedPerBlock, &p.TargetGasUsedPerBlock, validateTargetGasUsedPerBlock), + paramtypes.NewParamSetPair(KeyTargetGasUsedPerBlock, &p.TargetGasUsedPerBlock, func(i interface{}) error { return nil }), } } @@ -90,23 +90,9 @@ func (p Params) Validate() error { if err := validateBaseFeeAdjustment(p.MaxDynamicBaseFeeDownwardAdjustment); err != nil { return fmt.Errorf("invalid max dynamic base fee downward adjustment: %s, err: %s", p.MaxDynamicBaseFeeDownwardAdjustment, err) } - if err := validateTargetGasUsedPerBlock(p.TargetGasUsedPerBlock); err != nil { - return err - } return validateWhitelistedCwHashesForDelegateCall(p.WhitelistedCwCodeHashesForDelegateCall) } -func validateTargetGasUsedPerBlock(i interface{}) error { - v, ok := i.(uint64) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - if v == 0 { - return fmt.Errorf("invalid target gas used per block: must be greater than 0, got %d", v) - } - return nil -} - func validateBaseFeeAdjustment(i interface{}) error { adjustment, ok := i.(sdk.Dec) if !ok { From 32c89cdda9a5c34383d39b0c549f0a63e2d27b6d Mon Sep 17 00:00:00 2001 From: Philip Su Date: Mon, 28 Oct 2024 09:14:41 -0700 Subject: [PATCH 03/33] Use limited wasm gas meter (#1905) * Use limited wasm gas meter * Add rev * disable other integ tests * re-enable tests --- app/receipt.go | 4 ++-- contracts/test/ERC20toCW20PointerTest.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/receipt.go b/app/receipt.go index 127444ba61..6ba273d213 100644 --- a/app/receipt.go +++ b/app/receipt.go @@ -39,8 +39,8 @@ func (app *App) AddCosmosEventsToEVMReceiptIfApplicable(ctx sdk.Context, tx sdk. return } logs := []*ethtypes.Log{} - // wasmGasLimit := app.EvmKeeper.GetDeliverTxHookWasmGasLimit(ctx) - queryCtx := ctx.WithGasMeter(sdk.NewInfiniteGasMeter(1, 1)) + wasmGasLimit := app.EvmKeeper.GetDeliverTxHookWasmGasLimit(ctx) + queryCtx := ctx.WithGasMeter(sdk.NewGasMeterWithMultiplier(ctx, wasmGasLimit)) for _, wasmEvent := range wasmEvents { contractAddr, found := GetAttributeValue(wasmEvent, wasmtypes.AttributeKeyContractAddr) if !found { diff --git a/contracts/test/ERC20toCW20PointerTest.js b/contracts/test/ERC20toCW20PointerTest.js index f19884e133..aca3b48dd4 100644 --- a/contracts/test/ERC20toCW20PointerTest.js +++ b/contracts/test/ERC20toCW20PointerTest.js @@ -86,7 +86,7 @@ describe("ERC20 to CW20 Pointer", function () { }); describe("transfer()", function () { - it("should transfer", async function () { + it.only("should transfer", async function () { let sender = accounts[0]; let recipient = accounts[1]; From 6a3c5f30a5734a192832e2399f025ee10ae4041c Mon Sep 17 00:00:00 2001 From: yirenz Date: Wed, 30 Oct 2024 12:02:39 -0400 Subject: [PATCH 04/33] refactor: use wasm-to-evm gas limit for all interop operations (#1912) * refactor: use wasm-to-evm gas limit for all interop operations * fix cosmos dependency * add large number wasm events note --- app/receipt.go | 27 ++++++++++++++------------- app/seidb.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- tools/migration/sc/migrator.go | 2 +- 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/app/receipt.go b/app/receipt.go index 6ba273d213..02a987c8ec 100644 --- a/app/receipt.go +++ b/app/receipt.go @@ -39,17 +39,18 @@ func (app *App) AddCosmosEventsToEVMReceiptIfApplicable(ctx sdk.Context, tx sdk. return } logs := []*ethtypes.Log{} - wasmGasLimit := app.EvmKeeper.GetDeliverTxHookWasmGasLimit(ctx) - queryCtx := ctx.WithGasMeter(sdk.NewGasMeterWithMultiplier(ctx, wasmGasLimit)) + // Note: txs with a very large number of WASM events may run out of gas due to + // additional gas consumption from EVM receipt generation and event translation + wasmToEvmEventGasLimit := app.EvmKeeper.GetDeliverTxHookWasmGasLimit(ctx.WithGasMeter(sdk.NewInfiniteGasMeter(1, 1))) + wasmToEvmEventCtx := ctx.WithGasMeter(sdk.NewGasMeterWithMultiplier(ctx, wasmToEvmEventGasLimit)) for _, wasmEvent := range wasmEvents { contractAddr, found := GetAttributeValue(wasmEvent, wasmtypes.AttributeKeyContractAddr) if !found { continue } - // check if there is a ERC20 pointer to contractAddr - pointerAddr, _, exists := app.EvmKeeper.GetERC20CW20Pointer(queryCtx, contractAddr) + pointerAddr, _, exists := app.EvmKeeper.GetERC20CW20Pointer(wasmToEvmEventCtx, contractAddr) if exists { - log, eligible := app.translateCW20Event(queryCtx, wasmEvent, pointerAddr, contractAddr) + log, eligible := app.translateCW20Event(wasmToEvmEventCtx, wasmEvent, pointerAddr, contractAddr) if eligible { log.Index = uint(len(logs)) logs = append(logs, log) @@ -57,9 +58,9 @@ func (app *App) AddCosmosEventsToEVMReceiptIfApplicable(ctx sdk.Context, tx sdk. continue } // check if there is a ERC721 pointer to contract Addr - pointerAddr, _, exists = app.EvmKeeper.GetERC721CW721Pointer(queryCtx, contractAddr) + pointerAddr, _, exists = app.EvmKeeper.GetERC721CW721Pointer(wasmToEvmEventCtx, contractAddr) if exists { - log, eligible := app.translateCW721Event(queryCtx, wasmEvent, pointerAddr, contractAddr) + log, eligible := app.translateCW721Event(wasmToEvmEventCtx, wasmEvent, pointerAddr, contractAddr) if eligible { log.Index = uint(len(logs)) logs = append(logs, log) @@ -75,14 +76,14 @@ func (app *App) AddCosmosEventsToEVMReceiptIfApplicable(ctx sdk.Context, tx sdk. txHash = common.HexToHash(response.EvmTxInfo.TxHash) } var bloom ethtypes.Bloom - if r, err := app.EvmKeeper.GetTransientReceipt(ctx, txHash); err == nil && r != nil { + if r, err := app.EvmKeeper.GetTransientReceipt(wasmToEvmEventCtx, txHash); err == nil && r != nil { r.Logs = append(r.Logs, utils.Map(logs, evmkeeper.ConvertSyntheticEthLog)...) for i, l := range r.Logs { l.Index = uint32(i) } bloom = ethtypes.CreateBloom(ethtypes.Receipts{ðtypes.Receipt{Logs: evmkeeper.GetLogsForTx(r)}}) r.LogsBloom = bloom[:] - _ = app.EvmKeeper.SetTransientReceipt(ctx, txHash, r) + _ = app.EvmKeeper.SetTransientReceipt(wasmToEvmEventCtx, txHash, r) } else { bloom = ethtypes.CreateBloom(ethtypes.Receipts{ðtypes.Receipt{Logs: logs}}) receipt := &evmtypes.Receipt{ @@ -98,14 +99,14 @@ func (app *App) AddCosmosEventsToEVMReceiptIfApplicable(ctx sdk.Context, tx sdk. sigTx, ok := tx.(authsigning.SigVerifiableTx) if ok && len(sigTx.GetSigners()) > 0 { // use the first signer as the `from` - receipt.From = app.EvmKeeper.GetEVMAddressOrDefault(ctx, sigTx.GetSigners()[0]).Hex() + receipt.From = app.EvmKeeper.GetEVMAddressOrDefault(wasmToEvmEventCtx, sigTx.GetSigners()[0]).Hex() } - _ = app.EvmKeeper.SetTransientReceipt(ctx, txHash, receipt) + _ = app.EvmKeeper.SetTransientReceipt(wasmToEvmEventCtx, txHash, receipt) } if d, found := app.EvmKeeper.GetEVMTxDeferredInfo(ctx); found { - app.EvmKeeper.AppendToEvmTxDeferredInfo(ctx, bloom, txHash, d.Surplus) + app.EvmKeeper.AppendToEvmTxDeferredInfo(wasmToEvmEventCtx, bloom, txHash, d.Surplus) } else { - app.EvmKeeper.AppendToEvmTxDeferredInfo(ctx, bloom, txHash, sdk.ZeroInt()) + app.EvmKeeper.AppendToEvmTxDeferredInfo(wasmToEvmEventCtx, bloom, txHash, sdk.ZeroInt()) } } diff --git a/app/seidb.go b/app/seidb.go index a506146394..d51aadc6e6 100644 --- a/app/seidb.go +++ b/app/seidb.go @@ -56,7 +56,7 @@ func SetupSeiDB( // cms must be overridden before the other options, because they may use the cms, // make sure the cms aren't be overridden by the other options later on. - cms := rootmulti.NewStore(homePath, logger, scConfig, ssConfig) + cms := rootmulti.NewStore(homePath, logger, scConfig, ssConfig, false) baseAppOptions = append([]func(*baseapp.BaseApp){ func(baseApp *baseapp.BaseApp) { baseApp.SetCMS(cms) diff --git a/go.mod b/go.mod index ba4e98156b..d02d3f8a34 100644 --- a/go.mod +++ b/go.mod @@ -346,7 +346,7 @@ require ( replace ( github.com/CosmWasm/wasmd => github.com/sei-protocol/sei-wasmd v0.2.4 github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 - github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.39 + github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.41 github.com/cosmos/iavl => github.com/sei-protocol/sei-iavl v0.2.0 github.com/cosmos/ibc-go/v3 => github.com/sei-protocol/sei-ibc-go/v3 v3.3.2 github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.13.5-sei-23 diff --git a/go.sum b/go.sum index 9e29d9773d..1d4d9e7dbb 100644 --- a/go.sum +++ b/go.sum @@ -1347,8 +1347,8 @@ github.com/sei-protocol/go-ethereum v1.13.5-sei-23 h1:rkgeOHC56QTco4mIyGd6cZHtlo github.com/sei-protocol/go-ethereum v1.13.5-sei-23/go.mod h1:kcRZmuzRn1lVejiFNTz4l4W7imnpq1bDAnuKS/RyhbQ= github.com/sei-protocol/goutils v0.0.2 h1:Bfa7Sv+4CVLNM20QcpvGb81B8C5HkQC/kW1CQpIbXDA= github.com/sei-protocol/goutils v0.0.2/go.mod h1:iYE2DuJfEnM+APPehr2gOUXfuLuPsVxorcDO+Tzq9q8= -github.com/sei-protocol/sei-cosmos v0.3.39 h1:EaAoJNyN11MJCkgZG5D92UGXLy0X2NAPz0HltOHEBxk= -github.com/sei-protocol/sei-cosmos v0.3.39/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk= +github.com/sei-protocol/sei-cosmos v0.3.41 h1:w5ekTGC5J/7kxJhRkfdHk2KWOqi1zhic0gOXNm6W5vI= +github.com/sei-protocol/sei-cosmos v0.3.41/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk= github.com/sei-protocol/sei-db v0.0.44 h1:HMgcyDTQlmXdJysHJxmIo66EKeXn1CSQT9qXDnxjJgI= github.com/sei-protocol/sei-db v0.0.44/go.mod h1:F/ZKZA8HJPcUzSZPA8yt6pfwlGriJ4RDR4eHKSGLStI= github.com/sei-protocol/sei-iavl v0.2.0 h1:OisPjXiDT+oe+aeckzDEFgkZCYuUjHgs/PP8DPicN+I= diff --git a/tools/migration/sc/migrator.go b/tools/migration/sc/migrator.go index 5eec43a622..b4d66e85c0 100644 --- a/tools/migration/sc/migrator.go +++ b/tools/migration/sc/migrator.go @@ -77,7 +77,7 @@ func NewMigrator(homeDir string, db dbm.DB) *Migrator { scConfig.Enable = true ssConfig := config.DefaultStateStoreConfig() ssConfig.Enable = false - cmsV2 := rootmulti2.NewStore(homeDir, logger, scConfig, ssConfig) + cmsV2 := rootmulti2.NewStore(homeDir, logger, scConfig, ssConfig, false) for _, key := range Keys { cmsV2.MountStoreWithDB(key, sdk.StoreTypeIAVL, db) } From 97346a2abd83eba7b2f03d500794aea976eccb35 Mon Sep 17 00:00:00 2001 From: codchen Date: Thu, 31 Oct 2024 01:16:51 +0800 Subject: [PATCH 05/33] stop flushing deferred info into receipt store (#1909) Co-authored-by: Philip Su --- x/evm/keeper/receipt.go | 5 +++-- x/evm/keeper/receipt_test.go | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/x/evm/keeper/receipt.go b/x/evm/keeper/receipt.go index 1f01342097..69f0c38186 100644 --- a/x/evm/keeper/receipt.go +++ b/x/evm/keeper/receipt.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/iavl" "github.com/ethereum/go-ethereum/common" @@ -91,12 +92,12 @@ func (k *Keeper) MockReceipt(ctx sdk.Context, txHash common.Hash, receipt *types } func (k *Keeper) FlushTransientReceipts(ctx sdk.Context) error { - iter := ctx.TransientStore(k.transientStoreKey).Iterator(nil, nil) + iter := prefix.NewStore(ctx.TransientStore(k.transientStoreKey), types.ReceiptKeyPrefix).Iterator(nil, nil) defer iter.Close() var pairs []*iavl.KVPair var changesets []*proto.NamedChangeSet for ; iter.Valid(); iter.Next() { - kvPair := &iavl.KVPair{Key: iter.Key(), Value: iter.Value()} + kvPair := &iavl.KVPair{Key: types.ReceiptKey(common.Hash(iter.Key())), Value: iter.Value()} pairs = append(pairs, kvPair) } if len(pairs) == 0 { diff --git a/x/evm/keeper/receipt_test.go b/x/evm/keeper/receipt_test.go index 7f96e66cdc..3dd7aa6cec 100644 --- a/x/evm/keeper/receipt_test.go +++ b/x/evm/keeper/receipt_test.go @@ -3,7 +3,9 @@ package keeper_test import ( "testing" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" testkeeper "github.com/sei-protocol/sei-chain/testutil/keeper" "github.com/sei-protocol/sei-chain/x/evm/types" "github.com/stretchr/testify/require" @@ -16,7 +18,10 @@ func TestReceipt(t *testing.T) { _, err := k.GetReceipt(ctx, txHash) require.NotNil(t, err) k.MockReceipt(ctx, txHash, &types.Receipt{TxHashHex: txHash.Hex()}) + k.AppendToEvmTxDeferredInfo(ctx, ethtypes.Bloom{}, common.Hash{1}, sdk.NewInt(1)) // make sure this isn't flushed into receipt store r, err := k.GetReceipt(ctx, txHash) require.Nil(t, err) require.Equal(t, txHash.Hex(), r.TxHashHex) + _, err = k.GetReceipt(ctx, common.Hash{1}) + require.Equal(t, "not found", err.Error()) } From dd940e568bcfaa9d00388a9b499106c21a8ed30c Mon Sep 17 00:00:00 2001 From: Kartik Bhat Date: Wed, 30 Oct 2024 14:13:40 -0400 Subject: [PATCH 06/33] Archive Node Online Migration (#1863) * Archive Node Online Migration * Add migrate-iavl flag for online migration * Update sei cosmos * Add QMS for online migration (#1870) * Add QMS for online migration * Fix lint --------- Co-authored-by: kbhat1 * Add migrate-height flag to start cmd * Bump seidb * Reduce logging * Archive Migration doc * Update form * Update * Export metric * latest height * Update start module logic * Remove migrate SS command * Enable ss store * Update archive node migration docs * More migration doc updates * Update metrics in readme * Merge main * Remove dex * Add Faq section * Add requirements section * Systemd instructions * Minor add to readme * Add more examples for migration height * Bump sei cosmos * Update error log * Update command sc migration background --------- Co-authored-by: Yiming Zang <50607998+yzang2019@users.noreply.github.com> --- app/app.go | 7 +- app/seidb.go | 18 +- app/test_state_store.go | 20 ++ cmd/seid/cmd/root.go | 20 +- docs/migration/seidb_archive_migration.md | 212 ++++++++++++++++++++++ go.mod | 2 +- go.sum | 4 +- tools/migration/cmd/cmd.go | 41 ++--- tools/migration/sc/migrator.go | 6 +- tools/migration/ss/migrator.go | 121 +++++++----- 10 files changed, 369 insertions(+), 82 deletions(-) create mode 100644 docs/migration/seidb_archive_migration.md diff --git a/app/app.go b/app/app.go index a159cfd56e..00aa5fe32f 100644 --- a/app/app.go +++ b/app/app.go @@ -368,6 +368,7 @@ type App struct { genesisImportConfig genesistypes.GenesisImportConfig + stateStore seidb.StateStore receiptStore seidb.StateStore } @@ -396,7 +397,7 @@ func New( cdc := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry - bAppOptions := SetupSeiDB(logger, homePath, appOpts, baseAppOptions) + bAppOptions, stateStore := SetupSeiDB(logger, homePath, appOpts, baseAppOptions) bApp := baseapp.NewBaseApp(AppName, logger, db, encodingConfig.TxConfig.TxDecoder(), tmConfig, appOpts, bAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) @@ -429,6 +430,7 @@ func New( versionInfo: version.NewInfo(), metricCounter: &map[string]float32{}, encodingConfig: encodingConfig, + stateStore: stateStore, } for _, option := range appOptions { @@ -1064,6 +1066,9 @@ func (app *App) Name() string { return app.BaseApp.Name() } // GetBaseApp returns the base app of the application func (app App) GetBaseApp() *baseapp.BaseApp { return app.BaseApp } +// GetStateStore returns the state store of the application +func (app App) GetStateStore() seidb.StateStore { return app.stateStore } + // BeginBlocker application updates every begin block func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { metrics.GaugeSeidVersionAndCommit(app.versionInfo.Version, app.versionInfo.GitCommit) diff --git a/app/seidb.go b/app/seidb.go index d51aadc6e6..175d5c1a43 100644 --- a/app/seidb.go +++ b/app/seidb.go @@ -7,6 +7,7 @@ import ( servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/storev2/rootmulti" "github.com/sei-protocol/sei-db/config" + seidb "github.com/sei-protocol/sei-db/ss/types" "github.com/spf13/cast" "github.com/tendermint/tendermint/libs/log" ) @@ -33,6 +34,8 @@ const ( // Other configs FlagSnapshotInterval = "state-sync.snapshot-interval" + FlagMigrateIAVL = "migrate-iavl" + FlagMigrateHeight = "migrate-height" ) func SetupSeiDB( @@ -40,11 +43,11 @@ func SetupSeiDB( homePath string, appOpts servertypes.AppOptions, baseAppOptions []func(*baseapp.BaseApp), -) []func(*baseapp.BaseApp) { +) ([]func(*baseapp.BaseApp), seidb.StateStore) { scEnabled := cast.ToBool(appOpts.Get(FlagSCEnable)) if !scEnabled { logger.Info("SeiDB is disabled, falling back to IAVL") - return baseAppOptions + return baseAppOptions, nil } logger.Info("SeiDB SC is enabled, running node with StoreV2 commit store") scConfig := parseSCConfigs(appOpts) @@ -56,14 +59,21 @@ func SetupSeiDB( // cms must be overridden before the other options, because they may use the cms, // make sure the cms aren't be overridden by the other options later on. - cms := rootmulti.NewStore(homePath, logger, scConfig, ssConfig, false) + cms := rootmulti.NewStore(homePath, logger, scConfig, ssConfig, cast.ToBool(appOpts.Get("migrate-iavl"))) + migrationEnabled := cast.ToBool(appOpts.Get(FlagMigrateIAVL)) + migrationHeight := cast.ToInt64(appOpts.Get(FlagMigrateHeight)) baseAppOptions = append([]func(*baseapp.BaseApp){ func(baseApp *baseapp.BaseApp) { + if migrationEnabled { + originalCMS := baseApp.CommitMultiStore() + baseApp.SetQueryMultiStore(originalCMS) + baseApp.SetMigrationHeight(migrationHeight) + } baseApp.SetCMS(cms) }, }, baseAppOptions...) - return baseAppOptions + return baseAppOptions, cms.GetStateStore() } func parseSCConfigs(appOpts servertypes.AppOptions) config.StateCommitConfig { diff --git a/app/test_state_store.go b/app/test_state_store.go index 15b4d63e1a..a5b0711450 100644 --- a/app/test_state_store.go +++ b/app/test_state_store.go @@ -244,6 +244,26 @@ func (s *InMemoryStateStore) RawImport(ch <-chan types.RawSnapshotNode) error { return nil } +func (s *InMemoryStateStore) SetLatestMigratedModule(module string) error { + // TODO: Add set call here + return nil +} + +func (s *InMemoryStateStore) GetLatestMigratedModule() (string, error) { + // TODO: Add get call here + return "", nil +} + +func (s *InMemoryStateStore) SetLatestMigratedKey(key []byte) error { + // TODO: Add set call here + return nil +} + +func (s *InMemoryStateStore) GetLatestMigratedKey() ([]byte, error) { + // TODO: Add get call here + return nil, nil +} + func (s *InMemoryStateStore) Prune(version int64) error { s.mu.Lock() defer s.mu.Unlock() diff --git a/cmd/seid/cmd/root.go b/cmd/seid/cmd/root.go index df8ed1fe1d..81c7f8203f 100644 --- a/cmd/seid/cmd/root.go +++ b/cmd/seid/cmd/root.go @@ -38,6 +38,7 @@ import ( "github.com/sei-protocol/sei-chain/app/params" "github.com/sei-protocol/sei-chain/evmrpc" "github.com/sei-protocol/sei-chain/tools" + "github.com/sei-protocol/sei-chain/tools/migration/ss" "github.com/sei-protocol/sei-chain/x/evm/blocktest" "github.com/sei-protocol/sei-chain/x/evm/querier" "github.com/sei-protocol/sei-chain/x/evm/replay" @@ -220,6 +221,8 @@ func txCommand() *cobra.Command { func addModuleInitFlags(startCmd *cobra.Command) { crisis.AddModuleInitFlags(startCmd) + startCmd.Flags().Bool("migrate-iavl", false, "Run migration of IAVL data store to SeiDB State Store") + startCmd.Flags().Int64("migrate-height", 0, "Height at which to start the migration") } // newApp creates a new Cosmos SDK app @@ -266,7 +269,7 @@ func newApp( // This makes it such that the wasm VM gas converts to sdk gas at a 6.66x rate vs that of the previous multiplier wasmGasRegisterConfig.GasMultiplier = 21_000_000 - return app.New( + app := app.New( logger, db, traceStore, @@ -302,6 +305,21 @@ func newApp( baseapp.SetSnapshotDirectory(cast.ToString(appOpts.Get(server.FlagStateSyncSnapshotDir))), baseapp.SetOccEnabled(cast.ToBool(appOpts.Get(baseapp.FlagOccEnabled))), ) + + // Start migration if --migrate flag is set + if cast.ToBool(appOpts.Get("migrate-iavl")) { + go func() { + homeDir := cast.ToString(appOpts.Get(flags.FlagHome)) + stateStore := app.GetStateStore() + migrationHeight := cast.ToInt64(appOpts.Get("migrate-height")) + migrator := ss.NewMigrator(homeDir, db, stateStore) + if err := migrator.Migrate(migrationHeight, homeDir); err != nil { + panic(err) + } + }() + } + + return app } // appExport creates a new simapp (optionally at a given height) diff --git a/docs/migration/seidb_archive_migration.md b/docs/migration/seidb_archive_migration.md new file mode 100644 index 0000000000..9d27479518 --- /dev/null +++ b/docs/migration/seidb_archive_migration.md @@ -0,0 +1,212 @@ +# SeiDB Archive Migration Guide + +## Overview +SeiDB is the next generation of chain storage in SeiV2. +One issue for running SeiDB on archive nodes is that we need to keep the full state of the chain, so we can't +state sync it and clear out previous iavl data. + +In order to run an archive node with SeiDB, we need to run a migration from iavl to sei-db. + +The overall process will work as follows: + +1. Update config to enable SeiDB (state committment + state store) +2. Stop the node and Run SC Migration +3. Note down MIGRATION_HEIGHT +4. Re start seid with `--migrate-iavl` enabled (migrating state store in background) +5. Verify migration at various sampled heights once state store is complete +6. Restart seid normally and verify node runs properly +7. Clear out iavl and restart seid normally, now only using SeiDB fully + + +## Requirements + +### Additional Disk Space + +Ensure you have at least 10TB of free disk space available for the migration process. This extra space is needed because during migration, both IAVL and SeiDB state stores will exist simultaneously. Note +that this is ONLY during the migration process, and will not be necessary after completion + + +## Migration Steps + +### Step 1: Add SeiDB Configurations +We can enable SeiDB by adding the following configs to app.toml file. +Usually you can find this file under ~/.sei/config/app.toml. +```bash +############################################################################# +### SeiDB Configuration ### +############################################################################# + +[state-commit] +# Enable defines if the SeiDB should be enabled to override existing IAVL db backend. +sc-enable = true + +# AsyncCommitBuffer defines the size of asynchronous commit queue, this greatly improve block catching-up +# performance, <=0 means synchronous commit. +sc-async-commit-buffer = 100 + +# SnapshotKeepRecent defines how many memiavl snapshots (beyond the latest one) to keep +# Recommend to set to 1 to make sure IBC relayers work. +sc-keep-recent = 1 + +# SnapshotInterval defines the number of blocks interval the memiavl snapshot is taken, default to 10000 blocks. +# Adjust based on your needs: +# Setting this too low could lead to lot of extra heavy disk IO +# Setting this too high could lead to slow restart +sc-snapshot-interval = 10000 + +# SnapshotWriterLimit defines the max concurrency for taking memiavl snapshot +sc-snapshot-writer-limit = 1 + +# CacheSize defines the size of the LRU cache for each store on top of the tree, default to 100000. +sc-cache-size = 100000 + +[state-store] +# Enable defines if the state-store should be enabled for historical queries. +# In order to use state-store, you need to make sure to enable state-commit at the same time. +# Validator nodes should turn this off. +# State sync node or full nodes should turn this on. +ss-enable = true + +# DBBackend defines the backend database used for state-store. +# Supported backends: pebbledb, rocksdb +# defaults to pebbledb (recommended) +ss-backend = "pebbledb" + +# AsyncWriteBuffer defines the async queue length for commits to be applied to State Store +# Set <= 0 for synchronous writes, which means commits also need to wait for data to be persisted in State Store. +# defaults to 100 +ss-async-write-buffer = 100 + +# KeepRecent defines the number of versions to keep in state store +# Setting it to 0 means keep everything, default to 100000 +ss-keep-recent = 0 + +# PruneIntervalSeconds defines the minimum interval in seconds + some random delay to trigger pruning. +# It is more efficient to trigger pruning less frequently with large interval. +# default to 600 seconds +ss-prune-interval = 600 + +# ImportNumWorkers defines the concurrency for state sync import +# defaults to 1 +ss-import-num-workers = 1 +``` + + +### Step 2: Stop the node and Run SC Migration + +```bash +systemctl stop seid +seid tools migrate-iavl --home-dir /root/.sei +``` + +You can also run this sc migration in the background: +```bash +seid tools migrate-iavl --home-dir /root/.sei > migrate-sc.log 2>&1 & +``` + +This may take a couple hours to run. You will see logs of form +`Start restoring SC store for height` + + +### Step 3: Note down MIGRATION_HEIGHT +Note down the latest height as outputted from the sc migration log. + +As an example the sc migration log would show: +``` +latest version: 111417590 +D[2024-10-29|15:26:03.657] Finished loading IAVL tree +D[2024-10-29|15:26:03.657] Finished loading IAVL tree +D[2024-10-29|15:26:03.657] Finished loading IAVL tree +``` + +Save that `latest version` (in example 111417590) as an env var $MIGRATION_HEIGHT. + +```bash +MIGRATION_HEIGHT=<> +``` + + +### Step 4: Restart seid with background SS migration + +If you are using systemd, make sure to update your service configuration to use this command. +Always be sure to run with these flags until migration is complete. +```bash +seid start --migrate-iavl --migrate-height $MIGRATION_HEIGHT --chain-id pacific-1 +``` + +Seid will run normally and the migration will run in the background. Data from iavl +will be written to SS and new writes will be directed at SS not iavl. + +You will see logs of form +`SeiDB Archive Migration: Iterating through %s module...` and +`SeiDB Archive Migration: Last 1,000,000 iterations took:...` + +NOTE: While this is running, any historical queries will be routed to iavl if +they are for a height BEFORE the migrate-height. Any queries on heights +AFTER the migrate-height will be routed to state store (pebbledb). + + +### Step 5: Verify State Store Migration after completion +Once State Store Migration is complete, you will see logs of form +`SeiDB Archive Migration: DB scanning completed. Total time taken:...` + +You DO NOT immediately need to do anything. Your node will continue to run +and will operate normally. However we added a verification tool that will iterate through +all keys in iavl at a specific height and verify they exist in State Store. + +You should run the following command for a selection of different heights +```bash +seid tools verify-migration --version $VERIFICATION_HEIGHT +``` + +This will output `Verification Succeeded` if the verification was successful. + + +### Step 6: Restart seid normally and verify node runs properly +Once the verification has completed, we can restart seid normally and verify +that the node operates. + +If you are using systemd, make sure to update your service configuration to use this command: +```bash +seid start --chain-id pacific-1 +``` + +Note how we are not using the `--migrate-iavl` and `--migration-height` flags. +We can let this run for a couple hours and verify node oeprates normally. + + +### Step 7: Clear out Iavl and restart seid +Once it has been confirmed that the node has been running normally, +we can proceed to clear out the iavl and restart seid normally. + +```bash +systemctl stop seid +rm -rf ~/.sei/data/application.db +seid start --chain-id pacific-1 +``` + + +## Metrics + +During the State Store Migration, there are exported metrics that are helpful to keep track of +the progress. + +`sei_migration_leaf_nodes_exported` keeps track of how many nodes have been exported from iavl. + +`sei_migration_nodes_imported` keeps track of how many nodes have been imported into SeiDB (pebbledb). + +Both of these metrics have a `module` label which indicates what module is currently being exported / imported. + + +## FAQ + +### Can the state store migration be stopped and restarted? + +The state store migration can be stopped and restarted at any time. The migration +process saves the latest `module` and `key` written to State Store (pebbledb) and will +automatically resume the migration from that latest key once restarted. + +All one needs to do is restart seid with the migration command as in step 4 +```bash +seid start --migrate-iavl --migrate-height $MIGRATION_HEIGHT --chain-id pacific-1 +``` diff --git a/go.mod b/go.mod index d02d3f8a34..9288ff9489 100644 --- a/go.mod +++ b/go.mod @@ -351,7 +351,7 @@ replace ( github.com/cosmos/ibc-go/v3 => github.com/sei-protocol/sei-ibc-go/v3 v3.3.2 github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.13.5-sei-23 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - github.com/sei-protocol/sei-db => github.com/sei-protocol/sei-db v0.0.44 + github.com/sei-protocol/sei-db => github.com/sei-protocol/sei-db v0.0.45 // Latest goleveldb is broken, we have to stick to this version github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 github.com/tendermint/tendermint => github.com/sei-protocol/sei-tendermint v0.3.9-0.20240926181940-e9348a908b27 diff --git a/go.sum b/go.sum index 1d4d9e7dbb..83baf47ccd 100644 --- a/go.sum +++ b/go.sum @@ -1349,8 +1349,8 @@ github.com/sei-protocol/goutils v0.0.2 h1:Bfa7Sv+4CVLNM20QcpvGb81B8C5HkQC/kW1CQp github.com/sei-protocol/goutils v0.0.2/go.mod h1:iYE2DuJfEnM+APPehr2gOUXfuLuPsVxorcDO+Tzq9q8= github.com/sei-protocol/sei-cosmos v0.3.41 h1:w5ekTGC5J/7kxJhRkfdHk2KWOqi1zhic0gOXNm6W5vI= github.com/sei-protocol/sei-cosmos v0.3.41/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk= -github.com/sei-protocol/sei-db v0.0.44 h1:HMgcyDTQlmXdJysHJxmIo66EKeXn1CSQT9qXDnxjJgI= -github.com/sei-protocol/sei-db v0.0.44/go.mod h1:F/ZKZA8HJPcUzSZPA8yt6pfwlGriJ4RDR4eHKSGLStI= +github.com/sei-protocol/sei-db v0.0.45 h1:95ygzGFMyvaGwEUmzlKi8MxwXfbluoNzbaIjy9zOG6o= +github.com/sei-protocol/sei-db v0.0.45/go.mod h1:m5g7p0QeAS3dNJHIl28zQpzOgxQmvYqPb7t4hwgIOCA= github.com/sei-protocol/sei-iavl v0.2.0 h1:OisPjXiDT+oe+aeckzDEFgkZCYuUjHgs/PP8DPicN+I= github.com/sei-protocol/sei-iavl v0.2.0/go.mod h1:qRf8QYUPfrAO7K6VDB2B2l/N7K5L76OorioGBcJBIbw= github.com/sei-protocol/sei-ibc-go/v3 v3.3.2 h1:BaMZ6gjwqe3R/5dLmcJ1TkSZ3omcWy2TjaAZAeOJH44= diff --git a/tools/migration/cmd/cmd.go b/tools/migration/cmd/cmd.go index d1ff27a28d..a29b6386d9 100644 --- a/tools/migration/cmd/cmd.go +++ b/tools/migration/cmd/cmd.go @@ -7,7 +7,10 @@ import ( "github.com/cosmos/cosmos-sdk/store/rootmulti" "github.com/sei-protocol/sei-chain/tools/migration/sc" "github.com/sei-protocol/sei-chain/tools/migration/ss" + "github.com/sei-protocol/sei-db/config" + sstypes "github.com/sei-protocol/sei-db/ss" "github.com/spf13/cobra" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" ) @@ -18,13 +21,11 @@ func MigrateCmd() *cobra.Command { Run: execute, } cmd.PersistentFlags().String("home-dir", "/root/.sei", "Sei home directory") - cmd.PersistentFlags().String("target-db", "", "Available options: [SS, SC]") return cmd } func execute(cmd *cobra.Command, _ []string) { homeDir, _ := cmd.Flags().GetString("home-dir") - target, _ := cmd.Flags().GetString("target-db") dataDir := filepath.Join(homeDir, "data") db, err := dbm.NewGoLevelDB("application", dataDir) if err != nil { @@ -32,16 +33,9 @@ func execute(cmd *cobra.Command, _ []string) { } latestVersion := rootmulti.GetLatestVersion(db) fmt.Printf("latest version: %d\n", latestVersion) - if target == "SS" { - if err = migrateSS(latestVersion, homeDir, db); err != nil { - panic(err) - } - } else if target == "SC" { - if err = migrateSC(latestVersion, homeDir, db); err != nil { - panic(err) - } - } else { - panic("Invalid target-db, either SS or SC should be provided") + + if err = migrateSC(latestVersion, homeDir, db); err != nil { + panic(err) } } @@ -50,16 +44,6 @@ func migrateSC(version int64, homeDir string, db dbm.DB) error { return migrator.Migrate(version) } -func migrateSS(version int64, homeDir string, db dbm.DB) error { - migrator := ss.NewMigrator(homeDir, db) - return migrator.Migrate(version, homeDir) -} - -func verifySS(version int64, homeDir string, db dbm.DB) error { - migrator := ss.NewMigrator(homeDir, db) - return migrator.Verify(version) -} - func VerifyMigrationCmd() *cobra.Command { cmd := &cobra.Command{ Use: "verify-migration", @@ -97,3 +81,16 @@ func verify(cmd *cobra.Command, _ []string) { fmt.Println("Verification Succeeded") } + +func verifySS(version int64, homeDir string, db dbm.DB) error { + ssConfig := config.DefaultStateStoreConfig() + ssConfig.Enable = true + + stateStore, err := sstypes.NewStateStore(log.NewNopLogger(), homeDir, ssConfig) + if err != nil { + return err + } + + migrator := ss.NewMigrator(homeDir, db, stateStore) + return migrator.Verify(version) +} diff --git a/tools/migration/sc/migrator.go b/tools/migration/sc/migrator.go index b4d66e85c0..debb1ffb7a 100644 --- a/tools/migration/sc/migrator.go +++ b/tools/migration/sc/migrator.go @@ -56,7 +56,7 @@ var Keys = sdk.NewKVStoreKeys( minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey, evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, oracletypes.StoreKey, - evmtypes.StoreKey, wasm.StoreKey, epochmoduletypes.StoreKey, tokenfactorytypes.StoreKey, "dex", + evmtypes.StoreKey, wasm.StoreKey, epochmoduletypes.StoreKey, tokenfactorytypes.StoreKey, ) func NewMigrator(homeDir string, db dbm.DB) *Migrator { @@ -76,8 +76,8 @@ func NewMigrator(homeDir string, db dbm.DB) *Migrator { scConfig := config.DefaultStateCommitConfig() scConfig.Enable = true ssConfig := config.DefaultStateStoreConfig() - ssConfig.Enable = false - cmsV2 := rootmulti2.NewStore(homeDir, logger, scConfig, ssConfig, false) + ssConfig.Enable = true + cmsV2 := rootmulti2.NewStore(homeDir, logger, scConfig, ssConfig, true) for _, key := range Keys { cmsV2.MountStoreWithDB(key, sdk.StoreTypeIAVL, db) } diff --git a/tools/migration/ss/migrator.go b/tools/migration/ss/migrator.go index cb4e42bfcc..e050d27ecd 100644 --- a/tools/migration/ss/migrator.go +++ b/tools/migration/ss/migrator.go @@ -3,12 +3,11 @@ package ss import ( "bytes" "fmt" + "time" + "github.com/armon/go-metrics" "github.com/cosmos/iavl" - "github.com/sei-protocol/sei-db/config" - "github.com/sei-protocol/sei-db/ss" "github.com/sei-protocol/sei-db/ss/types" - "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" ) @@ -26,16 +25,7 @@ var modules = []string{ "wasm", "aclaccesscontrol", "oracle", "epoch", "mint", "acc", "bank", "feegrant", "staking", "distribution", "slashing", "gov", "params", "ibc", "upgrade", "evidence", "transfer", "tokenfactory", } -func NewMigrator(homeDir string, db dbm.DB) *Migrator { - // TODO: Pass in more configs outside default, in particular ImportNumWorkers - ssConfig := config.DefaultStateStoreConfig() - ssConfig.Enable = true - - stateStore, err := ss.NewStateStore(log.NewNopLogger(), homeDir, ssConfig) - if err != nil { - panic(err) - } - +func NewMigrator(homeDir string, db dbm.DB, stateStore types.StateStore) *Migrator { return &Migrator{ iavlDB: db, stateStore: stateStore, @@ -43,36 +33,42 @@ func NewMigrator(homeDir string, db dbm.DB) *Migrator { } func (m *Migrator) Migrate(version int64, homeDir string) error { - // TODO: Read in capacity of this buffered channel as param ch := make(chan types.RawSnapshotNode, 1000) errCh := make(chan error, 2) - fmt.Println("Beginning Migration...") + // Get the latest key, if any, to resume from + latestKey, err := m.stateStore.GetLatestMigratedKey() + if err != nil { + return fmt.Errorf("failed to get latest key: %w", err) + } + + latestModule, err := m.stateStore.GetLatestMigratedModule() + if err != nil { + return fmt.Errorf("failed to get latest module: %w", err) + } + + fmt.Println("Starting migration...") - // Goroutine to iterate through iavl and export leaf nodes + // Goroutine to iterate through IAVL and export leaf nodes go func() { defer close(ch) - errCh <- ExportLeafNodes(m.iavlDB, ch) + errCh <- ExportLeafNodesFromKey(m.iavlDB, ch, latestKey, latestModule) }() + // Import nodes into PebbleDB go func() { errCh <- m.stateStore.RawImport(ch) }() - // Block on completion of both goroutines + // Block until both processes complete for i := 0; i < 2; i++ { if err := <-errCh; err != nil { return err } } - // Set latest version - err := m.stateStore.SetLatestVersion(version) - if err != nil { - return err - } - - return nil + // Set latest version in the database + return m.stateStore.SetLatestVersion(version) } func (m *Migrator) Verify(version int64) error { @@ -96,57 +92,77 @@ func (m *Migrator) Verify(version int64) error { return true } if !bytes.Equal(val, value) { - verifyErr = fmt.Errorf("verification error: value doesn't match for key %s", string(key)) + verifyErr = fmt.Errorf("verification error: value doesn't match for key %s. Expected %s, got %s", string(key), string(value), string(val)) } count++ - if count%10000 == 0 { - fmt.Printf("Verified %d keys in for module %s\n", count, module) + if count%1000000 == 0 { + fmt.Printf("SeiDB Archive Migration: Verified %d keys in for module %s\n", count, module) } return false }) if err != nil { - fmt.Printf("Failed to iterate the tree %s: %s\n", module, err.Error()) + fmt.Printf("SeiDB Archive Migration: Failed to iterate the tree %s: %s\n", module, err.Error()) return err } - fmt.Printf("Finished verifying module %s, total scanned: %d keys\n", module, count) + fmt.Printf("SeiDB Archive Migration:: Finished verifying module %s, total scanned: %d keys\n", module, count) } return verifyErr } -// Export leaf nodes of iavl -func ExportLeafNodes(db dbm.DB, ch chan<- types.RawSnapshotNode) error { - // Module by module, TODO: Potentially parallelize +func ExportLeafNodesFromKey(db dbm.DB, ch chan<- types.RawSnapshotNode, startKey []byte, startModule string) error { count := 0 leafNodeCount := 0 - fmt.Println("Scanning database and exporting leaf nodes...") + fmt.Println("SeiDB Archive Migration: Scanning database and exporting leaf nodes...") + + startTimeTotal := time.Now() // Start measuring total time + + var batchLeafNodeCount int + startModuleFound := startModule == "" // true if no start module specified for _, module := range modules { - fmt.Printf("Iterating through %s module...\n", module) + if !startModuleFound { + if module == startModule { + startModuleFound = true + } else { + continue + } + } + startTimeModule := time.Now() // Measure time for each module + fmt.Printf("SeiDB Archive Migration: Iterating through %s module...\n", module) - // Can't use the previous, have to create an inner prefixDB := dbm.NewPrefixDB(db, []byte(buildRawPrefix(module))) - itr, err := prefixDB.Iterator(nil, nil) + var itr dbm.Iterator + var err error + + // If there is a starting key, seek to it, otherwise start from the beginning + if startKey != nil && bytes.HasPrefix(startKey, []byte(buildRawPrefix(module))) { + itr, err = prefixDB.Iterator(startKey, nil) // Start from the latest key + } else { + itr, err = prefixDB.Iterator(nil, nil) // Start from the beginning + } + if err != nil { - fmt.Printf("error Export Leaf Nodes %+v\n", err) + fmt.Printf("SeiDB Archive Migration: Error creating iterator: %+v\n", err) return fmt.Errorf("failed to create iterator: %w", err) } defer itr.Close() + startTimeBatch := time.Now() // Measure time for every 10,000 iterations + for ; itr.Valid(); itr.Next() { value := bytes.Clone(itr.Value()) node, err := iavl.MakeNode(value) - if err != nil { - fmt.Printf("failed to make node err: %+v\n", err) + fmt.Printf("SeiDB Archive Migration: Failed to make node: %+v\n", err) return fmt.Errorf("failed to make node: %w", err) } - // leaf node + // Only export leaf nodes if node.GetHeight() == 0 { leafNodeCount++ + batchLeafNodeCount++ ch <- types.RawSnapshotNode{ - // TODO: Likely need to clone StoreKey: module, Key: node.GetNodeKey(), Value: node.GetValue(), @@ -155,21 +171,30 @@ func ExportLeafNodes(db dbm.DB, ch chan<- types.RawSnapshotNode) error { } count++ - if count%10000 == 0 { - fmt.Printf("Total scanned: %d, leaf nodes exported: %d\n", count, leafNodeCount) + if count%1000000 == 0 { + batchDuration := time.Since(startTimeBatch) + fmt.Printf("SeiDB Archive Migration: Last 1,000,000 iterations took: %v. Total scanned: %d, leaf nodes exported: %d\n", batchDuration, count, leafNodeCount) + metrics.IncrCounterWithLabels([]string{"sei", "migration", "leaf_nodes_exported"}, float32(batchLeafNodeCount), []metrics.Label{ + {Name: "module", Value: module}, + }) + + batchLeafNodeCount = 0 + startTimeBatch = time.Now() } } - fmt.Printf("Finished scanning module %s Total scanned: %d, leaf nodes exported: %d\n", module, count, leafNodeCount) - if err := itr.Error(); err != nil { - fmt.Printf("iterator error: %+v\n", err) + fmt.Printf("Iterator error: %+v\n", err) return fmt.Errorf("iterator error: %w", err) } + moduleDuration := time.Since(startTimeModule) + fmt.Printf("SeiDB Archive Migration: Finished scanning module %s. Time taken: %v. Total scanned: %d, leaf nodes exported: %d\n", module, moduleDuration, count, leafNodeCount) } - fmt.Printf("DB contains %d entries, exported %d leaf nodes\n", count, leafNodeCount) + totalDuration := time.Since(startTimeTotal) + fmt.Printf("SeiDB Archive Migration: DB scanning completed. Total time taken: %v. Total entries scanned: %d, leaf nodes exported: %d\n", totalDuration, count, leafNodeCount) + return nil } From 1b0323cd5c9aa225365e5039ac2707c949d18ce4 Mon Sep 17 00:00:00 2001 From: yirenz Date: Thu, 31 Oct 2024 12:52:47 -0400 Subject: [PATCH 07/33] bump sei-tendermint to v0.4.3 for improving blocksync and p2p issue (#1915) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9288ff9489..298a4c152f 100644 --- a/go.mod +++ b/go.mod @@ -354,7 +354,7 @@ replace ( github.com/sei-protocol/sei-db => github.com/sei-protocol/sei-db v0.0.45 // Latest goleveldb is broken, we have to stick to this version github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 - github.com/tendermint/tendermint => github.com/sei-protocol/sei-tendermint v0.3.9-0.20240926181940-e9348a908b27 + github.com/tendermint/tendermint => github.com/sei-protocol/sei-tendermint v0.4.3 github.com/tendermint/tm-db => github.com/sei-protocol/tm-db v0.0.4 google.golang.org/grpc => google.golang.org/grpc v1.33.2 ) diff --git a/go.sum b/go.sum index 83baf47ccd..a163a05a2c 100644 --- a/go.sum +++ b/go.sum @@ -1355,8 +1355,8 @@ github.com/sei-protocol/sei-iavl v0.2.0 h1:OisPjXiDT+oe+aeckzDEFgkZCYuUjHgs/PP8D github.com/sei-protocol/sei-iavl v0.2.0/go.mod h1:qRf8QYUPfrAO7K6VDB2B2l/N7K5L76OorioGBcJBIbw= github.com/sei-protocol/sei-ibc-go/v3 v3.3.2 h1:BaMZ6gjwqe3R/5dLmcJ1TkSZ3omcWy2TjaAZAeOJH44= github.com/sei-protocol/sei-ibc-go/v3 v3.3.2/go.mod h1:VwB/vWu4ysT5DN2aF78d17LYmx3omSAdq6gpKvM7XRA= -github.com/sei-protocol/sei-tendermint v0.3.9-0.20240926181940-e9348a908b27 h1:IREoTJ2mrjmGGHVtuVLzzPjh7U7sqjqJLHAIN1BSIW4= -github.com/sei-protocol/sei-tendermint v0.3.9-0.20240926181940-e9348a908b27/go.mod h1:4LSlJdhl3nf3OmohliwRNUFLOB1XWlrmSodrIP7fLh4= +github.com/sei-protocol/sei-tendermint v0.4.3 h1:/Nx3Q309B4N61P3e6ScYiVuHgBRdapc3Taedz7a6/7k= +github.com/sei-protocol/sei-tendermint v0.4.3/go.mod h1:4LSlJdhl3nf3OmohliwRNUFLOB1XWlrmSodrIP7fLh4= github.com/sei-protocol/sei-tm-db v0.0.5 h1:3WONKdSXEqdZZeLuWYfK5hP37TJpfaUa13vAyAlvaQY= github.com/sei-protocol/sei-tm-db v0.0.5/go.mod h1:Cpa6rGyczgthq7/0pI31jys2Fw0Nfrc+/jKdP1prVqY= github.com/sei-protocol/sei-wasmd v0.2.4 h1:W++xiJ1P57BhBW8TGk8vfPRJlWXr1vp2kQCvSc8Qpaw= From 63856333321796a475ae6f8fe2850f67e625406c Mon Sep 17 00:00:00 2001 From: Kartik Bhat Date: Fri, 1 Nov 2024 14:11:14 -0400 Subject: [PATCH 08/33] Disable Pruning during SC migration + Bump Sei-cosmos (#1917) * Disable Pruning during SC migration * Bump sei-cosmos --- go.mod | 2 +- go.sum | 4 ++-- tools/migration/sc/migrator.go | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 298a4c152f..40a24f4b09 100644 --- a/go.mod +++ b/go.mod @@ -346,7 +346,7 @@ require ( replace ( github.com/CosmWasm/wasmd => github.com/sei-protocol/sei-wasmd v0.2.4 github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 - github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.41 + github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.43 github.com/cosmos/iavl => github.com/sei-protocol/sei-iavl v0.2.0 github.com/cosmos/ibc-go/v3 => github.com/sei-protocol/sei-ibc-go/v3 v3.3.2 github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.13.5-sei-23 diff --git a/go.sum b/go.sum index a163a05a2c..d75f868253 100644 --- a/go.sum +++ b/go.sum @@ -1347,8 +1347,8 @@ github.com/sei-protocol/go-ethereum v1.13.5-sei-23 h1:rkgeOHC56QTco4mIyGd6cZHtlo github.com/sei-protocol/go-ethereum v1.13.5-sei-23/go.mod h1:kcRZmuzRn1lVejiFNTz4l4W7imnpq1bDAnuKS/RyhbQ= github.com/sei-protocol/goutils v0.0.2 h1:Bfa7Sv+4CVLNM20QcpvGb81B8C5HkQC/kW1CQpIbXDA= github.com/sei-protocol/goutils v0.0.2/go.mod h1:iYE2DuJfEnM+APPehr2gOUXfuLuPsVxorcDO+Tzq9q8= -github.com/sei-protocol/sei-cosmos v0.3.41 h1:w5ekTGC5J/7kxJhRkfdHk2KWOqi1zhic0gOXNm6W5vI= -github.com/sei-protocol/sei-cosmos v0.3.41/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk= +github.com/sei-protocol/sei-cosmos v0.3.43 h1:H3F6wHze6Td0bdrOgV6uGzbMV9H699AA5w2sVgscKEA= +github.com/sei-protocol/sei-cosmos v0.3.43/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk= github.com/sei-protocol/sei-db v0.0.45 h1:95ygzGFMyvaGwEUmzlKi8MxwXfbluoNzbaIjy9zOG6o= github.com/sei-protocol/sei-db v0.0.45/go.mod h1:m5g7p0QeAS3dNJHIl28zQpzOgxQmvYqPb7t4hwgIOCA= github.com/sei-protocol/sei-iavl v0.2.0 h1:OisPjXiDT+oe+aeckzDEFgkZCYuUjHgs/PP8DPicN+I= diff --git a/tools/migration/sc/migrator.go b/tools/migration/sc/migrator.go index debb1ffb7a..a26275fb6a 100644 --- a/tools/migration/sc/migrator.go +++ b/tools/migration/sc/migrator.go @@ -77,6 +77,7 @@ func NewMigrator(homeDir string, db dbm.DB) *Migrator { scConfig.Enable = true ssConfig := config.DefaultStateStoreConfig() ssConfig.Enable = true + ssConfig.KeepRecent = 0 cmsV2 := rootmulti2.NewStore(homeDir, logger, scConfig, ssConfig, true) for _, key := range Keys { cmsV2.MountStoreWithDB(key, sdk.StoreTypeIAVL, db) From 92325cc7bf553326c28c1590c44561e35996c3fd Mon Sep 17 00:00:00 2001 From: Kartik Bhat Date: Mon, 4 Nov 2024 13:47:12 -0500 Subject: [PATCH 09/33] Set Earliest Version After SS Migration (#1920) Set earliest version after migration --- tools/migration/ss/migrator.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/migration/ss/migrator.go b/tools/migration/ss/migrator.go index e050d27ecd..829b7014a9 100644 --- a/tools/migration/ss/migrator.go +++ b/tools/migration/ss/migrator.go @@ -67,7 +67,12 @@ func (m *Migrator) Migrate(version int64, homeDir string) error { } } - // Set latest version in the database + // Set earliest and latest version in the database + err = m.stateStore.SetEarliestVersion(1) + if err != nil { + return err + } + return m.stateStore.SetLatestVersion(version) } @@ -93,6 +98,7 @@ func (m *Migrator) Verify(version int64) error { } if !bytes.Equal(val, value) { verifyErr = fmt.Errorf("verification error: value doesn't match for key %s. Expected %s, got %s", string(key), string(value), string(val)) + return true } count++ if count%1000000 == 0 { From 38418afec33d898588133cf5697090d7e2a87b37 Mon Sep 17 00:00:00 2001 From: Philip Su Date: Tue, 5 Nov 2024 03:36:55 +0100 Subject: [PATCH 10/33] v6.0.0 release (#1914) * v6.0.0 release * Disable Pruning during SC migration + Bump Sei-cosmos (#1917) * Disable Pruning during SC migration * Bump sei-cosmos * v6.0.0 release * Disable Pruning during SC migration + Bump Sei-cosmos (#1917) * Disable Pruning during SC migration * Bump sei-cosmos * Bump cosmos --------- Co-authored-by: Kartik Bhat --- CHANGELOG.md | 21 +++++++++++++++++++++ app/upgrades.go | 1 + go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d93eae4d72..feaf9502c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,27 @@ Ref: https://keepachangelog.com/en/1.0.0/ --> # Changelog +## v6.0.0 +sei-chain +* [#1905](https://github.com/sei-protocol/sei-chain/pull/1905) Use limited wasm gas meter +* [#1889](https://github.com/sei-protocol/sei-chain/pull/1889) Fix amino registry for custom modules +* [#1888](https://github.com/sei-protocol/sei-chain/pull/1888) Set EIP-1559 default values +* [#1884](https://github.com/sei-protocol/sei-chain/pull/1884) Update gas tip cap param range +* [#1878](https://github.com/sei-protocol/sei-chain/pull/1878) Add endpoint to estimate gas after simulating calls + +sei-cosmos +* [#547](https://github.com/sei-protocol/sei-cosmos/pull/547) Do not early return for validated tasks in synchronous mode +* [#544](https://github.com/sei-protocol/sei-cosmos/pull/544) Only apply DeliverTx hooks if there is no error +* [#538](https://github.com/sei-protocol/sei-cosmos/pull/538) Token allowlist feature + +sei-tendermint +* [#248](https://github.com/sei-protocol/sei-tendermint/pull/248) Improve Peer Score algorithm +* [#245](https://github.com/sei-protocol/sei-tendermint/pull/245) Exclude unconditional peers when connection limit checking +* [#244](https://github.com/sei-protocol/sei-tendermint/pull/244) Add new config to speed up block sync + +sei-db +* [#75](https://github.com/sei-protocol/sei-db/pull/75) Online archive node migration + ## v5.9.0 sei-chain * [#1867](https://github.com/sei-protocol/sei-chain/pull/1867) Add synthetic events in separate sei endpoints diff --git a/app/upgrades.go b/app/upgrades.go index 4ec052825a..1c1715f8c1 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -111,6 +111,7 @@ var upgradesList = []string{ "v5.7.5", "v5.8.0", "v5.9.0", + "v6.0.0", } // if there is an override list, use that instead, for integration tests diff --git a/go.mod b/go.mod index 40a24f4b09..42a6047536 100644 --- a/go.mod +++ b/go.mod @@ -346,7 +346,7 @@ require ( replace ( github.com/CosmWasm/wasmd => github.com/sei-protocol/sei-wasmd v0.2.4 github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 - github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.43 + github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.44 github.com/cosmos/iavl => github.com/sei-protocol/sei-iavl v0.2.0 github.com/cosmos/ibc-go/v3 => github.com/sei-protocol/sei-ibc-go/v3 v3.3.2 github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.13.5-sei-23 diff --git a/go.sum b/go.sum index d75f868253..05415a6bab 100644 --- a/go.sum +++ b/go.sum @@ -1347,8 +1347,8 @@ github.com/sei-protocol/go-ethereum v1.13.5-sei-23 h1:rkgeOHC56QTco4mIyGd6cZHtlo github.com/sei-protocol/go-ethereum v1.13.5-sei-23/go.mod h1:kcRZmuzRn1lVejiFNTz4l4W7imnpq1bDAnuKS/RyhbQ= github.com/sei-protocol/goutils v0.0.2 h1:Bfa7Sv+4CVLNM20QcpvGb81B8C5HkQC/kW1CQpIbXDA= github.com/sei-protocol/goutils v0.0.2/go.mod h1:iYE2DuJfEnM+APPehr2gOUXfuLuPsVxorcDO+Tzq9q8= -github.com/sei-protocol/sei-cosmos v0.3.43 h1:H3F6wHze6Td0bdrOgV6uGzbMV9H699AA5w2sVgscKEA= -github.com/sei-protocol/sei-cosmos v0.3.43/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk= +github.com/sei-protocol/sei-cosmos v0.3.44 h1:7wLuJguQBhQ1ljU92lEDrZDLcNt+JbUcX7r1Y7V1qws= +github.com/sei-protocol/sei-cosmos v0.3.44/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk= github.com/sei-protocol/sei-db v0.0.45 h1:95ygzGFMyvaGwEUmzlKi8MxwXfbluoNzbaIjy9zOG6o= github.com/sei-protocol/sei-db v0.0.45/go.mod h1:m5g7p0QeAS3dNJHIl28zQpzOgxQmvYqPb7t4hwgIOCA= github.com/sei-protocol/sei-iavl v0.2.0 h1:OisPjXiDT+oe+aeckzDEFgkZCYuUjHgs/PP8DPicN+I= From ddcb1e6eff4df4a81008666d4c50e400f46309a7 Mon Sep 17 00:00:00 2001 From: codchen Date: Tue, 5 Nov 2024 13:58:49 +0800 Subject: [PATCH 11/33] Use tendermint store to get Tx hashes instead of storing explicitly (#1913) * Use tendermint store to get Tx hashes instead of storing explicitly * refactor * fix tests --- evmrpc/block.go | 6 +----- evmrpc/block_test.go | 34 ++++++++++------------------------ evmrpc/filter.go | 15 +++++++++++---- evmrpc/filter_test.go | 6 +++--- evmrpc/server.go | 6 +++--- evmrpc/setup_test.go | 36 ++++++++++++++++++++++++++++++++---- evmrpc/utils.go | 27 +++++++++++++++++++++++++++ x/evm/keeper/tx.go | 2 ++ 8 files changed, 89 insertions(+), 43 deletions(-) diff --git a/evmrpc/block.go b/evmrpc/block.go index 6a51d64147..6ce9290fdb 100644 --- a/evmrpc/block.go +++ b/evmrpc/block.go @@ -148,13 +148,9 @@ func (a *BlockAPI) GetBlockReceipts(ctx context.Context, blockNrOrHash rpc.Block return nil, err } - if block == nil { - return nil, errors.New("could not retrieve block requested") - } - // Get all tx hashes for the block height := block.Block.Header.Height - txHashes := a.keeper.GetTxHashesOnHeight(a.ctxProvider(height), height) + txHashes := getEvmTxHashesFromBlock(block, a.txConfig) // Get tx receipts for all hashes in parallel wg := sync.WaitGroup{} mtx := sync.Mutex{} diff --git a/evmrpc/block_test.go b/evmrpc/block_test.go index 4c394ead3b..5a96781267 100644 --- a/evmrpc/block_test.go +++ b/evmrpc/block_test.go @@ -80,36 +80,30 @@ func TestGetBlockReceipts(t *testing.T) { // Query by block height resObj := sendRequestGood(t, "getBlockReceipts", "0x2") result := resObj["result"].([]interface{}) - require.Equal(t, 3, len(result)) + require.Equal(t, 6, len(result)) receipt1 := result[0].(map[string]interface{}) require.Equal(t, "0x2", receipt1["blockNumber"]) - require.Equal(t, "0x0", receipt1["transactionIndex"]) - require.Equal(t, multiTxBlockTx1.Hash().Hex(), receipt1["transactionHash"]) + require.Equal(t, "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", receipt1["transactionHash"]) receipt2 := result[1].(map[string]interface{}) require.Equal(t, "0x2", receipt2["blockNumber"]) - require.Equal(t, "0x1", receipt2["transactionIndex"]) - require.Equal(t, multiTxBlockTx2.Hash().Hex(), receipt2["transactionHash"]) + require.Equal(t, multiTxBlockTx1.Hash().Hex(), receipt2["transactionHash"]) receipt3 := result[2].(map[string]interface{}) require.Equal(t, "0x2", receipt3["blockNumber"]) - require.Equal(t, "0x2", receipt3["transactionIndex"]) - require.Equal(t, multiTxBlockTx3.Hash().Hex(), receipt3["transactionHash"]) + require.Equal(t, "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", receipt3["transactionHash"]) // Query by block hash resObj2 := sendRequestGood(t, "getBlockReceipts", "0x0000000000000000000000000000000000000000000000000000000000000002") result = resObj2["result"].([]interface{}) - require.Equal(t, 3, len(result)) + require.Equal(t, 6, len(result)) receipt1 = result[0].(map[string]interface{}) require.Equal(t, "0x2", receipt1["blockNumber"]) - require.Equal(t, "0x0", receipt1["transactionIndex"]) - require.Equal(t, multiTxBlockTx1.Hash().Hex(), receipt1["transactionHash"]) + require.Equal(t, "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", receipt1["transactionHash"]) receipt2 = result[1].(map[string]interface{}) require.Equal(t, "0x2", receipt2["blockNumber"]) - require.Equal(t, "0x1", receipt2["transactionIndex"]) - require.Equal(t, multiTxBlockTx2.Hash().Hex(), receipt2["transactionHash"]) + require.Equal(t, multiTxBlockTx1.Hash().Hex(), receipt2["transactionHash"]) receipt3 = result[2].(map[string]interface{}) require.Equal(t, "0x2", receipt3["blockNumber"]) - require.Equal(t, "0x2", receipt3["transactionIndex"]) - require.Equal(t, multiTxBlockTx3.Hash().Hex(), receipt3["transactionHash"]) + require.Equal(t, "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", receipt3["transactionHash"]) // Query by tag latest => retrieves block 8 resObj3 := sendRequestGood(t, "getBlockReceipts", "latest") @@ -117,15 +111,7 @@ func TestGetBlockReceipts(t *testing.T) { require.Equal(t, 2, len(result)) receipt1 = result[0].(map[string]interface{}) require.Equal(t, "0x8", receipt1["blockNumber"]) - require.Equal(t, "0x0", receipt1["transactionIndex"]) - require.Equal(t, multiTxBlockTx4.Hash().Hex(), receipt1["transactionHash"]) - receiptWithSyntheticLog := result[1].(map[string]interface{}) - require.Equal(t, "0x8", receiptWithSyntheticLog["blockNumber"]) - logs := receiptWithSyntheticLog["logs"].([]interface{}) - firstLog := logs[0].(map[string]interface{}) - topics := firstLog["topics"].([]interface{}) - syntheticLogFirstTopic := "0x0000000000000000000000000000000000000000000000000000000000000234" - require.Equal(t, syntheticLogFirstTopic, topics[0].(string)) + require.Equal(t, tx1.Hash().Hex(), receipt1["transactionHash"]) } func verifyGenesisBlockResult(t *testing.T, resObj map[string]interface{}) { @@ -160,7 +146,7 @@ func verifyBlockResult(t *testing.T, resObj map[string]interface{}) { require.Equal(t, "0x5", resObj["gasUsed"]) require.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000001", resObj["hash"]) // see setup_tests.go, which have one transaction for block 0x8 (latest) - require.Equal(t, "0x00002000040000000000000000000080000000200000000000000000000000080000000000000000000000000000000000000000000000000800000000000000001000000000000000000000000000000000000000000000000000000000000100000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000200000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000010200000000000000", resObj["logsBloom"]) + require.Equal(t, "0x00002000040000000000000000000080000000200000000000002000000000080000000000000000000000000000000000000000000000000800000000000000001000000000000000000000000000000000020000000000000000000000000100000000000000002000000000200000000000000000000000000000000000100000000000000000000000000400000000000000200000000000000000000000000000000000000100000000000000020000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000200000000010000000002000000000000000000000000000000010200000000000000", resObj["logsBloom"]) require.Equal(t, "0x0000000000000000000000000000000000000005", resObj["miner"]) require.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000000", resObj["mixHash"]) require.Equal(t, "0x0000000000000000", resObj["nonce"]) diff --git a/evmrpc/filter.go b/evmrpc/filter.go index 167118ede7..bf5cdab9ab 100644 --- a/evmrpc/filter.go +++ b/evmrpc/filter.go @@ -8,6 +8,7 @@ import ( "sync" "time" + "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" @@ -63,8 +64,8 @@ type EventItemDataWrapper struct { Value json.RawMessage `json:"value"` } -func NewFilterAPI(tmClient rpcclient.Client, k *keeper.Keeper, ctxProvider func(int64) sdk.Context, filterConfig *FilterConfig, connectionType ConnectionType, namespace string) *FilterAPI { - logFetcher := &LogFetcher{tmClient: tmClient, k: k, ctxProvider: ctxProvider, filterConfig: filterConfig, includeSyntheticReceipts: shouldIncludeSynthetic(namespace)} +func NewFilterAPI(tmClient rpcclient.Client, k *keeper.Keeper, ctxProvider func(int64) sdk.Context, txConfig client.TxConfig, filterConfig *FilterConfig, connectionType ConnectionType, namespace string) *FilterAPI { + logFetcher := &LogFetcher{tmClient: tmClient, k: k, ctxProvider: ctxProvider, txConfig: txConfig, filterConfig: filterConfig, includeSyntheticReceipts: shouldIncludeSynthetic(namespace)} filters := make(map[ethrpc.ID]filter) api := &FilterAPI{ namespace: namespace, @@ -276,6 +277,7 @@ func (a *FilterAPI) UninstallFilter( type LogFetcher struct { tmClient rpcclient.Client k *keeper.Keeper + txConfig client.TxConfig ctxProvider func(int64) sdk.Context filterConfig *FilterConfig includeSyntheticReceipts bool @@ -358,8 +360,13 @@ func (f *LogFetcher) FindBlockesByBloom(begin, end int64, filters [][]bloomIndex func (f *LogFetcher) FindLogsByBloom(height int64, filters [][]bloomIndexes) (res []*ethtypes.Log) { ctx := f.ctxProvider(LatestCtxHeight) - txHashes := f.k.GetTxHashesOnHeight(ctx, height) - for _, hash := range txHashes { + block, err := blockByNumberWithRetry(context.Background(), f.tmClient, &height, 1) + if err != nil { + fmt.Printf("error getting block when querying logs: %s\n", err) + return + } + + for _, hash := range getEvmTxHashesFromBlock(block, f.txConfig) { receipt, err := f.k.GetReceipt(ctx, hash) if err != nil { ctx.Logger().Error(fmt.Sprintf("FindLogsByBloom: unable to find receipt for hash %s", hash.Hex())) diff --git a/evmrpc/filter_test.go b/evmrpc/filter_test.go index fa0a4f145f..8fa73c77b3 100644 --- a/evmrpc/filter_test.go +++ b/evmrpc/filter_test.go @@ -131,10 +131,10 @@ func getCommonFilterLogTests() []GetFilterLogTests { }, { name: "filter by single topic with default range", - topics: [][]common.Hash{{common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000123")}}, + topics: [][]common.Hash{{common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111111")}}, wantErr: false, check: func(t *testing.T, log map[string]interface{}) { - require.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000123", log["topics"].([]interface{})[0].(string)) + require.Equal(t, "0x1111111111111111111111111111111111111111111111111111111111111111", log["topics"].([]interface{})[0].(string)) }, wantLen: 1, }, @@ -283,7 +283,7 @@ func TestFilterGetFilterLogs(t *testing.T) { resObj = sendRequest(t, TestPort, "getFilterLogs", filterId) logs := resObj["result"].([]interface{}) - require.Equal(t, 4, len(logs)) + require.Equal(t, 7, len(logs)) for _, log := range logs { logObj := log.(map[string]interface{}) require.Equal(t, "0x2", logObj["blockNumber"].(string)) diff --git a/evmrpc/server.go b/evmrpc/server.go index a76045e292..9691d5b077 100644 --- a/evmrpc/server.go +++ b/evmrpc/server.go @@ -87,11 +87,11 @@ func NewEVMHTTPServer( }, { Namespace: "eth", - Service: NewFilterAPI(tmClient, k, ctxProvider, &FilterConfig{timeout: config.FilterTimeout, maxLog: config.MaxLogNoBlock, maxBlock: config.MaxBlocksForLog}, ConnectionTypeHTTP, "eth"), + Service: NewFilterAPI(tmClient, k, ctxProvider, txConfig, &FilterConfig{timeout: config.FilterTimeout, maxLog: config.MaxLogNoBlock, maxBlock: config.MaxBlocksForLog}, ConnectionTypeHTTP, "eth"), }, { Namespace: "sei", - Service: NewFilterAPI(tmClient, k, ctxProvider, &FilterConfig{timeout: config.FilterTimeout, maxLog: config.MaxLogNoBlock, maxBlock: config.MaxBlocksForLog}, ConnectionTypeHTTP, "sei"), + Service: NewFilterAPI(tmClient, k, ctxProvider, txConfig, &FilterConfig{timeout: config.FilterTimeout, maxLog: config.MaxLogNoBlock, maxBlock: config.MaxBlocksForLog}, ConnectionTypeHTTP, "sei"), }, { Namespace: "sei", @@ -184,7 +184,7 @@ func NewEVMWebSocketServer( }, { Namespace: "eth", - Service: NewSubscriptionAPI(tmClient, &LogFetcher{tmClient: tmClient, k: k, ctxProvider: ctxProvider}, &SubscriptionConfig{subscriptionCapacity: 100, newHeadLimit: config.MaxSubscriptionsNewHead}, &FilterConfig{timeout: config.FilterTimeout, maxLog: config.MaxLogNoBlock, maxBlock: config.MaxBlocksForLog}, ConnectionTypeWS), + Service: NewSubscriptionAPI(tmClient, &LogFetcher{tmClient: tmClient, k: k, ctxProvider: ctxProvider, txConfig: txConfig}, &SubscriptionConfig{subscriptionCapacity: 100, newHeadLimit: config.MaxSubscriptionsNewHead}, &FilterConfig{timeout: config.FilterTimeout, maxLog: config.MaxLogNoBlock, maxBlock: config.MaxBlocksForLog}, ConnectionTypeWS), }, { Namespace: "web3", diff --git a/evmrpc/setup_test.go b/evmrpc/setup_test.go index d252f31673..635b2f91dc 100644 --- a/evmrpc/setup_test.go +++ b/evmrpc/setup_test.go @@ -2,6 +2,7 @@ package evmrpc_test import ( "context" + "crypto/sha256" "encoding/hex" "encoding/json" "errors" @@ -76,6 +77,7 @@ var multiTxBlockSynthTx *ethtypes.Transaction var DebugTraceTx sdk.Tx var TxNonEvm sdk.Tx +var TxNonEvmWithSyntheticLog sdk.Tx var UnconfirmedTx sdk.Tx var SConfig = evmrpc.SimulateConfig{GasCap: 10000000} @@ -176,7 +178,7 @@ func (c *MockClient) mockBlock(height int64) *coretypes.ResultBlock { return bz }(), func() []byte { - bz, _ := Encoder(TxNonEvm) + bz, _ := Encoder(TxNonEvmWithSyntheticLog) return bz }(), }, @@ -564,6 +566,12 @@ func generateTxData() { MultiTxBlockSynthTx = synthTxBuilder.GetTx() DebugTraceTx = debugTraceTxBuilder.GetTx() TxNonEvm = app.TestTx{} + TxNonEvmWithSyntheticLog = app.TestTx{} + bloomTx1 := ethtypes.CreateBloom(ethtypes.Receipts{ðtypes.Receipt{Logs: []*ethtypes.Log{{ + Address: common.HexToAddress("0x1111111111111111111111111111111111111111"), + Topics: []common.Hash{common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111111"), + common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111112")}, + }}}}) if err := EVMKeeper.MockReceipt(Ctx, tx1.Hash(), &types.Receipt{ From: "0x1234567890123456789012345678901234567890", To: "0x1234567890123456789012345678901234567890", @@ -580,6 +588,7 @@ func generateTxData() { Address: "0x1111111111111111111111111111111111111111", Topics: []string{"0x1111111111111111111111111111111111111111111111111111111111111111", "0x1111111111111111111111111111111111111111111111111111111111111112"}, }}, + LogsBloom: bloomTx1[:], }); err != nil { panic(err) } @@ -747,8 +756,8 @@ func setupLogs() { }, }}}}) EVMKeeper.MockReceipt(Ctx, multiTxBlockSynthTx.Hash(), &types.Receipt{ - BlockNumber: MockHeight, - TransactionIndex: 0, + BlockNumber: MultiTxBlockHeight, + TransactionIndex: 5, TxHashHex: multiTxBlockSynthTx.Hash().Hex(), LogsBloom: bloomSynth[:], Logs: []*types.Log{{ @@ -763,6 +772,20 @@ func setupLogs() { TransactionIndex: 0, TxHashHex: DebugTraceHashHex, }) + txNonEvmBz, _ := Encoder(TxNonEvmWithSyntheticLog) + txNonEvmHash := sha256.Sum256(txNonEvmBz) + EVMKeeper.MockReceipt(Ctx, txNonEvmHash, &types.Receipt{ + BlockNumber: MultiTxBlockHeight, + TransactionIndex: 1, + TxHashHex: common.Hash(txNonEvmHash).Hex(), + LogsBloom: bloomSynth[:], + Logs: []*types.Log{{ + Address: "0x1111111111111111111111111111111111111116", + Topics: []string{"0x0000000000000000000000000000000000000000000000000000000000000234", "0x0000000000000000000000000000000000000000000000000000000000000789"}, + Synthetic: true, + }}, + EffectiveGasPrice: 100, + }) EVMKeeper.SetTxHashesOnHeight(Ctx, MultiTxBlockHeight, []common.Hash{ multiTxBlockTx1.Hash(), multiTxBlockTx2.Hash(), @@ -772,8 +795,13 @@ func setupLogs() { multiTxBlockTx4.Hash(), multiTxBlockSynthTx.Hash(), }) + bloomTx1 := ethtypes.CreateBloom(ethtypes.Receipts{ðtypes.Receipt{Logs: []*ethtypes.Log{{ + Address: common.HexToAddress("0x1111111111111111111111111111111111111111"), + Topics: []common.Hash{common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111111"), + common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111112")}, + }}}}) EVMKeeper.SetBlockBloom(MultiTxCtx, []ethtypes.Bloom{bloom1, bloom2, bloom3}) - EVMKeeper.SetBlockBloom(Ctx, []ethtypes.Bloom{bloom4, bloomSynth}) + EVMKeeper.SetBlockBloom(Ctx, []ethtypes.Bloom{bloom4, bloomSynth, bloomTx1}) } //nolint:deadcode diff --git a/evmrpc/utils.go b/evmrpc/utils.go index 6fc9eb30db..0d494c9495 100644 --- a/evmrpc/utils.go +++ b/evmrpc/utils.go @@ -3,6 +3,7 @@ package evmrpc import ( "context" "crypto/ecdsa" + "crypto/sha256" "encoding/hex" "fmt" "math/big" @@ -15,10 +16,12 @@ import ( "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/rpc" "github.com/sei-protocol/sei-chain/utils/metrics" "github.com/sei-protocol/sei-chain/x/evm/keeper" + "github.com/sei-protocol/sei-chain/x/evm/types" "github.com/tendermint/tendermint/libs/bytes" rpcclient "github.com/tendermint/tendermint/rpc/client" "github.com/tendermint/tendermint/rpc/coretypes" @@ -203,3 +206,27 @@ func shouldIncludeSynthetic(namespace string) bool { } return namespace == "sei" } + +func getEvmTxHashesFromBlock(block *coretypes.ResultBlock, txConfig client.TxConfig) []common.Hash { + txHashes := []common.Hash{} + for i, tx := range block.Block.Data.Txs { + sdkTx, err := txConfig.TxDecoder()(tx) + if err != nil { + fmt.Printf("error decoding tx %d in block %d, skipping\n", i, block.Block.Height) + continue + } + if len(sdkTx.GetMsgs()) == 0 { + txHashes = append(txHashes, sha256.Sum256(tx)) + continue + } + if evmTx, ok := sdkTx.GetMsgs()[0].(*types.MsgEVMTransaction); ok { + if evmTx.IsAssociateTx() { + continue + } + ethtx, _ := evmTx.AsTransaction() + txHashes = append(txHashes, ethtx.Hash()) + } + txHashes = append(txHashes, sha256.Sum256(tx)) + } + return txHashes +} diff --git a/x/evm/keeper/tx.go b/x/evm/keeper/tx.go index 1c086d565e..2a5c900933 100644 --- a/x/evm/keeper/tx.go +++ b/x/evm/keeper/tx.go @@ -6,6 +6,7 @@ import ( "github.com/sei-protocol/sei-chain/x/evm/types" ) +// deprecated func (k *Keeper) GetTxHashesOnHeight(ctx sdk.Context, height int64) (res []common.Hash) { store := ctx.KVStore(k.storeKey) bz := store.Get(types.TxHashesKey(height)) @@ -18,6 +19,7 @@ func (k *Keeper) GetTxHashesOnHeight(ctx sdk.Context, height int64) (res []commo return } +// deprecated func (k *Keeper) SetTxHashesOnHeight(ctx sdk.Context, height int64, hashes []common.Hash) { if len(hashes) == 0 { return From 0dd7724e2f2e8734bdd69c515472d10683658f20 Mon Sep 17 00:00:00 2001 From: Denys S <150304777+dssei@users.noreply.github.com> Date: Tue, 5 Nov 2024 11:06:13 -0800 Subject: [PATCH 12/33] Use msg server send in bank precompile (#1922) * use msg server send in bank precompile * self review tweak --- app/app.go | 1 + precompiles/bank/bank.go | 18 ++++++++++++++++-- precompiles/bank/bank_test.go | 11 ++++++----- precompiles/common/expected_keepers.go | 4 ++++ precompiles/setup.go | 5 +++-- 5 files changed, 30 insertions(+), 9 deletions(-) diff --git a/app/app.go b/app/app.go index 00aa5fe32f..04aeddce06 100644 --- a/app/app.go +++ b/app/app.go @@ -697,6 +697,7 @@ func New( false, &app.EvmKeeper, app.BankKeeper, + bankkeeper.NewMsgServerImpl(app.BankKeeper), wasmkeeper.NewDefaultPermissionKeeper(app.WasmKeeper), app.WasmKeeper, stakingkeeper.NewMsgServerImpl(app.StakingKeeper), diff --git a/precompiles/bank/bank.go b/precompiles/bank/bank.go index 88cb90a8ae..cfdd0aae62 100644 --- a/precompiles/bank/bank.go +++ b/precompiles/bank/bank.go @@ -8,6 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" @@ -39,6 +40,7 @@ var f embed.FS type PrecompileExecutor struct { accountKeeper pcommon.AccountKeeper bankKeeper pcommon.BankKeeper + bankMsgServer pcommon.BankMsgServer evmKeeper pcommon.EVMKeeper address common.Address @@ -57,10 +59,11 @@ type CoinBalance struct { Denom string } -func NewPrecompile(bankKeeper pcommon.BankKeeper, evmKeeper pcommon.EVMKeeper, accountKeeper pcommon.AccountKeeper) (*pcommon.Precompile, error) { +func NewPrecompile(bankKeeper pcommon.BankKeeper, bankMsgServer pcommon.BankMsgServer, evmKeeper pcommon.EVMKeeper, accountKeeper pcommon.AccountKeeper) (*pcommon.Precompile, error) { newAbi := pcommon.MustGetABI(f, "abi.json") p := &PrecompileExecutor{ bankKeeper: bankKeeper, + bankMsgServer: bankMsgServer, evmKeeper: evmKeeper, accountKeeper: accountKeeper, address: common.HexToAddress(BankAddress), @@ -150,7 +153,18 @@ func (p PrecompileExecutor) send(ctx sdk.Context, caller common.Address, method return nil, err } - if err := p.bankKeeper.SendCoins(ctx, senderSeiAddr, receiverSeiAddr, sdk.NewCoins(sdk.NewCoin(denom, sdk.NewIntFromBigInt(amount)))); err != nil { + msg := &banktypes.MsgSend{ + FromAddress: senderSeiAddr.String(), + ToAddress: receiverSeiAddr.String(), + Amount: sdk.NewCoins(sdk.NewCoin(denom, sdk.NewIntFromBigInt(amount))), + } + + err = msg.ValidateBasic() + if err != nil { + return nil, err + } + + if _, err = p.bankMsgServer.Send(sdk.WrapSDKContext(ctx), msg); err != nil { return nil, err } diff --git a/precompiles/bank/bank_test.go b/precompiles/bank/bank_test.go index 41ffee15fa..6c2ab19b03 100644 --- a/precompiles/bank/bank_test.go +++ b/precompiles/bank/bank_test.go @@ -4,6 +4,7 @@ import ( "embed" "encoding/hex" "fmt" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "math/big" "strings" "testing" @@ -65,7 +66,7 @@ func TestRun(t *testing.T) { // Setup receiving addresses seiAddr, evmAddr := testkeeper.MockAddressPair() k.SetAddressMapping(ctx, seiAddr, evmAddr) - p, err := bank.NewPrecompile(k.BankKeeper(), k, k.AccountKeeper()) + p, err := bank.NewPrecompile(k.BankKeeper(), bankkeeper.NewMsgServerImpl(k.BankKeeper()), k, k.AccountKeeper()) require.Nil(t, err) statedb := state.NewDBImpl(ctx, k, true) evm := vm.EVM{ @@ -272,7 +273,7 @@ func TestSendForUnlinkedReceiver(t *testing.T) { // Setup receiving addresses - NOT linked _, evmAddr := testkeeper.MockAddressPair() - p, err := bank.NewPrecompile(k.BankKeeper(), k, k.AccountKeeper()) + p, err := bank.NewPrecompile(k.BankKeeper(), bankkeeper.NewMsgServerImpl(k.BankKeeper()), k, k.AccountKeeper()) require.Nil(t, err) statedb := state.NewDBImpl(ctx, k, true) evm := vm.EVM{ @@ -342,7 +343,7 @@ func TestMetadata(t *testing.T) { k := &testkeeper.EVMTestApp.EvmKeeper ctx := testkeeper.EVMTestApp.GetContextForDeliverTx([]byte{}).WithBlockTime(time.Now()) k.BankKeeper().SetDenomMetaData(ctx, banktypes.Metadata{Name: "SEI", Symbol: "usei", Base: "usei"}) - p, err := bank.NewPrecompile(k.BankKeeper(), k, k.AccountKeeper()) + p, err := bank.NewPrecompile(k.BankKeeper(), bankkeeper.NewMsgServerImpl(k.BankKeeper()), k, k.AccountKeeper()) require.Nil(t, err) statedb := state.NewDBImpl(ctx, k, true) evm := vm.EVM{ @@ -381,7 +382,7 @@ func TestMetadata(t *testing.T) { func TestRequiredGas(t *testing.T) { k := &testkeeper.EVMTestApp.EvmKeeper - p, err := bank.NewPrecompile(k.BankKeeper(), k, k.AccountKeeper()) + p, err := bank.NewPrecompile(k.BankKeeper(), bankkeeper.NewMsgServerImpl(k.BankKeeper()), k, k.AccountKeeper()) require.Nil(t, err) balanceRequiredGas := p.RequiredGas(p.GetExecutor().(*bank.PrecompileExecutor).BalanceID) require.Equal(t, uint64(1000), balanceRequiredGas) @@ -391,7 +392,7 @@ func TestRequiredGas(t *testing.T) { func TestAddress(t *testing.T) { k := &testkeeper.EVMTestApp.EvmKeeper - p, err := bank.NewPrecompile(k.BankKeeper(), k, k.AccountKeeper()) + p, err := bank.NewPrecompile(k.BankKeeper(), bankkeeper.NewMsgServerImpl(k.BankKeeper()), k, k.AccountKeeper()) require.Nil(t, err) require.Equal(t, common.HexToAddress(bank.BankAddress), p.Address()) } diff --git a/precompiles/common/expected_keepers.go b/precompiles/common/expected_keepers.go index bb98ffbef3..bd7f3e687d 100644 --- a/precompiles/common/expected_keepers.go +++ b/precompiles/common/expected_keepers.go @@ -32,6 +32,10 @@ type BankKeeper interface { SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins } +type BankMsgServer interface { + Send(goCtx context.Context, msg *banktypes.MsgSend) (*banktypes.MsgSendResponse, error) +} + type EVMKeeper interface { GetSeiAddress(sdk.Context, common.Address) (sdk.AccAddress, bool) GetSeiAddressOrDefault(ctx sdk.Context, evmAddress common.Address) sdk.AccAddress // only used for getting precompile Sei addresses diff --git a/precompiles/setup.go b/precompiles/setup.go index 56c6ce3e4c..c04741f356 100644 --- a/precompiles/setup.go +++ b/precompiles/setup.go @@ -42,6 +42,7 @@ func InitializePrecompiles( dryRun bool, evmKeeper common.EVMKeeper, bankKeeper common.BankKeeper, + bankSender common.BankMsgServer, wasmdKeeper common.WasmdKeeper, wasmdViewKeeper common.WasmdViewKeeper, stakingKeeper common.StakingKeeper, @@ -60,7 +61,7 @@ func InitializePrecompiles( if Initialized { panic("precompiles already initialized") } - bankp, err := bank.NewPrecompile(bankKeeper, evmKeeper, accountKeeper) + bankp, err := bank.NewPrecompile(bankKeeper, bankSender, evmKeeper, accountKeeper) if err != nil { return err } @@ -135,7 +136,7 @@ func InitializePrecompiles( func GetPrecompileInfo(name string) PrecompileInfo { if !Initialized { // Precompile Info does not require any keeper state - _ = InitializePrecompiles(true, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil) + _ = InitializePrecompiles(true, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil) } i, ok := PrecompileNamesToInfo[name] if !ok { From c7a4b81ca0be02368c242ded073a431de56badeb Mon Sep 17 00:00:00 2001 From: Jeremy Wei Date: Thu, 7 Nov 2024 13:47:59 -0500 Subject: [PATCH 13/33] Wasmd precompile: QuerySmart to always use cached ctx (#1908) * refactor: use wasm-to-evm gas limit for all interop operations * fix cosmos dependency * Replace QuerySmart with QuerySmartSafe in WasmViewKeeper * comment out other integration tests * increase gas limits * Revert "increase gas limits" This reverts commit fc14398f64717bc0aaa8e7ef4f056a073f96c013. * re-enable integration tests * update sei-wasmd version in go.mod * remove .only in ERC20ToCW20 integration test * update go.mod --------- Co-authored-by: blindchaser --- contracts/test/ERC20toCW20PointerTest.js | 2 +- go.mod | 2 +- go.sum | 4 ++-- precompiles/common/expected_keepers.go | 2 +- precompiles/pointer/pointer.go | 4 ++-- precompiles/wasmd/wasmd.go | 3 +-- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/contracts/test/ERC20toCW20PointerTest.js b/contracts/test/ERC20toCW20PointerTest.js index aca3b48dd4..f19884e133 100644 --- a/contracts/test/ERC20toCW20PointerTest.js +++ b/contracts/test/ERC20toCW20PointerTest.js @@ -86,7 +86,7 @@ describe("ERC20 to CW20 Pointer", function () { }); describe("transfer()", function () { - it.only("should transfer", async function () { + it("should transfer", async function () { let sender = accounts[0]; let recipient = accounts[1]; diff --git a/go.mod b/go.mod index 42a6047536..9e3d910dca 100644 --- a/go.mod +++ b/go.mod @@ -344,7 +344,7 @@ require ( ) replace ( - github.com/CosmWasm/wasmd => github.com/sei-protocol/sei-wasmd v0.2.4 + github.com/CosmWasm/wasmd => github.com/sei-protocol/sei-wasmd v0.2.5-0.20241107175838-0d53ba130a0e github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.44 github.com/cosmos/iavl => github.com/sei-protocol/sei-iavl v0.2.0 diff --git a/go.sum b/go.sum index 05415a6bab..c502d19c6e 100644 --- a/go.sum +++ b/go.sum @@ -1359,8 +1359,8 @@ github.com/sei-protocol/sei-tendermint v0.4.3 h1:/Nx3Q309B4N61P3e6ScYiVuHgBRdapc github.com/sei-protocol/sei-tendermint v0.4.3/go.mod h1:4LSlJdhl3nf3OmohliwRNUFLOB1XWlrmSodrIP7fLh4= github.com/sei-protocol/sei-tm-db v0.0.5 h1:3WONKdSXEqdZZeLuWYfK5hP37TJpfaUa13vAyAlvaQY= github.com/sei-protocol/sei-tm-db v0.0.5/go.mod h1:Cpa6rGyczgthq7/0pI31jys2Fw0Nfrc+/jKdP1prVqY= -github.com/sei-protocol/sei-wasmd v0.2.4 h1:W++xiJ1P57BhBW8TGk8vfPRJlWXr1vp2kQCvSc8Qpaw= -github.com/sei-protocol/sei-wasmd v0.2.4/go.mod h1:fKHnK3Nms+BZeGvXeIC3SEzUDfkB7/tYOf95kVOhiO4= +github.com/sei-protocol/sei-wasmd v0.2.5-0.20241107175838-0d53ba130a0e h1:/w3VQZBOzCUQNDLFdAPm3nguyD7l2K6453E+U++2p40= +github.com/sei-protocol/sei-wasmd v0.2.5-0.20241107175838-0d53ba130a0e/go.mod h1:fKHnK3Nms+BZeGvXeIC3SEzUDfkB7/tYOf95kVOhiO4= github.com/sei-protocol/tm-db v0.0.4 h1:7Y4EU62Xzzg6wKAHEotm7SXQR0aPLcGhKHkh3qd0tnk= github.com/sei-protocol/tm-db v0.0.4/go.mod h1:PWsIWOTwdwC7Ow/GUvx8HgUJTO691pBuorIQD8JvwAs= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= diff --git a/precompiles/common/expected_keepers.go b/precompiles/common/expected_keepers.go index bd7f3e687d..d29560c9ca 100644 --- a/precompiles/common/expected_keepers.go +++ b/precompiles/common/expected_keepers.go @@ -83,7 +83,7 @@ type WasmdKeeper interface { } type WasmdViewKeeper interface { - QuerySmart(ctx sdk.Context, contractAddr sdk.AccAddress, req []byte) ([]byte, error) + QuerySmartSafe(ctx sdk.Context, contractAddr sdk.AccAddress, req []byte) ([]byte, error) } type StakingKeeper interface { diff --git a/precompiles/pointer/pointer.go b/precompiles/pointer/pointer.go index 6d1502cd14..1f3c1ade84 100644 --- a/precompiles/pointer/pointer.go +++ b/precompiles/pointer/pointer.go @@ -134,7 +134,7 @@ func (p PrecompileExecutor) AddCW20(ctx sdk.Context, method *ethabi.Method, call if err != nil { return nil, 0, err } - res, err := p.wasmdKeeper.QuerySmart(ctx, cwAddress, []byte("{\"token_info\":{}}")) + res, err := p.wasmdKeeper.QuerySmartSafe(ctx, cwAddress, []byte("{\"token_info\":{}}")) if err != nil { return nil, 0, err } @@ -165,7 +165,7 @@ func (p PrecompileExecutor) AddCW721(ctx sdk.Context, method *ethabi.Method, cal if err != nil { return nil, 0, err } - res, err := p.wasmdKeeper.QuerySmart(ctx, cwAddress, []byte("{\"contract_info\":{}}")) + res, err := p.wasmdKeeper.QuerySmartSafe(ctx, cwAddress, []byte("{\"contract_info\":{}}")) if err != nil { return nil, 0, err } diff --git a/precompiles/wasmd/wasmd.go b/precompiles/wasmd/wasmd.go index a01b9d56c5..5e48cd9a15 100644 --- a/precompiles/wasmd/wasmd.go +++ b/precompiles/wasmd/wasmd.go @@ -448,8 +448,7 @@ func (p PrecompileExecutor) query(ctx sdk.Context, method *abi.Method, args []in rerr = err return } - - res, err := p.wasmdViewKeeper.QuerySmart(ctx, contractAddr, req) + res, err := p.wasmdViewKeeper.QuerySmartSafe(ctx, contractAddr, req) if err != nil { rerr = err return From df0ca5b6be35fe6012cd9d08043d99fc3a9d75a6 Mon Sep 17 00:00:00 2001 From: carson <104383295+codebycarson@users.noreply.github.com> Date: Tue, 12 Nov 2024 05:24:39 -0700 Subject: [PATCH 14/33] Remove Vue code generated by ignite (#1906) Ignite CLI generated this vue frontend code, which is not needed and clutters up the repository, this PR removes this folder. --- .../wasmd/cosmwasm.wasm.v1/index.d.ts | 27 - .../CosmWasm/wasmd/cosmwasm.wasm.v1/index.js | 611 -- .../CosmWasm/wasmd/cosmwasm.wasm.v1/index.ts | 663 -- .../wasmd/cosmwasm.wasm.v1/module/index.d.ts | 36 - .../wasmd/cosmwasm.wasm.v1/module/index.js | 55 - .../wasmd/cosmwasm.wasm.v1/module/index.ts | 81 - .../wasmd/cosmwasm.wasm.v1/module/rest.d.ts | 529 -- .../wasmd/cosmwasm.wasm.v1/module/rest.js | 297 - .../wasmd/cosmwasm.wasm.v1/module/rest.ts | 812 --- .../cosmos/base/query/v1beta1/pagination.d.ts | 83 - .../cosmos/base/query/v1beta1/pagination.js | 242 - .../cosmos/base/query/v1beta1/pagination.ts | 328 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../module/types/cosmos_proto/cosmos.d.ts | 1 - .../module/types/cosmos_proto/cosmos.js | 2 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../types/cosmwasm/wasm/v1/genesis.d.ts | 80 - .../module/types/cosmwasm/wasm/v1/genesis.js | 578 -- .../module/types/cosmwasm/wasm/v1/genesis.ts | 703 -- .../module/types/cosmwasm/wasm/v1/ibc.d.ts | 45 - .../module/types/cosmwasm/wasm/v1/ibc.js | 209 - .../module/types/cosmwasm/wasm/v1/ibc.ts | 264 - .../types/cosmwasm/wasm/v1/proposal.d.ts | 235 - .../module/types/cosmwasm/wasm/v1/proposal.js | 1397 ---- .../module/types/cosmwasm/wasm/v1/proposal.ts | 1651 ----- .../module/types/cosmwasm/wasm/v1/query.d.ts | 335 - .../module/types/cosmwasm/wasm/v1/query.js | 1503 ----- .../module/types/cosmwasm/wasm/v1/query.ts | 2036 ------ .../module/types/cosmwasm/wasm/v1/tx.d.ts | 220 - .../module/types/cosmwasm/wasm/v1/tx.js | 1006 --- .../module/types/cosmwasm/wasm/v1/tx.ts | 1300 ---- .../module/types/cosmwasm/wasm/v1/types.d.ts | 167 - .../module/types/cosmwasm/wasm/v1/types.js | 863 --- .../module/types/cosmwasm/wasm/v1/types.ts | 1043 --- .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 -- .../module/types/google/api/http.ts | 706 -- .../module/types/google/protobuf/any.d.ts | 132 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.d.ts | 1022 --- .../types/google/protobuf/descriptor.js | 4144 ------------ .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../wasmd/cosmwasm.wasm.v1/package.json | 18 - .../CosmWasm/wasmd/cosmwasm.wasm.v1/vuex-root | 1 - .../cosmos-sdk/cosmos.auth.v1beta1/index.ts | 207 - .../cosmos.auth.v1beta1/module/index.ts | 57 - .../cosmos.auth.v1beta1/module/rest.ts | 500 -- .../module/types/cosmos/auth/v1beta1/auth.ts | 441 -- .../types/cosmos/auth/v1beta1/genesis.ts | 107 - .../module/types/cosmos/auth/v1beta1/query.ts | 493 -- .../cosmos/base/query/v1beta1/pagination.ts | 328 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.ts | 706 -- .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../cosmos.auth.v1beta1/package.json | 18 - .../cosmos-sdk/cosmos.auth.v1beta1/vuex-root | 1 - .../cosmos.authz.v1beta1/index.d.ts | 8 - .../cosmos-sdk/cosmos.authz.v1beta1/index.js | 279 - .../cosmos-sdk/cosmos.authz.v1beta1/index.ts | 308 - .../cosmos.authz.v1beta1/module/index.d.ts | 26 - .../cosmos.authz.v1beta1/module/index.js | 40 - .../cosmos.authz.v1beta1/module/index.ts | 66 - .../cosmos.authz.v1beta1/module/rest.d.ts | 514 -- .../cosmos.authz.v1beta1/module/rest.js | 185 - .../cosmos.authz.v1beta1/module/rest.ts | 719 --- .../types/cosmos/authz/v1beta1/authz.d.ts | 58 - .../types/cosmos/authz/v1beta1/authz.js | 269 - .../types/cosmos/authz/v1beta1/authz.ts | 335 - .../types/cosmos/authz/v1beta1/event.d.ts | 40 - .../types/cosmos/authz/v1beta1/event.js | 181 - .../types/cosmos/authz/v1beta1/event.ts | 215 - .../types/cosmos/authz/v1beta1/genesis.d.ts | 20 - .../types/cosmos/authz/v1beta1/genesis.js | 61 - .../types/cosmos/authz/v1beta1/genesis.ts | 89 - .../types/cosmos/authz/v1beta1/query.d.ts | 121 - .../types/cosmos/authz/v1beta1/query.js | 547 -- .../types/cosmos/authz/v1beta1/query.ts | 732 --- .../module/types/cosmos/authz/v1beta1/tx.d.ts | 125 - .../module/types/cosmos/authz/v1beta1/tx.js | 431 -- .../module/types/cosmos/authz/v1beta1/tx.ts | 554 -- .../types/cosmos/base/abci/v1beta1/abci.d.ts | 211 - .../types/cosmos/base/abci/v1beta1/abci.js | 1110 ---- .../types/cosmos/base/abci/v1beta1/abci.ts | 1279 ---- .../cosmos/base/query/v1beta1/pagination.d.ts | 83 - .../cosmos/base/query/v1beta1/pagination.js | 242 - .../cosmos/base/query/v1beta1/pagination.ts | 327 - .../module/types/cosmos_proto/cosmos.d.ts | 1 - .../module/types/cosmos_proto/cosmos.js | 2 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 -- .../module/types/google/api/http.ts | 705 -- .../module/types/google/protobuf/any.d.ts | 132 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.d.ts | 1022 --- .../types/google/protobuf/descriptor.js | 4144 ------------ .../types/google/protobuf/descriptor.ts | 5261 --------------- .../types/google/protobuf/duration.d.ts | 91 - .../module/types/google/protobuf/duration.js | 95 - .../module/types/google/protobuf/duration.ts | 188 - .../types/google/protobuf/timestamp.d.ts | 122 - .../module/types/google/protobuf/timestamp.js | 95 - .../module/types/google/protobuf/timestamp.ts | 219 - .../module/types/tendermint/abci/types.d.ts | 697 -- .../module/types/tendermint/abci/types.js | 4788 -------------- .../module/types/tendermint/abci/types.ts | 5624 ---------------- .../module/types/tendermint/crypto/keys.d.ts | 19 - .../module/types/tendermint/crypto/keys.js | 105 - .../module/types/tendermint/crypto/keys.ts | 130 - .../module/types/tendermint/crypto/proof.d.ts | 73 - .../module/types/tendermint/crypto/proof.js | 456 -- .../module/types/tendermint/crypto/proof.ts | 529 -- .../module/types/tendermint/types/params.d.ts | 124 - .../module/types/tendermint/types/params.js | 510 -- .../module/types/tendermint/types/params.ts | 625 -- .../module/types/tendermint/types/types.d.ts | 233 - .../module/types/tendermint/types/types.js | 1689 ----- .../module/types/tendermint/types/types.ts | 1912 ------ .../types/tendermint/types/validator.d.ts | 44 - .../types/tendermint/types/validator.js | 333 - .../types/tendermint/types/validator.ts | 382 -- .../types/tendermint/version/types.d.ts | 39 - .../module/types/tendermint/version/types.js | 165 - .../module/types/tendermint/version/types.ts | 202 - .../cosmos.authz.v1beta1/package.json | 18 - .../cosmos-sdk/cosmos.authz.v1beta1/vuex-root | 1 - .../cosmos-sdk/cosmos.bank.v1beta1/index.d.ts | 12 - .../cosmos-sdk/cosmos.bank.v1beta1/index.js | 368 -- .../cosmos-sdk/cosmos.bank.v1beta1/index.ts | 436 -- .../cosmos.bank.v1beta1/module/index.d.ts | 24 - .../cosmos.bank.v1beta1/module/index.js | 37 - .../cosmos.bank.v1beta1/module/index.ts | 63 - .../cosmos.bank.v1beta1/module/rest.d.ts | 381 -- .../cosmos.bank.v1beta1/module/rest.js | 258 - .../cosmos.bank.v1beta1/module/rest.ts | 636 -- .../types/cosmos/bank/v1beta1/authz.d.ts | 24 - .../module/types/cosmos/bank/v1beta1/authz.js | 61 - .../module/types/cosmos/bank/v1beta1/authz.ts | 90 - .../types/cosmos/bank/v1beta1/bank.d.ts | 137 - .../module/types/cosmos/bank/v1beta1/bank.js | 616 -- .../module/types/cosmos/bank/v1beta1/bank.ts | 737 --- .../types/cosmos/bank/v1beta1/genesis.d.ts | 47 - .../types/cosmos/bank/v1beta1/genesis.js | 208 - .../types/cosmos/bank/v1beta1/genesis.ts | 254 - .../types/cosmos/bank/v1beta1/query.d.ts | 279 - .../module/types/cosmos/bank/v1beta1/query.js | 1097 ---- .../module/types/cosmos/bank/v1beta1/query.ts | 1518 ----- .../module/types/cosmos/bank/v1beta1/tx.d.ts | 70 - .../module/types/cosmos/bank/v1beta1/tx.js | 262 - .../module/types/cosmos/bank/v1beta1/tx.ts | 337 - .../cosmos/base/query/v1beta1/pagination.d.ts | 83 - .../cosmos/base/query/v1beta1/pagination.js | 242 - .../cosmos/base/query/v1beta1/pagination.ts | 328 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../module/types/cosmos_proto/cosmos.d.ts | 1 - .../module/types/cosmos_proto/cosmos.js | 2 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 -- .../module/types/google/api/http.ts | 706 -- .../types/google/protobuf/descriptor.d.ts | 1022 --- .../types/google/protobuf/descriptor.js | 4144 ------------ .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../cosmos.bank.v1beta1/package.json | 18 - .../cosmos-sdk/cosmos.bank.v1beta1/vuex-root | 1 - .../cosmos.base.tendermint.v1beta1/index.ts | 298 - .../module/index.ts | 57 - .../module/rest.ts | 987 --- .../cosmos/base/query/v1beta1/pagination.ts | 328 - .../cosmos/base/tendermint/v1beta1/query.ts | 1584 ----- .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.ts | 706 -- .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../module/types/google/protobuf/timestamp.ts | 219 - .../module/types/tendermint/crypto/keys.ts | 130 - .../module/types/tendermint/crypto/proof.ts | 529 -- .../module/types/tendermint/p2p/types.ts | 557 -- .../module/types/tendermint/types/block.ts | 138 - .../module/types/tendermint/types/evidence.ts | 611 -- .../module/types/tendermint/types/types.ts | 1943 ------ .../types/tendermint/types/validator.ts | 382 -- .../module/types/tendermint/version/types.ts | 202 - .../package.json | 18 - .../cosmos.base.tendermint.v1beta1/vuex-root | 1 - .../cosmos.crisis.v1beta1/index.d.ts | 3 - .../cosmos-sdk/cosmos.crisis.v1beta1/index.js | 128 - .../cosmos-sdk/cosmos.crisis.v1beta1/index.ts | 138 - .../cosmos.crisis.v1beta1/module/index.d.ts | 22 - .../cosmos.crisis.v1beta1/module/index.js | 34 - .../cosmos.crisis.v1beta1/module/index.ts | 60 - .../cosmos.crisis.v1beta1/module/rest.d.ts | 73 - .../cosmos.crisis.v1beta1/module/rest.js | 137 - .../cosmos.crisis.v1beta1/module/rest.ts | 223 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../types/cosmos/crisis/v1beta1/genesis.d.ts | 23 - .../types/cosmos/crisis/v1beta1/genesis.js | 58 - .../types/cosmos/crisis/v1beta1/genesis.ts | 83 - .../types/cosmos/crisis/v1beta1/tx.d.ts | 43 - .../module/types/cosmos/crisis/v1beta1/tx.js | 148 - .../module/types/cosmos/crisis/v1beta1/tx.ts | 223 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../types/google/protobuf/descriptor.d.ts | 1022 --- .../types/google/protobuf/descriptor.js | 4144 ------------ .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../cosmos.crisis.v1beta1/package.json | 18 - .../cosmos.crisis.v1beta1/vuex-root | 1 - .../cosmos.distribution.v1beta1/index.d.ts | 22 - .../cosmos.distribution.v1beta1/index.js | 457 -- .../cosmos.distribution.v1beta1/index.ts | 525 -- .../module/index.d.ts | 28 - .../module/index.js | 43 - .../module/index.ts | 69 - .../module/rest.d.ts | 367 -- .../module/rest.js | 268 - .../module/rest.ts | 613 -- .../cosmos/base/query/v1beta1/pagination.d.ts | 83 - .../cosmos/base/query/v1beta1/pagination.js | 242 - .../cosmos/base/query/v1beta1/pagination.ts | 328 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../distribution/v1beta1/distribution.d.ts | 201 - .../distribution/v1beta1/distribution.js | 1075 ---- .../distribution/v1beta1/distribution.ts | 1355 ---- .../cosmos/distribution/v1beta1/genesis.d.ts | 155 - .../cosmos/distribution/v1beta1/genesis.js | 981 --- .../cosmos/distribution/v1beta1/genesis.ts | 1343 ---- .../cosmos/distribution/v1beta1/query.d.ts | 321 - .../cosmos/distribution/v1beta1/query.js | 1259 ---- .../cosmos/distribution/v1beta1/query.ts | 1845 ------ .../types/cosmos/distribution/v1beta1/tx.d.ts | 141 - .../types/cosmos/distribution/v1beta1/tx.js | 481 -- .../types/cosmos/distribution/v1beta1/tx.ts | 728 --- .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 -- .../module/types/google/api/http.ts | 706 -- .../types/google/protobuf/descriptor.d.ts | 1022 --- .../types/google/protobuf/descriptor.js | 4144 ------------ .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../cosmos.distribution.v1beta1/package.json | 18 - .../cosmos.distribution.v1beta1/vuex-root | 1 - .../cosmos.evidence.v1beta1/index.d.ts | 4 - .../cosmos.evidence.v1beta1/index.js | 178 - .../cosmos.evidence.v1beta1/index.ts | 202 - .../cosmos.evidence.v1beta1/module/index.d.ts | 22 - .../cosmos.evidence.v1beta1/module/index.js | 34 - .../cosmos.evidence.v1beta1/module/index.ts | 60 - .../cosmos.evidence.v1beta1/module/rest.d.ts | 289 - .../cosmos.evidence.v1beta1/module/rest.js | 169 - .../cosmos.evidence.v1beta1/module/rest.ts | 467 -- .../cosmos/base/query/v1beta1/pagination.d.ts | 83 - .../cosmos/base/query/v1beta1/pagination.js | 242 - .../cosmos/base/query/v1beta1/pagination.ts | 328 - .../cosmos/evidence/v1beta1/evidence.d.ts | 24 - .../types/cosmos/evidence/v1beta1/evidence.js | 160 - .../types/cosmos/evidence/v1beta1/evidence.ts | 192 - .../cosmos/evidence/v1beta1/genesis.d.ts | 20 - .../types/cosmos/evidence/v1beta1/genesis.js | 61 - .../types/cosmos/evidence/v1beta1/genesis.ts | 86 - .../types/cosmos/evidence/v1beta1/query.d.ts | 81 - .../types/cosmos/evidence/v1beta1/query.js | 300 - .../types/cosmos/evidence/v1beta1/query.ts | 429 -- .../types/cosmos/evidence/v1beta1/tx.d.ts | 51 - .../types/cosmos/evidence/v1beta1/tx.js | 172 - .../types/cosmos/evidence/v1beta1/tx.ts | 248 - .../module/types/cosmos_proto/cosmos.d.ts | 1 - .../module/types/cosmos_proto/cosmos.js | 2 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 -- .../module/types/google/api/http.ts | 706 -- .../module/types/google/protobuf/any.d.ts | 132 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.d.ts | 1022 --- .../types/google/protobuf/descriptor.js | 4144 ------------ .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../types/google/protobuf/timestamp.d.ts | 122 - .../module/types/google/protobuf/timestamp.js | 95 - .../module/types/google/protobuf/timestamp.ts | 219 - .../cosmos.evidence.v1beta1/package.json | 18 - .../cosmos.evidence.v1beta1/vuex-root | 1 - .../cosmos.feegrant.v1beta1/index.d.ts | 7 - .../cosmos.feegrant.v1beta1/index.js | 216 - .../cosmos.feegrant.v1beta1/index.ts | 236 - .../cosmos.feegrant.v1beta1/module/index.d.ts | 24 - .../cosmos.feegrant.v1beta1/module/index.js | 37 - .../cosmos.feegrant.v1beta1/module/index.ts | 63 - .../cosmos.feegrant.v1beta1/module/rest.d.ts | 294 - .../cosmos.feegrant.v1beta1/module/rest.js | 169 - .../cosmos.feegrant.v1beta1/module/rest.ts | 477 -- .../cosmos/base/query/v1beta1/pagination.d.ts | 83 - .../cosmos/base/query/v1beta1/pagination.js | 242 - .../cosmos/base/query/v1beta1/pagination.ts | 328 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../cosmos/feegrant/v1beta1/feegrant.d.ts | 95 - .../types/cosmos/feegrant/v1beta1/feegrant.js | 432 -- .../types/cosmos/feegrant/v1beta1/feegrant.ts | 544 -- .../cosmos/feegrant/v1beta1/genesis.d.ts | 20 - .../types/cosmos/feegrant/v1beta1/genesis.js | 61 - .../types/cosmos/feegrant/v1beta1/genesis.ts | 87 - .../types/cosmos/feegrant/v1beta1/query.d.ts | 79 - .../types/cosmos/feegrant/v1beta1/query.js | 302 - .../types/cosmos/feegrant/v1beta1/query.ts | 417 -- .../types/cosmos/feegrant/v1beta1/tx.d.ts | 84 - .../types/cosmos/feegrant/v1beta1/tx.js | 257 - .../types/cosmos/feegrant/v1beta1/tx.ts | 376 -- .../module/types/cosmos_proto/cosmos.d.ts | 1 - .../module/types/cosmos_proto/cosmos.js | 2 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 -- .../module/types/google/api/http.ts | 706 -- .../module/types/google/protobuf/any.d.ts | 132 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.d.ts | 1022 --- .../types/google/protobuf/descriptor.js | 4144 ------------ .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../types/google/protobuf/duration.d.ts | 91 - .../module/types/google/protobuf/duration.js | 95 - .../module/types/google/protobuf/duration.ts | 188 - .../types/google/protobuf/timestamp.d.ts | 122 - .../module/types/google/protobuf/timestamp.js | 95 - .../module/types/google/protobuf/timestamp.ts | 219 - .../cosmos.feegrant.v1beta1/package.json | 18 - .../cosmos.feegrant.v1beta1/vuex-root | 1 - .../cosmos-sdk/cosmos.gov.v1beta1/index.d.ts | 12 - .../cosmos-sdk/cosmos.gov.v1beta1/index.js | 424 -- .../cosmos-sdk/cosmos.gov.v1beta1/index.ts | 484 -- .../cosmos.gov.v1beta1/module/index.d.ts | 28 - .../cosmos.gov.v1beta1/module/index.js | 43 - .../cosmos.gov.v1beta1/module/index.ts | 69 - .../cosmos.gov.v1beta1/module/rest.d.ts | 679 -- .../cosmos.gov.v1beta1/module/rest.js | 296 - .../cosmos.gov.v1beta1/module/rest.ts | 950 --- .../cosmos/base/query/v1beta1/pagination.d.ts | 83 - .../cosmos/base/query/v1beta1/pagination.js | 242 - .../cosmos/base/query/v1beta1/pagination.ts | 328 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../types/cosmos/gov/v1beta1/genesis.d.ts | 32 - .../types/cosmos/gov/v1beta1/genesis.js | 221 - .../types/cosmos/gov/v1beta1/genesis.ts | 274 - .../module/types/cosmos/gov/v1beta1/gov.d.ts | 215 - .../module/types/cosmos/gov/v1beta1/gov.js | 1118 ---- .../module/types/cosmos/gov/v1beta1/gov.ts | 1323 ---- .../types/cosmos/gov/v1beta1/query.d.ts | 262 - .../module/types/cosmos/gov/v1beta1/query.js | 1188 ---- .../module/types/cosmos/gov/v1beta1/query.ts | 1548 ----- .../module/types/cosmos/gov/v1beta1/tx.d.ts | 140 - .../module/types/cosmos/gov/v1beta1/tx.js | 588 -- .../module/types/cosmos/gov/v1beta1/tx.ts | 755 --- .../module/types/cosmos_proto/cosmos.d.ts | 1 - .../module/types/cosmos_proto/cosmos.js | 2 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 -- .../module/types/google/api/http.ts | 706 -- .../module/types/google/protobuf/any.d.ts | 132 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.d.ts | 1022 --- .../types/google/protobuf/descriptor.js | 4144 ------------ .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../types/google/protobuf/duration.d.ts | 91 - .../module/types/google/protobuf/duration.js | 95 - .../module/types/google/protobuf/duration.ts | 188 - .../types/google/protobuf/timestamp.d.ts | 122 - .../module/types/google/protobuf/timestamp.js | 95 - .../module/types/google/protobuf/timestamp.ts | 219 - .../cosmos.gov.v1beta1/package.json | 18 - .../cosmos-sdk/cosmos.gov.v1beta1/vuex-root | 1 - .../cosmos-sdk/cosmos.params.v1beta1/index.ts | 147 - .../cosmos.params.v1beta1/module/index.ts | 57 - .../cosmos.params.v1beta1/module/rest.ts | 254 - .../types/cosmos/params/v1beta1/params.ts | 231 - .../types/cosmos/params/v1beta1/query.ts | 199 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.ts | 706 -- .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../cosmos.params.v1beta1/package.json | 18 - .../cosmos.params.v1beta1/vuex-root | 1 - .../cosmos.slashing.v1beta1/index.d.ts | 8 - .../cosmos.slashing.v1beta1/index.js | 207 - .../cosmos.slashing.v1beta1/index.ts | 239 - .../cosmos.slashing.v1beta1/module/index.d.ts | 22 - .../cosmos.slashing.v1beta1/module/index.js | 34 - .../cosmos.slashing.v1beta1/module/index.ts | 60 - .../cosmos.slashing.v1beta1/module/rest.d.ts | 229 - .../cosmos.slashing.v1beta1/module/rest.js | 183 - .../cosmos.slashing.v1beta1/module/rest.ts | 425 -- .../cosmos/base/query/v1beta1/pagination.d.ts | 83 - .../cosmos/base/query/v1beta1/pagination.js | 242 - .../cosmos/base/query/v1beta1/pagination.ts | 328 - .../cosmos/slashing/v1beta1/genesis.d.ts | 75 - .../types/cosmos/slashing/v1beta1/genesis.js | 349 - .../types/cosmos/slashing/v1beta1/genesis.ts | 448 -- .../types/cosmos/slashing/v1beta1/query.d.ts | 109 - .../types/cosmos/slashing/v1beta1/query.js | 372 -- .../types/cosmos/slashing/v1beta1/query.ts | 560 -- .../cosmos/slashing/v1beta1/slashing.d.ts | 57 - .../types/cosmos/slashing/v1beta1/slashing.js | 369 -- .../types/cosmos/slashing/v1beta1/slashing.ts | 471 -- .../types/cosmos/slashing/v1beta1/tx.d.ts | 45 - .../types/cosmos/slashing/v1beta1/tx.js | 97 - .../types/cosmos/slashing/v1beta1/tx.ts | 151 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 -- .../module/types/google/api/http.ts | 706 -- .../types/google/protobuf/descriptor.d.ts | 1022 --- .../types/google/protobuf/descriptor.js | 4144 ------------ .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../types/google/protobuf/duration.d.ts | 91 - .../module/types/google/protobuf/duration.js | 95 - .../module/types/google/protobuf/duration.ts | 188 - .../types/google/protobuf/timestamp.d.ts | 122 - .../module/types/google/protobuf/timestamp.js | 95 - .../module/types/google/protobuf/timestamp.ts | 219 - .../cosmos.slashing.v1beta1/package.json | 18 - .../cosmos.slashing.v1beta1/vuex-root | 1 - .../cosmos.staking.v1beta1/index.d.ts | 26 - .../cosmos.staking.v1beta1/index.js | 626 -- .../cosmos.staking.v1beta1/index.ts | 730 --- .../cosmos.staking.v1beta1/module/index.d.ts | 30 - .../cosmos.staking.v1beta1/module/index.js | 46 - .../cosmos.staking.v1beta1/module/index.ts | 72 - .../cosmos.staking.v1beta1/module/rest.d.ts | 868 --- .../cosmos.staking.v1beta1/module/rest.js | 362 -- .../cosmos.staking.v1beta1/module/rest.ts | 1251 ---- .../cosmos/base/query/v1beta1/pagination.d.ts | 83 - .../cosmos/base/query/v1beta1/pagination.js | 242 - .../cosmos/base/query/v1beta1/pagination.ts | 328 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../types/cosmos/staking/v1beta1/authz.d.ts | 65 - .../types/cosmos/staking/v1beta1/authz.js | 238 - .../types/cosmos/staking/v1beta1/authz.ts | 321 - .../types/cosmos/staking/v1beta1/genesis.d.ts | 53 - .../types/cosmos/staking/v1beta1/genesis.js | 334 - .../types/cosmos/staking/v1beta1/genesis.ts | 423 -- .../types/cosmos/staking/v1beta1/query.d.ts | 493 -- .../types/cosmos/staking/v1beta1/query.js | 2122 ------- .../types/cosmos/staking/v1beta1/query.ts | 2941 --------- .../types/cosmos/staking/v1beta1/staking.d.ts | 381 -- .../types/cosmos/staking/v1beta1/staking.js | 2131 ------- .../types/cosmos/staking/v1beta1/staking.ts | 2607 -------- .../types/cosmos/staking/v1beta1/tx.d.ts | 182 - .../module/types/cosmos/staking/v1beta1/tx.js | 907 --- .../module/types/cosmos/staking/v1beta1/tx.ts | 1208 ---- .../module/types/cosmos_proto/cosmos.d.ts | 1 - .../module/types/cosmos_proto/cosmos.js | 2 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 -- .../module/types/google/api/http.ts | 706 -- .../module/types/google/protobuf/any.d.ts | 132 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.d.ts | 1022 --- .../types/google/protobuf/descriptor.js | 4144 ------------ .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../types/google/protobuf/duration.d.ts | 91 - .../module/types/google/protobuf/duration.js | 95 - .../module/types/google/protobuf/duration.ts | 188 - .../types/google/protobuf/timestamp.d.ts | 122 - .../module/types/google/protobuf/timestamp.js | 95 - .../module/types/google/protobuf/timestamp.ts | 219 - .../module/types/tendermint/crypto/keys.d.ts | 19 - .../module/types/tendermint/crypto/keys.js | 105 - .../module/types/tendermint/crypto/keys.ts | 130 - .../module/types/tendermint/crypto/proof.d.ts | 73 - .../module/types/tendermint/crypto/proof.js | 456 -- .../module/types/tendermint/crypto/proof.ts | 529 -- .../module/types/tendermint/types/types.d.ts | 233 - .../module/types/tendermint/types/types.js | 1689 ----- .../module/types/tendermint/types/types.ts | 1943 ------ .../types/tendermint/types/validator.d.ts | 44 - .../types/tendermint/types/validator.js | 333 - .../types/tendermint/types/validator.ts | 382 -- .../types/tendermint/version/types.d.ts | 39 - .../module/types/tendermint/version/types.js | 165 - .../module/types/tendermint/version/types.ts | 202 - .../cosmos.staking.v1beta1/package.json | 18 - .../cosmos.staking.v1beta1/vuex-root | 1 - .../cosmos-sdk/cosmos.tx.v1beta1/index.ts | 283 - .../cosmos.tx.v1beta1/module/index.ts | 57 - .../cosmos.tx.v1beta1/module/rest.ts | 1284 ---- .../types/cosmos/base/abci/v1beta1/abci.ts | 1281 ---- .../cosmos/base/query/v1beta1/pagination.ts | 328 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../crypto/multisig/v1beta1/multisig.ts | 212 - .../cosmos/tx/signing/v1beta1/signing.ts | 660 -- .../module/types/cosmos/tx/v1beta1/service.ts | 1230 ---- .../module/types/cosmos/tx/v1beta1/tx.ts | 1274 ---- .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.ts | 706 -- .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../module/types/google/protobuf/duration.ts | 188 - .../module/types/google/protobuf/timestamp.ts | 219 - .../module/types/tendermint/abci/types.ts | 5656 ----------------- .../module/types/tendermint/crypto/keys.ts | 130 - .../module/types/tendermint/crypto/proof.ts | 529 -- .../module/types/tendermint/types/block.ts | 138 - .../module/types/tendermint/types/evidence.ts | 611 -- .../module/types/tendermint/types/params.ts | 639 -- .../module/types/tendermint/types/types.ts | 1943 ------ .../types/tendermint/types/validator.ts | 382 -- .../module/types/tendermint/version/types.ts | 202 - .../cosmos-sdk/cosmos.tx.v1beta1/package.json | 18 - .../cosmos-sdk/cosmos.tx.v1beta1/vuex-root | 1 - .../cosmos.upgrade.v1beta1/index.ts | 238 - .../cosmos.upgrade.v1beta1/module/index.ts | 57 - .../cosmos.upgrade.v1beta1/module/rest.ts | 493 -- .../types/cosmos/upgrade/v1beta1/query.ts | 806 --- .../types/cosmos/upgrade/v1beta1/upgrade.ts | 543 -- .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.ts | 706 -- .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../module/types/google/protobuf/timestamp.ts | 219 - .../cosmos.upgrade.v1beta1/package.json | 18 - .../cosmos.upgrade.v1beta1/vuex-root | 1 - .../cosmos.vesting.v1beta1/index.d.ts | 9 - .../cosmos.vesting.v1beta1/index.js | 142 - .../cosmos.vesting.v1beta1/index.ts | 150 - .../cosmos.vesting.v1beta1/module/index.d.ts | 22 - .../cosmos.vesting.v1beta1/module/index.js | 34 - .../cosmos.vesting.v1beta1/module/index.ts | 60 - .../cosmos.vesting.v1beta1/module/rest.d.ts | 196 - .../cosmos.vesting.v1beta1/module/rest.js | 137 - .../cosmos.vesting.v1beta1/module/rest.ts | 347 - .../types/cosmos/auth/v1beta1/auth.d.ts | 54 - .../module/types/cosmos/auth/v1beta1/auth.js | 379 -- .../module/types/cosmos/auth/v1beta1/auth.ts | 441 -- .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../types/cosmos/vesting/v1beta1/tx.d.ts | 52 - .../module/types/cosmos/vesting/v1beta1/tx.js | 219 - .../module/types/cosmos/vesting/v1beta1/tx.ts | 292 - .../types/cosmos/vesting/v1beta1/vesting.d.ts | 102 - .../types/cosmos/vesting/v1beta1/vesting.js | 548 -- .../types/cosmos/vesting/v1beta1/vesting.ts | 738 --- .../module/types/cosmos_proto/cosmos.d.ts | 1 - .../module/types/cosmos_proto/cosmos.js | 2 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/protobuf/any.d.ts | 132 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.d.ts | 1022 --- .../types/google/protobuf/descriptor.js | 4144 ------------ .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../cosmos.vesting.v1beta1/package.json | 18 - .../cosmos.vesting.v1beta1/vuex-root | 1 - .../ibc.applications.transfer.v1/index.d.ts | 5 - .../ibc.applications.transfer.v1/index.js | 222 - .../ibc.applications.transfer.v1/index.ts | 265 - .../module/index.d.ts | 22 - .../module/index.js | 34 - .../module/index.ts | 60 - .../module/rest.d.ts | 365 -- .../module/rest.js | 197 - .../module/rest.ts | 565 -- .../cosmos/base/query/v1beta1/pagination.d.ts | 77 - .../cosmos/base/query/v1beta1/pagination.js | 218 - .../cosmos/base/query/v1beta1/pagination.ts | 299 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../types/cosmos/upgrade/v1beta1/upgrade.d.ts | 73 - .../types/cosmos/upgrade/v1beta1/upgrade.js | 334 - .../types/cosmos/upgrade/v1beta1/upgrade.ts | 414 -- .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 -- .../module/types/google/api/http.ts | 705 -- .../module/types/google/protobuf/any.d.ts | 132 - .../module/types/google/protobuf/any.js | 101 - .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.d.ts | 1022 --- .../types/google/protobuf/descriptor.js | 4144 ------------ .../types/google/protobuf/descriptor.ts | 5261 --------------- .../types/google/protobuf/timestamp.d.ts | 122 - .../module/types/google/protobuf/timestamp.js | 95 - .../module/types/google/protobuf/timestamp.ts | 219 - .../ibc/applications/transfer/v1/genesis.d.ts | 21 - .../ibc/applications/transfer/v1/genesis.js | 100 - .../ibc/applications/transfer/v1/genesis.ts | 125 - .../ibc/applications/transfer/v1/query.d.ts | 145 - .../ibc/applications/transfer/v1/query.js | 472 -- .../ibc/applications/transfer/v1/query.ts | 682 -- .../applications/transfer/v1/transfer.d.ts | 52 - .../ibc/applications/transfer/v1/transfer.js | 145 - .../ibc/applications/transfer/v1/transfer.ts | 194 - .../ibc/applications/transfer/v1/tx.d.ts | 66 - .../types/ibc/applications/transfer/v1/tx.js | 248 - .../types/ibc/applications/transfer/v1/tx.ts | 314 - .../types/ibc/core/client/v1/client.d.ts | 148 - .../module/types/ibc/core/client/v1/client.js | 622 -- .../module/types/ibc/core/client/v1/client.ts | 786 --- .../ibc.applications.transfer.v1/package.json | 18 - .../ibc.applications.transfer.v1/vuex-root | 1 - .../ibc.applications.transfer.v2/index.d.ts | 4 - .../ibc.applications.transfer.v2/index.js | 100 - .../ibc.applications.transfer.v2/index.ts | 114 - .../module/index.d.ts | 20 - .../module/index.js | 30 - .../module/index.ts | 57 - .../module/rest.d.ts | 69 - .../module/rest.js | 137 - .../module/rest.ts | 218 - .../ibc/applications/transfer/v2/packet.d.ts | 29 - .../ibc/applications/transfer/v2/packet.js | 122 - .../ibc/applications/transfer/v2/packet.ts | 153 - .../ibc.applications.transfer.v2/package.json | 18 - .../ibc.applications.transfer.v2/vuex-root | 1 - .../index.ts | 141 - .../module/index.ts | 57 - .../module/rest.ts | 251 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.ts | 706 -- .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../controller/v1/controller.ts | 87 - .../controller/v1/query.ts | 153 - .../package.json | 18 - .../vuex-root | 1 - .../index.ts | 141 - .../module/index.ts | 57 - .../module/rest.ts | 254 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.ts | 706 -- .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../interchain_accounts/host/v1/host.ts | 106 - .../interchain_accounts/host/v1/query.ts | 152 - .../package.json | 18 - .../vuex-root | 1 - .../v3/ibc.applications.transfer.v1/index.ts | 262 - .../module/index.ts | 60 - .../module/rest.ts | 565 -- .../cosmos/base/query/v1beta1/pagination.ts | 300 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../types/cosmos/upgrade/v1beta1/upgrade.ts | 414 -- .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.ts | 706 -- .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../module/types/google/protobuf/timestamp.ts | 219 - .../ibc/applications/transfer/v1/genesis.ts | 125 - .../ibc/applications/transfer/v1/query.ts | 682 -- .../ibc/applications/transfer/v1/transfer.ts | 200 - .../types/ibc/applications/transfer/v1/tx.ts | 315 - .../module/types/ibc/core/client/v1/client.ts | 814 --- .../ibc.applications.transfer.v1/package.json | 18 - .../v3/ibc.applications.transfer.v1/vuex-root | 1 - .../ibc-go/v3/ibc.core.channel.v1/index.ts | 517 -- .../v3/ibc.core.channel.v1/module/index.ts | 57 - .../v3/ibc.core.channel.v1/module/rest.ts | 1385 ---- .../cosmos/base/query/v1beta1/pagination.ts | 300 - .../types/cosmos/upgrade/v1beta1/upgrade.ts | 414 -- .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.ts | 706 -- .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../module/types/google/protobuf/timestamp.ts | 219 - .../types/ibc/core/channel/v1/channel.ts | 1073 ---- .../types/ibc/core/channel/v1/genesis.ts | 414 -- .../module/types/ibc/core/channel/v1/query.ts | 3549 ----------- .../module/types/ibc/core/channel/v1/tx.ts | 2439 ------- .../module/types/ibc/core/client/v1/client.ts | 814 --- .../v3/ibc.core.channel.v1/package.json | 18 - .../ibc-go/v3/ibc.core.channel.v1/vuex-root | 1 - .../ibc-go/v3/ibc.core.client.v1/index.ts | 372 -- .../v3/ibc.core.client.v1/module/index.ts | 57 - .../v3/ibc.core.client.v1/module/rest.ts | 1227 ---- .../cosmos/base/query/v1beta1/pagination.ts | 300 - .../types/cosmos/upgrade/v1beta1/upgrade.ts | 414 -- .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.ts | 706 -- .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../module/types/google/protobuf/timestamp.ts | 219 - .../module/types/ibc/core/client/v1/client.ts | 814 --- .../types/ibc/core/client/v1/genesis.ts | 481 -- .../module/types/ibc/core/client/v1/query.ts | 1741 ----- .../module/types/ibc/core/client/v1/tx.ts | 862 --- .../ibc-go/v3/ibc.core.client.v1/package.json | 18 - .../ibc-go/v3/ibc.core.client.v1/vuex-root | 1 - .../ibc-go/v3/ibc.core.connection.v1/index.ts | 273 - .../v3/ibc.core.connection.v1/module/index.ts | 57 - .../v3/ibc.core.connection.v1/module/rest.ts | 922 --- .../cosmos/base/query/v1beta1/pagination.ts | 300 - .../types/cosmos/upgrade/v1beta1/upgrade.ts | 414 -- .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.ts | 706 -- .../module/types/google/protobuf/any.ts | 240 - .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../module/types/google/protobuf/timestamp.ts | 219 - .../module/types/ibc/core/client/v1/client.ts | 814 --- .../ibc/core/commitment/v1/commitment.ts | 324 - .../ibc/core/connection/v1/connection.ts | 875 --- .../types/ibc/core/connection/v1/genesis.ts | 198 - .../types/ibc/core/connection/v1/query.ts | 1304 ---- .../module/types/ibc/core/connection/v1/tx.ts | 1300 ---- .../module/types/proofs.ts | 1831 ------ .../v3/ibc.core.connection.v1/package.json | 18 - .../v3/ibc.core.connection.v1/vuex-root | 1 - vue/src/store/generated/index.d.ts | 19 - vue/src/store/generated/index.js | 52 - vue/src/store/generated/index.ts | 83 - vue/src/store/generated/package.json | 17 - vue/src/store/generated/readme.md | 1 - .../seiprotocol.seichain.dex/index.d.ts | 28 - .../seiprotocol.seichain.dex/index.js | 550 -- .../seiprotocol.seichain.dex/index.ts | 662 -- .../module/index.d.ts | 26 - .../seiprotocol.seichain.dex/module/index.js | 40 - .../seiprotocol.seichain.dex/module/index.ts | 66 - .../seiprotocol.seichain.dex/module/rest.d.ts | 550 -- .../seiprotocol.seichain.dex/module/rest.js | 357 -- .../seiprotocol.seichain.dex/module/rest.ts | 897 --- .../types/cosmos/bank/v1beta1/bank.d.ts | 137 - .../module/types/cosmos/bank/v1beta1/bank.js | 616 -- .../module/types/cosmos/bank/v1beta1/bank.ts | 737 --- .../cosmos/base/query/v1beta1/pagination.d.ts | 83 - .../cosmos/base/query/v1beta1/pagination.js | 242 - .../cosmos/base/query/v1beta1/pagination.ts | 300 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../module/types/cosmos_proto/cosmos.d.ts | 1 - .../module/types/cosmos_proto/cosmos.js | 2 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../module/types/dex/asset_list.d.ts | 34 - .../module/types/dex/asset_list.js | 215 - .../module/types/dex/asset_list.ts | 239 - .../module/types/dex/contract.d.ts | 48 - .../module/types/dex/contract.js | 434 -- .../module/types/dex/contract.ts | 500 -- .../module/types/dex/enums.d.ts | 50 - .../module/types/dex/enums.js | 219 - .../module/types/dex/enums.ts | 235 - .../module/types/dex/genesis.d.ts | 30 - .../module/types/dex/genesis.js | 201 - .../module/types/dex/genesis.ts | 232 - .../module/types/dex/gov.d.ts | 55 - .../module/types/dex/gov.js | 302 - .../module/types/dex/gov.ts | 374 -- .../module/types/dex/long_book.d.ts | 19 - .../module/types/dex/long_book.js | 77 - .../module/types/dex/long_book.ts | 96 - .../module/types/dex/match_result.d.ts | 23 - .../module/types/dex/match_result.js | 173 - .../module/types/dex/match_result.ts | 201 - .../module/types/dex/order.d.ts | 56 - .../module/types/dex/order.js | 573 -- .../module/types/dex/order.ts | 625 -- .../module/types/dex/order_entry.d.ts | 33 - .../module/types/dex/order_entry.js | 252 - .../module/types/dex/order_entry.ts | 278 - .../module/types/dex/pair.d.ts | 30 - .../module/types/dex/pair.js | 169 - .../module/types/dex/pair.ts | 195 - .../module/types/dex/params.d.ts | 18 - .../module/types/dex/params.js | 79 - .../module/types/dex/params.ts | 109 - .../module/types/dex/price.d.ts | 36 - .../module/types/dex/price.js | 294 - .../module/types/dex/price.ts | 323 - .../module/types/dex/query.d.ts | 422 -- .../module/types/dex/query.js | 2644 -------- .../module/types/dex/query.ts | 3322 ---------- .../module/types/dex/settlement.d.ts | 39 - .../module/types/dex/settlement.js | 384 -- .../module/types/dex/settlement.ts | 416 -- .../module/types/dex/short_book.d.ts | 19 - .../module/types/dex/short_book.js | 77 - .../module/types/dex/short_book.ts | 96 - .../module/types/dex/tick_size.d.ts | 20 - .../module/types/dex/tick_size.js | 95 - .../module/types/dex/tick_size.ts | 113 - .../module/types/dex/twap.d.ts | 20 - .../module/types/dex/twap.js | 119 - .../module/types/dex/twap.ts | 142 - .../module/types/dex/tx.d.ts | 91 - .../module/types/dex/tx.js | 481 -- .../module/types/dex/tx.ts | 603 -- .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 -- .../module/types/google/api/http.ts | 706 -- .../types/google/protobuf/descriptor.d.ts | 1022 --- .../types/google/protobuf/descriptor.js | 4144 ------------ .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../seiprotocol.seichain.dex/package.json | 18 - .../seiprotocol.seichain.dex/vuex-root | 1 - .../seiprotocol.seichain.epoch/index.ts | 172 - .../module/index.ts | 57 - .../seiprotocol.seichain.epoch/module/rest.ts | 282 - .../cosmos/base/query/v1beta1/pagination.ts | 300 - .../module/types/epoch/epoch.ts | 233 - .../module/types/epoch/genesis.ts | 98 - .../module/types/epoch/params.ts | 56 - .../module/types/epoch/query.ts | 268 - .../module/types/epoch/tx.ts | 20 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.ts | 706 -- .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../module/types/google/protobuf/duration.ts | 188 - .../module/types/google/protobuf/timestamp.ts | 219 - .../seiprotocol.seichain.epoch/package.json | 18 - .../seiprotocol.seichain.epoch/vuex-root | 1 - .../seiprotocol.seichain.mint/index.ts | 172 - .../seiprotocol.seichain.mint/module/index.ts | 57 - .../seiprotocol.seichain.mint/module/rest.ts | 282 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.ts | 706 -- .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../module/types/mint/v1beta1/genesis.ts | 147 - .../module/types/mint/v1beta1/mint.ts | 256 - .../module/types/mint/v1beta1/query.ts | 348 - .../seiprotocol.seichain.mint/package.json | 18 - .../seiprotocol.seichain.mint/vuex-root | 1 - .../seiprotocol.seichain.oracle/index.d.ts | 16 - .../seiprotocol.seichain.oracle/index.js | 529 -- .../seiprotocol.seichain.oracle/index.ts | 629 -- .../module/index.d.ts | 28 - .../module/index.js | 43 - .../module/index.ts | 69 - .../module/rest.d.ts | 351 - .../module/rest.js | 322 - .../module/rest.ts | 623 -- .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 -- .../module/types/google/api/http.ts | 706 -- .../types/google/protobuf/descriptor.d.ts | 1022 --- .../types/google/protobuf/descriptor.js | 4144 ------------ .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../module/types/oracle/genesis.d.ts | 45 - .../module/types/oracle/genesis.js | 344 - .../module/types/oracle/genesis.ts | 453 -- .../module/types/oracle/oracle.d.ts | 124 - .../module/types/oracle/oracle.js | 928 --- .../module/types/oracle/oracle.ts | 1080 ---- .../module/types/oracle/query.d.ts | 392 -- .../module/types/oracle/query.js | 1562 ----- .../module/types/oracle/query.ts | 2333 ------- .../module/types/oracle/tx.d.ts | 141 - .../module/types/oracle/tx.js | 612 -- .../module/types/oracle/tx.ts | 834 --- .../seiprotocol.seichain.oracle/package.json | 18 - .../seiprotocol.seichain.oracle/vuex-root | 1 - .../index.d.ts | 7 - .../index.js | 339 - .../index.ts | 375 -- .../module/index.d.ts | 28 - .../module/index.js | 43 - .../module/index.ts | 69 - .../module/rest.d.ts | 193 - .../module/rest.js | 215 - .../module/rest.ts | 389 -- .../cosmos/base/query/v1beta1/pagination.d.ts | 83 - .../cosmos/base/query/v1beta1/pagination.js | 242 - .../cosmos/base/query/v1beta1/pagination.ts | 300 - .../types/cosmos/base/v1beta1/coin.d.ts | 63 - .../module/types/cosmos/base/v1beta1/coin.js | 245 - .../module/types/cosmos/base/v1beta1/coin.ts | 301 - .../module/types/cosmos_proto/cosmos.d.ts | 1 - .../module/types/cosmos_proto/cosmos.js | 2 - .../module/types/cosmos_proto/cosmos.ts | 2 - .../module/types/gogoproto/gogo.d.ts | 1 - .../module/types/gogoproto/gogo.js | 2 - .../module/types/gogoproto/gogo.ts | 2 - .../module/types/google/api/annotations.d.ts | 1 - .../module/types/google/api/annotations.js | 2 - .../module/types/google/api/annotations.ts | 2 - .../module/types/google/api/http.d.ts | 320 - .../module/types/google/api/http.js | 387 -- .../module/types/google/api/http.ts | 706 -- .../types/google/protobuf/descriptor.d.ts | 1022 --- .../types/google/protobuf/descriptor.js | 4144 ------------ .../types/google/protobuf/descriptor.ts | 5314 ---------------- .../types/tokenfactory/authorityMetadata.d.ts | 23 - .../types/tokenfactory/authorityMetadata.js | 54 - .../types/tokenfactory/authorityMetadata.ts | 85 - .../module/types/tokenfactory/genesis.d.ts | 38 - .../module/types/tokenfactory/genesis.js | 157 - .../module/types/tokenfactory/genesis.ts | 209 - .../module/types/tokenfactory/gov.d.ts | 19 - .../module/types/tokenfactory/gov.js | 109 - .../module/types/tokenfactory/gov.ts | 136 - .../module/types/tokenfactory/params.d.ts | 19 - .../module/types/tokenfactory/params.js | 63 - .../module/types/tokenfactory/params.ts | 91 - .../module/types/tokenfactory/query.d.ts | 182 - .../module/types/tokenfactory/query.js | 576 -- .../module/types/tokenfactory/query.ts | 875 --- .../module/types/tokenfactory/tx.d.ts | 140 - .../module/types/tokenfactory/tx.js | 478 -- .../module/types/tokenfactory/tx.ts | 633 -- .../package.json | 18 - .../vuex-root | 1 - 1009 files changed, 508808 deletions(-) delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/index.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/index.js delete mode 100755 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/index.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/index.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/index.js delete mode 100755 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/index.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/rest.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/rest.js delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/rest.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos_proto/cosmos.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos_proto/cosmos.js delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/genesis.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/genesis.js delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/genesis.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/ibc.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/ibc.js delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/ibc.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/proposal.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/proposal.js delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/proposal.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/query.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/query.js delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/query.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/tx.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/tx.js delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/tx.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/types.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/types.js delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/types.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/descriptor.ts delete mode 100755 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/package.json delete mode 100755 vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/vuex-root delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/index.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/auth/v1beta1/auth.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/auth/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/auth/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/package.json delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/authz.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/authz.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/authz.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/event.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/event.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/event.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos_proto/cosmos.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos_proto/cosmos.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/duration.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/duration.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/duration.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/timestamp.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/timestamp.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/timestamp.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/abci/types.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/abci/types.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/abci/types.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/keys.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/keys.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/keys.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/proof.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/proof.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/proof.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/params.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/params.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/params.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/types.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/types.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/types.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/validator.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/validator.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/validator.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/version/types.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/version/types.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/version/types.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/package.json delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/authz.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/authz.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/authz.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/package.json delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/vuex-root delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/index.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/cosmos/base/tendermint/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/protobuf/timestamp.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/crypto/keys.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/crypto/proof.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/p2p/types.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/block.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/evidence.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/types.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/validator.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/version/types.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/package.json delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/package.json delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/package.json delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/package.json delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/feegrant.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/feegrant.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/feegrant.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos_proto/cosmos.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos_proto/cosmos.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/duration.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/duration.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/duration.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/timestamp.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/timestamp.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/timestamp.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/package.json delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/package.json delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/vuex-root delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/index.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/cosmos/params/v1beta1/params.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/cosmos/params/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/package.json delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/package.json delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/authz.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/authz.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/authz.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/package.json delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/vuex-root delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/index.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/crypto/multisig/v1beta1/multisig.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/tx/signing/v1beta1/signing.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/tx/v1beta1/service.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/tx/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/duration.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/timestamp.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/abci/types.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/crypto/keys.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/crypto/proof.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/block.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/evidence.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/params.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/types.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/validator.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/version/types.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/package.json delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/vuex-root delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/index.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/cosmos/upgrade/v1beta1/query.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/cosmos/upgrade/v1beta1/upgrade.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/protobuf/timestamp.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/package.json delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.js delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.ts delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/package.json delete mode 100755 vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/index.js delete mode 100755 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/index.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/index.js delete mode 100755 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/any.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/any.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.ts delete mode 100755 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/package.json delete mode 100755 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/vuex-root delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/index.js delete mode 100755 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/index.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/index.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/index.js delete mode 100755 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/index.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/rest.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/rest.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/rest.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/types/ibc/applications/transfer/v2/packet.d.ts delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/types/ibc/applications/transfer/v2/packet.js delete mode 100644 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/types/ibc/applications/transfer/v2/packet.ts delete mode 100755 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/package.json delete mode 100755 vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/vuex-root delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/index.ts delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/index.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/rest.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/ibc/applications/interchain_accounts/controller/v1/controller.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/ibc/applications/interchain_accounts/controller/v1/query.ts delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/package.json delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/vuex-root delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/index.ts delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/index.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/rest.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/ibc/applications/interchain_accounts/host/v1/host.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/ibc/applications/interchain_accounts/host/v1/query.ts delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/package.json delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/vuex-root delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/index.ts delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/index.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/rest.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.ts delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/package.json delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/vuex-root delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/index.ts delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/index.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/rest.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/protobuf/timestamp.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.ts delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/package.json delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/vuex-root delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/index.ts delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/index.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/rest.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/protobuf/timestamp.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/client.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/query.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.ts delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/package.json delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/vuex-root delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/index.ts delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/index.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/rest.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/protobuf/any.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/protobuf/timestamp.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.ts delete mode 100644 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/proofs.ts delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/package.json delete mode 100755 vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/vuex-root delete mode 100644 vue/src/store/generated/index.d.ts delete mode 100644 vue/src/store/generated/index.js delete mode 100755 vue/src/store/generated/index.ts delete mode 100755 vue/src/store/generated/package.json delete mode 100755 vue/src/store/generated/readme.md delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/index.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/index.js delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/index.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/index.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/index.js delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/index.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/rest.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/rest.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/rest.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/bank/v1beta1/bank.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/bank/v1beta1/bank.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/bank/v1beta1/bank.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos_proto/cosmos.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos_proto/cosmos.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/asset_list.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/asset_list.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/asset_list.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/contract.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/contract.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/contract.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/enums.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/enums.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/enums.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/genesis.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/genesis.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/genesis.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/gov.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/gov.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/gov.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/long_book.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/long_book.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/long_book.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/match_result.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/match_result.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/match_result.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order_entry.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order_entry.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order_entry.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/pair.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/pair.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/pair.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/params.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/params.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/params.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/price.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/price.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/price.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/query.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/query.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/query.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/settlement.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/settlement.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/settlement.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/short_book.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/short_book.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/short_book.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tick_size.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tick_size.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tick_size.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/twap.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/twap.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/twap.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tx.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tx.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tx.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/protobuf/descriptor.ts delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/package.json delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/vuex-root delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/index.ts delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/index.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/rest.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/epoch.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/genesis.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/params.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/query.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/tx.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/protobuf/duration.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/protobuf/timestamp.ts delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/package.json delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/vuex-root delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/index.ts delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/index.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/rest.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/mint/v1beta1/genesis.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/mint/v1beta1/mint.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/mint/v1beta1/query.ts delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/package.json delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/vuex-root delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/index.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/index.js delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/index.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/index.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/index.js delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/index.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/rest.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/rest.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/rest.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/genesis.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/genesis.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/genesis.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/oracle.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/oracle.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/oracle.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/query.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/query.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/query.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/tx.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/tx.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/tx.ts delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/package.json delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/vuex-root delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/index.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/index.js delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/index.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/index.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/index.js delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/index.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/rest.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/rest.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/rest.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/query/v1beta1/pagination.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/query/v1beta1/pagination.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/v1beta1/coin.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/v1beta1/coin.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/v1beta1/coin.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos_proto/cosmos.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos_proto/cosmos.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos_proto/cosmos.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/gogoproto/gogo.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/gogoproto/gogo.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/gogoproto/gogo.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/annotations.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/annotations.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/annotations.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/http.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/http.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/http.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/protobuf/descriptor.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/protobuf/descriptor.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/protobuf/descriptor.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/authorityMetadata.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/authorityMetadata.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/authorityMetadata.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/genesis.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/genesis.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/genesis.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/gov.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/gov.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/gov.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/params.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/params.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/params.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/query.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/query.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/query.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/tx.d.ts delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/tx.js delete mode 100644 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/tx.ts delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/package.json delete mode 100755 vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/vuex-root diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/index.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/index.d.ts deleted file mode 100644 index 41d6a9bc28..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/index.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { GenesisState_GenMsgs } from "./module/types/cosmwasm/wasm/v1/genesis"; -import { Code } from "./module/types/cosmwasm/wasm/v1/genesis"; -import { Contract } from "./module/types/cosmwasm/wasm/v1/genesis"; -import { Sequence } from "./module/types/cosmwasm/wasm/v1/genesis"; -import { StoreCodeProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { InstantiateContractProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { MigrateContractProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { SudoContractProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { ExecuteContractProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { UpdateAdminProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { ClearAdminProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { PinCodesProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { UnpinCodesProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { AccessConfigUpdate } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { UpdateInstantiateConfigProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { CodeInfoResponse } from "./module/types/cosmwasm/wasm/v1/query"; -import { AccessTypeParam } from "./module/types/cosmwasm/wasm/v1/types"; -import { AccessConfig } from "./module/types/cosmwasm/wasm/v1/types"; -import { Params } from "./module/types/cosmwasm/wasm/v1/types"; -import { CodeInfo } from "./module/types/cosmwasm/wasm/v1/types"; -import { ContractInfo } from "./module/types/cosmwasm/wasm/v1/types"; -import { ContractCodeHistoryEntry } from "./module/types/cosmwasm/wasm/v1/types"; -import { AbsoluteTxPosition } from "./module/types/cosmwasm/wasm/v1/types"; -import { Model } from "./module/types/cosmwasm/wasm/v1/types"; -export { GenesisState_GenMsgs, Code, Contract, Sequence, StoreCodeProposal, InstantiateContractProposal, MigrateContractProposal, SudoContractProposal, ExecuteContractProposal, UpdateAdminProposal, ClearAdminProposal, PinCodesProposal, UnpinCodesProposal, AccessConfigUpdate, UpdateInstantiateConfigProposal, CodeInfoResponse, AccessTypeParam, AccessConfig, Params, CodeInfo, ContractInfo, ContractCodeHistoryEntry, AbsoluteTxPosition, Model }; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/index.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/index.js deleted file mode 100644 index c932e473b6..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/index.js +++ /dev/null @@ -1,611 +0,0 @@ -import { txClient, queryClient, MissingWalletError, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { GenesisState_GenMsgs } from "./module/types/cosmwasm/wasm/v1/genesis"; -import { Code } from "./module/types/cosmwasm/wasm/v1/genesis"; -import { Contract } from "./module/types/cosmwasm/wasm/v1/genesis"; -import { Sequence } from "./module/types/cosmwasm/wasm/v1/genesis"; -import { StoreCodeProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { InstantiateContractProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { MigrateContractProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { SudoContractProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { ExecuteContractProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { UpdateAdminProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { ClearAdminProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { PinCodesProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { UnpinCodesProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { AccessConfigUpdate } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { UpdateInstantiateConfigProposal } from "./module/types/cosmwasm/wasm/v1/proposal"; -import { CodeInfoResponse } from "./module/types/cosmwasm/wasm/v1/query"; -import { AccessTypeParam } from "./module/types/cosmwasm/wasm/v1/types"; -import { AccessConfig } from "./module/types/cosmwasm/wasm/v1/types"; -import { Params } from "./module/types/cosmwasm/wasm/v1/types"; -import { CodeInfo } from "./module/types/cosmwasm/wasm/v1/types"; -import { ContractInfo } from "./module/types/cosmwasm/wasm/v1/types"; -import { ContractCodeHistoryEntry } from "./module/types/cosmwasm/wasm/v1/types"; -import { AbsoluteTxPosition } from "./module/types/cosmwasm/wasm/v1/types"; -import { Model } from "./module/types/cosmwasm/wasm/v1/types"; -export { GenesisState_GenMsgs, Code, Contract, Sequence, StoreCodeProposal, InstantiateContractProposal, MigrateContractProposal, SudoContractProposal, ExecuteContractProposal, UpdateAdminProposal, ClearAdminProposal, PinCodesProposal, UnpinCodesProposal, AccessConfigUpdate, UpdateInstantiateConfigProposal, CodeInfoResponse, AccessTypeParam, AccessConfig, Params, CodeInfo, ContractInfo, ContractCodeHistoryEntry, AbsoluteTxPosition, Model }; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - ContractInfo: {}, - ContractHistory: {}, - ContractsByCode: {}, - AllContractState: {}, - RawContractState: {}, - SmartContractState: {}, - Code: {}, - Codes: {}, - PinnedCodes: {}, - _Structure: { - GenesisState_GenMsgs: getStructure(GenesisState_GenMsgs.fromPartial({})), - Code: getStructure(Code.fromPartial({})), - Contract: getStructure(Contract.fromPartial({})), - Sequence: getStructure(Sequence.fromPartial({})), - StoreCodeProposal: getStructure(StoreCodeProposal.fromPartial({})), - InstantiateContractProposal: getStructure(InstantiateContractProposal.fromPartial({})), - MigrateContractProposal: getStructure(MigrateContractProposal.fromPartial({})), - SudoContractProposal: getStructure(SudoContractProposal.fromPartial({})), - ExecuteContractProposal: getStructure(ExecuteContractProposal.fromPartial({})), - UpdateAdminProposal: getStructure(UpdateAdminProposal.fromPartial({})), - ClearAdminProposal: getStructure(ClearAdminProposal.fromPartial({})), - PinCodesProposal: getStructure(PinCodesProposal.fromPartial({})), - UnpinCodesProposal: getStructure(UnpinCodesProposal.fromPartial({})), - AccessConfigUpdate: getStructure(AccessConfigUpdate.fromPartial({})), - UpdateInstantiateConfigProposal: getStructure(UpdateInstantiateConfigProposal.fromPartial({})), - CodeInfoResponse: getStructure(CodeInfoResponse.fromPartial({})), - AccessTypeParam: getStructure(AccessTypeParam.fromPartial({})), - AccessConfig: getStructure(AccessConfig.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - CodeInfo: getStructure(CodeInfo.fromPartial({})), - ContractInfo: getStructure(ContractInfo.fromPartial({})), - ContractCodeHistoryEntry: getStructure(ContractCodeHistoryEntry.fromPartial({})), - AbsoluteTxPosition: getStructure(AbsoluteTxPosition.fromPartial({})), - Model: getStructure(Model.fromPartial({})), - }, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getContractInfo: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.ContractInfo[JSON.stringify(params)] ?? {}; - }, - getContractHistory: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.ContractHistory[JSON.stringify(params)] ?? {}; - }, - getContractsByCode: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.ContractsByCode[JSON.stringify(params)] ?? {}; - }, - getAllContractState: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.AllContractState[JSON.stringify(params)] ?? {}; - }, - getRawContractState: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.RawContractState[JSON.stringify(params)] ?? {}; - }, - getSmartContractState: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.SmartContractState[JSON.stringify(params)] ?? {}; - }, - getCode: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Code[JSON.stringify(params)] ?? {}; - }, - getCodes: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Codes[JSON.stringify(params)] ?? {}; - }, - getPinnedCodes: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.PinnedCodes[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmwasm.wasm.v1 initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - async QueryContractInfo({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryContractInfo(key.address)).data; - commit('QUERY', { query: 'ContractInfo', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryContractInfo', payload: { options: { all }, params: { ...key }, query } }); - return getters['getContractInfo']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryContractInfo', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryContractHistory({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryContractHistory(key.address, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryContractHistory(key.address, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ContractHistory', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryContractHistory', payload: { options: { all }, params: { ...key }, query } }); - return getters['getContractHistory']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryContractHistory', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryContractsByCode({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryContractsByCode(key.code_id, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryContractsByCode(key.code_id, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ContractsByCode', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryContractsByCode', payload: { options: { all }, params: { ...key }, query } }); - return getters['getContractsByCode']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryContractsByCode', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryAllContractState({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryAllContractState(key.address, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryAllContractState(key.address, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'AllContractState', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryAllContractState', payload: { options: { all }, params: { ...key }, query } }); - return getters['getAllContractState']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryAllContractState', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryRawContractState({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryRawContractState(key.address, key.query_data)).data; - commit('QUERY', { query: 'RawContractState', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryRawContractState', payload: { options: { all }, params: { ...key }, query } }); - return getters['getRawContractState']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryRawContractState', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QuerySmartContractState({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.querySmartContractState(key.address, key.query_data)).data; - commit('QUERY', { query: 'SmartContractState', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QuerySmartContractState', payload: { options: { all }, params: { ...key }, query } }); - return getters['getSmartContractState']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QuerySmartContractState', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryCode({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryCode(key.code_id)).data; - commit('QUERY', { query: 'Code', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryCode', payload: { options: { all }, params: { ...key }, query } }); - return getters['getCode']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryCode', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryCodes({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryCodes(query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryCodes({ ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Codes', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryCodes', payload: { options: { all }, params: { ...key }, query } }); - return getters['getCodes']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryCodes', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryPinnedCodes({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryPinnedCodes(query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryPinnedCodes({ ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'PinnedCodes', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryPinnedCodes', payload: { options: { all }, params: { ...key }, query } }); - return getters['getPinnedCodes']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryPinnedCodes', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async sendMsgIBCSend({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgIBCSend(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgIBCSend:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgIBCSend:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgInstantiateContract({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgInstantiateContract(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgInstantiateContract:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgInstantiateContract:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgUpdateAdmin({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgUpdateAdmin(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgUpdateAdmin:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgUpdateAdmin:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgStoreCode({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgStoreCode(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgStoreCode:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgStoreCode:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgExecuteContract({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgExecuteContract(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgExecuteContract:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgExecuteContract:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgIBCCloseChannel({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgIBCCloseChannel(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgIBCCloseChannel:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgIBCCloseChannel:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgMigrateContract({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgMigrateContract(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgMigrateContract:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgMigrateContract:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgClearAdmin({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgClearAdmin(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgClearAdmin:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgClearAdmin:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async MsgIBCSend({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgIBCSend(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgIBCSend:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgIBCSend:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgInstantiateContract({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgInstantiateContract(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgInstantiateContract:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgInstantiateContract:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgUpdateAdmin({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgUpdateAdmin(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgUpdateAdmin:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgUpdateAdmin:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgStoreCode({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgStoreCode(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgStoreCode:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgStoreCode:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgExecuteContract({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgExecuteContract(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgExecuteContract:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgExecuteContract:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgIBCCloseChannel({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgIBCCloseChannel(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgIBCCloseChannel:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgIBCCloseChannel:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgMigrateContract({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgMigrateContract(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgMigrateContract:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgMigrateContract:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgClearAdmin({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgClearAdmin(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgClearAdmin:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgClearAdmin:Create', 'Could not create message: ' + e.message); - } - } - }, - } -}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/index.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/index.ts deleted file mode 100755 index 47a9cc5d12..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/index.ts +++ /dev/null @@ -1,663 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { GenesisState_GenMsgs } from "./module/types/cosmwasm/wasm/v1/genesis" -import { Code } from "./module/types/cosmwasm/wasm/v1/genesis" -import { Contract } from "./module/types/cosmwasm/wasm/v1/genesis" -import { Sequence } from "./module/types/cosmwasm/wasm/v1/genesis" -import { StoreCodeProposal } from "./module/types/cosmwasm/wasm/v1/proposal" -import { InstantiateContractProposal } from "./module/types/cosmwasm/wasm/v1/proposal" -import { MigrateContractProposal } from "./module/types/cosmwasm/wasm/v1/proposal" -import { SudoContractProposal } from "./module/types/cosmwasm/wasm/v1/proposal" -import { ExecuteContractProposal } from "./module/types/cosmwasm/wasm/v1/proposal" -import { UpdateAdminProposal } from "./module/types/cosmwasm/wasm/v1/proposal" -import { ClearAdminProposal } from "./module/types/cosmwasm/wasm/v1/proposal" -import { PinCodesProposal } from "./module/types/cosmwasm/wasm/v1/proposal" -import { UnpinCodesProposal } from "./module/types/cosmwasm/wasm/v1/proposal" -import { AccessConfigUpdate } from "./module/types/cosmwasm/wasm/v1/proposal" -import { UpdateInstantiateConfigProposal } from "./module/types/cosmwasm/wasm/v1/proposal" -import { CodeInfoResponse } from "./module/types/cosmwasm/wasm/v1/query" -import { AccessTypeParam } from "./module/types/cosmwasm/wasm/v1/types" -import { AccessConfig } from "./module/types/cosmwasm/wasm/v1/types" -import { Params } from "./module/types/cosmwasm/wasm/v1/types" -import { CodeInfo } from "./module/types/cosmwasm/wasm/v1/types" -import { ContractInfo } from "./module/types/cosmwasm/wasm/v1/types" -import { ContractCodeHistoryEntry } from "./module/types/cosmwasm/wasm/v1/types" -import { AbsoluteTxPosition } from "./module/types/cosmwasm/wasm/v1/types" -import { Model } from "./module/types/cosmwasm/wasm/v1/types" - - -export { GenesisState_GenMsgs, Code, Contract, Sequence, StoreCodeProposal, InstantiateContractProposal, MigrateContractProposal, SudoContractProposal, ExecuteContractProposal, UpdateAdminProposal, ClearAdminProposal, PinCodesProposal, UnpinCodesProposal, AccessConfigUpdate, UpdateInstantiateConfigProposal, CodeInfoResponse, AccessTypeParam, AccessConfig, Params, CodeInfo, ContractInfo, ContractCodeHistoryEntry, AbsoluteTxPosition, Model }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - ContractInfo: {}, - ContractHistory: {}, - ContractsByCode: {}, - AllContractState: {}, - RawContractState: {}, - SmartContractState: {}, - Code: {}, - Codes: {}, - PinnedCodes: {}, - - _Structure: { - GenesisState_GenMsgs: getStructure(GenesisState_GenMsgs.fromPartial({})), - Code: getStructure(Code.fromPartial({})), - Contract: getStructure(Contract.fromPartial({})), - Sequence: getStructure(Sequence.fromPartial({})), - StoreCodeProposal: getStructure(StoreCodeProposal.fromPartial({})), - InstantiateContractProposal: getStructure(InstantiateContractProposal.fromPartial({})), - MigrateContractProposal: getStructure(MigrateContractProposal.fromPartial({})), - SudoContractProposal: getStructure(SudoContractProposal.fromPartial({})), - ExecuteContractProposal: getStructure(ExecuteContractProposal.fromPartial({})), - UpdateAdminProposal: getStructure(UpdateAdminProposal.fromPartial({})), - ClearAdminProposal: getStructure(ClearAdminProposal.fromPartial({})), - PinCodesProposal: getStructure(PinCodesProposal.fromPartial({})), - UnpinCodesProposal: getStructure(UnpinCodesProposal.fromPartial({})), - AccessConfigUpdate: getStructure(AccessConfigUpdate.fromPartial({})), - UpdateInstantiateConfigProposal: getStructure(UpdateInstantiateConfigProposal.fromPartial({})), - CodeInfoResponse: getStructure(CodeInfoResponse.fromPartial({})), - AccessTypeParam: getStructure(AccessTypeParam.fromPartial({})), - AccessConfig: getStructure(AccessConfig.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - CodeInfo: getStructure(CodeInfo.fromPartial({})), - ContractInfo: getStructure(ContractInfo.fromPartial({})), - ContractCodeHistoryEntry: getStructure(ContractCodeHistoryEntry.fromPartial({})), - AbsoluteTxPosition: getStructure(AbsoluteTxPosition.fromPartial({})), - Model: getStructure(Model.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getContractInfo: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ContractInfo[JSON.stringify(params)] ?? {} - }, - getContractHistory: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ContractHistory[JSON.stringify(params)] ?? {} - }, - getContractsByCode: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ContractsByCode[JSON.stringify(params)] ?? {} - }, - getAllContractState: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.AllContractState[JSON.stringify(params)] ?? {} - }, - getRawContractState: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.RawContractState[JSON.stringify(params)] ?? {} - }, - getSmartContractState: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.SmartContractState[JSON.stringify(params)] ?? {} - }, - getCode: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Code[JSON.stringify(params)] ?? {} - }, - getCodes: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Codes[JSON.stringify(params)] ?? {} - }, - getPinnedCodes: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.PinnedCodes[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmwasm.wasm.v1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryContractInfo({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryContractInfo( key.address)).data - - - commit('QUERY', { query: 'ContractInfo', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryContractInfo', payload: { options: { all }, params: {...key},query }}) - return getters['getContractInfo']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryContractInfo API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryContractHistory({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryContractHistory( key.address, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryContractHistory( key.address, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ContractHistory', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryContractHistory', payload: { options: { all }, params: {...key},query }}) - return getters['getContractHistory']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryContractHistory API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryContractsByCode({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryContractsByCode( key.code_id, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryContractsByCode( key.code_id, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ContractsByCode', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryContractsByCode', payload: { options: { all }, params: {...key},query }}) - return getters['getContractsByCode']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryContractsByCode API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryAllContractState({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryAllContractState( key.address, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryAllContractState( key.address, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'AllContractState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAllContractState', payload: { options: { all }, params: {...key},query }}) - return getters['getAllContractState']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryAllContractState API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryRawContractState({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryRawContractState( key.address, key.query_data)).data - - - commit('QUERY', { query: 'RawContractState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryRawContractState', payload: { options: { all }, params: {...key},query }}) - return getters['getRawContractState']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryRawContractState API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QuerySmartContractState({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.querySmartContractState( key.address, key.query_data)).data - - - commit('QUERY', { query: 'SmartContractState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QuerySmartContractState', payload: { options: { all }, params: {...key},query }}) - return getters['getSmartContractState']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QuerySmartContractState API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryCode({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryCode( key.code_id)).data - - - commit('QUERY', { query: 'Code', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryCode', payload: { options: { all }, params: {...key},query }}) - return getters['getCode']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryCode API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryCodes({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryCodes(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryCodes({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Codes', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryCodes', payload: { options: { all }, params: {...key},query }}) - return getters['getCodes']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryCodes API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryPinnedCodes({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryPinnedCodes(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryPinnedCodes({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'PinnedCodes', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryPinnedCodes', payload: { options: { all }, params: {...key},query }}) - return getters['getPinnedCodes']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryPinnedCodes API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - async sendMsgIBCCloseChannel({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgIBCCloseChannel(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgIBCCloseChannel:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgIBCCloseChannel:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgExecuteContract({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgExecuteContract(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgExecuteContract:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgExecuteContract:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgUpdateAdmin({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgUpdateAdmin(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgUpdateAdmin:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgUpdateAdmin:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgInstantiateContract({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgInstantiateContract(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgInstantiateContract:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgInstantiateContract:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgClearAdmin({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgClearAdmin(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgClearAdmin:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgClearAdmin:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgStoreCode({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgStoreCode(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgStoreCode:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgStoreCode:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgIBCSend({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgIBCSend(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgIBCSend:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgIBCSend:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgMigrateContract({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgMigrateContract(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgMigrateContract:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgMigrateContract:Send Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgIBCCloseChannel({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgIBCCloseChannel(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgIBCCloseChannel:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgIBCCloseChannel:Create Could not create message: ' + e.message) - } - } - }, - async MsgExecuteContract({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgExecuteContract(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgExecuteContract:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgExecuteContract:Create Could not create message: ' + e.message) - } - } - }, - async MsgUpdateAdmin({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgUpdateAdmin(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgUpdateAdmin:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgUpdateAdmin:Create Could not create message: ' + e.message) - } - } - }, - async MsgInstantiateContract({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgInstantiateContract(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgInstantiateContract:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgInstantiateContract:Create Could not create message: ' + e.message) - } - } - }, - async MsgClearAdmin({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgClearAdmin(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgClearAdmin:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgClearAdmin:Create Could not create message: ' + e.message) - } - } - }, - async MsgStoreCode({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgStoreCode(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgStoreCode:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgStoreCode:Create Could not create message: ' + e.message) - } - } - }, - async MsgIBCSend({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgIBCSend(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgIBCSend:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgIBCSend:Create Could not create message: ' + e.message) - } - } - }, - async MsgMigrateContract({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgMigrateContract(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgMigrateContract:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgMigrateContract:Create Could not create message: ' + e.message) - } - } - }, - - } -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/index.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/index.d.ts deleted file mode 100644 index 6ef8a051fc..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgIBCSend } from "./types/cosmwasm/wasm/v1/ibc"; -import { MsgInstantiateContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgUpdateAdmin } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgStoreCode } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgExecuteContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgIBCCloseChannel } from "./types/cosmwasm/wasm/v1/ibc"; -import { MsgMigrateContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgClearAdmin } from "./types/cosmwasm/wasm/v1/tx"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; - msgIBCSend: (data: MsgIBCSend) => EncodeObject; - msgInstantiateContract: (data: MsgInstantiateContract) => EncodeObject; - msgUpdateAdmin: (data: MsgUpdateAdmin) => EncodeObject; - msgStoreCode: (data: MsgStoreCode) => EncodeObject; - msgExecuteContract: (data: MsgExecuteContract) => EncodeObject; - msgIBCCloseChannel: (data: MsgIBCCloseChannel) => EncodeObject; - msgMigrateContract: (data: MsgMigrateContract) => EncodeObject; - msgClearAdmin: (data: MsgClearAdmin) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/index.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/index.js deleted file mode 100644 index c31e2377e8..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/index.js +++ /dev/null @@ -1,55 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgIBCSend } from "./types/cosmwasm/wasm/v1/ibc"; -import { MsgInstantiateContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgUpdateAdmin } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgStoreCode } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgExecuteContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgIBCCloseChannel } from "./types/cosmwasm/wasm/v1/ibc"; -import { MsgMigrateContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgClearAdmin } from "./types/cosmwasm/wasm/v1/tx"; -const types = [ - ["/cosmwasm.wasm.v1.MsgIBCSend", MsgIBCSend], - ["/cosmwasm.wasm.v1.MsgInstantiateContract", MsgInstantiateContract], - ["/cosmwasm.wasm.v1.MsgUpdateAdmin", MsgUpdateAdmin], - ["/cosmwasm.wasm.v1.MsgStoreCode", MsgStoreCode], - ["/cosmwasm.wasm.v1.MsgExecuteContract", MsgExecuteContract], - ["/cosmwasm.wasm.v1.MsgIBCCloseChannel", MsgIBCCloseChannel], - ["/cosmwasm.wasm.v1.MsgMigrateContract", MsgMigrateContract], - ["/cosmwasm.wasm.v1.MsgClearAdmin", MsgClearAdmin], -]; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - msgIBCSend: (data) => ({ typeUrl: "/cosmwasm.wasm.v1.MsgIBCSend", value: MsgIBCSend.fromPartial(data) }), - msgInstantiateContract: (data) => ({ typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", value: MsgInstantiateContract.fromPartial(data) }), - msgUpdateAdmin: (data) => ({ typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", value: MsgUpdateAdmin.fromPartial(data) }), - msgStoreCode: (data) => ({ typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", value: MsgStoreCode.fromPartial(data) }), - msgExecuteContract: (data) => ({ typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", value: MsgExecuteContract.fromPartial(data) }), - msgIBCCloseChannel: (data) => ({ typeUrl: "/cosmwasm.wasm.v1.MsgIBCCloseChannel", value: MsgIBCCloseChannel.fromPartial(data) }), - msgMigrateContract: (data) => ({ typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", value: MsgMigrateContract.fromPartial(data) }), - msgClearAdmin: (data) => ({ typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", value: MsgClearAdmin.fromPartial(data) }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/index.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/index.ts deleted file mode 100755 index 2eb8f3981a..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/index.ts +++ /dev/null @@ -1,81 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgIBCCloseChannel } from "./types/cosmwasm/wasm/v1/ibc"; -import { MsgExecuteContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgUpdateAdmin } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgInstantiateContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgClearAdmin } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgStoreCode } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgIBCSend } from "./types/cosmwasm/wasm/v1/ibc"; -import { MsgMigrateContract } from "./types/cosmwasm/wasm/v1/tx"; - - -const types = [ - ["/cosmwasm.wasm.v1.MsgIBCCloseChannel", MsgIBCCloseChannel], - ["/cosmwasm.wasm.v1.MsgExecuteContract", MsgExecuteContract], - ["/cosmwasm.wasm.v1.MsgUpdateAdmin", MsgUpdateAdmin], - ["/cosmwasm.wasm.v1.MsgInstantiateContract", MsgInstantiateContract], - ["/cosmwasm.wasm.v1.MsgClearAdmin", MsgClearAdmin], - ["/cosmwasm.wasm.v1.MsgStoreCode", MsgStoreCode], - ["/cosmwasm.wasm.v1.MsgIBCSend", MsgIBCSend], - ["/cosmwasm.wasm.v1.MsgMigrateContract", MsgMigrateContract], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgIBCCloseChannel: (data: MsgIBCCloseChannel): EncodeObject => ({ typeUrl: "/cosmwasm.wasm.v1.MsgIBCCloseChannel", value: MsgIBCCloseChannel.fromPartial( data ) }), - msgExecuteContract: (data: MsgExecuteContract): EncodeObject => ({ typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", value: MsgExecuteContract.fromPartial( data ) }), - msgUpdateAdmin: (data: MsgUpdateAdmin): EncodeObject => ({ typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", value: MsgUpdateAdmin.fromPartial( data ) }), - msgInstantiateContract: (data: MsgInstantiateContract): EncodeObject => ({ typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", value: MsgInstantiateContract.fromPartial( data ) }), - msgClearAdmin: (data: MsgClearAdmin): EncodeObject => ({ typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", value: MsgClearAdmin.fromPartial( data ) }), - msgStoreCode: (data: MsgStoreCode): EncodeObject => ({ typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", value: MsgStoreCode.fromPartial( data ) }), - msgIBCSend: (data: MsgIBCSend): EncodeObject => ({ typeUrl: "/cosmwasm.wasm.v1.MsgIBCSend", value: MsgIBCSend.fromPartial( data ) }), - msgMigrateContract: (data: MsgMigrateContract): EncodeObject => ({ typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", value: MsgMigrateContract.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/rest.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/rest.d.ts deleted file mode 100644 index e68ad2d860..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/rest.d.ts +++ /dev/null @@ -1,529 +0,0 @@ -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* AbsoluteTxPosition is a unique transaction position that allows for global -ordering of transactions. -*/ -export interface V1AbsoluteTxPosition { - /** @format uint64 */ - blockHeight?: string; - /** @format uint64 */ - txIndex?: string; -} -/** - * AccessConfig access control type. - */ -export interface V1AccessConfig { - /** - * - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder for empty value - * - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden - * - ACCESS_TYPE_ONLY_ADDRESS: AccessTypeOnlyAddress restricted to an address - * - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted - */ - permission?: V1AccessType; - address?: string; -} -/** -* - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder for empty value - - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden - - ACCESS_TYPE_ONLY_ADDRESS: AccessTypeOnlyAddress restricted to an address - - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted -*/ -export declare enum V1AccessType { - ACCESS_TYPE_UNSPECIFIED = "ACCESS_TYPE_UNSPECIFIED", - ACCESS_TYPE_NOBODY = "ACCESS_TYPE_NOBODY", - ACCESS_TYPE_ONLY_ADDRESS = "ACCESS_TYPE_ONLY_ADDRESS", - ACCESS_TYPE_EVERYBODY = "ACCESS_TYPE_EVERYBODY" -} -export interface V1CodeInfoResponse { - /** @format uint64 */ - codeId?: string; - creator?: string; - /** @format byte */ - dataHash?: string; - /** AccessConfig access control type. */ - instantiatePermission?: V1AccessConfig; -} -/** - * ContractCodeHistoryEntry metadata to a contract. - */ -export interface V1ContractCodeHistoryEntry { - /** - * - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: ContractCodeHistoryOperationTypeUnspecified placeholder for empty value - * - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: ContractCodeHistoryOperationTypeInit on chain contract instantiation - * - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: ContractCodeHistoryOperationTypeMigrate code migration - * - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: ContractCodeHistoryOperationTypeGenesis based on genesis data - */ - operation?: V1ContractCodeHistoryOperationType; - /** @format uint64 */ - codeId?: string; - /** Updated Tx position when the operation was executed. */ - updated?: V1AbsoluteTxPosition; - /** @format byte */ - msg?: string; -} -/** -* - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: ContractCodeHistoryOperationTypeUnspecified placeholder for empty value - - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: ContractCodeHistoryOperationTypeInit on chain contract instantiation - - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: ContractCodeHistoryOperationTypeMigrate code migration - - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: ContractCodeHistoryOperationTypeGenesis based on genesis data -*/ -export declare enum V1ContractCodeHistoryOperationType { - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED", - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT", - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE", - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS" -} -export interface V1ContractInfo { - /** @format uint64 */ - codeId?: string; - creator?: string; - admin?: string; - /** Label is optional metadata to be stored with a contract instance. */ - label?: string; - /** - * AbsoluteTxPosition is a unique transaction position that allows for global - * ordering of transactions. - */ - created?: V1AbsoluteTxPosition; - ibcPortId?: string; - /** - * Extension is an extension point to store custom metadata within the - * persistence model. - */ - extension?: ProtobufAny; -} -export interface V1Model { - /** @format byte */ - key?: string; - /** @format byte */ - value?: string; -} -export declare type V1MsgClearAdminResponse = object; -/** - * MsgExecuteContractResponse returns execution result data. - */ -export interface V1MsgExecuteContractResponse { - /** @format byte */ - data?: string; -} -export interface V1MsgInstantiateContractResponse { - /** Address is the bech32 address of the new contract instance. */ - address?: string; - /** @format byte */ - data?: string; -} -/** - * MsgMigrateContractResponse returns contract migration result data. - */ -export interface V1MsgMigrateContractResponse { - /** @format byte */ - data?: string; -} -/** - * MsgStoreCodeResponse returns store result data. - */ -export interface V1MsgStoreCodeResponse { - /** @format uint64 */ - codeId?: string; -} -export declare type V1MsgUpdateAdminResponse = object; -export interface V1QueryAllContractStateResponse { - models?: V1Model[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -export interface V1QueryCodeResponse { - codeInfo?: V1CodeInfoResponse; - /** @format byte */ - data?: string; -} -export interface V1QueryCodesResponse { - codeInfos?: V1CodeInfoResponse[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -export interface V1QueryContractHistoryResponse { - entries?: V1ContractCodeHistoryEntry[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -export interface V1QueryContractInfoResponse { - address?: string; - contractInfo?: V1ContractInfo; -} -export interface V1QueryContractsByCodeResponse { - contracts?: string[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -export interface V1QueryPinnedCodesResponse { - codeIds?: string[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -export interface V1QueryRawContractStateResponse { - /** @format byte */ - data?: string; -} -export interface V1QuerySmartContractStateResponse { - /** @format byte */ - data?: string; -} -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - /** - * 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. - * @format uint64 - */ - offset?: string; - /** - * 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. - * @format uint64 - */ - limit?: string; - /** - * 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. - */ - countTotal?: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse?: boolean; -} -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmwasm/wasm/v1/genesis.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryCodes - * @summary Codes gets the metadata for all stored wasm codes - * @request GET:/cosmwasm/wasm/v1/code - */ - queryCodes: (query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryCode - * @summary Code gets the binary code and metadata for a singe wasm code - * @request GET:/cosmwasm/wasm/v1/code/{codeId} - */ - queryCode: (codeId: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryContractsByCode - * @summary ContractsByCode lists all smart contracts for a code id - * @request GET:/cosmwasm/wasm/v1/code/{codeId}/contracts - */ - queryContractsByCode: (codeId: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryPinnedCodes - * @summary PinnedCodes gets the pinned code ids - * @request GET:/cosmwasm/wasm/v1/codes/pinned - */ - queryPinnedCodes: (query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryContractInfo - * @summary ContractInfo gets the contract meta data - * @request GET:/cosmwasm/wasm/v1/contract/{address} - */ - queryContractInfo: (address: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryContractHistory - * @summary ContractHistory gets the contract code history - * @request GET:/cosmwasm/wasm/v1/contract/{address}/history - */ - queryContractHistory: (address: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryRawContractState - * @summary RawContractState gets single key from the raw store data of a contract - * @request GET:/cosmwasm/wasm/v1/contract/{address}/raw/{queryData} - */ - queryRawContractState: (address: string, queryData: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QuerySmartContractState - * @summary SmartContractState get smart query result from the contract - * @request GET:/cosmwasm/wasm/v1/contract/{address}/smart/{queryData} - */ - querySmartContractState: (address: string, queryData: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryAllContractState - * @summary AllContractState gets all raw store data for a single contract - * @request GET:/cosmwasm/wasm/v1/contract/{address}/state - */ - queryAllContractState: (address: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/rest.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/rest.js deleted file mode 100644 index c849307ce1..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/rest.js +++ /dev/null @@ -1,297 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -/** -* - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder for empty value - - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden - - ACCESS_TYPE_ONLY_ADDRESS: AccessTypeOnlyAddress restricted to an address - - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted -*/ -export var V1AccessType; -(function (V1AccessType) { - V1AccessType["ACCESS_TYPE_UNSPECIFIED"] = "ACCESS_TYPE_UNSPECIFIED"; - V1AccessType["ACCESS_TYPE_NOBODY"] = "ACCESS_TYPE_NOBODY"; - V1AccessType["ACCESS_TYPE_ONLY_ADDRESS"] = "ACCESS_TYPE_ONLY_ADDRESS"; - V1AccessType["ACCESS_TYPE_EVERYBODY"] = "ACCESS_TYPE_EVERYBODY"; -})(V1AccessType || (V1AccessType = {})); -/** -* - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: ContractCodeHistoryOperationTypeUnspecified placeholder for empty value - - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: ContractCodeHistoryOperationTypeInit on chain contract instantiation - - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: ContractCodeHistoryOperationTypeMigrate code migration - - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: ContractCodeHistoryOperationTypeGenesis based on genesis data -*/ -export var V1ContractCodeHistoryOperationType; -(function (V1ContractCodeHistoryOperationType) { - V1ContractCodeHistoryOperationType["CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED"] = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED"; - V1ContractCodeHistoryOperationType["CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT"] = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT"; - V1ContractCodeHistoryOperationType["CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE"] = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE"; - V1ContractCodeHistoryOperationType["CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS"] = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS"; -})(V1ContractCodeHistoryOperationType || (V1ContractCodeHistoryOperationType = {})); -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmwasm/wasm/v1/genesis.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryCodes - * @summary Codes gets the metadata for all stored wasm codes - * @request GET:/cosmwasm/wasm/v1/code - */ - this.queryCodes = (query, params = {}) => this.request({ - path: `/cosmwasm/wasm/v1/code`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryCode - * @summary Code gets the binary code and metadata for a singe wasm code - * @request GET:/cosmwasm/wasm/v1/code/{codeId} - */ - this.queryCode = (codeId, params = {}) => this.request({ - path: `/cosmwasm/wasm/v1/code/${codeId}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryContractsByCode - * @summary ContractsByCode lists all smart contracts for a code id - * @request GET:/cosmwasm/wasm/v1/code/{codeId}/contracts - */ - this.queryContractsByCode = (codeId, query, params = {}) => this.request({ - path: `/cosmwasm/wasm/v1/code/${codeId}/contracts`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryPinnedCodes - * @summary PinnedCodes gets the pinned code ids - * @request GET:/cosmwasm/wasm/v1/codes/pinned - */ - this.queryPinnedCodes = (query, params = {}) => this.request({ - path: `/cosmwasm/wasm/v1/codes/pinned`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryContractInfo - * @summary ContractInfo gets the contract meta data - * @request GET:/cosmwasm/wasm/v1/contract/{address} - */ - this.queryContractInfo = (address, params = {}) => this.request({ - path: `/cosmwasm/wasm/v1/contract/${address}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryContractHistory - * @summary ContractHistory gets the contract code history - * @request GET:/cosmwasm/wasm/v1/contract/{address}/history - */ - this.queryContractHistory = (address, query, params = {}) => this.request({ - path: `/cosmwasm/wasm/v1/contract/${address}/history`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryRawContractState - * @summary RawContractState gets single key from the raw store data of a contract - * @request GET:/cosmwasm/wasm/v1/contract/{address}/raw/{queryData} - */ - this.queryRawContractState = (address, queryData, params = {}) => this.request({ - path: `/cosmwasm/wasm/v1/contract/${address}/raw/${queryData}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QuerySmartContractState - * @summary SmartContractState get smart query result from the contract - * @request GET:/cosmwasm/wasm/v1/contract/{address}/smart/{queryData} - */ - this.querySmartContractState = (address, queryData, params = {}) => this.request({ - path: `/cosmwasm/wasm/v1/contract/${address}/smart/${queryData}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryAllContractState - * @summary AllContractState gets all raw store data for a single contract - * @request GET:/cosmwasm/wasm/v1/contract/{address}/state - */ - this.queryAllContractState = (address, query, params = {}) => this.request({ - path: `/cosmwasm/wasm/v1/contract/${address}/state`, - method: "GET", - query: query, - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/rest.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/rest.ts deleted file mode 100644 index f26020f507..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/rest.ts +++ /dev/null @@ -1,812 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* AbsoluteTxPosition is a unique transaction position that allows for global -ordering of transactions. -*/ -export interface V1AbsoluteTxPosition { - /** @format uint64 */ - block_height?: string; - - /** @format uint64 */ - tx_index?: string; -} - -/** - * AccessConfig access control type. - */ -export interface V1AccessConfig { - /** - * - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder for empty value - * - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden - * - ACCESS_TYPE_ONLY_ADDRESS: AccessTypeOnlyAddress restricted to an address - * - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted - */ - permission?: V1AccessType; - address?: string; -} - -/** -* - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder for empty value - - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden - - ACCESS_TYPE_ONLY_ADDRESS: AccessTypeOnlyAddress restricted to an address - - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted -*/ -export enum V1AccessType { - ACCESS_TYPE_UNSPECIFIED = "ACCESS_TYPE_UNSPECIFIED", - ACCESS_TYPE_NOBODY = "ACCESS_TYPE_NOBODY", - ACCESS_TYPE_ONLY_ADDRESS = "ACCESS_TYPE_ONLY_ADDRESS", - ACCESS_TYPE_EVERYBODY = "ACCESS_TYPE_EVERYBODY", -} - -export interface V1CodeInfoResponse { - /** @format uint64 */ - code_id?: string; - creator?: string; - - /** @format byte */ - data_hash?: string; - - /** AccessConfig access control type. */ - instantiate_permission?: V1AccessConfig; -} - -/** - * ContractCodeHistoryEntry metadata to a contract. - */ -export interface V1ContractCodeHistoryEntry { - /** - * - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: ContractCodeHistoryOperationTypeUnspecified placeholder for empty value - * - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: ContractCodeHistoryOperationTypeInit on chain contract instantiation - * - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: ContractCodeHistoryOperationTypeMigrate code migration - * - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: ContractCodeHistoryOperationTypeGenesis based on genesis data - */ - operation?: V1ContractCodeHistoryOperationType; - - /** @format uint64 */ - code_id?: string; - - /** Updated Tx position when the operation was executed. */ - updated?: V1AbsoluteTxPosition; - - /** @format byte */ - msg?: string; -} - -/** -* - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: ContractCodeHistoryOperationTypeUnspecified placeholder for empty value - - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: ContractCodeHistoryOperationTypeInit on chain contract instantiation - - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: ContractCodeHistoryOperationTypeMigrate code migration - - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: ContractCodeHistoryOperationTypeGenesis based on genesis data -*/ -export enum V1ContractCodeHistoryOperationType { - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED", - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT", - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE", - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS", -} - -export interface V1ContractInfo { - /** @format uint64 */ - code_id?: string; - creator?: string; - admin?: string; - - /** Label is optional metadata to be stored with a contract instance. */ - label?: string; - - /** - * AbsoluteTxPosition is a unique transaction position that allows for global - * ordering of transactions. - */ - created?: V1AbsoluteTxPosition; - ibc_port_id?: string; - - /** - * Extension is an extension point to store custom metadata within the - * persistence model. - */ - extension?: ProtobufAny; -} - -export interface V1Model { - /** @format byte */ - key?: string; - - /** @format byte */ - value?: string; -} - -export type V1MsgClearAdminResponse = object; - -/** - * MsgExecuteContractResponse returns execution result data. - */ -export interface V1MsgExecuteContractResponse { - /** @format byte */ - data?: string; -} - -export interface V1MsgInstantiateContractResponse { - /** Address is the bech32 address of the new contract instance. */ - address?: string; - - /** @format byte */ - data?: string; -} - -/** - * MsgMigrateContractResponse returns contract migration result data. - */ -export interface V1MsgMigrateContractResponse { - /** @format byte */ - data?: string; -} - -/** - * MsgStoreCodeResponse returns store result data. - */ -export interface V1MsgStoreCodeResponse { - /** @format uint64 */ - code_id?: string; -} - -export type V1MsgUpdateAdminResponse = object; - -export interface V1QueryAllContractStateResponse { - models?: V1Model[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -export interface V1QueryCodeResponse { - code_info?: V1CodeInfoResponse; - - /** @format byte */ - data?: string; -} - -export interface V1QueryCodesResponse { - code_infos?: V1CodeInfoResponse[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -export interface V1QueryContractHistoryResponse { - entries?: V1ContractCodeHistoryEntry[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -export interface V1QueryContractInfoResponse { - address?: string; - contract_info?: V1ContractInfo; -} - -export interface V1QueryContractsByCodeResponse { - contracts?: string[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -export interface V1QueryPinnedCodesResponse { - code_ids?: string[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -export interface V1QueryRawContractStateResponse { - /** @format byte */ - data?: string; -} - -export interface V1QuerySmartContractStateResponse { - /** @format byte */ - data?: string; -} - -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - 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; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmwasm/wasm/v1/genesis.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryCodes - * @summary Codes gets the metadata for all stored wasm codes - * @request GET:/cosmwasm/wasm/v1/code - */ - queryCodes = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmwasm/wasm/v1/code`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryCode - * @summary Code gets the binary code and metadata for a singe wasm code - * @request GET:/cosmwasm/wasm/v1/code/{code_id} - */ - queryCode = (code_id: string, params: RequestParams = {}) => - this.request({ - path: `/cosmwasm/wasm/v1/code/${code_id}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryContractsByCode - * @summary ContractsByCode lists all smart contracts for a code id - * @request GET:/cosmwasm/wasm/v1/code/{code_id}/contracts - */ - queryContractsByCode = ( - code_id: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmwasm/wasm/v1/code/${code_id}/contracts`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryPinnedCodes - * @summary PinnedCodes gets the pinned code ids - * @request GET:/cosmwasm/wasm/v1/codes/pinned - */ - queryPinnedCodes = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmwasm/wasm/v1/codes/pinned`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryContractInfo - * @summary ContractInfo gets the contract meta data - * @request GET:/cosmwasm/wasm/v1/contract/{address} - */ - queryContractInfo = (address: string, params: RequestParams = {}) => - this.request({ - path: `/cosmwasm/wasm/v1/contract/${address}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryContractHistory - * @summary ContractHistory gets the contract code history - * @request GET:/cosmwasm/wasm/v1/contract/{address}/history - */ - queryContractHistory = ( - address: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmwasm/wasm/v1/contract/${address}/history`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryRawContractState - * @summary RawContractState gets single key from the raw store data of a contract - * @request GET:/cosmwasm/wasm/v1/contract/{address}/raw/{query_data} - */ - queryRawContractState = (address: string, query_data: string, params: RequestParams = {}) => - this.request({ - path: `/cosmwasm/wasm/v1/contract/${address}/raw/${query_data}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QuerySmartContractState - * @summary SmartContractState get smart query result from the contract - * @request GET:/cosmwasm/wasm/v1/contract/{address}/smart/{query_data} - */ - querySmartContractState = (address: string, query_data: string, params: RequestParams = {}) => - this.request({ - path: `/cosmwasm/wasm/v1/contract/${address}/smart/${query_data}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryAllContractState - * @summary AllContractState gets all raw store data for a single contract - * @request GET:/cosmwasm/wasm/v1/contract/{address}/state - */ - queryAllContractState = ( - address: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmwasm/wasm/v1/contract/${address}/state`, - method: "GET", - query: query, - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index 767d2c358f..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - countTotal: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; -} -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index b5f5ced3d6..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,242 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { - offset: 0, - limit: 0, - countTotal: false, - reverse: false, -}; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } - else { - message.reverse = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - message.reverse !== undefined && (obj.reverse = message.reverse); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } - else { - message.reverse = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 9c87ac0c9c..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - 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; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { - offset: 0, - limit: 0, - count_total: false, - reverse: false, -}; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } else { - message.reverse = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - 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; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } else { - message.reverse = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac6a3..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb30cd..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98406..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos_proto/cosmos.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos_proto/cosmos.d.ts deleted file mode 100644 index ac37814871..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos_proto/cosmos.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos_proto/cosmos.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos_proto/cosmos.js deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos_proto/cosmos.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/genesis.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/genesis.d.ts deleted file mode 100644 index bc86251278..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/genesis.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Params, CodeInfo, ContractInfo, Model } from "../../../cosmwasm/wasm/v1/types"; -import { MsgStoreCode, MsgInstantiateContract, MsgExecuteContract } from "../../../cosmwasm/wasm/v1/tx"; -export declare const protobufPackage = "cosmwasm.wasm.v1"; -/** GenesisState - genesis state of x/wasm */ -export interface GenesisState { - params: Params | undefined; - codes: Code[]; - contracts: Contract[]; - sequences: Sequence[]; - genMsgs: GenesisState_GenMsgs[]; -} -/** - * GenMsgs define the messages that can be executed during genesis phase in - * order. The intention is to have more human readable data that is auditable. - */ -export interface GenesisState_GenMsgs { - storeCode: MsgStoreCode | undefined; - instantiateContract: MsgInstantiateContract | undefined; - executeContract: MsgExecuteContract | undefined; -} -/** Code struct encompasses CodeInfo and CodeBytes */ -export interface Code { - codeId: number; - codeInfo: CodeInfo | undefined; - codeBytes: Uint8Array; - /** Pinned to wasmvm cache */ - pinned: boolean; -} -/** Contract struct encompasses ContractAddress, ContractInfo, and ContractState */ -export interface Contract { - contractAddress: string; - contractInfo: ContractInfo | undefined; - contractState: Model[]; -} -/** Sequence key and value of an id generation counter */ -export interface Sequence { - idKey: Uint8Array; - value: number; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -export declare const GenesisState_GenMsgs: { - encode(message: GenesisState_GenMsgs, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState_GenMsgs; - fromJSON(object: any): GenesisState_GenMsgs; - toJSON(message: GenesisState_GenMsgs): unknown; - fromPartial(object: DeepPartial): GenesisState_GenMsgs; -}; -export declare const Code: { - encode(message: Code, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Code; - fromJSON(object: any): Code; - toJSON(message: Code): unknown; - fromPartial(object: DeepPartial): Code; -}; -export declare const Contract: { - encode(message: Contract, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Contract; - fromJSON(object: any): Contract; - toJSON(message: Contract): unknown; - fromPartial(object: DeepPartial): Contract; -}; -export declare const Sequence: { - encode(message: Sequence, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Sequence; - fromJSON(object: any): Sequence; - toJSON(message: Sequence): unknown; - fromPartial(object: DeepPartial): Sequence; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/genesis.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/genesis.js deleted file mode 100644 index 069741ecfc..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/genesis.js +++ /dev/null @@ -1,578 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Params, CodeInfo, ContractInfo, Model, } from "../../../cosmwasm/wasm/v1/types"; -import { MsgStoreCode, MsgInstantiateContract, MsgExecuteContract, } from "../../../cosmwasm/wasm/v1/tx"; -export const protobufPackage = "cosmwasm.wasm.v1"; -const baseGenesisState = {}; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.codes) { - Code.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.contracts) { - Contract.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.sequences) { - Sequence.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.genMsgs) { - GenesisState_GenMsgs.encode(v, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.codes = []; - message.contracts = []; - message.sequences = []; - message.genMsgs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.codes.push(Code.decode(reader, reader.uint32())); - break; - case 3: - message.contracts.push(Contract.decode(reader, reader.uint32())); - break; - case 4: - message.sequences.push(Sequence.decode(reader, reader.uint32())); - break; - case 5: - message.genMsgs.push(GenesisState_GenMsgs.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.codes = []; - message.contracts = []; - message.sequences = []; - message.genMsgs = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - if (object.codes !== undefined && object.codes !== null) { - for (const e of object.codes) { - message.codes.push(Code.fromJSON(e)); - } - } - if (object.contracts !== undefined && object.contracts !== null) { - for (const e of object.contracts) { - message.contracts.push(Contract.fromJSON(e)); - } - } - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(Sequence.fromJSON(e)); - } - } - if (object.genMsgs !== undefined && object.genMsgs !== null) { - for (const e of object.genMsgs) { - message.genMsgs.push(GenesisState_GenMsgs.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.codes) { - obj.codes = message.codes.map((e) => (e ? Code.toJSON(e) : undefined)); - } - else { - obj.codes = []; - } - if (message.contracts) { - obj.contracts = message.contracts.map((e) => e ? Contract.toJSON(e) : undefined); - } - else { - obj.contracts = []; - } - if (message.sequences) { - obj.sequences = message.sequences.map((e) => e ? Sequence.toJSON(e) : undefined); - } - else { - obj.sequences = []; - } - if (message.genMsgs) { - obj.genMsgs = message.genMsgs.map((e) => e ? GenesisState_GenMsgs.toJSON(e) : undefined); - } - else { - obj.genMsgs = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.codes = []; - message.contracts = []; - message.sequences = []; - message.genMsgs = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - if (object.codes !== undefined && object.codes !== null) { - for (const e of object.codes) { - message.codes.push(Code.fromPartial(e)); - } - } - if (object.contracts !== undefined && object.contracts !== null) { - for (const e of object.contracts) { - message.contracts.push(Contract.fromPartial(e)); - } - } - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(Sequence.fromPartial(e)); - } - } - if (object.genMsgs !== undefined && object.genMsgs !== null) { - for (const e of object.genMsgs) { - message.genMsgs.push(GenesisState_GenMsgs.fromPartial(e)); - } - } - return message; - }, -}; -const baseGenesisState_GenMsgs = {}; -export const GenesisState_GenMsgs = { - encode(message, writer = Writer.create()) { - if (message.storeCode !== undefined) { - MsgStoreCode.encode(message.storeCode, writer.uint32(10).fork()).ldelim(); - } - if (message.instantiateContract !== undefined) { - MsgInstantiateContract.encode(message.instantiateContract, writer.uint32(18).fork()).ldelim(); - } - if (message.executeContract !== undefined) { - MsgExecuteContract.encode(message.executeContract, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState_GenMsgs }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.storeCode = MsgStoreCode.decode(reader, reader.uint32()); - break; - case 2: - message.instantiateContract = MsgInstantiateContract.decode(reader, reader.uint32()); - break; - case 3: - message.executeContract = MsgExecuteContract.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState_GenMsgs }; - if (object.storeCode !== undefined && object.storeCode !== null) { - message.storeCode = MsgStoreCode.fromJSON(object.storeCode); - } - else { - message.storeCode = undefined; - } - if (object.instantiateContract !== undefined && - object.instantiateContract !== null) { - message.instantiateContract = MsgInstantiateContract.fromJSON(object.instantiateContract); - } - else { - message.instantiateContract = undefined; - } - if (object.executeContract !== undefined && - object.executeContract !== null) { - message.executeContract = MsgExecuteContract.fromJSON(object.executeContract); - } - else { - message.executeContract = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.storeCode !== undefined && - (obj.storeCode = message.storeCode - ? MsgStoreCode.toJSON(message.storeCode) - : undefined); - message.instantiateContract !== undefined && - (obj.instantiateContract = message.instantiateContract - ? MsgInstantiateContract.toJSON(message.instantiateContract) - : undefined); - message.executeContract !== undefined && - (obj.executeContract = message.executeContract - ? MsgExecuteContract.toJSON(message.executeContract) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState_GenMsgs }; - if (object.storeCode !== undefined && object.storeCode !== null) { - message.storeCode = MsgStoreCode.fromPartial(object.storeCode); - } - else { - message.storeCode = undefined; - } - if (object.instantiateContract !== undefined && - object.instantiateContract !== null) { - message.instantiateContract = MsgInstantiateContract.fromPartial(object.instantiateContract); - } - else { - message.instantiateContract = undefined; - } - if (object.executeContract !== undefined && - object.executeContract !== null) { - message.executeContract = MsgExecuteContract.fromPartial(object.executeContract); - } - else { - message.executeContract = undefined; - } - return message; - }, -}; -const baseCode = { codeId: 0, pinned: false }; -export const Code = { - encode(message, writer = Writer.create()) { - if (message.codeId !== 0) { - writer.uint32(8).uint64(message.codeId); - } - if (message.codeInfo !== undefined) { - CodeInfo.encode(message.codeInfo, writer.uint32(18).fork()).ldelim(); - } - if (message.codeBytes.length !== 0) { - writer.uint32(26).bytes(message.codeBytes); - } - if (message.pinned === true) { - writer.uint32(32).bool(message.pinned); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCode }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = longToNumber(reader.uint64()); - break; - case 2: - message.codeInfo = CodeInfo.decode(reader, reader.uint32()); - break; - case 3: - message.codeBytes = reader.bytes(); - break; - case 4: - message.pinned = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCode }; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } - else { - message.codeId = 0; - } - if (object.codeInfo !== undefined && object.codeInfo !== null) { - message.codeInfo = CodeInfo.fromJSON(object.codeInfo); - } - else { - message.codeInfo = undefined; - } - if (object.codeBytes !== undefined && object.codeBytes !== null) { - message.codeBytes = bytesFromBase64(object.codeBytes); - } - if (object.pinned !== undefined && object.pinned !== null) { - message.pinned = Boolean(object.pinned); - } - else { - message.pinned = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = message.codeId); - message.codeInfo !== undefined && - (obj.codeInfo = message.codeInfo - ? CodeInfo.toJSON(message.codeInfo) - : undefined); - message.codeBytes !== undefined && - (obj.codeBytes = base64FromBytes(message.codeBytes !== undefined ? message.codeBytes : new Uint8Array())); - message.pinned !== undefined && (obj.pinned = message.pinned); - return obj; - }, - fromPartial(object) { - const message = { ...baseCode }; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = 0; - } - if (object.codeInfo !== undefined && object.codeInfo !== null) { - message.codeInfo = CodeInfo.fromPartial(object.codeInfo); - } - else { - message.codeInfo = undefined; - } - if (object.codeBytes !== undefined && object.codeBytes !== null) { - message.codeBytes = object.codeBytes; - } - else { - message.codeBytes = new Uint8Array(); - } - if (object.pinned !== undefined && object.pinned !== null) { - message.pinned = object.pinned; - } - else { - message.pinned = false; - } - return message; - }, -}; -const baseContract = { contractAddress: "" }; -export const Contract = { - encode(message, writer = Writer.create()) { - if (message.contractAddress !== "") { - writer.uint32(10).string(message.contractAddress); - } - if (message.contractInfo !== undefined) { - ContractInfo.encode(message.contractInfo, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.contractState) { - Model.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseContract }; - message.contractState = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddress = reader.string(); - break; - case 2: - message.contractInfo = ContractInfo.decode(reader, reader.uint32()); - break; - case 3: - message.contractState.push(Model.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseContract }; - message.contractState = []; - if (object.contractAddress !== undefined && - object.contractAddress !== null) { - message.contractAddress = String(object.contractAddress); - } - else { - message.contractAddress = ""; - } - if (object.contractInfo !== undefined && object.contractInfo !== null) { - message.contractInfo = ContractInfo.fromJSON(object.contractInfo); - } - else { - message.contractInfo = undefined; - } - if (object.contractState !== undefined && object.contractState !== null) { - for (const e of object.contractState) { - message.contractState.push(Model.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.contractAddress !== undefined && - (obj.contractAddress = message.contractAddress); - message.contractInfo !== undefined && - (obj.contractInfo = message.contractInfo - ? ContractInfo.toJSON(message.contractInfo) - : undefined); - if (message.contractState) { - obj.contractState = message.contractState.map((e) => e ? Model.toJSON(e) : undefined); - } - else { - obj.contractState = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseContract }; - message.contractState = []; - if (object.contractAddress !== undefined && - object.contractAddress !== null) { - message.contractAddress = object.contractAddress; - } - else { - message.contractAddress = ""; - } - if (object.contractInfo !== undefined && object.contractInfo !== null) { - message.contractInfo = ContractInfo.fromPartial(object.contractInfo); - } - else { - message.contractInfo = undefined; - } - if (object.contractState !== undefined && object.contractState !== null) { - for (const e of object.contractState) { - message.contractState.push(Model.fromPartial(e)); - } - } - return message; - }, -}; -const baseSequence = { value: 0 }; -export const Sequence = { - encode(message, writer = Writer.create()) { - if (message.idKey.length !== 0) { - writer.uint32(10).bytes(message.idKey); - } - if (message.value !== 0) { - writer.uint32(16).uint64(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSequence }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.idKey = reader.bytes(); - break; - case 2: - message.value = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSequence }; - if (object.idKey !== undefined && object.idKey !== null) { - message.idKey = bytesFromBase64(object.idKey); - } - if (object.value !== undefined && object.value !== null) { - message.value = Number(object.value); - } - else { - message.value = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.idKey !== undefined && - (obj.idKey = base64FromBytes(message.idKey !== undefined ? message.idKey : new Uint8Array())); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - fromPartial(object) { - const message = { ...baseSequence }; - if (object.idKey !== undefined && object.idKey !== null) { - message.idKey = object.idKey; - } - else { - message.idKey = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/genesis.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/genesis.ts deleted file mode 100644 index f0eb59ce2a..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/genesis.ts +++ /dev/null @@ -1,703 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { - Params, - CodeInfo, - ContractInfo, - Model, -} from "../../../cosmwasm/wasm/v1/types"; -import { - MsgStoreCode, - MsgInstantiateContract, - MsgExecuteContract, -} from "../../../cosmwasm/wasm/v1/tx"; - -export const protobufPackage = "cosmwasm.wasm.v1"; - -/** GenesisState - genesis state of x/wasm */ -export interface GenesisState { - params: Params | undefined; - codes: Code[]; - contracts: Contract[]; - sequences: Sequence[]; - gen_msgs: GenesisState_GenMsgs[]; -} - -/** - * GenMsgs define the messages that can be executed during genesis phase in - * order. The intention is to have more human readable data that is auditable. - */ -export interface GenesisState_GenMsgs { - store_code: MsgStoreCode | undefined; - instantiate_contract: MsgInstantiateContract | undefined; - execute_contract: MsgExecuteContract | undefined; -} - -/** Code struct encompasses CodeInfo and CodeBytes */ -export interface Code { - code_id: number; - code_info: CodeInfo | undefined; - code_bytes: Uint8Array; - /** Pinned to wasmvm cache */ - pinned: boolean; -} - -/** Contract struct encompasses ContractAddress, ContractInfo, and ContractState */ -export interface Contract { - contract_address: string; - contract_info: ContractInfo | undefined; - contract_state: Model[]; -} - -/** Sequence key and value of an id generation counter */ -export interface Sequence { - id_key: Uint8Array; - value: number; -} - -const baseGenesisState: object = {}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.codes) { - Code.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.contracts) { - Contract.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.sequences) { - Sequence.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.gen_msgs) { - GenesisState_GenMsgs.encode(v!, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.codes = []; - message.contracts = []; - message.sequences = []; - message.gen_msgs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.codes.push(Code.decode(reader, reader.uint32())); - break; - case 3: - message.contracts.push(Contract.decode(reader, reader.uint32())); - break; - case 4: - message.sequences.push(Sequence.decode(reader, reader.uint32())); - break; - case 5: - message.gen_msgs.push( - GenesisState_GenMsgs.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.codes = []; - message.contracts = []; - message.sequences = []; - message.gen_msgs = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if (object.codes !== undefined && object.codes !== null) { - for (const e of object.codes) { - message.codes.push(Code.fromJSON(e)); - } - } - if (object.contracts !== undefined && object.contracts !== null) { - for (const e of object.contracts) { - message.contracts.push(Contract.fromJSON(e)); - } - } - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(Sequence.fromJSON(e)); - } - } - if (object.gen_msgs !== undefined && object.gen_msgs !== null) { - for (const e of object.gen_msgs) { - message.gen_msgs.push(GenesisState_GenMsgs.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.codes) { - obj.codes = message.codes.map((e) => (e ? Code.toJSON(e) : undefined)); - } else { - obj.codes = []; - } - if (message.contracts) { - obj.contracts = message.contracts.map((e) => - e ? Contract.toJSON(e) : undefined - ); - } else { - obj.contracts = []; - } - if (message.sequences) { - obj.sequences = message.sequences.map((e) => - e ? Sequence.toJSON(e) : undefined - ); - } else { - obj.sequences = []; - } - if (message.gen_msgs) { - obj.gen_msgs = message.gen_msgs.map((e) => - e ? GenesisState_GenMsgs.toJSON(e) : undefined - ); - } else { - obj.gen_msgs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.codes = []; - message.contracts = []; - message.sequences = []; - message.gen_msgs = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if (object.codes !== undefined && object.codes !== null) { - for (const e of object.codes) { - message.codes.push(Code.fromPartial(e)); - } - } - if (object.contracts !== undefined && object.contracts !== null) { - for (const e of object.contracts) { - message.contracts.push(Contract.fromPartial(e)); - } - } - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(Sequence.fromPartial(e)); - } - } - if (object.gen_msgs !== undefined && object.gen_msgs !== null) { - for (const e of object.gen_msgs) { - message.gen_msgs.push(GenesisState_GenMsgs.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGenesisState_GenMsgs: object = {}; - -export const GenesisState_GenMsgs = { - encode( - message: GenesisState_GenMsgs, - writer: Writer = Writer.create() - ): Writer { - if (message.store_code !== undefined) { - MsgStoreCode.encode( - message.store_code, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.instantiate_contract !== undefined) { - MsgInstantiateContract.encode( - message.instantiate_contract, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.execute_contract !== undefined) { - MsgExecuteContract.encode( - message.execute_contract, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState_GenMsgs { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState_GenMsgs } as GenesisState_GenMsgs; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.store_code = MsgStoreCode.decode(reader, reader.uint32()); - break; - case 2: - message.instantiate_contract = MsgInstantiateContract.decode( - reader, - reader.uint32() - ); - break; - case 3: - message.execute_contract = MsgExecuteContract.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState_GenMsgs { - const message = { ...baseGenesisState_GenMsgs } as GenesisState_GenMsgs; - if (object.store_code !== undefined && object.store_code !== null) { - message.store_code = MsgStoreCode.fromJSON(object.store_code); - } else { - message.store_code = undefined; - } - if ( - object.instantiate_contract !== undefined && - object.instantiate_contract !== null - ) { - message.instantiate_contract = MsgInstantiateContract.fromJSON( - object.instantiate_contract - ); - } else { - message.instantiate_contract = undefined; - } - if ( - object.execute_contract !== undefined && - object.execute_contract !== null - ) { - message.execute_contract = MsgExecuteContract.fromJSON( - object.execute_contract - ); - } else { - message.execute_contract = undefined; - } - return message; - }, - - toJSON(message: GenesisState_GenMsgs): unknown { - const obj: any = {}; - message.store_code !== undefined && - (obj.store_code = message.store_code - ? MsgStoreCode.toJSON(message.store_code) - : undefined); - message.instantiate_contract !== undefined && - (obj.instantiate_contract = message.instantiate_contract - ? MsgInstantiateContract.toJSON(message.instantiate_contract) - : undefined); - message.execute_contract !== undefined && - (obj.execute_contract = message.execute_contract - ? MsgExecuteContract.toJSON(message.execute_contract) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState_GenMsgs { - const message = { ...baseGenesisState_GenMsgs } as GenesisState_GenMsgs; - if (object.store_code !== undefined && object.store_code !== null) { - message.store_code = MsgStoreCode.fromPartial(object.store_code); - } else { - message.store_code = undefined; - } - if ( - object.instantiate_contract !== undefined && - object.instantiate_contract !== null - ) { - message.instantiate_contract = MsgInstantiateContract.fromPartial( - object.instantiate_contract - ); - } else { - message.instantiate_contract = undefined; - } - if ( - object.execute_contract !== undefined && - object.execute_contract !== null - ) { - message.execute_contract = MsgExecuteContract.fromPartial( - object.execute_contract - ); - } else { - message.execute_contract = undefined; - } - return message; - }, -}; - -const baseCode: object = { code_id: 0, pinned: false }; - -export const Code = { - encode(message: Code, writer: Writer = Writer.create()): Writer { - if (message.code_id !== 0) { - writer.uint32(8).uint64(message.code_id); - } - if (message.code_info !== undefined) { - CodeInfo.encode(message.code_info, writer.uint32(18).fork()).ldelim(); - } - if (message.code_bytes.length !== 0) { - writer.uint32(26).bytes(message.code_bytes); - } - if (message.pinned === true) { - writer.uint32(32).bool(message.pinned); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Code { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCode } as Code; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.code_info = CodeInfo.decode(reader, reader.uint32()); - break; - case 3: - message.code_bytes = reader.bytes(); - break; - case 4: - message.pinned = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Code { - const message = { ...baseCode } as Code; - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = Number(object.code_id); - } else { - message.code_id = 0; - } - if (object.code_info !== undefined && object.code_info !== null) { - message.code_info = CodeInfo.fromJSON(object.code_info); - } else { - message.code_info = undefined; - } - if (object.code_bytes !== undefined && object.code_bytes !== null) { - message.code_bytes = bytesFromBase64(object.code_bytes); - } - if (object.pinned !== undefined && object.pinned !== null) { - message.pinned = Boolean(object.pinned); - } else { - message.pinned = false; - } - return message; - }, - - toJSON(message: Code): unknown { - const obj: any = {}; - message.code_id !== undefined && (obj.code_id = message.code_id); - message.code_info !== undefined && - (obj.code_info = message.code_info - ? CodeInfo.toJSON(message.code_info) - : undefined); - message.code_bytes !== undefined && - (obj.code_bytes = base64FromBytes( - message.code_bytes !== undefined ? message.code_bytes : new Uint8Array() - )); - message.pinned !== undefined && (obj.pinned = message.pinned); - return obj; - }, - - fromPartial(object: DeepPartial): Code { - const message = { ...baseCode } as Code; - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = object.code_id; - } else { - message.code_id = 0; - } - if (object.code_info !== undefined && object.code_info !== null) { - message.code_info = CodeInfo.fromPartial(object.code_info); - } else { - message.code_info = undefined; - } - if (object.code_bytes !== undefined && object.code_bytes !== null) { - message.code_bytes = object.code_bytes; - } else { - message.code_bytes = new Uint8Array(); - } - if (object.pinned !== undefined && object.pinned !== null) { - message.pinned = object.pinned; - } else { - message.pinned = false; - } - return message; - }, -}; - -const baseContract: object = { contract_address: "" }; - -export const Contract = { - encode(message: Contract, writer: Writer = Writer.create()): Writer { - if (message.contract_address !== "") { - writer.uint32(10).string(message.contract_address); - } - if (message.contract_info !== undefined) { - ContractInfo.encode( - message.contract_info, - writer.uint32(18).fork() - ).ldelim(); - } - for (const v of message.contract_state) { - Model.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Contract { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseContract } as Contract; - message.contract_state = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contract_address = reader.string(); - break; - case 2: - message.contract_info = ContractInfo.decode(reader, reader.uint32()); - break; - case 3: - message.contract_state.push(Model.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Contract { - const message = { ...baseContract } as Contract; - message.contract_state = []; - if ( - object.contract_address !== undefined && - object.contract_address !== null - ) { - message.contract_address = String(object.contract_address); - } else { - message.contract_address = ""; - } - if (object.contract_info !== undefined && object.contract_info !== null) { - message.contract_info = ContractInfo.fromJSON(object.contract_info); - } else { - message.contract_info = undefined; - } - if (object.contract_state !== undefined && object.contract_state !== null) { - for (const e of object.contract_state) { - message.contract_state.push(Model.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Contract): unknown { - const obj: any = {}; - message.contract_address !== undefined && - (obj.contract_address = message.contract_address); - message.contract_info !== undefined && - (obj.contract_info = message.contract_info - ? ContractInfo.toJSON(message.contract_info) - : undefined); - if (message.contract_state) { - obj.contract_state = message.contract_state.map((e) => - e ? Model.toJSON(e) : undefined - ); - } else { - obj.contract_state = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Contract { - const message = { ...baseContract } as Contract; - message.contract_state = []; - if ( - object.contract_address !== undefined && - object.contract_address !== null - ) { - message.contract_address = object.contract_address; - } else { - message.contract_address = ""; - } - if (object.contract_info !== undefined && object.contract_info !== null) { - message.contract_info = ContractInfo.fromPartial(object.contract_info); - } else { - message.contract_info = undefined; - } - if (object.contract_state !== undefined && object.contract_state !== null) { - for (const e of object.contract_state) { - message.contract_state.push(Model.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSequence: object = { value: 0 }; - -export const Sequence = { - encode(message: Sequence, writer: Writer = Writer.create()): Writer { - if (message.id_key.length !== 0) { - writer.uint32(10).bytes(message.id_key); - } - if (message.value !== 0) { - writer.uint32(16).uint64(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Sequence { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSequence } as Sequence; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id_key = reader.bytes(); - break; - case 2: - message.value = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Sequence { - const message = { ...baseSequence } as Sequence; - if (object.id_key !== undefined && object.id_key !== null) { - message.id_key = bytesFromBase64(object.id_key); - } - if (object.value !== undefined && object.value !== null) { - message.value = Number(object.value); - } else { - message.value = 0; - } - return message; - }, - - toJSON(message: Sequence): unknown { - const obj: any = {}; - message.id_key !== undefined && - (obj.id_key = base64FromBytes( - message.id_key !== undefined ? message.id_key : new Uint8Array() - )); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - - fromPartial(object: DeepPartial): Sequence { - const message = { ...baseSequence } as Sequence; - if (object.id_key !== undefined && object.id_key !== null) { - message.id_key = object.id_key; - } else { - message.id_key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/ibc.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/ibc.d.ts deleted file mode 100644 index 85d8b12024..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/ibc.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmwasm.wasm.v1"; -/** MsgIBCSend */ -export interface MsgIBCSend { - /** the channel by which the packet will be sent */ - channel: string; - /** - * Timeout height relative to the current block height. - * The timeout is disabled when set to 0. - */ - timeoutHeight: number; - /** - * Timeout timestamp (in nanoseconds) relative to the current block timestamp. - * The timeout is disabled when set to 0. - */ - timeoutTimestamp: number; - /** - * Data is the payload to transfer. We must not make assumption what format or - * content is in here. - */ - data: Uint8Array; -} -/** MsgIBCCloseChannel port and channel need to be owned by the contract */ -export interface MsgIBCCloseChannel { - channel: string; -} -export declare const MsgIBCSend: { - encode(message: MsgIBCSend, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgIBCSend; - fromJSON(object: any): MsgIBCSend; - toJSON(message: MsgIBCSend): unknown; - fromPartial(object: DeepPartial): MsgIBCSend; -}; -export declare const MsgIBCCloseChannel: { - encode(message: MsgIBCCloseChannel, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgIBCCloseChannel; - fromJSON(object: any): MsgIBCCloseChannel; - toJSON(message: MsgIBCCloseChannel): unknown; - fromPartial(object: DeepPartial): MsgIBCCloseChannel; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/ibc.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/ibc.js deleted file mode 100644 index 51f1e5b834..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/ibc.js +++ /dev/null @@ -1,209 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmwasm.wasm.v1"; -const baseMsgIBCSend = { - channel: "", - timeoutHeight: 0, - timeoutTimestamp: 0, -}; -export const MsgIBCSend = { - encode(message, writer = Writer.create()) { - if (message.channel !== "") { - writer.uint32(18).string(message.channel); - } - if (message.timeoutHeight !== 0) { - writer.uint32(32).uint64(message.timeoutHeight); - } - if (message.timeoutTimestamp !== 0) { - writer.uint32(40).uint64(message.timeoutTimestamp); - } - if (message.data.length !== 0) { - writer.uint32(50).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgIBCSend }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.channel = reader.string(); - break; - case 4: - message.timeoutHeight = longToNumber(reader.uint64()); - break; - case 5: - message.timeoutTimestamp = longToNumber(reader.uint64()); - break; - case 6: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgIBCSend }; - if (object.channel !== undefined && object.channel !== null) { - message.channel = String(object.channel); - } - else { - message.channel = ""; - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = Number(object.timeoutHeight); - } - else { - message.timeoutHeight = 0; - } - if (object.timeoutTimestamp !== undefined && - object.timeoutTimestamp !== null) { - message.timeoutTimestamp = Number(object.timeoutTimestamp); - } - else { - message.timeoutTimestamp = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.channel !== undefined && (obj.channel = message.channel); - message.timeoutHeight !== undefined && - (obj.timeoutHeight = message.timeoutHeight); - message.timeoutTimestamp !== undefined && - (obj.timeoutTimestamp = message.timeoutTimestamp); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgIBCSend }; - if (object.channel !== undefined && object.channel !== null) { - message.channel = object.channel; - } - else { - message.channel = ""; - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = object.timeoutHeight; - } - else { - message.timeoutHeight = 0; - } - if (object.timeoutTimestamp !== undefined && - object.timeoutTimestamp !== null) { - message.timeoutTimestamp = object.timeoutTimestamp; - } - else { - message.timeoutTimestamp = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseMsgIBCCloseChannel = { channel: "" }; -export const MsgIBCCloseChannel = { - encode(message, writer = Writer.create()) { - if (message.channel !== "") { - writer.uint32(18).string(message.channel); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgIBCCloseChannel }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.channel = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgIBCCloseChannel }; - if (object.channel !== undefined && object.channel !== null) { - message.channel = String(object.channel); - } - else { - message.channel = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.channel !== undefined && (obj.channel = message.channel); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgIBCCloseChannel }; - if (object.channel !== undefined && object.channel !== null) { - message.channel = object.channel; - } - else { - message.channel = ""; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/ibc.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/ibc.ts deleted file mode 100644 index e2f753499e..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/ibc.ts +++ /dev/null @@ -1,264 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmwasm.wasm.v1"; - -/** MsgIBCSend */ -export interface MsgIBCSend { - /** the channel by which the packet will be sent */ - channel: string; - /** - * Timeout height relative to the current block height. - * The timeout is disabled when set to 0. - */ - timeout_height: number; - /** - * Timeout timestamp (in nanoseconds) relative to the current block timestamp. - * The timeout is disabled when set to 0. - */ - timeout_timestamp: number; - /** - * Data is the payload to transfer. We must not make assumption what format or - * content is in here. - */ - data: Uint8Array; -} - -/** MsgIBCCloseChannel port and channel need to be owned by the contract */ -export interface MsgIBCCloseChannel { - channel: string; -} - -const baseMsgIBCSend: object = { - channel: "", - timeout_height: 0, - timeout_timestamp: 0, -}; - -export const MsgIBCSend = { - encode(message: MsgIBCSend, writer: Writer = Writer.create()): Writer { - if (message.channel !== "") { - writer.uint32(18).string(message.channel); - } - if (message.timeout_height !== 0) { - writer.uint32(32).uint64(message.timeout_height); - } - if (message.timeout_timestamp !== 0) { - writer.uint32(40).uint64(message.timeout_timestamp); - } - if (message.data.length !== 0) { - writer.uint32(50).bytes(message.data); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgIBCSend { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgIBCSend } as MsgIBCSend; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.channel = reader.string(); - break; - case 4: - message.timeout_height = longToNumber(reader.uint64() as Long); - break; - case 5: - message.timeout_timestamp = longToNumber(reader.uint64() as Long); - break; - case 6: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgIBCSend { - const message = { ...baseMsgIBCSend } as MsgIBCSend; - if (object.channel !== undefined && object.channel !== null) { - message.channel = String(object.channel); - } else { - message.channel = ""; - } - if (object.timeout_height !== undefined && object.timeout_height !== null) { - message.timeout_height = Number(object.timeout_height); - } else { - message.timeout_height = 0; - } - if ( - object.timeout_timestamp !== undefined && - object.timeout_timestamp !== null - ) { - message.timeout_timestamp = Number(object.timeout_timestamp); - } else { - message.timeout_timestamp = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: MsgIBCSend): unknown { - const obj: any = {}; - message.channel !== undefined && (obj.channel = message.channel); - message.timeout_height !== undefined && - (obj.timeout_height = message.timeout_height); - message.timeout_timestamp !== undefined && - (obj.timeout_timestamp = message.timeout_timestamp); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): MsgIBCSend { - const message = { ...baseMsgIBCSend } as MsgIBCSend; - if (object.channel !== undefined && object.channel !== null) { - message.channel = object.channel; - } else { - message.channel = ""; - } - if (object.timeout_height !== undefined && object.timeout_height !== null) { - message.timeout_height = object.timeout_height; - } else { - message.timeout_height = 0; - } - if ( - object.timeout_timestamp !== undefined && - object.timeout_timestamp !== null - ) { - message.timeout_timestamp = object.timeout_timestamp; - } else { - message.timeout_timestamp = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseMsgIBCCloseChannel: object = { channel: "" }; - -export const MsgIBCCloseChannel = { - encode( - message: MsgIBCCloseChannel, - writer: Writer = Writer.create() - ): Writer { - if (message.channel !== "") { - writer.uint32(18).string(message.channel); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgIBCCloseChannel { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgIBCCloseChannel } as MsgIBCCloseChannel; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.channel = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgIBCCloseChannel { - const message = { ...baseMsgIBCCloseChannel } as MsgIBCCloseChannel; - if (object.channel !== undefined && object.channel !== null) { - message.channel = String(object.channel); - } else { - message.channel = ""; - } - return message; - }, - - toJSON(message: MsgIBCCloseChannel): unknown { - const obj: any = {}; - message.channel !== undefined && (obj.channel = message.channel); - return obj; - }, - - fromPartial(object: DeepPartial): MsgIBCCloseChannel { - const message = { ...baseMsgIBCCloseChannel } as MsgIBCCloseChannel; - if (object.channel !== undefined && object.channel !== null) { - message.channel = object.channel; - } else { - message.channel = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/proposal.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/proposal.d.ts deleted file mode 100644 index 0b0795b59d..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/proposal.d.ts +++ /dev/null @@ -1,235 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { AccessConfig } from "../../../cosmwasm/wasm/v1/types"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmwasm.wasm.v1"; -/** StoreCodeProposal gov proposal content type to submit WASM code to the system */ -export interface StoreCodeProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** RunAs is the address that is passed to the contract's environment as sender */ - runAs: string; - /** WASMByteCode can be raw or gzip compressed */ - wasmByteCode: Uint8Array; - /** InstantiatePermission to apply on contract creation, optional */ - instantiatePermission: AccessConfig | undefined; -} -/** - * InstantiateContractProposal gov proposal content type to instantiate a - * contract. - */ -export interface InstantiateContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** RunAs is the address that is passed to the contract's environment as sender */ - runAs: string; - /** Admin is an optional address that can execute migrations */ - admin: string; - /** CodeID is the reference to the stored WASM code */ - codeId: number; - /** Label is optional metadata to be stored with a constract instance. */ - label: string; - /** Msg json encoded message to be passed to the contract on instantiation */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on instantiation */ - funds: Coin[]; -} -/** MigrateContractProposal gov proposal content type to migrate a contract. */ -export interface MigrateContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** Contract is the address of the smart contract */ - contract: string; - /** CodeID references the new WASM code */ - codeId: number; - /** Msg json encoded message to be passed to the contract on migration */ - msg: Uint8Array; -} -/** SudoContractProposal gov proposal content type to call sudo on a contract. */ -export interface SudoContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** Contract is the address of the smart contract */ - contract: string; - /** Msg json encoded message to be passed to the contract as sudo */ - msg: Uint8Array; -} -/** - * ExecuteContractProposal gov proposal content type to call execute on a - * contract. - */ -export interface ExecuteContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** RunAs is the address that is passed to the contract's environment as sender */ - runAs: string; - /** Contract is the address of the smart contract */ - contract: string; - /** Msg json encoded message to be passed to the contract as execute */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on instantiation */ - funds: Coin[]; -} -/** UpdateAdminProposal gov proposal content type to set an admin for a contract. */ -export interface UpdateAdminProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** NewAdmin address to be set */ - newAdmin: string; - /** Contract is the address of the smart contract */ - contract: string; -} -/** - * ClearAdminProposal gov proposal content type to clear the admin of a - * contract. - */ -export interface ClearAdminProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** Contract is the address of the smart contract */ - contract: string; -} -/** - * PinCodesProposal gov proposal content type to pin a set of code ids in the - * wasmvm cache. - */ -export interface PinCodesProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** CodeIDs references the new WASM codes */ - codeIds: number[]; -} -/** - * UnpinCodesProposal gov proposal content type to unpin a set of code ids in - * the wasmvm cache. - */ -export interface UnpinCodesProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** CodeIDs references the WASM codes */ - codeIds: number[]; -} -/** - * AccessConfigUpdate contains the code id and the access config to be - * applied. - */ -export interface AccessConfigUpdate { - /** CodeID is the reference to the stored WASM code to be updated */ - codeId: number; - /** InstantiatePermission to apply to the set of code ids */ - instantiatePermission: AccessConfig | undefined; -} -/** - * UpdateInstantiateConfigProposal gov proposal content type to update - * instantiate config to a set of code ids. - */ -export interface UpdateInstantiateConfigProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** - * AccessConfigUpdate contains the list of code ids and the access config - * to be applied. - */ - accessConfigUpdates: AccessConfigUpdate[]; -} -export declare const StoreCodeProposal: { - encode(message: StoreCodeProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): StoreCodeProposal; - fromJSON(object: any): StoreCodeProposal; - toJSON(message: StoreCodeProposal): unknown; - fromPartial(object: DeepPartial): StoreCodeProposal; -}; -export declare const InstantiateContractProposal: { - encode(message: InstantiateContractProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): InstantiateContractProposal; - fromJSON(object: any): InstantiateContractProposal; - toJSON(message: InstantiateContractProposal): unknown; - fromPartial(object: DeepPartial): InstantiateContractProposal; -}; -export declare const MigrateContractProposal: { - encode(message: MigrateContractProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MigrateContractProposal; - fromJSON(object: any): MigrateContractProposal; - toJSON(message: MigrateContractProposal): unknown; - fromPartial(object: DeepPartial): MigrateContractProposal; -}; -export declare const SudoContractProposal: { - encode(message: SudoContractProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SudoContractProposal; - fromJSON(object: any): SudoContractProposal; - toJSON(message: SudoContractProposal): unknown; - fromPartial(object: DeepPartial): SudoContractProposal; -}; -export declare const ExecuteContractProposal: { - encode(message: ExecuteContractProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExecuteContractProposal; - fromJSON(object: any): ExecuteContractProposal; - toJSON(message: ExecuteContractProposal): unknown; - fromPartial(object: DeepPartial): ExecuteContractProposal; -}; -export declare const UpdateAdminProposal: { - encode(message: UpdateAdminProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UpdateAdminProposal; - fromJSON(object: any): UpdateAdminProposal; - toJSON(message: UpdateAdminProposal): unknown; - fromPartial(object: DeepPartial): UpdateAdminProposal; -}; -export declare const ClearAdminProposal: { - encode(message: ClearAdminProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ClearAdminProposal; - fromJSON(object: any): ClearAdminProposal; - toJSON(message: ClearAdminProposal): unknown; - fromPartial(object: DeepPartial): ClearAdminProposal; -}; -export declare const PinCodesProposal: { - encode(message: PinCodesProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PinCodesProposal; - fromJSON(object: any): PinCodesProposal; - toJSON(message: PinCodesProposal): unknown; - fromPartial(object: DeepPartial): PinCodesProposal; -}; -export declare const UnpinCodesProposal: { - encode(message: UnpinCodesProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UnpinCodesProposal; - fromJSON(object: any): UnpinCodesProposal; - toJSON(message: UnpinCodesProposal): unknown; - fromPartial(object: DeepPartial): UnpinCodesProposal; -}; -export declare const AccessConfigUpdate: { - encode(message: AccessConfigUpdate, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): AccessConfigUpdate; - fromJSON(object: any): AccessConfigUpdate; - toJSON(message: AccessConfigUpdate): unknown; - fromPartial(object: DeepPartial): AccessConfigUpdate; -}; -export declare const UpdateInstantiateConfigProposal: { - encode(message: UpdateInstantiateConfigProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UpdateInstantiateConfigProposal; - fromJSON(object: any): UpdateInstantiateConfigProposal; - toJSON(message: UpdateInstantiateConfigProposal): unknown; - fromPartial(object: DeepPartial): UpdateInstantiateConfigProposal; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/proposal.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/proposal.js deleted file mode 100644 index 2ebb0b9940..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/proposal.js +++ /dev/null @@ -1,1397 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { AccessConfig } from "../../../cosmwasm/wasm/v1/types"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmwasm.wasm.v1"; -const baseStoreCodeProposal = { title: "", description: "", runAs: "" }; -export const StoreCodeProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.runAs !== "") { - writer.uint32(26).string(message.runAs); - } - if (message.wasmByteCode.length !== 0) { - writer.uint32(34).bytes(message.wasmByteCode); - } - if (message.instantiatePermission !== undefined) { - AccessConfig.encode(message.instantiatePermission, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseStoreCodeProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.runAs = reader.string(); - break; - case 4: - message.wasmByteCode = reader.bytes(); - break; - case 7: - message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseStoreCodeProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.runAs !== undefined && object.runAs !== null) { - message.runAs = String(object.runAs); - } - else { - message.runAs = ""; - } - if (object.wasmByteCode !== undefined && object.wasmByteCode !== null) { - message.wasmByteCode = bytesFromBase64(object.wasmByteCode); - } - if (object.instantiatePermission !== undefined && - object.instantiatePermission !== null) { - message.instantiatePermission = AccessConfig.fromJSON(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.runAs !== undefined && (obj.runAs = message.runAs); - message.wasmByteCode !== undefined && - (obj.wasmByteCode = base64FromBytes(message.wasmByteCode !== undefined - ? message.wasmByteCode - : new Uint8Array())); - message.instantiatePermission !== undefined && - (obj.instantiatePermission = message.instantiatePermission - ? AccessConfig.toJSON(message.instantiatePermission) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseStoreCodeProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.runAs !== undefined && object.runAs !== null) { - message.runAs = object.runAs; - } - else { - message.runAs = ""; - } - if (object.wasmByteCode !== undefined && object.wasmByteCode !== null) { - message.wasmByteCode = object.wasmByteCode; - } - else { - message.wasmByteCode = new Uint8Array(); - } - if (object.instantiatePermission !== undefined && - object.instantiatePermission !== null) { - message.instantiatePermission = AccessConfig.fromPartial(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, -}; -const baseInstantiateContractProposal = { - title: "", - description: "", - runAs: "", - admin: "", - codeId: 0, - label: "", -}; -export const InstantiateContractProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.runAs !== "") { - writer.uint32(26).string(message.runAs); - } - if (message.admin !== "") { - writer.uint32(34).string(message.admin); - } - if (message.codeId !== 0) { - writer.uint32(40).uint64(message.codeId); - } - if (message.label !== "") { - writer.uint32(50).string(message.label); - } - if (message.msg.length !== 0) { - writer.uint32(58).bytes(message.msg); - } - for (const v of message.funds) { - Coin.encode(v, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseInstantiateContractProposal, - }; - message.funds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.runAs = reader.string(); - break; - case 4: - message.admin = reader.string(); - break; - case 5: - message.codeId = longToNumber(reader.uint64()); - break; - case 6: - message.label = reader.string(); - break; - case 7: - message.msg = reader.bytes(); - break; - case 8: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseInstantiateContractProposal, - }; - message.funds = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.runAs !== undefined && object.runAs !== null) { - message.runAs = String(object.runAs); - } - else { - message.runAs = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = String(object.admin); - } - else { - message.admin = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } - else { - message.codeId = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = String(object.label); - } - else { - message.label = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.runAs !== undefined && (obj.runAs = message.runAs); - message.admin !== undefined && (obj.admin = message.admin); - message.codeId !== undefined && (obj.codeId = message.codeId); - message.label !== undefined && (obj.label = message.label); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - if (message.funds) { - obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.funds = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseInstantiateContractProposal, - }; - message.funds = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.runAs !== undefined && object.runAs !== null) { - message.runAs = object.runAs; - } - else { - message.runAs = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = object.admin; - } - else { - message.admin = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseMigrateContractProposal = { - title: "", - description: "", - contract: "", - codeId: 0, -}; -export const MigrateContractProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.contract !== "") { - writer.uint32(34).string(message.contract); - } - if (message.codeId !== 0) { - writer.uint32(40).uint64(message.codeId); - } - if (message.msg.length !== 0) { - writer.uint32(50).bytes(message.msg); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMigrateContractProposal, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 4: - message.contract = reader.string(); - break; - case 5: - message.codeId = longToNumber(reader.uint64()); - break; - case 6: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMigrateContractProposal, - }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } - else { - message.codeId = 0; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.contract !== undefined && (obj.contract = message.contract); - message.codeId !== undefined && (obj.codeId = message.codeId); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMigrateContractProposal, - }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = 0; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - return message; - }, -}; -const baseSudoContractProposal = { - title: "", - description: "", - contract: "", -}; -export const SudoContractProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - if (message.msg.length !== 0) { - writer.uint32(34).bytes(message.msg); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSudoContractProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - case 4: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSudoContractProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.contract !== undefined && (obj.contract = message.contract); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseSudoContractProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - return message; - }, -}; -const baseExecuteContractProposal = { - title: "", - description: "", - runAs: "", - contract: "", -}; -export const ExecuteContractProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.runAs !== "") { - writer.uint32(26).string(message.runAs); - } - if (message.contract !== "") { - writer.uint32(34).string(message.contract); - } - if (message.msg.length !== 0) { - writer.uint32(42).bytes(message.msg); - } - for (const v of message.funds) { - Coin.encode(v, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseExecuteContractProposal, - }; - message.funds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.runAs = reader.string(); - break; - case 4: - message.contract = reader.string(); - break; - case 5: - message.msg = reader.bytes(); - break; - case 6: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseExecuteContractProposal, - }; - message.funds = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.runAs !== undefined && object.runAs !== null) { - message.runAs = String(object.runAs); - } - else { - message.runAs = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.runAs !== undefined && (obj.runAs = message.runAs); - message.contract !== undefined && (obj.contract = message.contract); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - if (message.funds) { - obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.funds = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseExecuteContractProposal, - }; - message.funds = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.runAs !== undefined && object.runAs !== null) { - message.runAs = object.runAs; - } - else { - message.runAs = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseUpdateAdminProposal = { - title: "", - description: "", - newAdmin: "", - contract: "", -}; -export const UpdateAdminProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.newAdmin !== "") { - writer.uint32(26).string(message.newAdmin); - } - if (message.contract !== "") { - writer.uint32(34).string(message.contract); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUpdateAdminProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.newAdmin = reader.string(); - break; - case 4: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUpdateAdminProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.newAdmin !== undefined && object.newAdmin !== null) { - message.newAdmin = String(object.newAdmin); - } - else { - message.newAdmin = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.newAdmin !== undefined && (obj.newAdmin = message.newAdmin); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - fromPartial(object) { - const message = { ...baseUpdateAdminProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.newAdmin !== undefined && object.newAdmin !== null) { - message.newAdmin = object.newAdmin; - } - else { - message.newAdmin = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - return message; - }, -}; -const baseClearAdminProposal = { - title: "", - description: "", - contract: "", -}; -export const ClearAdminProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClearAdminProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseClearAdminProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - fromPartial(object) { - const message = { ...baseClearAdminProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - return message; - }, -}; -const basePinCodesProposal = { title: "", description: "", codeIds: 0 }; -export const PinCodesProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - writer.uint32(26).fork(); - for (const v of message.codeIds) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePinCodesProposal }; - message.codeIds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.codeIds.push(longToNumber(reader.uint64())); - } - } - else { - message.codeIds.push(longToNumber(reader.uint64())); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePinCodesProposal }; - message.codeIds = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.codeIds !== undefined && object.codeIds !== null) { - for (const e of object.codeIds) { - message.codeIds.push(Number(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - if (message.codeIds) { - obj.codeIds = message.codeIds.map((e) => e); - } - else { - obj.codeIds = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...basePinCodesProposal }; - message.codeIds = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.codeIds !== undefined && object.codeIds !== null) { - for (const e of object.codeIds) { - message.codeIds.push(e); - } - } - return message; - }, -}; -const baseUnpinCodesProposal = { - title: "", - description: "", - codeIds: 0, -}; -export const UnpinCodesProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - writer.uint32(26).fork(); - for (const v of message.codeIds) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUnpinCodesProposal }; - message.codeIds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.codeIds.push(longToNumber(reader.uint64())); - } - } - else { - message.codeIds.push(longToNumber(reader.uint64())); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUnpinCodesProposal }; - message.codeIds = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.codeIds !== undefined && object.codeIds !== null) { - for (const e of object.codeIds) { - message.codeIds.push(Number(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - if (message.codeIds) { - obj.codeIds = message.codeIds.map((e) => e); - } - else { - obj.codeIds = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseUnpinCodesProposal }; - message.codeIds = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.codeIds !== undefined && object.codeIds !== null) { - for (const e of object.codeIds) { - message.codeIds.push(e); - } - } - return message; - }, -}; -const baseAccessConfigUpdate = { codeId: 0 }; -export const AccessConfigUpdate = { - encode(message, writer = Writer.create()) { - if (message.codeId !== 0) { - writer.uint32(8).uint64(message.codeId); - } - if (message.instantiatePermission !== undefined) { - AccessConfig.encode(message.instantiatePermission, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAccessConfigUpdate }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = longToNumber(reader.uint64()); - break; - case 2: - message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAccessConfigUpdate }; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } - else { - message.codeId = 0; - } - if (object.instantiatePermission !== undefined && - object.instantiatePermission !== null) { - message.instantiatePermission = AccessConfig.fromJSON(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = message.codeId); - message.instantiatePermission !== undefined && - (obj.instantiatePermission = message.instantiatePermission - ? AccessConfig.toJSON(message.instantiatePermission) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseAccessConfigUpdate }; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = 0; - } - if (object.instantiatePermission !== undefined && - object.instantiatePermission !== null) { - message.instantiatePermission = AccessConfig.fromPartial(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, -}; -const baseUpdateInstantiateConfigProposal = { - title: "", - description: "", -}; -export const UpdateInstantiateConfigProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.accessConfigUpdates) { - AccessConfigUpdate.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUpdateInstantiateConfigProposal, - }; - message.accessConfigUpdates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.accessConfigUpdates.push(AccessConfigUpdate.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUpdateInstantiateConfigProposal, - }; - message.accessConfigUpdates = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.accessConfigUpdates !== undefined && - object.accessConfigUpdates !== null) { - for (const e of object.accessConfigUpdates) { - message.accessConfigUpdates.push(AccessConfigUpdate.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - if (message.accessConfigUpdates) { - obj.accessConfigUpdates = message.accessConfigUpdates.map((e) => e ? AccessConfigUpdate.toJSON(e) : undefined); - } - else { - obj.accessConfigUpdates = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseUpdateInstantiateConfigProposal, - }; - message.accessConfigUpdates = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.accessConfigUpdates !== undefined && - object.accessConfigUpdates !== null) { - for (const e of object.accessConfigUpdates) { - message.accessConfigUpdates.push(AccessConfigUpdate.fromPartial(e)); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/proposal.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/proposal.ts deleted file mode 100644 index 59a7e93335..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/proposal.ts +++ /dev/null @@ -1,1651 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { AccessConfig } from "../../../cosmwasm/wasm/v1/types"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmwasm.wasm.v1"; - -/** StoreCodeProposal gov proposal content type to submit WASM code to the system */ -export interface StoreCodeProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** RunAs is the address that is passed to the contract's environment as sender */ - run_as: string; - /** WASMByteCode can be raw or gzip compressed */ - wasm_byte_code: Uint8Array; - /** InstantiatePermission to apply on contract creation, optional */ - instantiate_permission: AccessConfig | undefined; -} - -/** - * InstantiateContractProposal gov proposal content type to instantiate a - * contract. - */ -export interface InstantiateContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** RunAs is the address that is passed to the contract's environment as sender */ - run_as: string; - /** Admin is an optional address that can execute migrations */ - admin: string; - /** CodeID is the reference to the stored WASM code */ - code_id: number; - /** Label is optional metadata to be stored with a constract instance. */ - label: string; - /** Msg json encoded message to be passed to the contract on instantiation */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on instantiation */ - funds: Coin[]; -} - -/** MigrateContractProposal gov proposal content type to migrate a contract. */ -export interface MigrateContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** Contract is the address of the smart contract */ - contract: string; - /** CodeID references the new WASM code */ - code_id: number; - /** Msg json encoded message to be passed to the contract on migration */ - msg: Uint8Array; -} - -/** SudoContractProposal gov proposal content type to call sudo on a contract. */ -export interface SudoContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** Contract is the address of the smart contract */ - contract: string; - /** Msg json encoded message to be passed to the contract as sudo */ - msg: Uint8Array; -} - -/** - * ExecuteContractProposal gov proposal content type to call execute on a - * contract. - */ -export interface ExecuteContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** RunAs is the address that is passed to the contract's environment as sender */ - run_as: string; - /** Contract is the address of the smart contract */ - contract: string; - /** Msg json encoded message to be passed to the contract as execute */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on instantiation */ - funds: Coin[]; -} - -/** UpdateAdminProposal gov proposal content type to set an admin for a contract. */ -export interface UpdateAdminProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** NewAdmin address to be set */ - new_admin: string; - /** Contract is the address of the smart contract */ - contract: string; -} - -/** - * ClearAdminProposal gov proposal content type to clear the admin of a - * contract. - */ -export interface ClearAdminProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** Contract is the address of the smart contract */ - contract: string; -} - -/** - * PinCodesProposal gov proposal content type to pin a set of code ids in the - * wasmvm cache. - */ -export interface PinCodesProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** CodeIDs references the new WASM codes */ - code_ids: number[]; -} - -/** - * UnpinCodesProposal gov proposal content type to unpin a set of code ids in - * the wasmvm cache. - */ -export interface UnpinCodesProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** CodeIDs references the WASM codes */ - code_ids: number[]; -} - -/** - * AccessConfigUpdate contains the code id and the access config to be - * applied. - */ -export interface AccessConfigUpdate { - /** CodeID is the reference to the stored WASM code to be updated */ - code_id: number; - /** InstantiatePermission to apply to the set of code ids */ - instantiate_permission: AccessConfig | undefined; -} - -/** - * UpdateInstantiateConfigProposal gov proposal content type to update - * instantiate config to a set of code ids. - */ -export interface UpdateInstantiateConfigProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** - * AccessConfigUpdate contains the list of code ids and the access config - * to be applied. - */ - access_config_updates: AccessConfigUpdate[]; -} - -const baseStoreCodeProposal: object = { - title: "", - description: "", - run_as: "", -}; - -export const StoreCodeProposal = { - encode(message: StoreCodeProposal, writer: Writer = Writer.create()): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.run_as !== "") { - writer.uint32(26).string(message.run_as); - } - if (message.wasm_byte_code.length !== 0) { - writer.uint32(34).bytes(message.wasm_byte_code); - } - if (message.instantiate_permission !== undefined) { - AccessConfig.encode( - message.instantiate_permission, - writer.uint32(58).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): StoreCodeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseStoreCodeProposal } as StoreCodeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.run_as = reader.string(); - break; - case 4: - message.wasm_byte_code = reader.bytes(); - break; - case 7: - message.instantiate_permission = AccessConfig.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): StoreCodeProposal { - const message = { ...baseStoreCodeProposal } as StoreCodeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.run_as !== undefined && object.run_as !== null) { - message.run_as = String(object.run_as); - } else { - message.run_as = ""; - } - if (object.wasm_byte_code !== undefined && object.wasm_byte_code !== null) { - message.wasm_byte_code = bytesFromBase64(object.wasm_byte_code); - } - if ( - object.instantiate_permission !== undefined && - object.instantiate_permission !== null - ) { - message.instantiate_permission = AccessConfig.fromJSON( - object.instantiate_permission - ); - } else { - message.instantiate_permission = undefined; - } - return message; - }, - - toJSON(message: StoreCodeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.run_as !== undefined && (obj.run_as = message.run_as); - message.wasm_byte_code !== undefined && - (obj.wasm_byte_code = base64FromBytes( - message.wasm_byte_code !== undefined - ? message.wasm_byte_code - : new Uint8Array() - )); - message.instantiate_permission !== undefined && - (obj.instantiate_permission = message.instantiate_permission - ? AccessConfig.toJSON(message.instantiate_permission) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): StoreCodeProposal { - const message = { ...baseStoreCodeProposal } as StoreCodeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.run_as !== undefined && object.run_as !== null) { - message.run_as = object.run_as; - } else { - message.run_as = ""; - } - if (object.wasm_byte_code !== undefined && object.wasm_byte_code !== null) { - message.wasm_byte_code = object.wasm_byte_code; - } else { - message.wasm_byte_code = new Uint8Array(); - } - if ( - object.instantiate_permission !== undefined && - object.instantiate_permission !== null - ) { - message.instantiate_permission = AccessConfig.fromPartial( - object.instantiate_permission - ); - } else { - message.instantiate_permission = undefined; - } - return message; - }, -}; - -const baseInstantiateContractProposal: object = { - title: "", - description: "", - run_as: "", - admin: "", - code_id: 0, - label: "", -}; - -export const InstantiateContractProposal = { - encode( - message: InstantiateContractProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.run_as !== "") { - writer.uint32(26).string(message.run_as); - } - if (message.admin !== "") { - writer.uint32(34).string(message.admin); - } - if (message.code_id !== 0) { - writer.uint32(40).uint64(message.code_id); - } - if (message.label !== "") { - writer.uint32(50).string(message.label); - } - if (message.msg.length !== 0) { - writer.uint32(58).bytes(message.msg); - } - for (const v of message.funds) { - Coin.encode(v!, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): InstantiateContractProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseInstantiateContractProposal, - } as InstantiateContractProposal; - message.funds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.run_as = reader.string(); - break; - case 4: - message.admin = reader.string(); - break; - case 5: - message.code_id = longToNumber(reader.uint64() as Long); - break; - case 6: - message.label = reader.string(); - break; - case 7: - message.msg = reader.bytes(); - break; - case 8: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): InstantiateContractProposal { - const message = { - ...baseInstantiateContractProposal, - } as InstantiateContractProposal; - message.funds = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.run_as !== undefined && object.run_as !== null) { - message.run_as = String(object.run_as); - } else { - message.run_as = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = String(object.admin); - } else { - message.admin = ""; - } - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = Number(object.code_id); - } else { - message.code_id = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = String(object.label); - } else { - message.label = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: InstantiateContractProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.run_as !== undefined && (obj.run_as = message.run_as); - message.admin !== undefined && (obj.admin = message.admin); - message.code_id !== undefined && (obj.code_id = message.code_id); - message.label !== undefined && (obj.label = message.label); - message.msg !== undefined && - (obj.msg = base64FromBytes( - message.msg !== undefined ? message.msg : new Uint8Array() - )); - if (message.funds) { - obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.funds = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): InstantiateContractProposal { - const message = { - ...baseInstantiateContractProposal, - } as InstantiateContractProposal; - message.funds = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.run_as !== undefined && object.run_as !== null) { - message.run_as = object.run_as; - } else { - message.run_as = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = object.admin; - } else { - message.admin = ""; - } - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = object.code_id; - } else { - message.code_id = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } else { - message.msg = new Uint8Array(); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMigrateContractProposal: object = { - title: "", - description: "", - contract: "", - code_id: 0, -}; - -export const MigrateContractProposal = { - encode( - message: MigrateContractProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.contract !== "") { - writer.uint32(34).string(message.contract); - } - if (message.code_id !== 0) { - writer.uint32(40).uint64(message.code_id); - } - if (message.msg.length !== 0) { - writer.uint32(50).bytes(message.msg); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MigrateContractProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMigrateContractProposal, - } as MigrateContractProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 4: - message.contract = reader.string(); - break; - case 5: - message.code_id = longToNumber(reader.uint64() as Long); - break; - case 6: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MigrateContractProposal { - const message = { - ...baseMigrateContractProposal, - } as MigrateContractProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } else { - message.contract = ""; - } - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = Number(object.code_id); - } else { - message.code_id = 0; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - return message; - }, - - toJSON(message: MigrateContractProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.contract !== undefined && (obj.contract = message.contract); - message.code_id !== undefined && (obj.code_id = message.code_id); - message.msg !== undefined && - (obj.msg = base64FromBytes( - message.msg !== undefined ? message.msg : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MigrateContractProposal { - const message = { - ...baseMigrateContractProposal, - } as MigrateContractProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } else { - message.contract = ""; - } - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = object.code_id; - } else { - message.code_id = 0; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } else { - message.msg = new Uint8Array(); - } - return message; - }, -}; - -const baseSudoContractProposal: object = { - title: "", - description: "", - contract: "", -}; - -export const SudoContractProposal = { - encode( - message: SudoContractProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - if (message.msg.length !== 0) { - writer.uint32(34).bytes(message.msg); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SudoContractProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSudoContractProposal } as SudoContractProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - case 4: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SudoContractProposal { - const message = { ...baseSudoContractProposal } as SudoContractProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - return message; - }, - - toJSON(message: SudoContractProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.contract !== undefined && (obj.contract = message.contract); - message.msg !== undefined && - (obj.msg = base64FromBytes( - message.msg !== undefined ? message.msg : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): SudoContractProposal { - const message = { ...baseSudoContractProposal } as SudoContractProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } else { - message.msg = new Uint8Array(); - } - return message; - }, -}; - -const baseExecuteContractProposal: object = { - title: "", - description: "", - run_as: "", - contract: "", -}; - -export const ExecuteContractProposal = { - encode( - message: ExecuteContractProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.run_as !== "") { - writer.uint32(26).string(message.run_as); - } - if (message.contract !== "") { - writer.uint32(34).string(message.contract); - } - if (message.msg.length !== 0) { - writer.uint32(42).bytes(message.msg); - } - for (const v of message.funds) { - Coin.encode(v!, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExecuteContractProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseExecuteContractProposal, - } as ExecuteContractProposal; - message.funds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.run_as = reader.string(); - break; - case 4: - message.contract = reader.string(); - break; - case 5: - message.msg = reader.bytes(); - break; - case 6: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExecuteContractProposal { - const message = { - ...baseExecuteContractProposal, - } as ExecuteContractProposal; - message.funds = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.run_as !== undefined && object.run_as !== null) { - message.run_as = String(object.run_as); - } else { - message.run_as = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExecuteContractProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.run_as !== undefined && (obj.run_as = message.run_as); - message.contract !== undefined && (obj.contract = message.contract); - message.msg !== undefined && - (obj.msg = base64FromBytes( - message.msg !== undefined ? message.msg : new Uint8Array() - )); - if (message.funds) { - obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.funds = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExecuteContractProposal { - const message = { - ...baseExecuteContractProposal, - } as ExecuteContractProposal; - message.funds = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.run_as !== undefined && object.run_as !== null) { - message.run_as = object.run_as; - } else { - message.run_as = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } else { - message.msg = new Uint8Array(); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUpdateAdminProposal: object = { - title: "", - description: "", - new_admin: "", - contract: "", -}; - -export const UpdateAdminProposal = { - encode( - message: UpdateAdminProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.new_admin !== "") { - writer.uint32(26).string(message.new_admin); - } - if (message.contract !== "") { - writer.uint32(34).string(message.contract); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UpdateAdminProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUpdateAdminProposal } as UpdateAdminProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.new_admin = reader.string(); - break; - case 4: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateAdminProposal { - const message = { ...baseUpdateAdminProposal } as UpdateAdminProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.new_admin !== undefined && object.new_admin !== null) { - message.new_admin = String(object.new_admin); - } else { - message.new_admin = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } else { - message.contract = ""; - } - return message; - }, - - toJSON(message: UpdateAdminProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.new_admin !== undefined && (obj.new_admin = message.new_admin); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - - fromPartial(object: DeepPartial): UpdateAdminProposal { - const message = { ...baseUpdateAdminProposal } as UpdateAdminProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.new_admin !== undefined && object.new_admin !== null) { - message.new_admin = object.new_admin; - } else { - message.new_admin = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } else { - message.contract = ""; - } - return message; - }, -}; - -const baseClearAdminProposal: object = { - title: "", - description: "", - contract: "", -}; - -export const ClearAdminProposal = { - encode( - message: ClearAdminProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClearAdminProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClearAdminProposal } as ClearAdminProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClearAdminProposal { - const message = { ...baseClearAdminProposal } as ClearAdminProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } else { - message.contract = ""; - } - return message; - }, - - toJSON(message: ClearAdminProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - - fromPartial(object: DeepPartial): ClearAdminProposal { - const message = { ...baseClearAdminProposal } as ClearAdminProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } else { - message.contract = ""; - } - return message; - }, -}; - -const basePinCodesProposal: object = { - title: "", - description: "", - code_ids: 0, -}; - -export const PinCodesProposal = { - encode(message: PinCodesProposal, writer: Writer = Writer.create()): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - writer.uint32(26).fork(); - for (const v of message.code_ids) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PinCodesProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePinCodesProposal } as PinCodesProposal; - message.code_ids = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.code_ids.push(longToNumber(reader.uint64() as Long)); - } - } else { - message.code_ids.push(longToNumber(reader.uint64() as Long)); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PinCodesProposal { - const message = { ...basePinCodesProposal } as PinCodesProposal; - message.code_ids = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.code_ids !== undefined && object.code_ids !== null) { - for (const e of object.code_ids) { - message.code_ids.push(Number(e)); - } - } - return message; - }, - - toJSON(message: PinCodesProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - if (message.code_ids) { - obj.code_ids = message.code_ids.map((e) => e); - } else { - obj.code_ids = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): PinCodesProposal { - const message = { ...basePinCodesProposal } as PinCodesProposal; - message.code_ids = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.code_ids !== undefined && object.code_ids !== null) { - for (const e of object.code_ids) { - message.code_ids.push(e); - } - } - return message; - }, -}; - -const baseUnpinCodesProposal: object = { - title: "", - description: "", - code_ids: 0, -}; - -export const UnpinCodesProposal = { - encode( - message: UnpinCodesProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - writer.uint32(26).fork(); - for (const v of message.code_ids) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UnpinCodesProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUnpinCodesProposal } as UnpinCodesProposal; - message.code_ids = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.code_ids.push(longToNumber(reader.uint64() as Long)); - } - } else { - message.code_ids.push(longToNumber(reader.uint64() as Long)); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UnpinCodesProposal { - const message = { ...baseUnpinCodesProposal } as UnpinCodesProposal; - message.code_ids = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.code_ids !== undefined && object.code_ids !== null) { - for (const e of object.code_ids) { - message.code_ids.push(Number(e)); - } - } - return message; - }, - - toJSON(message: UnpinCodesProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - if (message.code_ids) { - obj.code_ids = message.code_ids.map((e) => e); - } else { - obj.code_ids = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): UnpinCodesProposal { - const message = { ...baseUnpinCodesProposal } as UnpinCodesProposal; - message.code_ids = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.code_ids !== undefined && object.code_ids !== null) { - for (const e of object.code_ids) { - message.code_ids.push(e); - } - } - return message; - }, -}; - -const baseAccessConfigUpdate: object = { code_id: 0 }; - -export const AccessConfigUpdate = { - encode( - message: AccessConfigUpdate, - writer: Writer = Writer.create() - ): Writer { - if (message.code_id !== 0) { - writer.uint32(8).uint64(message.code_id); - } - if (message.instantiate_permission !== undefined) { - AccessConfig.encode( - message.instantiate_permission, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): AccessConfigUpdate { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAccessConfigUpdate } as AccessConfigUpdate; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.instantiate_permission = AccessConfig.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): AccessConfigUpdate { - const message = { ...baseAccessConfigUpdate } as AccessConfigUpdate; - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = Number(object.code_id); - } else { - message.code_id = 0; - } - if ( - object.instantiate_permission !== undefined && - object.instantiate_permission !== null - ) { - message.instantiate_permission = AccessConfig.fromJSON( - object.instantiate_permission - ); - } else { - message.instantiate_permission = undefined; - } - return message; - }, - - toJSON(message: AccessConfigUpdate): unknown { - const obj: any = {}; - message.code_id !== undefined && (obj.code_id = message.code_id); - message.instantiate_permission !== undefined && - (obj.instantiate_permission = message.instantiate_permission - ? AccessConfig.toJSON(message.instantiate_permission) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): AccessConfigUpdate { - const message = { ...baseAccessConfigUpdate } as AccessConfigUpdate; - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = object.code_id; - } else { - message.code_id = 0; - } - if ( - object.instantiate_permission !== undefined && - object.instantiate_permission !== null - ) { - message.instantiate_permission = AccessConfig.fromPartial( - object.instantiate_permission - ); - } else { - message.instantiate_permission = undefined; - } - return message; - }, -}; - -const baseUpdateInstantiateConfigProposal: object = { - title: "", - description: "", -}; - -export const UpdateInstantiateConfigProposal = { - encode( - message: UpdateInstantiateConfigProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.access_config_updates) { - AccessConfigUpdate.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UpdateInstantiateConfigProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUpdateInstantiateConfigProposal, - } as UpdateInstantiateConfigProposal; - message.access_config_updates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.access_config_updates.push( - AccessConfigUpdate.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateInstantiateConfigProposal { - const message = { - ...baseUpdateInstantiateConfigProposal, - } as UpdateInstantiateConfigProposal; - message.access_config_updates = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if ( - object.access_config_updates !== undefined && - object.access_config_updates !== null - ) { - for (const e of object.access_config_updates) { - message.access_config_updates.push(AccessConfigUpdate.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: UpdateInstantiateConfigProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - if (message.access_config_updates) { - obj.access_config_updates = message.access_config_updates.map((e) => - e ? AccessConfigUpdate.toJSON(e) : undefined - ); - } else { - obj.access_config_updates = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): UpdateInstantiateConfigProposal { - const message = { - ...baseUpdateInstantiateConfigProposal, - } as UpdateInstantiateConfigProposal; - message.access_config_updates = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if ( - object.access_config_updates !== undefined && - object.access_config_updates !== null - ) { - for (const e of object.access_config_updates) { - message.access_config_updates.push(AccessConfigUpdate.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/query.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/query.d.ts deleted file mode 100644 index 75ab5c92b3..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/query.d.ts +++ /dev/null @@ -1,335 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { ContractInfo, ContractCodeHistoryEntry, Model, AccessConfig } from "../../../cosmwasm/wasm/v1/types"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -export declare const protobufPackage = "cosmwasm.wasm.v1"; -/** - * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC - * method - */ -export interface QueryContractInfoRequest { - /** address is the address of the contract to query */ - address: string; -} -/** - * QueryContractInfoResponse is the response type for the Query/ContractInfo RPC - * method - */ -export interface QueryContractInfoResponse { - /** address is the address of the contract */ - address: string; - contractInfo: ContractInfo | undefined; -} -/** - * QueryContractHistoryRequest is the request type for the Query/ContractHistory - * RPC method - */ -export interface QueryContractHistoryRequest { - /** address is the address of the contract to query */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryContractHistoryResponse is the response type for the - * Query/ContractHistory RPC method - */ -export interface QueryContractHistoryResponse { - entries: ContractCodeHistoryEntry[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryContractsByCodeRequest is the request type for the Query/ContractsByCode - * RPC method - */ -export interface QueryContractsByCodeRequest { - /** grpc-gateway_out does not support Go style CodID */ - codeId: number; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryContractsByCodeResponse is the response type for the - * Query/ContractsByCode RPC method - */ -export interface QueryContractsByCodeResponse { - /** contracts are a set of contract addresses */ - contracts: string[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryAllContractStateRequest is the request type for the - * Query/AllContractState RPC method - */ -export interface QueryAllContractStateRequest { - /** address is the address of the contract */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryAllContractStateResponse is the response type for the - * Query/AllContractState RPC method - */ -export interface QueryAllContractStateResponse { - models: Model[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryRawContractStateRequest is the request type for the - * Query/RawContractState RPC method - */ -export interface QueryRawContractStateRequest { - /** address is the address of the contract */ - address: string; - queryData: Uint8Array; -} -/** - * QueryRawContractStateResponse is the response type for the - * Query/RawContractState RPC method - */ -export interface QueryRawContractStateResponse { - /** Data contains the raw store data */ - data: Uint8Array; -} -/** - * QuerySmartContractStateRequest is the request type for the - * Query/SmartContractState RPC method - */ -export interface QuerySmartContractStateRequest { - /** address is the address of the contract */ - address: string; - /** QueryData contains the query data passed to the contract */ - queryData: Uint8Array; -} -/** - * QuerySmartContractStateResponse is the response type for the - * Query/SmartContractState RPC method - */ -export interface QuerySmartContractStateResponse { - /** Data contains the json data returned from the smart contract */ - data: Uint8Array; -} -/** QueryCodeRequest is the request type for the Query/Code RPC method */ -export interface QueryCodeRequest { - /** grpc-gateway_out does not support Go style CodID */ - codeId: number; -} -/** CodeInfoResponse contains code meta data from CodeInfo */ -export interface CodeInfoResponse { - /** id for legacy support */ - codeId: number; - creator: string; - dataHash: Uint8Array; - instantiatePermission: AccessConfig | undefined; -} -/** QueryCodeResponse is the response type for the Query/Code RPC method */ -export interface QueryCodeResponse { - codeInfo: CodeInfoResponse | undefined; - data: Uint8Array; -} -/** QueryCodesRequest is the request type for the Query/Codes RPC method */ -export interface QueryCodesRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** QueryCodesResponse is the response type for the Query/Codes RPC method */ -export interface QueryCodesResponse { - codeInfos: CodeInfoResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryPinnedCodesRequest is the request type for the Query/PinnedCodes - * RPC method - */ -export interface QueryPinnedCodesRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryPinnedCodesResponse is the response type for the - * Query/PinnedCodes RPC method - */ -export interface QueryPinnedCodesResponse { - codeIds: number[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export declare const QueryContractInfoRequest: { - encode(message: QueryContractInfoRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryContractInfoRequest; - fromJSON(object: any): QueryContractInfoRequest; - toJSON(message: QueryContractInfoRequest): unknown; - fromPartial(object: DeepPartial): QueryContractInfoRequest; -}; -export declare const QueryContractInfoResponse: { - encode(message: QueryContractInfoResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryContractInfoResponse; - fromJSON(object: any): QueryContractInfoResponse; - toJSON(message: QueryContractInfoResponse): unknown; - fromPartial(object: DeepPartial): QueryContractInfoResponse; -}; -export declare const QueryContractHistoryRequest: { - encode(message: QueryContractHistoryRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryContractHistoryRequest; - fromJSON(object: any): QueryContractHistoryRequest; - toJSON(message: QueryContractHistoryRequest): unknown; - fromPartial(object: DeepPartial): QueryContractHistoryRequest; -}; -export declare const QueryContractHistoryResponse: { - encode(message: QueryContractHistoryResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryContractHistoryResponse; - fromJSON(object: any): QueryContractHistoryResponse; - toJSON(message: QueryContractHistoryResponse): unknown; - fromPartial(object: DeepPartial): QueryContractHistoryResponse; -}; -export declare const QueryContractsByCodeRequest: { - encode(message: QueryContractsByCodeRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryContractsByCodeRequest; - fromJSON(object: any): QueryContractsByCodeRequest; - toJSON(message: QueryContractsByCodeRequest): unknown; - fromPartial(object: DeepPartial): QueryContractsByCodeRequest; -}; -export declare const QueryContractsByCodeResponse: { - encode(message: QueryContractsByCodeResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryContractsByCodeResponse; - fromJSON(object: any): QueryContractsByCodeResponse; - toJSON(message: QueryContractsByCodeResponse): unknown; - fromPartial(object: DeepPartial): QueryContractsByCodeResponse; -}; -export declare const QueryAllContractStateRequest: { - encode(message: QueryAllContractStateRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllContractStateRequest; - fromJSON(object: any): QueryAllContractStateRequest; - toJSON(message: QueryAllContractStateRequest): unknown; - fromPartial(object: DeepPartial): QueryAllContractStateRequest; -}; -export declare const QueryAllContractStateResponse: { - encode(message: QueryAllContractStateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllContractStateResponse; - fromJSON(object: any): QueryAllContractStateResponse; - toJSON(message: QueryAllContractStateResponse): unknown; - fromPartial(object: DeepPartial): QueryAllContractStateResponse; -}; -export declare const QueryRawContractStateRequest: { - encode(message: QueryRawContractStateRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryRawContractStateRequest; - fromJSON(object: any): QueryRawContractStateRequest; - toJSON(message: QueryRawContractStateRequest): unknown; - fromPartial(object: DeepPartial): QueryRawContractStateRequest; -}; -export declare const QueryRawContractStateResponse: { - encode(message: QueryRawContractStateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryRawContractStateResponse; - fromJSON(object: any): QueryRawContractStateResponse; - toJSON(message: QueryRawContractStateResponse): unknown; - fromPartial(object: DeepPartial): QueryRawContractStateResponse; -}; -export declare const QuerySmartContractStateRequest: { - encode(message: QuerySmartContractStateRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySmartContractStateRequest; - fromJSON(object: any): QuerySmartContractStateRequest; - toJSON(message: QuerySmartContractStateRequest): unknown; - fromPartial(object: DeepPartial): QuerySmartContractStateRequest; -}; -export declare const QuerySmartContractStateResponse: { - encode(message: QuerySmartContractStateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySmartContractStateResponse; - fromJSON(object: any): QuerySmartContractStateResponse; - toJSON(message: QuerySmartContractStateResponse): unknown; - fromPartial(object: DeepPartial): QuerySmartContractStateResponse; -}; -export declare const QueryCodeRequest: { - encode(message: QueryCodeRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryCodeRequest; - fromJSON(object: any): QueryCodeRequest; - toJSON(message: QueryCodeRequest): unknown; - fromPartial(object: DeepPartial): QueryCodeRequest; -}; -export declare const CodeInfoResponse: { - encode(message: CodeInfoResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CodeInfoResponse; - fromJSON(object: any): CodeInfoResponse; - toJSON(message: CodeInfoResponse): unknown; - fromPartial(object: DeepPartial): CodeInfoResponse; -}; -export declare const QueryCodeResponse: { - encode(message: QueryCodeResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryCodeResponse; - fromJSON(object: any): QueryCodeResponse; - toJSON(message: QueryCodeResponse): unknown; - fromPartial(object: DeepPartial): QueryCodeResponse; -}; -export declare const QueryCodesRequest: { - encode(message: QueryCodesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryCodesRequest; - fromJSON(object: any): QueryCodesRequest; - toJSON(message: QueryCodesRequest): unknown; - fromPartial(object: DeepPartial): QueryCodesRequest; -}; -export declare const QueryCodesResponse: { - encode(message: QueryCodesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryCodesResponse; - fromJSON(object: any): QueryCodesResponse; - toJSON(message: QueryCodesResponse): unknown; - fromPartial(object: DeepPartial): QueryCodesResponse; -}; -export declare const QueryPinnedCodesRequest: { - encode(message: QueryPinnedCodesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPinnedCodesRequest; - fromJSON(object: any): QueryPinnedCodesRequest; - toJSON(message: QueryPinnedCodesRequest): unknown; - fromPartial(object: DeepPartial): QueryPinnedCodesRequest; -}; -export declare const QueryPinnedCodesResponse: { - encode(message: QueryPinnedCodesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPinnedCodesResponse; - fromJSON(object: any): QueryPinnedCodesResponse; - toJSON(message: QueryPinnedCodesResponse): unknown; - fromPartial(object: DeepPartial): QueryPinnedCodesResponse; -}; -/** Query provides defines the gRPC querier service */ -export interface Query { - /** ContractInfo gets the contract meta data */ - ContractInfo(request: QueryContractInfoRequest): Promise; - /** ContractHistory gets the contract code history */ - ContractHistory(request: QueryContractHistoryRequest): Promise; - /** ContractsByCode lists all smart contracts for a code id */ - ContractsByCode(request: QueryContractsByCodeRequest): Promise; - /** AllContractState gets all raw store data for a single contract */ - AllContractState(request: QueryAllContractStateRequest): Promise; - /** RawContractState gets single key from the raw store data of a contract */ - RawContractState(request: QueryRawContractStateRequest): Promise; - /** SmartContractState get smart query result from the contract */ - SmartContractState(request: QuerySmartContractStateRequest): Promise; - /** Code gets the binary code and metadata for a singe wasm code */ - Code(request: QueryCodeRequest): Promise; - /** Codes gets the metadata for all stored wasm codes */ - Codes(request: QueryCodesRequest): Promise; - /** PinnedCodes gets the pinned code ids */ - PinnedCodes(request: QueryPinnedCodesRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - ContractInfo(request: QueryContractInfoRequest): Promise; - ContractHistory(request: QueryContractHistoryRequest): Promise; - ContractsByCode(request: QueryContractsByCodeRequest): Promise; - AllContractState(request: QueryAllContractStateRequest): Promise; - RawContractState(request: QueryRawContractStateRequest): Promise; - SmartContractState(request: QuerySmartContractStateRequest): Promise; - Code(request: QueryCodeRequest): Promise; - Codes(request: QueryCodesRequest): Promise; - PinnedCodes(request: QueryPinnedCodesRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/query.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/query.js deleted file mode 100644 index 1b8a137de0..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/query.js +++ /dev/null @@ -1,1503 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { ContractInfo, ContractCodeHistoryEntry, Model, AccessConfig, } from "../../../cosmwasm/wasm/v1/types"; -import { PageRequest, PageResponse, } from "../../../cosmos/base/query/v1beta1/pagination"; -export const protobufPackage = "cosmwasm.wasm.v1"; -const baseQueryContractInfoRequest = { address: "" }; -export const QueryContractInfoRequest = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryContractInfoRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryContractInfoRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryContractInfoRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - return message; - }, -}; -const baseQueryContractInfoResponse = { address: "" }; -export const QueryContractInfoResponse = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.contractInfo !== undefined) { - ContractInfo.encode(message.contractInfo, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryContractInfoResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.contractInfo = ContractInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryContractInfoResponse, - }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.contractInfo !== undefined && object.contractInfo !== null) { - message.contractInfo = ContractInfo.fromJSON(object.contractInfo); - } - else { - message.contractInfo = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.contractInfo !== undefined && - (obj.contractInfo = message.contractInfo - ? ContractInfo.toJSON(message.contractInfo) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryContractInfoResponse, - }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.contractInfo !== undefined && object.contractInfo !== null) { - message.contractInfo = ContractInfo.fromPartial(object.contractInfo); - } - else { - message.contractInfo = undefined; - } - return message; - }, -}; -const baseQueryContractHistoryRequest = { address: "" }; -export const QueryContractHistoryRequest = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryContractHistoryRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryContractHistoryRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryContractHistoryRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryContractHistoryResponse = {}; -export const QueryContractHistoryResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.entries) { - ContractCodeHistoryEntry.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryContractHistoryResponse, - }; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.entries.push(ContractCodeHistoryEntry.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryContractHistoryResponse, - }; - message.entries = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(ContractCodeHistoryEntry.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.entries) { - obj.entries = message.entries.map((e) => e ? ContractCodeHistoryEntry.toJSON(e) : undefined); - } - else { - obj.entries = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryContractHistoryResponse, - }; - message.entries = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(ContractCodeHistoryEntry.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryContractsByCodeRequest = { codeId: 0 }; -export const QueryContractsByCodeRequest = { - encode(message, writer = Writer.create()) { - if (message.codeId !== 0) { - writer.uint32(8).uint64(message.codeId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryContractsByCodeRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = longToNumber(reader.uint64()); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryContractsByCodeRequest, - }; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } - else { - message.codeId = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = message.codeId); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryContractsByCodeRequest, - }; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryContractsByCodeResponse = { contracts: "" }; -export const QueryContractsByCodeResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.contracts) { - writer.uint32(10).string(v); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryContractsByCodeResponse, - }; - message.contracts = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contracts.push(reader.string()); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryContractsByCodeResponse, - }; - message.contracts = []; - if (object.contracts !== undefined && object.contracts !== null) { - for (const e of object.contracts) { - message.contracts.push(String(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.contracts) { - obj.contracts = message.contracts.map((e) => e); - } - else { - obj.contracts = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryContractsByCodeResponse, - }; - message.contracts = []; - if (object.contracts !== undefined && object.contracts !== null) { - for (const e of object.contracts) { - message.contracts.push(e); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryAllContractStateRequest = { address: "" }; -export const QueryAllContractStateRequest = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllContractStateRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAllContractStateRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAllContractStateRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryAllContractStateResponse = {}; -export const QueryAllContractStateResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.models) { - Model.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllContractStateResponse, - }; - message.models = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.models.push(Model.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAllContractStateResponse, - }; - message.models = []; - if (object.models !== undefined && object.models !== null) { - for (const e of object.models) { - message.models.push(Model.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.models) { - obj.models = message.models.map((e) => (e ? Model.toJSON(e) : undefined)); - } - else { - obj.models = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAllContractStateResponse, - }; - message.models = []; - if (object.models !== undefined && object.models !== null) { - for (const e of object.models) { - message.models.push(Model.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryRawContractStateRequest = { address: "" }; -export const QueryRawContractStateRequest = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.queryData.length !== 0) { - writer.uint32(18).bytes(message.queryData); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRawContractStateRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.queryData = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryRawContractStateRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.queryData !== undefined && object.queryData !== null) { - message.queryData = bytesFromBase64(object.queryData); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.queryData !== undefined && - (obj.queryData = base64FromBytes(message.queryData !== undefined ? message.queryData : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryRawContractStateRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.queryData !== undefined && object.queryData !== null) { - message.queryData = object.queryData; - } - else { - message.queryData = new Uint8Array(); - } - return message; - }, -}; -const baseQueryRawContractStateResponse = {}; -export const QueryRawContractStateResponse = { - encode(message, writer = Writer.create()) { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRawContractStateResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryRawContractStateResponse, - }; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryRawContractStateResponse, - }; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseQuerySmartContractStateRequest = { address: "" }; -export const QuerySmartContractStateRequest = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.queryData.length !== 0) { - writer.uint32(18).bytes(message.queryData); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySmartContractStateRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.queryData = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQuerySmartContractStateRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.queryData !== undefined && object.queryData !== null) { - message.queryData = bytesFromBase64(object.queryData); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.queryData !== undefined && - (obj.queryData = base64FromBytes(message.queryData !== undefined ? message.queryData : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQuerySmartContractStateRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.queryData !== undefined && object.queryData !== null) { - message.queryData = object.queryData; - } - else { - message.queryData = new Uint8Array(); - } - return message; - }, -}; -const baseQuerySmartContractStateResponse = {}; -export const QuerySmartContractStateResponse = { - encode(message, writer = Writer.create()) { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySmartContractStateResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQuerySmartContractStateResponse, - }; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQuerySmartContractStateResponse, - }; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseQueryCodeRequest = { codeId: 0 }; -export const QueryCodeRequest = { - encode(message, writer = Writer.create()) { - if (message.codeId !== 0) { - writer.uint32(8).uint64(message.codeId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryCodeRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryCodeRequest }; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } - else { - message.codeId = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = message.codeId); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryCodeRequest }; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = 0; - } - return message; - }, -}; -const baseCodeInfoResponse = { codeId: 0, creator: "" }; -export const CodeInfoResponse = { - encode(message, writer = Writer.create()) { - if (message.codeId !== 0) { - writer.uint32(8).uint64(message.codeId); - } - if (message.creator !== "") { - writer.uint32(18).string(message.creator); - } - if (message.dataHash.length !== 0) { - writer.uint32(26).bytes(message.dataHash); - } - if (message.instantiatePermission !== undefined) { - AccessConfig.encode(message.instantiatePermission, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCodeInfoResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = longToNumber(reader.uint64()); - break; - case 2: - message.creator = reader.string(); - break; - case 3: - message.dataHash = reader.bytes(); - break; - case 6: - message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCodeInfoResponse }; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } - else { - message.codeId = 0; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } - else { - message.creator = ""; - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = bytesFromBase64(object.dataHash); - } - if (object.instantiatePermission !== undefined && - object.instantiatePermission !== null) { - message.instantiatePermission = AccessConfig.fromJSON(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = message.codeId); - message.creator !== undefined && (obj.creator = message.creator); - message.dataHash !== undefined && - (obj.dataHash = base64FromBytes(message.dataHash !== undefined ? message.dataHash : new Uint8Array())); - message.instantiatePermission !== undefined && - (obj.instantiatePermission = message.instantiatePermission - ? AccessConfig.toJSON(message.instantiatePermission) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseCodeInfoResponse }; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = 0; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } - else { - message.creator = ""; - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = object.dataHash; - } - else { - message.dataHash = new Uint8Array(); - } - if (object.instantiatePermission !== undefined && - object.instantiatePermission !== null) { - message.instantiatePermission = AccessConfig.fromPartial(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, -}; -const baseQueryCodeResponse = {}; -export const QueryCodeResponse = { - encode(message, writer = Writer.create()) { - if (message.codeInfo !== undefined) { - CodeInfoResponse.encode(message.codeInfo, writer.uint32(10).fork()).ldelim(); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryCodeResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeInfo = CodeInfoResponse.decode(reader, reader.uint32()); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryCodeResponse }; - if (object.codeInfo !== undefined && object.codeInfo !== null) { - message.codeInfo = CodeInfoResponse.fromJSON(object.codeInfo); - } - else { - message.codeInfo = undefined; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeInfo !== undefined && - (obj.codeInfo = message.codeInfo - ? CodeInfoResponse.toJSON(message.codeInfo) - : undefined); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryCodeResponse }; - if (object.codeInfo !== undefined && object.codeInfo !== null) { - message.codeInfo = CodeInfoResponse.fromPartial(object.codeInfo); - } - else { - message.codeInfo = undefined; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseQueryCodesRequest = {}; -export const QueryCodesRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryCodesRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryCodesRequest }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryCodesRequest }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryCodesResponse = {}; -export const QueryCodesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.codeInfos) { - CodeInfoResponse.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryCodesResponse }; - message.codeInfos = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeInfos.push(CodeInfoResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryCodesResponse }; - message.codeInfos = []; - if (object.codeInfos !== undefined && object.codeInfos !== null) { - for (const e of object.codeInfos) { - message.codeInfos.push(CodeInfoResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.codeInfos) { - obj.codeInfos = message.codeInfos.map((e) => e ? CodeInfoResponse.toJSON(e) : undefined); - } - else { - obj.codeInfos = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryCodesResponse }; - message.codeInfos = []; - if (object.codeInfos !== undefined && object.codeInfos !== null) { - for (const e of object.codeInfos) { - message.codeInfos.push(CodeInfoResponse.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryPinnedCodesRequest = {}; -export const QueryPinnedCodesRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPinnedCodesRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryPinnedCodesRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryPinnedCodesRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryPinnedCodesResponse = { codeIds: 0 }; -export const QueryPinnedCodesResponse = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.codeIds) { - writer.uint64(v); - } - writer.ldelim(); - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPinnedCodesResponse, - }; - message.codeIds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.codeIds.push(longToNumber(reader.uint64())); - } - } - else { - message.codeIds.push(longToNumber(reader.uint64())); - } - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryPinnedCodesResponse, - }; - message.codeIds = []; - if (object.codeIds !== undefined && object.codeIds !== null) { - for (const e of object.codeIds) { - message.codeIds.push(Number(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.codeIds) { - obj.codeIds = message.codeIds.map((e) => e); - } - else { - obj.codeIds = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryPinnedCodesResponse, - }; - message.codeIds = []; - if (object.codeIds !== undefined && object.codeIds !== null) { - for (const e of object.codeIds) { - message.codeIds.push(e); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - ContractInfo(request) { - const data = QueryContractInfoRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "ContractInfo", data); - return promise.then((data) => QueryContractInfoResponse.decode(new Reader(data))); - } - ContractHistory(request) { - const data = QueryContractHistoryRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "ContractHistory", data); - return promise.then((data) => QueryContractHistoryResponse.decode(new Reader(data))); - } - ContractsByCode(request) { - const data = QueryContractsByCodeRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "ContractsByCode", data); - return promise.then((data) => QueryContractsByCodeResponse.decode(new Reader(data))); - } - AllContractState(request) { - const data = QueryAllContractStateRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "AllContractState", data); - return promise.then((data) => QueryAllContractStateResponse.decode(new Reader(data))); - } - RawContractState(request) { - const data = QueryRawContractStateRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "RawContractState", data); - return promise.then((data) => QueryRawContractStateResponse.decode(new Reader(data))); - } - SmartContractState(request) { - const data = QuerySmartContractStateRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "SmartContractState", data); - return promise.then((data) => QuerySmartContractStateResponse.decode(new Reader(data))); - } - Code(request) { - const data = QueryCodeRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "Code", data); - return promise.then((data) => QueryCodeResponse.decode(new Reader(data))); - } - Codes(request) { - const data = QueryCodesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "Codes", data); - return promise.then((data) => QueryCodesResponse.decode(new Reader(data))); - } - PinnedCodes(request) { - const data = QueryPinnedCodesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "PinnedCodes", data); - return promise.then((data) => QueryPinnedCodesResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/query.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/query.ts deleted file mode 100644 index 72b8bab72d..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/query.ts +++ /dev/null @@ -1,2036 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - ContractInfo, - ContractCodeHistoryEntry, - Model, - AccessConfig, -} from "../../../cosmwasm/wasm/v1/types"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; - -export const protobufPackage = "cosmwasm.wasm.v1"; - -/** - * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC - * method - */ -export interface QueryContractInfoRequest { - /** address is the address of the contract to query */ - address: string; -} - -/** - * QueryContractInfoResponse is the response type for the Query/ContractInfo RPC - * method - */ -export interface QueryContractInfoResponse { - /** address is the address of the contract */ - address: string; - contract_info: ContractInfo | undefined; -} - -/** - * QueryContractHistoryRequest is the request type for the Query/ContractHistory - * RPC method - */ -export interface QueryContractHistoryRequest { - /** address is the address of the contract to query */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryContractHistoryResponse is the response type for the - * Query/ContractHistory RPC method - */ -export interface QueryContractHistoryResponse { - entries: ContractCodeHistoryEntry[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryContractsByCodeRequest is the request type for the Query/ContractsByCode - * RPC method - */ -export interface QueryContractsByCodeRequest { - /** grpc-gateway_out does not support Go style CodID */ - code_id: number; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryContractsByCodeResponse is the response type for the - * Query/ContractsByCode RPC method - */ -export interface QueryContractsByCodeResponse { - /** contracts are a set of contract addresses */ - contracts: string[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryAllContractStateRequest is the request type for the - * Query/AllContractState RPC method - */ -export interface QueryAllContractStateRequest { - /** address is the address of the contract */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryAllContractStateResponse is the response type for the - * Query/AllContractState RPC method - */ -export interface QueryAllContractStateResponse { - models: Model[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryRawContractStateRequest is the request type for the - * Query/RawContractState RPC method - */ -export interface QueryRawContractStateRequest { - /** address is the address of the contract */ - address: string; - query_data: Uint8Array; -} - -/** - * QueryRawContractStateResponse is the response type for the - * Query/RawContractState RPC method - */ -export interface QueryRawContractStateResponse { - /** Data contains the raw store data */ - data: Uint8Array; -} - -/** - * QuerySmartContractStateRequest is the request type for the - * Query/SmartContractState RPC method - */ -export interface QuerySmartContractStateRequest { - /** address is the address of the contract */ - address: string; - /** QueryData contains the query data passed to the contract */ - query_data: Uint8Array; -} - -/** - * QuerySmartContractStateResponse is the response type for the - * Query/SmartContractState RPC method - */ -export interface QuerySmartContractStateResponse { - /** Data contains the json data returned from the smart contract */ - data: Uint8Array; -} - -/** QueryCodeRequest is the request type for the Query/Code RPC method */ -export interface QueryCodeRequest { - /** grpc-gateway_out does not support Go style CodID */ - code_id: number; -} - -/** CodeInfoResponse contains code meta data from CodeInfo */ -export interface CodeInfoResponse { - /** id for legacy support */ - code_id: number; - creator: string; - data_hash: Uint8Array; - instantiate_permission: AccessConfig | undefined; -} - -/** QueryCodeResponse is the response type for the Query/Code RPC method */ -export interface QueryCodeResponse { - code_info: CodeInfoResponse | undefined; - data: Uint8Array; -} - -/** QueryCodesRequest is the request type for the Query/Codes RPC method */ -export interface QueryCodesRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** QueryCodesResponse is the response type for the Query/Codes RPC method */ -export interface QueryCodesResponse { - code_infos: CodeInfoResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryPinnedCodesRequest is the request type for the Query/PinnedCodes - * RPC method - */ -export interface QueryPinnedCodesRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryPinnedCodesResponse is the response type for the - * Query/PinnedCodes RPC method - */ -export interface QueryPinnedCodesResponse { - code_ids: number[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -const baseQueryContractInfoRequest: object = { address: "" }; - -export const QueryContractInfoRequest = { - encode( - message: QueryContractInfoRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryContractInfoRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryContractInfoRequest, - } as QueryContractInfoRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryContractInfoRequest { - const message = { - ...baseQueryContractInfoRequest, - } as QueryContractInfoRequest; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - return message; - }, - - toJSON(message: QueryContractInfoRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryContractInfoRequest { - const message = { - ...baseQueryContractInfoRequest, - } as QueryContractInfoRequest; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - return message; - }, -}; - -const baseQueryContractInfoResponse: object = { address: "" }; - -export const QueryContractInfoResponse = { - encode( - message: QueryContractInfoResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.contract_info !== undefined) { - ContractInfo.encode( - message.contract_info, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryContractInfoResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryContractInfoResponse, - } as QueryContractInfoResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.contract_info = ContractInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryContractInfoResponse { - const message = { - ...baseQueryContractInfoResponse, - } as QueryContractInfoResponse; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.contract_info !== undefined && object.contract_info !== null) { - message.contract_info = ContractInfo.fromJSON(object.contract_info); - } else { - message.contract_info = undefined; - } - return message; - }, - - toJSON(message: QueryContractInfoResponse): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.contract_info !== undefined && - (obj.contract_info = message.contract_info - ? ContractInfo.toJSON(message.contract_info) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryContractInfoResponse { - const message = { - ...baseQueryContractInfoResponse, - } as QueryContractInfoResponse; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.contract_info !== undefined && object.contract_info !== null) { - message.contract_info = ContractInfo.fromPartial(object.contract_info); - } else { - message.contract_info = undefined; - } - return message; - }, -}; - -const baseQueryContractHistoryRequest: object = { address: "" }; - -export const QueryContractHistoryRequest = { - encode( - message: QueryContractHistoryRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryContractHistoryRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryContractHistoryRequest, - } as QueryContractHistoryRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryContractHistoryRequest { - const message = { - ...baseQueryContractHistoryRequest, - } as QueryContractHistoryRequest; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryContractHistoryRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryContractHistoryRequest { - const message = { - ...baseQueryContractHistoryRequest, - } as QueryContractHistoryRequest; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryContractHistoryResponse: object = {}; - -export const QueryContractHistoryResponse = { - encode( - message: QueryContractHistoryResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.entries) { - ContractCodeHistoryEntry.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryContractHistoryResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryContractHistoryResponse, - } as QueryContractHistoryResponse; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.entries.push( - ContractCodeHistoryEntry.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryContractHistoryResponse { - const message = { - ...baseQueryContractHistoryResponse, - } as QueryContractHistoryResponse; - message.entries = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(ContractCodeHistoryEntry.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryContractHistoryResponse): unknown { - const obj: any = {}; - if (message.entries) { - obj.entries = message.entries.map((e) => - e ? ContractCodeHistoryEntry.toJSON(e) : undefined - ); - } else { - obj.entries = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryContractHistoryResponse { - const message = { - ...baseQueryContractHistoryResponse, - } as QueryContractHistoryResponse; - message.entries = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(ContractCodeHistoryEntry.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryContractsByCodeRequest: object = { code_id: 0 }; - -export const QueryContractsByCodeRequest = { - encode( - message: QueryContractsByCodeRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.code_id !== 0) { - writer.uint32(8).uint64(message.code_id); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryContractsByCodeRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryContractsByCodeRequest, - } as QueryContractsByCodeRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryContractsByCodeRequest { - const message = { - ...baseQueryContractsByCodeRequest, - } as QueryContractsByCodeRequest; - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = Number(object.code_id); - } else { - message.code_id = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryContractsByCodeRequest): unknown { - const obj: any = {}; - message.code_id !== undefined && (obj.code_id = message.code_id); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryContractsByCodeRequest { - const message = { - ...baseQueryContractsByCodeRequest, - } as QueryContractsByCodeRequest; - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = object.code_id; - } else { - message.code_id = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryContractsByCodeResponse: object = { contracts: "" }; - -export const QueryContractsByCodeResponse = { - encode( - message: QueryContractsByCodeResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.contracts) { - writer.uint32(10).string(v!); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryContractsByCodeResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryContractsByCodeResponse, - } as QueryContractsByCodeResponse; - message.contracts = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contracts.push(reader.string()); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryContractsByCodeResponse { - const message = { - ...baseQueryContractsByCodeResponse, - } as QueryContractsByCodeResponse; - message.contracts = []; - if (object.contracts !== undefined && object.contracts !== null) { - for (const e of object.contracts) { - message.contracts.push(String(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryContractsByCodeResponse): unknown { - const obj: any = {}; - if (message.contracts) { - obj.contracts = message.contracts.map((e) => e); - } else { - obj.contracts = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryContractsByCodeResponse { - const message = { - ...baseQueryContractsByCodeResponse, - } as QueryContractsByCodeResponse; - message.contracts = []; - if (object.contracts !== undefined && object.contracts !== null) { - for (const e of object.contracts) { - message.contracts.push(e); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryAllContractStateRequest: object = { address: "" }; - -export const QueryAllContractStateRequest = { - encode( - message: QueryAllContractStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAllContractStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllContractStateRequest, - } as QueryAllContractStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllContractStateRequest { - const message = { - ...baseQueryAllContractStateRequest, - } as QueryAllContractStateRequest; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllContractStateRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllContractStateRequest { - const message = { - ...baseQueryAllContractStateRequest, - } as QueryAllContractStateRequest; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryAllContractStateResponse: object = {}; - -export const QueryAllContractStateResponse = { - encode( - message: QueryAllContractStateResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.models) { - Model.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAllContractStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllContractStateResponse, - } as QueryAllContractStateResponse; - message.models = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.models.push(Model.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllContractStateResponse { - const message = { - ...baseQueryAllContractStateResponse, - } as QueryAllContractStateResponse; - message.models = []; - if (object.models !== undefined && object.models !== null) { - for (const e of object.models) { - message.models.push(Model.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllContractStateResponse): unknown { - const obj: any = {}; - if (message.models) { - obj.models = message.models.map((e) => (e ? Model.toJSON(e) : undefined)); - } else { - obj.models = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllContractStateResponse { - const message = { - ...baseQueryAllContractStateResponse, - } as QueryAllContractStateResponse; - message.models = []; - if (object.models !== undefined && object.models !== null) { - for (const e of object.models) { - message.models.push(Model.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryRawContractStateRequest: object = { address: "" }; - -export const QueryRawContractStateRequest = { - encode( - message: QueryRawContractStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.query_data.length !== 0) { - writer.uint32(18).bytes(message.query_data); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryRawContractStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRawContractStateRequest, - } as QueryRawContractStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.query_data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryRawContractStateRequest { - const message = { - ...baseQueryRawContractStateRequest, - } as QueryRawContractStateRequest; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.query_data !== undefined && object.query_data !== null) { - message.query_data = bytesFromBase64(object.query_data); - } - return message; - }, - - toJSON(message: QueryRawContractStateRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.query_data !== undefined && - (obj.query_data = base64FromBytes( - message.query_data !== undefined ? message.query_data : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryRawContractStateRequest { - const message = { - ...baseQueryRawContractStateRequest, - } as QueryRawContractStateRequest; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.query_data !== undefined && object.query_data !== null) { - message.query_data = object.query_data; - } else { - message.query_data = new Uint8Array(); - } - return message; - }, -}; - -const baseQueryRawContractStateResponse: object = {}; - -export const QueryRawContractStateResponse = { - encode( - message: QueryRawContractStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryRawContractStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRawContractStateResponse, - } as QueryRawContractStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryRawContractStateResponse { - const message = { - ...baseQueryRawContractStateResponse, - } as QueryRawContractStateResponse; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: QueryRawContractStateResponse): unknown { - const obj: any = {}; - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryRawContractStateResponse { - const message = { - ...baseQueryRawContractStateResponse, - } as QueryRawContractStateResponse; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseQuerySmartContractStateRequest: object = { address: "" }; - -export const QuerySmartContractStateRequest = { - encode( - message: QuerySmartContractStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.query_data.length !== 0) { - writer.uint32(18).bytes(message.query_data); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QuerySmartContractStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySmartContractStateRequest, - } as QuerySmartContractStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.query_data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySmartContractStateRequest { - const message = { - ...baseQuerySmartContractStateRequest, - } as QuerySmartContractStateRequest; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.query_data !== undefined && object.query_data !== null) { - message.query_data = bytesFromBase64(object.query_data); - } - return message; - }, - - toJSON(message: QuerySmartContractStateRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.query_data !== undefined && - (obj.query_data = base64FromBytes( - message.query_data !== undefined ? message.query_data : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QuerySmartContractStateRequest { - const message = { - ...baseQuerySmartContractStateRequest, - } as QuerySmartContractStateRequest; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.query_data !== undefined && object.query_data !== null) { - message.query_data = object.query_data; - } else { - message.query_data = new Uint8Array(); - } - return message; - }, -}; - -const baseQuerySmartContractStateResponse: object = {}; - -export const QuerySmartContractStateResponse = { - encode( - message: QuerySmartContractStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QuerySmartContractStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySmartContractStateResponse, - } as QuerySmartContractStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySmartContractStateResponse { - const message = { - ...baseQuerySmartContractStateResponse, - } as QuerySmartContractStateResponse; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: QuerySmartContractStateResponse): unknown { - const obj: any = {}; - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QuerySmartContractStateResponse { - const message = { - ...baseQuerySmartContractStateResponse, - } as QuerySmartContractStateResponse; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseQueryCodeRequest: object = { code_id: 0 }; - -export const QueryCodeRequest = { - encode(message: QueryCodeRequest, writer: Writer = Writer.create()): Writer { - if (message.code_id !== 0) { - writer.uint32(8).uint64(message.code_id); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryCodeRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryCodeRequest } as QueryCodeRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code_id = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryCodeRequest { - const message = { ...baseQueryCodeRequest } as QueryCodeRequest; - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = Number(object.code_id); - } else { - message.code_id = 0; - } - return message; - }, - - toJSON(message: QueryCodeRequest): unknown { - const obj: any = {}; - message.code_id !== undefined && (obj.code_id = message.code_id); - return obj; - }, - - fromPartial(object: DeepPartial): QueryCodeRequest { - const message = { ...baseQueryCodeRequest } as QueryCodeRequest; - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = object.code_id; - } else { - message.code_id = 0; - } - return message; - }, -}; - -const baseCodeInfoResponse: object = { code_id: 0, creator: "" }; - -export const CodeInfoResponse = { - encode(message: CodeInfoResponse, writer: Writer = Writer.create()): Writer { - if (message.code_id !== 0) { - writer.uint32(8).uint64(message.code_id); - } - if (message.creator !== "") { - writer.uint32(18).string(message.creator); - } - if (message.data_hash.length !== 0) { - writer.uint32(26).bytes(message.data_hash); - } - if (message.instantiate_permission !== undefined) { - AccessConfig.encode( - message.instantiate_permission, - writer.uint32(50).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CodeInfoResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCodeInfoResponse } as CodeInfoResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.creator = reader.string(); - break; - case 3: - message.data_hash = reader.bytes(); - break; - case 6: - message.instantiate_permission = AccessConfig.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CodeInfoResponse { - const message = { ...baseCodeInfoResponse } as CodeInfoResponse; - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = Number(object.code_id); - } else { - message.code_id = 0; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } else { - message.creator = ""; - } - if (object.data_hash !== undefined && object.data_hash !== null) { - message.data_hash = bytesFromBase64(object.data_hash); - } - if ( - object.instantiate_permission !== undefined && - object.instantiate_permission !== null - ) { - message.instantiate_permission = AccessConfig.fromJSON( - object.instantiate_permission - ); - } else { - message.instantiate_permission = undefined; - } - return message; - }, - - toJSON(message: CodeInfoResponse): unknown { - const obj: any = {}; - message.code_id !== undefined && (obj.code_id = message.code_id); - message.creator !== undefined && (obj.creator = message.creator); - message.data_hash !== undefined && - (obj.data_hash = base64FromBytes( - message.data_hash !== undefined ? message.data_hash : new Uint8Array() - )); - message.instantiate_permission !== undefined && - (obj.instantiate_permission = message.instantiate_permission - ? AccessConfig.toJSON(message.instantiate_permission) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): CodeInfoResponse { - const message = { ...baseCodeInfoResponse } as CodeInfoResponse; - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = object.code_id; - } else { - message.code_id = 0; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } else { - message.creator = ""; - } - if (object.data_hash !== undefined && object.data_hash !== null) { - message.data_hash = object.data_hash; - } else { - message.data_hash = new Uint8Array(); - } - if ( - object.instantiate_permission !== undefined && - object.instantiate_permission !== null - ) { - message.instantiate_permission = AccessConfig.fromPartial( - object.instantiate_permission - ); - } else { - message.instantiate_permission = undefined; - } - return message; - }, -}; - -const baseQueryCodeResponse: object = {}; - -export const QueryCodeResponse = { - encode(message: QueryCodeResponse, writer: Writer = Writer.create()): Writer { - if (message.code_info !== undefined) { - CodeInfoResponse.encode( - message.code_info, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryCodeResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryCodeResponse } as QueryCodeResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code_info = CodeInfoResponse.decode(reader, reader.uint32()); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryCodeResponse { - const message = { ...baseQueryCodeResponse } as QueryCodeResponse; - if (object.code_info !== undefined && object.code_info !== null) { - message.code_info = CodeInfoResponse.fromJSON(object.code_info); - } else { - message.code_info = undefined; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: QueryCodeResponse): unknown { - const obj: any = {}; - message.code_info !== undefined && - (obj.code_info = message.code_info - ? CodeInfoResponse.toJSON(message.code_info) - : undefined); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): QueryCodeResponse { - const message = { ...baseQueryCodeResponse } as QueryCodeResponse; - if (object.code_info !== undefined && object.code_info !== null) { - message.code_info = CodeInfoResponse.fromPartial(object.code_info); - } else { - message.code_info = undefined; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseQueryCodesRequest: object = {}; - -export const QueryCodesRequest = { - encode(message: QueryCodesRequest, writer: Writer = Writer.create()): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryCodesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryCodesRequest } as QueryCodesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryCodesRequest { - const message = { ...baseQueryCodesRequest } as QueryCodesRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryCodesRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryCodesRequest { - const message = { ...baseQueryCodesRequest } as QueryCodesRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryCodesResponse: object = {}; - -export const QueryCodesResponse = { - encode( - message: QueryCodesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.code_infos) { - CodeInfoResponse.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryCodesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryCodesResponse } as QueryCodesResponse; - message.code_infos = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code_infos.push( - CodeInfoResponse.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryCodesResponse { - const message = { ...baseQueryCodesResponse } as QueryCodesResponse; - message.code_infos = []; - if (object.code_infos !== undefined && object.code_infos !== null) { - for (const e of object.code_infos) { - message.code_infos.push(CodeInfoResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryCodesResponse): unknown { - const obj: any = {}; - if (message.code_infos) { - obj.code_infos = message.code_infos.map((e) => - e ? CodeInfoResponse.toJSON(e) : undefined - ); - } else { - obj.code_infos = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryCodesResponse { - const message = { ...baseQueryCodesResponse } as QueryCodesResponse; - message.code_infos = []; - if (object.code_infos !== undefined && object.code_infos !== null) { - for (const e of object.code_infos) { - message.code_infos.push(CodeInfoResponse.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryPinnedCodesRequest: object = {}; - -export const QueryPinnedCodesRequest = { - encode( - message: QueryPinnedCodesRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryPinnedCodesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPinnedCodesRequest, - } as QueryPinnedCodesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPinnedCodesRequest { - const message = { - ...baseQueryPinnedCodesRequest, - } as QueryPinnedCodesRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryPinnedCodesRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPinnedCodesRequest { - const message = { - ...baseQueryPinnedCodesRequest, - } as QueryPinnedCodesRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryPinnedCodesResponse: object = { code_ids: 0 }; - -export const QueryPinnedCodesResponse = { - encode( - message: QueryPinnedCodesResponse, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.code_ids) { - writer.uint64(v); - } - writer.ldelim(); - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPinnedCodesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPinnedCodesResponse, - } as QueryPinnedCodesResponse; - message.code_ids = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.code_ids.push(longToNumber(reader.uint64() as Long)); - } - } else { - message.code_ids.push(longToNumber(reader.uint64() as Long)); - } - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPinnedCodesResponse { - const message = { - ...baseQueryPinnedCodesResponse, - } as QueryPinnedCodesResponse; - message.code_ids = []; - if (object.code_ids !== undefined && object.code_ids !== null) { - for (const e of object.code_ids) { - message.code_ids.push(Number(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryPinnedCodesResponse): unknown { - const obj: any = {}; - if (message.code_ids) { - obj.code_ids = message.code_ids.map((e) => e); - } else { - obj.code_ids = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPinnedCodesResponse { - const message = { - ...baseQueryPinnedCodesResponse, - } as QueryPinnedCodesResponse; - message.code_ids = []; - if (object.code_ids !== undefined && object.code_ids !== null) { - for (const e of object.code_ids) { - message.code_ids.push(e); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -/** Query provides defines the gRPC querier service */ -export interface Query { - /** ContractInfo gets the contract meta data */ - ContractInfo( - request: QueryContractInfoRequest - ): Promise; - /** ContractHistory gets the contract code history */ - ContractHistory( - request: QueryContractHistoryRequest - ): Promise; - /** ContractsByCode lists all smart contracts for a code id */ - ContractsByCode( - request: QueryContractsByCodeRequest - ): Promise; - /** AllContractState gets all raw store data for a single contract */ - AllContractState( - request: QueryAllContractStateRequest - ): Promise; - /** RawContractState gets single key from the raw store data of a contract */ - RawContractState( - request: QueryRawContractStateRequest - ): Promise; - /** SmartContractState get smart query result from the contract */ - SmartContractState( - request: QuerySmartContractStateRequest - ): Promise; - /** Code gets the binary code and metadata for a singe wasm code */ - Code(request: QueryCodeRequest): Promise; - /** Codes gets the metadata for all stored wasm codes */ - Codes(request: QueryCodesRequest): Promise; - /** PinnedCodes gets the pinned code ids */ - PinnedCodes( - request: QueryPinnedCodesRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - ContractInfo( - request: QueryContractInfoRequest - ): Promise { - const data = QueryContractInfoRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmwasm.wasm.v1.Query", - "ContractInfo", - data - ); - return promise.then((data) => - QueryContractInfoResponse.decode(new Reader(data)) - ); - } - - ContractHistory( - request: QueryContractHistoryRequest - ): Promise { - const data = QueryContractHistoryRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmwasm.wasm.v1.Query", - "ContractHistory", - data - ); - return promise.then((data) => - QueryContractHistoryResponse.decode(new Reader(data)) - ); - } - - ContractsByCode( - request: QueryContractsByCodeRequest - ): Promise { - const data = QueryContractsByCodeRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmwasm.wasm.v1.Query", - "ContractsByCode", - data - ); - return promise.then((data) => - QueryContractsByCodeResponse.decode(new Reader(data)) - ); - } - - AllContractState( - request: QueryAllContractStateRequest - ): Promise { - const data = QueryAllContractStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmwasm.wasm.v1.Query", - "AllContractState", - data - ); - return promise.then((data) => - QueryAllContractStateResponse.decode(new Reader(data)) - ); - } - - RawContractState( - request: QueryRawContractStateRequest - ): Promise { - const data = QueryRawContractStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmwasm.wasm.v1.Query", - "RawContractState", - data - ); - return promise.then((data) => - QueryRawContractStateResponse.decode(new Reader(data)) - ); - } - - SmartContractState( - request: QuerySmartContractStateRequest - ): Promise { - const data = QuerySmartContractStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmwasm.wasm.v1.Query", - "SmartContractState", - data - ); - return promise.then((data) => - QuerySmartContractStateResponse.decode(new Reader(data)) - ); - } - - Code(request: QueryCodeRequest): Promise { - const data = QueryCodeRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "Code", data); - return promise.then((data) => QueryCodeResponse.decode(new Reader(data))); - } - - Codes(request: QueryCodesRequest): Promise { - const data = QueryCodesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "Codes", data); - return promise.then((data) => QueryCodesResponse.decode(new Reader(data))); - } - - PinnedCodes( - request: QueryPinnedCodesRequest - ): Promise { - const data = QueryPinnedCodesRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmwasm.wasm.v1.Query", - "PinnedCodes", - data - ); - return promise.then((data) => - QueryPinnedCodesResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/tx.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/tx.d.ts deleted file mode 100644 index e2343006ba..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/tx.d.ts +++ /dev/null @@ -1,220 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { AccessConfig } from "../../../cosmwasm/wasm/v1/types"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmwasm.wasm.v1"; -/** MsgStoreCode submit Wasm code to the system */ -export interface MsgStoreCode { - /** Sender is the that actor that signed the messages */ - sender: string; - /** WASMByteCode can be raw or gzip compressed */ - wasmByteCode: Uint8Array; - /** - * InstantiatePermission access control to apply on contract creation, - * optional - */ - instantiatePermission: AccessConfig | undefined; -} -/** MsgStoreCodeResponse returns store result data. */ -export interface MsgStoreCodeResponse { - /** CodeID is the reference to the stored WASM code */ - codeId: number; -} -/** - * MsgInstantiateContract create a new smart contract instance for the given - * code id. - */ -export interface MsgInstantiateContract { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Admin is an optional address that can execute migrations */ - admin: string; - /** CodeID is the reference to the stored WASM code */ - codeId: number; - /** Label is optional metadata to be stored with a contract instance. */ - label: string; - /** Msg json encoded message to be passed to the contract on instantiation */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on instantiation */ - funds: Coin[]; -} -/** MsgInstantiateContractResponse return instantiation result data */ -export interface MsgInstantiateContractResponse { - /** Address is the bech32 address of the new contract instance. */ - address: string; - /** Data contains base64-encoded bytes to returned from the contract */ - data: Uint8Array; -} -/** MsgExecuteContract submits the given message data to a smart contract */ -export interface MsgExecuteContract { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Contract is the address of the smart contract */ - contract: string; - /** Msg json encoded message to be passed to the contract */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on execution */ - funds: Coin[]; -} -/** MsgExecuteContractResponse returns execution result data. */ -export interface MsgExecuteContractResponse { - /** Data contains base64-encoded bytes to returned from the contract */ - data: Uint8Array; -} -/** MsgMigrateContract runs a code upgrade/ downgrade for a smart contract */ -export interface MsgMigrateContract { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Contract is the address of the smart contract */ - contract: string; - /** CodeID references the new WASM code */ - codeId: number; - /** Msg json encoded message to be passed to the contract on migration */ - msg: Uint8Array; -} -/** MsgMigrateContractResponse returns contract migration result data. */ -export interface MsgMigrateContractResponse { - /** - * Data contains same raw bytes returned as data from the wasm contract. - * (May be empty) - */ - data: Uint8Array; -} -/** MsgUpdateAdmin sets a new admin for a smart contract */ -export interface MsgUpdateAdmin { - /** Sender is the that actor that signed the messages */ - sender: string; - /** NewAdmin address to be set */ - newAdmin: string; - /** Contract is the address of the smart contract */ - contract: string; -} -/** MsgUpdateAdminResponse returns empty data */ -export interface MsgUpdateAdminResponse { -} -/** MsgClearAdmin removes any admin stored for a smart contract */ -export interface MsgClearAdmin { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Contract is the address of the smart contract */ - contract: string; -} -/** MsgClearAdminResponse returns empty data */ -export interface MsgClearAdminResponse { -} -export declare const MsgStoreCode: { - encode(message: MsgStoreCode, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgStoreCode; - fromJSON(object: any): MsgStoreCode; - toJSON(message: MsgStoreCode): unknown; - fromPartial(object: DeepPartial): MsgStoreCode; -}; -export declare const MsgStoreCodeResponse: { - encode(message: MsgStoreCodeResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgStoreCodeResponse; - fromJSON(object: any): MsgStoreCodeResponse; - toJSON(message: MsgStoreCodeResponse): unknown; - fromPartial(object: DeepPartial): MsgStoreCodeResponse; -}; -export declare const MsgInstantiateContract: { - encode(message: MsgInstantiateContract, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgInstantiateContract; - fromJSON(object: any): MsgInstantiateContract; - toJSON(message: MsgInstantiateContract): unknown; - fromPartial(object: DeepPartial): MsgInstantiateContract; -}; -export declare const MsgInstantiateContractResponse: { - encode(message: MsgInstantiateContractResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgInstantiateContractResponse; - fromJSON(object: any): MsgInstantiateContractResponse; - toJSON(message: MsgInstantiateContractResponse): unknown; - fromPartial(object: DeepPartial): MsgInstantiateContractResponse; -}; -export declare const MsgExecuteContract: { - encode(message: MsgExecuteContract, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgExecuteContract; - fromJSON(object: any): MsgExecuteContract; - toJSON(message: MsgExecuteContract): unknown; - fromPartial(object: DeepPartial): MsgExecuteContract; -}; -export declare const MsgExecuteContractResponse: { - encode(message: MsgExecuteContractResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgExecuteContractResponse; - fromJSON(object: any): MsgExecuteContractResponse; - toJSON(message: MsgExecuteContractResponse): unknown; - fromPartial(object: DeepPartial): MsgExecuteContractResponse; -}; -export declare const MsgMigrateContract: { - encode(message: MsgMigrateContract, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgMigrateContract; - fromJSON(object: any): MsgMigrateContract; - toJSON(message: MsgMigrateContract): unknown; - fromPartial(object: DeepPartial): MsgMigrateContract; -}; -export declare const MsgMigrateContractResponse: { - encode(message: MsgMigrateContractResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgMigrateContractResponse; - fromJSON(object: any): MsgMigrateContractResponse; - toJSON(message: MsgMigrateContractResponse): unknown; - fromPartial(object: DeepPartial): MsgMigrateContractResponse; -}; -export declare const MsgUpdateAdmin: { - encode(message: MsgUpdateAdmin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgUpdateAdmin; - fromJSON(object: any): MsgUpdateAdmin; - toJSON(message: MsgUpdateAdmin): unknown; - fromPartial(object: DeepPartial): MsgUpdateAdmin; -}; -export declare const MsgUpdateAdminResponse: { - encode(_: MsgUpdateAdminResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgUpdateAdminResponse; - fromJSON(_: any): MsgUpdateAdminResponse; - toJSON(_: MsgUpdateAdminResponse): unknown; - fromPartial(_: DeepPartial): MsgUpdateAdminResponse; -}; -export declare const MsgClearAdmin: { - encode(message: MsgClearAdmin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgClearAdmin; - fromJSON(object: any): MsgClearAdmin; - toJSON(message: MsgClearAdmin): unknown; - fromPartial(object: DeepPartial): MsgClearAdmin; -}; -export declare const MsgClearAdminResponse: { - encode(_: MsgClearAdminResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgClearAdminResponse; - fromJSON(_: any): MsgClearAdminResponse; - toJSON(_: MsgClearAdminResponse): unknown; - fromPartial(_: DeepPartial): MsgClearAdminResponse; -}; -/** Msg defines the wasm Msg service. */ -export interface Msg { - /** StoreCode to submit Wasm code to the system */ - StoreCode(request: MsgStoreCode): Promise; - /** Instantiate creates a new smart contract instance for the given code id. */ - InstantiateContract(request: MsgInstantiateContract): Promise; - /** Execute submits the given message data to a smart contract */ - ExecuteContract(request: MsgExecuteContract): Promise; - /** Migrate runs a code upgrade/ downgrade for a smart contract */ - MigrateContract(request: MsgMigrateContract): Promise; - /** UpdateAdmin sets a new admin for a smart contract */ - UpdateAdmin(request: MsgUpdateAdmin): Promise; - /** ClearAdmin removes any admin stored for a smart contract */ - ClearAdmin(request: MsgClearAdmin): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - StoreCode(request: MsgStoreCode): Promise; - InstantiateContract(request: MsgInstantiateContract): Promise; - ExecuteContract(request: MsgExecuteContract): Promise; - MigrateContract(request: MsgMigrateContract): Promise; - UpdateAdmin(request: MsgUpdateAdmin): Promise; - ClearAdmin(request: MsgClearAdmin): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/tx.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/tx.js deleted file mode 100644 index 217c6a4812..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/tx.js +++ /dev/null @@ -1,1006 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { AccessConfig } from "../../../cosmwasm/wasm/v1/types"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmwasm.wasm.v1"; -const baseMsgStoreCode = { sender: "" }; -export const MsgStoreCode = { - encode(message, writer = Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.wasmByteCode.length !== 0) { - writer.uint32(18).bytes(message.wasmByteCode); - } - if (message.instantiatePermission !== undefined) { - AccessConfig.encode(message.instantiatePermission, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgStoreCode }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.wasmByteCode = reader.bytes(); - break; - case 5: - message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgStoreCode }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.wasmByteCode !== undefined && object.wasmByteCode !== null) { - message.wasmByteCode = bytesFromBase64(object.wasmByteCode); - } - if (object.instantiatePermission !== undefined && - object.instantiatePermission !== null) { - message.instantiatePermission = AccessConfig.fromJSON(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.wasmByteCode !== undefined && - (obj.wasmByteCode = base64FromBytes(message.wasmByteCode !== undefined - ? message.wasmByteCode - : new Uint8Array())); - message.instantiatePermission !== undefined && - (obj.instantiatePermission = message.instantiatePermission - ? AccessConfig.toJSON(message.instantiatePermission) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgStoreCode }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.wasmByteCode !== undefined && object.wasmByteCode !== null) { - message.wasmByteCode = object.wasmByteCode; - } - else { - message.wasmByteCode = new Uint8Array(); - } - if (object.instantiatePermission !== undefined && - object.instantiatePermission !== null) { - message.instantiatePermission = AccessConfig.fromPartial(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, -}; -const baseMsgStoreCodeResponse = { codeId: 0 }; -export const MsgStoreCodeResponse = { - encode(message, writer = Writer.create()) { - if (message.codeId !== 0) { - writer.uint32(8).uint64(message.codeId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgStoreCodeResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgStoreCodeResponse }; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } - else { - message.codeId = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = message.codeId); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgStoreCodeResponse }; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = 0; - } - return message; - }, -}; -const baseMsgInstantiateContract = { - sender: "", - admin: "", - codeId: 0, - label: "", -}; -export const MsgInstantiateContract = { - encode(message, writer = Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.admin !== "") { - writer.uint32(18).string(message.admin); - } - if (message.codeId !== 0) { - writer.uint32(24).uint64(message.codeId); - } - if (message.label !== "") { - writer.uint32(34).string(message.label); - } - if (message.msg.length !== 0) { - writer.uint32(42).bytes(message.msg); - } - for (const v of message.funds) { - Coin.encode(v, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgInstantiateContract }; - message.funds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.admin = reader.string(); - break; - case 3: - message.codeId = longToNumber(reader.uint64()); - break; - case 4: - message.label = reader.string(); - break; - case 5: - message.msg = reader.bytes(); - break; - case 6: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgInstantiateContract }; - message.funds = []; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = String(object.admin); - } - else { - message.admin = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } - else { - message.codeId = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = String(object.label); - } - else { - message.label = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.admin !== undefined && (obj.admin = message.admin); - message.codeId !== undefined && (obj.codeId = message.codeId); - message.label !== undefined && (obj.label = message.label); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - if (message.funds) { - obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.funds = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgInstantiateContract }; - message.funds = []; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = object.admin; - } - else { - message.admin = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseMsgInstantiateContractResponse = { address: "" }; -export const MsgInstantiateContractResponse = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgInstantiateContractResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgInstantiateContractResponse, - }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgInstantiateContractResponse, - }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseMsgExecuteContract = { sender: "", contract: "" }; -export const MsgExecuteContract = { - encode(message, writer = Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.contract !== "") { - writer.uint32(18).string(message.contract); - } - if (message.msg.length !== 0) { - writer.uint32(26).bytes(message.msg); - } - for (const v of message.funds) { - Coin.encode(v, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgExecuteContract }; - message.funds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.contract = reader.string(); - break; - case 3: - message.msg = reader.bytes(); - break; - case 5: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgExecuteContract }; - message.funds = []; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.contract !== undefined && (obj.contract = message.contract); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - if (message.funds) { - obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.funds = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgExecuteContract }; - message.funds = []; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseMsgExecuteContractResponse = {}; -export const MsgExecuteContractResponse = { - encode(message, writer = Writer.create()) { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgExecuteContractResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgExecuteContractResponse, - }; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgExecuteContractResponse, - }; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseMsgMigrateContract = { sender: "", contract: "", codeId: 0 }; -export const MsgMigrateContract = { - encode(message, writer = Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.contract !== "") { - writer.uint32(18).string(message.contract); - } - if (message.codeId !== 0) { - writer.uint32(24).uint64(message.codeId); - } - if (message.msg.length !== 0) { - writer.uint32(34).bytes(message.msg); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgMigrateContract }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.contract = reader.string(); - break; - case 3: - message.codeId = longToNumber(reader.uint64()); - break; - case 4: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgMigrateContract }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } - else { - message.codeId = 0; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.contract !== undefined && (obj.contract = message.contract); - message.codeId !== undefined && (obj.codeId = message.codeId); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgMigrateContract }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = 0; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - return message; - }, -}; -const baseMsgMigrateContractResponse = {}; -export const MsgMigrateContractResponse = { - encode(message, writer = Writer.create()) { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgMigrateContractResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgMigrateContractResponse, - }; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgMigrateContractResponse, - }; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseMsgUpdateAdmin = { sender: "", newAdmin: "", contract: "" }; -export const MsgUpdateAdmin = { - encode(message, writer = Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.newAdmin !== "") { - writer.uint32(18).string(message.newAdmin); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUpdateAdmin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.newAdmin = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgUpdateAdmin }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.newAdmin !== undefined && object.newAdmin !== null) { - message.newAdmin = String(object.newAdmin); - } - else { - message.newAdmin = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.newAdmin !== undefined && (obj.newAdmin = message.newAdmin); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgUpdateAdmin }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.newAdmin !== undefined && object.newAdmin !== null) { - message.newAdmin = object.newAdmin; - } - else { - message.newAdmin = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - return message; - }, -}; -const baseMsgUpdateAdminResponse = {}; -export const MsgUpdateAdminResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUpdateAdminResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgUpdateAdminResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgUpdateAdminResponse }; - return message; - }, -}; -const baseMsgClearAdmin = { sender: "", contract: "" }; -export const MsgClearAdmin = { - encode(message, writer = Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgClearAdmin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgClearAdmin }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgClearAdmin }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - return message; - }, -}; -const baseMsgClearAdminResponse = {}; -export const MsgClearAdminResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgClearAdminResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgClearAdminResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgClearAdminResponse }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - StoreCode(request) { - const data = MsgStoreCode.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "StoreCode", data); - return promise.then((data) => MsgStoreCodeResponse.decode(new Reader(data))); - } - InstantiateContract(request) { - const data = MsgInstantiateContract.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "InstantiateContract", data); - return promise.then((data) => MsgInstantiateContractResponse.decode(new Reader(data))); - } - ExecuteContract(request) { - const data = MsgExecuteContract.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "ExecuteContract", data); - return promise.then((data) => MsgExecuteContractResponse.decode(new Reader(data))); - } - MigrateContract(request) { - const data = MsgMigrateContract.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "MigrateContract", data); - return promise.then((data) => MsgMigrateContractResponse.decode(new Reader(data))); - } - UpdateAdmin(request) { - const data = MsgUpdateAdmin.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "UpdateAdmin", data); - return promise.then((data) => MsgUpdateAdminResponse.decode(new Reader(data))); - } - ClearAdmin(request) { - const data = MsgClearAdmin.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "ClearAdmin", data); - return promise.then((data) => MsgClearAdminResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/tx.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/tx.ts deleted file mode 100644 index 8042ce9738..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/tx.ts +++ /dev/null @@ -1,1300 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { AccessConfig } from "../../../cosmwasm/wasm/v1/types"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmwasm.wasm.v1"; - -/** MsgStoreCode submit Wasm code to the system */ -export interface MsgStoreCode { - /** Sender is the that actor that signed the messages */ - sender: string; - /** WASMByteCode can be raw or gzip compressed */ - wasm_byte_code: Uint8Array; - /** - * InstantiatePermission access control to apply on contract creation, - * optional - */ - instantiate_permission: AccessConfig | undefined; -} - -/** MsgStoreCodeResponse returns store result data. */ -export interface MsgStoreCodeResponse { - /** CodeID is the reference to the stored WASM code */ - code_id: number; -} - -/** - * MsgInstantiateContract create a new smart contract instance for the given - * code id. - */ -export interface MsgInstantiateContract { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Admin is an optional address that can execute migrations */ - admin: string; - /** CodeID is the reference to the stored WASM code */ - code_id: number; - /** Label is optional metadata to be stored with a contract instance. */ - label: string; - /** Msg json encoded message to be passed to the contract on instantiation */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on instantiation */ - funds: Coin[]; -} - -/** MsgInstantiateContractResponse return instantiation result data */ -export interface MsgInstantiateContractResponse { - /** Address is the bech32 address of the new contract instance. */ - address: string; - /** Data contains base64-encoded bytes to returned from the contract */ - data: Uint8Array; -} - -/** MsgExecuteContract submits the given message data to a smart contract */ -export interface MsgExecuteContract { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Contract is the address of the smart contract */ - contract: string; - /** Msg json encoded message to be passed to the contract */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on execution */ - funds: Coin[]; -} - -/** MsgExecuteContractResponse returns execution result data. */ -export interface MsgExecuteContractResponse { - /** Data contains base64-encoded bytes to returned from the contract */ - data: Uint8Array; -} - -/** MsgMigrateContract runs a code upgrade/ downgrade for a smart contract */ -export interface MsgMigrateContract { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Contract is the address of the smart contract */ - contract: string; - /** CodeID references the new WASM code */ - code_id: number; - /** Msg json encoded message to be passed to the contract on migration */ - msg: Uint8Array; -} - -/** MsgMigrateContractResponse returns contract migration result data. */ -export interface MsgMigrateContractResponse { - /** - * Data contains same raw bytes returned as data from the wasm contract. - * (May be empty) - */ - data: Uint8Array; -} - -/** MsgUpdateAdmin sets a new admin for a smart contract */ -export interface MsgUpdateAdmin { - /** Sender is the that actor that signed the messages */ - sender: string; - /** NewAdmin address to be set */ - new_admin: string; - /** Contract is the address of the smart contract */ - contract: string; -} - -/** MsgUpdateAdminResponse returns empty data */ -export interface MsgUpdateAdminResponse {} - -/** MsgClearAdmin removes any admin stored for a smart contract */ -export interface MsgClearAdmin { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Contract is the address of the smart contract */ - contract: string; -} - -/** MsgClearAdminResponse returns empty data */ -export interface MsgClearAdminResponse {} - -const baseMsgStoreCode: object = { sender: "" }; - -export const MsgStoreCode = { - encode(message: MsgStoreCode, writer: Writer = Writer.create()): Writer { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.wasm_byte_code.length !== 0) { - writer.uint32(18).bytes(message.wasm_byte_code); - } - if (message.instantiate_permission !== undefined) { - AccessConfig.encode( - message.instantiate_permission, - writer.uint32(42).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgStoreCode { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgStoreCode } as MsgStoreCode; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.wasm_byte_code = reader.bytes(); - break; - case 5: - message.instantiate_permission = AccessConfig.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgStoreCode { - const message = { ...baseMsgStoreCode } as MsgStoreCode; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if (object.wasm_byte_code !== undefined && object.wasm_byte_code !== null) { - message.wasm_byte_code = bytesFromBase64(object.wasm_byte_code); - } - if ( - object.instantiate_permission !== undefined && - object.instantiate_permission !== null - ) { - message.instantiate_permission = AccessConfig.fromJSON( - object.instantiate_permission - ); - } else { - message.instantiate_permission = undefined; - } - return message; - }, - - toJSON(message: MsgStoreCode): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.wasm_byte_code !== undefined && - (obj.wasm_byte_code = base64FromBytes( - message.wasm_byte_code !== undefined - ? message.wasm_byte_code - : new Uint8Array() - )); - message.instantiate_permission !== undefined && - (obj.instantiate_permission = message.instantiate_permission - ? AccessConfig.toJSON(message.instantiate_permission) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgStoreCode { - const message = { ...baseMsgStoreCode } as MsgStoreCode; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if (object.wasm_byte_code !== undefined && object.wasm_byte_code !== null) { - message.wasm_byte_code = object.wasm_byte_code; - } else { - message.wasm_byte_code = new Uint8Array(); - } - if ( - object.instantiate_permission !== undefined && - object.instantiate_permission !== null - ) { - message.instantiate_permission = AccessConfig.fromPartial( - object.instantiate_permission - ); - } else { - message.instantiate_permission = undefined; - } - return message; - }, -}; - -const baseMsgStoreCodeResponse: object = { code_id: 0 }; - -export const MsgStoreCodeResponse = { - encode( - message: MsgStoreCodeResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.code_id !== 0) { - writer.uint32(8).uint64(message.code_id); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgStoreCodeResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgStoreCodeResponse } as MsgStoreCodeResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code_id = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgStoreCodeResponse { - const message = { ...baseMsgStoreCodeResponse } as MsgStoreCodeResponse; - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = Number(object.code_id); - } else { - message.code_id = 0; - } - return message; - }, - - toJSON(message: MsgStoreCodeResponse): unknown { - const obj: any = {}; - message.code_id !== undefined && (obj.code_id = message.code_id); - return obj; - }, - - fromPartial(object: DeepPartial): MsgStoreCodeResponse { - const message = { ...baseMsgStoreCodeResponse } as MsgStoreCodeResponse; - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = object.code_id; - } else { - message.code_id = 0; - } - return message; - }, -}; - -const baseMsgInstantiateContract: object = { - sender: "", - admin: "", - code_id: 0, - label: "", -}; - -export const MsgInstantiateContract = { - encode( - message: MsgInstantiateContract, - writer: Writer = Writer.create() - ): Writer { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.admin !== "") { - writer.uint32(18).string(message.admin); - } - if (message.code_id !== 0) { - writer.uint32(24).uint64(message.code_id); - } - if (message.label !== "") { - writer.uint32(34).string(message.label); - } - if (message.msg.length !== 0) { - writer.uint32(42).bytes(message.msg); - } - for (const v of message.funds) { - Coin.encode(v!, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgInstantiateContract { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgInstantiateContract } as MsgInstantiateContract; - message.funds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.admin = reader.string(); - break; - case 3: - message.code_id = longToNumber(reader.uint64() as Long); - break; - case 4: - message.label = reader.string(); - break; - case 5: - message.msg = reader.bytes(); - break; - case 6: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgInstantiateContract { - const message = { ...baseMsgInstantiateContract } as MsgInstantiateContract; - message.funds = []; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = String(object.admin); - } else { - message.admin = ""; - } - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = Number(object.code_id); - } else { - message.code_id = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = String(object.label); - } else { - message.label = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MsgInstantiateContract): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.admin !== undefined && (obj.admin = message.admin); - message.code_id !== undefined && (obj.code_id = message.code_id); - message.label !== undefined && (obj.label = message.label); - message.msg !== undefined && - (obj.msg = base64FromBytes( - message.msg !== undefined ? message.msg : new Uint8Array() - )); - if (message.funds) { - obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.funds = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgInstantiateContract { - const message = { ...baseMsgInstantiateContract } as MsgInstantiateContract; - message.funds = []; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = object.admin; - } else { - message.admin = ""; - } - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = object.code_id; - } else { - message.code_id = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } else { - message.msg = new Uint8Array(); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMsgInstantiateContractResponse: object = { address: "" }; - -export const MsgInstantiateContractResponse = { - encode( - message: MsgInstantiateContractResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgInstantiateContractResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgInstantiateContractResponse, - } as MsgInstantiateContractResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgInstantiateContractResponse { - const message = { - ...baseMsgInstantiateContractResponse, - } as MsgInstantiateContractResponse; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: MsgInstantiateContractResponse): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgInstantiateContractResponse { - const message = { - ...baseMsgInstantiateContractResponse, - } as MsgInstantiateContractResponse; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseMsgExecuteContract: object = { sender: "", contract: "" }; - -export const MsgExecuteContract = { - encode( - message: MsgExecuteContract, - writer: Writer = Writer.create() - ): Writer { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.contract !== "") { - writer.uint32(18).string(message.contract); - } - if (message.msg.length !== 0) { - writer.uint32(26).bytes(message.msg); - } - for (const v of message.funds) { - Coin.encode(v!, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgExecuteContract { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgExecuteContract } as MsgExecuteContract; - message.funds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.contract = reader.string(); - break; - case 3: - message.msg = reader.bytes(); - break; - case 5: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgExecuteContract { - const message = { ...baseMsgExecuteContract } as MsgExecuteContract; - message.funds = []; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MsgExecuteContract): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.contract !== undefined && (obj.contract = message.contract); - message.msg !== undefined && - (obj.msg = base64FromBytes( - message.msg !== undefined ? message.msg : new Uint8Array() - )); - if (message.funds) { - obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.funds = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MsgExecuteContract { - const message = { ...baseMsgExecuteContract } as MsgExecuteContract; - message.funds = []; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } else { - message.msg = new Uint8Array(); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMsgExecuteContractResponse: object = {}; - -export const MsgExecuteContractResponse = { - encode( - message: MsgExecuteContractResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgExecuteContractResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgExecuteContractResponse, - } as MsgExecuteContractResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgExecuteContractResponse { - const message = { - ...baseMsgExecuteContractResponse, - } as MsgExecuteContractResponse; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: MsgExecuteContractResponse): unknown { - const obj: any = {}; - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgExecuteContractResponse { - const message = { - ...baseMsgExecuteContractResponse, - } as MsgExecuteContractResponse; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseMsgMigrateContract: object = { sender: "", contract: "", code_id: 0 }; - -export const MsgMigrateContract = { - encode( - message: MsgMigrateContract, - writer: Writer = Writer.create() - ): Writer { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.contract !== "") { - writer.uint32(18).string(message.contract); - } - if (message.code_id !== 0) { - writer.uint32(24).uint64(message.code_id); - } - if (message.msg.length !== 0) { - writer.uint32(34).bytes(message.msg); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgMigrateContract { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgMigrateContract } as MsgMigrateContract; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.contract = reader.string(); - break; - case 3: - message.code_id = longToNumber(reader.uint64() as Long); - break; - case 4: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgMigrateContract { - const message = { ...baseMsgMigrateContract } as MsgMigrateContract; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } else { - message.contract = ""; - } - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = Number(object.code_id); - } else { - message.code_id = 0; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - return message; - }, - - toJSON(message: MsgMigrateContract): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.contract !== undefined && (obj.contract = message.contract); - message.code_id !== undefined && (obj.code_id = message.code_id); - message.msg !== undefined && - (obj.msg = base64FromBytes( - message.msg !== undefined ? message.msg : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): MsgMigrateContract { - const message = { ...baseMsgMigrateContract } as MsgMigrateContract; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } else { - message.contract = ""; - } - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = object.code_id; - } else { - message.code_id = 0; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } else { - message.msg = new Uint8Array(); - } - return message; - }, -}; - -const baseMsgMigrateContractResponse: object = {}; - -export const MsgMigrateContractResponse = { - encode( - message: MsgMigrateContractResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgMigrateContractResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgMigrateContractResponse, - } as MsgMigrateContractResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgMigrateContractResponse { - const message = { - ...baseMsgMigrateContractResponse, - } as MsgMigrateContractResponse; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: MsgMigrateContractResponse): unknown { - const obj: any = {}; - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgMigrateContractResponse { - const message = { - ...baseMsgMigrateContractResponse, - } as MsgMigrateContractResponse; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseMsgUpdateAdmin: object = { sender: "", new_admin: "", contract: "" }; - -export const MsgUpdateAdmin = { - encode(message: MsgUpdateAdmin, writer: Writer = Writer.create()): Writer { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.new_admin !== "") { - writer.uint32(18).string(message.new_admin); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUpdateAdmin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUpdateAdmin } as MsgUpdateAdmin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.new_admin = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgUpdateAdmin { - const message = { ...baseMsgUpdateAdmin } as MsgUpdateAdmin; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if (object.new_admin !== undefined && object.new_admin !== null) { - message.new_admin = String(object.new_admin); - } else { - message.new_admin = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } else { - message.contract = ""; - } - return message; - }, - - toJSON(message: MsgUpdateAdmin): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.new_admin !== undefined && (obj.new_admin = message.new_admin); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - - fromPartial(object: DeepPartial): MsgUpdateAdmin { - const message = { ...baseMsgUpdateAdmin } as MsgUpdateAdmin; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if (object.new_admin !== undefined && object.new_admin !== null) { - message.new_admin = object.new_admin; - } else { - message.new_admin = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } else { - message.contract = ""; - } - return message; - }, -}; - -const baseMsgUpdateAdminResponse: object = {}; - -export const MsgUpdateAdminResponse = { - encode(_: MsgUpdateAdminResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUpdateAdminResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUpdateAdminResponse } as MsgUpdateAdminResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgUpdateAdminResponse { - const message = { ...baseMsgUpdateAdminResponse } as MsgUpdateAdminResponse; - return message; - }, - - toJSON(_: MsgUpdateAdminResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgUpdateAdminResponse { - const message = { ...baseMsgUpdateAdminResponse } as MsgUpdateAdminResponse; - return message; - }, -}; - -const baseMsgClearAdmin: object = { sender: "", contract: "" }; - -export const MsgClearAdmin = { - encode(message: MsgClearAdmin, writer: Writer = Writer.create()): Writer { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgClearAdmin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgClearAdmin } as MsgClearAdmin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgClearAdmin { - const message = { ...baseMsgClearAdmin } as MsgClearAdmin; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } else { - message.contract = ""; - } - return message; - }, - - toJSON(message: MsgClearAdmin): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - - fromPartial(object: DeepPartial): MsgClearAdmin { - const message = { ...baseMsgClearAdmin } as MsgClearAdmin; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } else { - message.contract = ""; - } - return message; - }, -}; - -const baseMsgClearAdminResponse: object = {}; - -export const MsgClearAdminResponse = { - encode(_: MsgClearAdminResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgClearAdminResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgClearAdminResponse } as MsgClearAdminResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgClearAdminResponse { - const message = { ...baseMsgClearAdminResponse } as MsgClearAdminResponse; - return message; - }, - - toJSON(_: MsgClearAdminResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgClearAdminResponse { - const message = { ...baseMsgClearAdminResponse } as MsgClearAdminResponse; - return message; - }, -}; - -/** Msg defines the wasm Msg service. */ -export interface Msg { - /** StoreCode to submit Wasm code to the system */ - StoreCode(request: MsgStoreCode): Promise; - /** Instantiate creates a new smart contract instance for the given code id. */ - InstantiateContract( - request: MsgInstantiateContract - ): Promise; - /** Execute submits the given message data to a smart contract */ - ExecuteContract( - request: MsgExecuteContract - ): Promise; - /** Migrate runs a code upgrade/ downgrade for a smart contract */ - MigrateContract( - request: MsgMigrateContract - ): Promise; - /** UpdateAdmin sets a new admin for a smart contract */ - UpdateAdmin(request: MsgUpdateAdmin): Promise; - /** ClearAdmin removes any admin stored for a smart contract */ - ClearAdmin(request: MsgClearAdmin): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - StoreCode(request: MsgStoreCode): Promise { - const data = MsgStoreCode.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "StoreCode", data); - return promise.then((data) => - MsgStoreCodeResponse.decode(new Reader(data)) - ); - } - - InstantiateContract( - request: MsgInstantiateContract - ): Promise { - const data = MsgInstantiateContract.encode(request).finish(); - const promise = this.rpc.request( - "cosmwasm.wasm.v1.Msg", - "InstantiateContract", - data - ); - return promise.then((data) => - MsgInstantiateContractResponse.decode(new Reader(data)) - ); - } - - ExecuteContract( - request: MsgExecuteContract - ): Promise { - const data = MsgExecuteContract.encode(request).finish(); - const promise = this.rpc.request( - "cosmwasm.wasm.v1.Msg", - "ExecuteContract", - data - ); - return promise.then((data) => - MsgExecuteContractResponse.decode(new Reader(data)) - ); - } - - MigrateContract( - request: MsgMigrateContract - ): Promise { - const data = MsgMigrateContract.encode(request).finish(); - const promise = this.rpc.request( - "cosmwasm.wasm.v1.Msg", - "MigrateContract", - data - ); - return promise.then((data) => - MsgMigrateContractResponse.decode(new Reader(data)) - ); - } - - UpdateAdmin(request: MsgUpdateAdmin): Promise { - const data = MsgUpdateAdmin.encode(request).finish(); - const promise = this.rpc.request( - "cosmwasm.wasm.v1.Msg", - "UpdateAdmin", - data - ); - return promise.then((data) => - MsgUpdateAdminResponse.decode(new Reader(data)) - ); - } - - ClearAdmin(request: MsgClearAdmin): Promise { - const data = MsgClearAdmin.encode(request).finish(); - const promise = this.rpc.request( - "cosmwasm.wasm.v1.Msg", - "ClearAdmin", - data - ); - return promise.then((data) => - MsgClearAdminResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/types.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/types.d.ts deleted file mode 100644 index 23818330ee..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/types.d.ts +++ /dev/null @@ -1,167 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -export declare const protobufPackage = "cosmwasm.wasm.v1"; -/** AccessType permission types */ -export declare enum AccessType { - /** ACCESS_TYPE_UNSPECIFIED - AccessTypeUnspecified placeholder for empty value */ - ACCESS_TYPE_UNSPECIFIED = 0, - /** ACCESS_TYPE_NOBODY - AccessTypeNobody forbidden */ - ACCESS_TYPE_NOBODY = 1, - /** ACCESS_TYPE_ONLY_ADDRESS - AccessTypeOnlyAddress restricted to an address */ - ACCESS_TYPE_ONLY_ADDRESS = 2, - /** ACCESS_TYPE_EVERYBODY - AccessTypeEverybody unrestricted */ - ACCESS_TYPE_EVERYBODY = 3, - UNRECOGNIZED = -1 -} -export declare function accessTypeFromJSON(object: any): AccessType; -export declare function accessTypeToJSON(object: AccessType): string; -/** ContractCodeHistoryOperationType actions that caused a code change */ -export declare enum ContractCodeHistoryOperationType { - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED - ContractCodeHistoryOperationTypeUnspecified placeholder for empty value */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED = 0, - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT - ContractCodeHistoryOperationTypeInit on chain contract instantiation */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT = 1, - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE - ContractCodeHistoryOperationTypeMigrate code migration */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE = 2, - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS - ContractCodeHistoryOperationTypeGenesis based on genesis data */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS = 3, - UNRECOGNIZED = -1 -} -export declare function contractCodeHistoryOperationTypeFromJSON(object: any): ContractCodeHistoryOperationType; -export declare function contractCodeHistoryOperationTypeToJSON(object: ContractCodeHistoryOperationType): string; -/** AccessTypeParam */ -export interface AccessTypeParam { - value: AccessType; -} -/** AccessConfig access control type. */ -export interface AccessConfig { - permission: AccessType; - address: string; -} -/** Params defines the set of wasm parameters. */ -export interface Params { - codeUploadAccess: AccessConfig | undefined; - instantiateDefaultPermission: AccessType; -} -/** CodeInfo is data for the uploaded contract WASM code */ -export interface CodeInfo { - /** CodeHash is the unique identifier created by wasmvm */ - codeHash: Uint8Array; - /** Creator address who initially stored the code */ - creator: string; - /** InstantiateConfig access control to apply on contract creation, optional */ - instantiateConfig: AccessConfig | undefined; -} -/** ContractInfo stores a WASM contract instance */ -export interface ContractInfo { - /** CodeID is the reference to the stored Wasm code */ - codeId: number; - /** Creator address who initially instantiated the contract */ - creator: string; - /** Admin is an optional address that can execute migrations */ - admin: string; - /** Label is optional metadata to be stored with a contract instance. */ - label: string; - /** - * Created Tx position when the contract was instantiated. - * This data should kept internal and not be exposed via query results. Just - * use for sorting - */ - created: AbsoluteTxPosition | undefined; - ibcPortId: string; - /** - * Extension is an extension point to store custom metadata within the - * persistence model. - */ - extension: Any | undefined; -} -/** ContractCodeHistoryEntry metadata to a contract. */ -export interface ContractCodeHistoryEntry { - operation: ContractCodeHistoryOperationType; - /** CodeID is the reference to the stored WASM code */ - codeId: number; - /** Updated Tx position when the operation was executed. */ - updated: AbsoluteTxPosition | undefined; - msg: Uint8Array; -} -/** - * AbsoluteTxPosition is a unique transaction position that allows for global - * ordering of transactions. - */ -export interface AbsoluteTxPosition { - /** BlockHeight is the block the contract was created at */ - blockHeight: number; - /** - * TxIndex is a monotonic counter within the block (actual transaction index, - * or gas consumed) - */ - txIndex: number; -} -/** Model is a struct that holds a KV pair */ -export interface Model { - /** hex-encode key to read it better (this is often ascii) */ - key: Uint8Array; - /** base64-encode raw value */ - value: Uint8Array; -} -export declare const AccessTypeParam: { - encode(message: AccessTypeParam, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): AccessTypeParam; - fromJSON(object: any): AccessTypeParam; - toJSON(message: AccessTypeParam): unknown; - fromPartial(object: DeepPartial): AccessTypeParam; -}; -export declare const AccessConfig: { - encode(message: AccessConfig, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): AccessConfig; - fromJSON(object: any): AccessConfig; - toJSON(message: AccessConfig): unknown; - fromPartial(object: DeepPartial): AccessConfig; -}; -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -export declare const CodeInfo: { - encode(message: CodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CodeInfo; - fromJSON(object: any): CodeInfo; - toJSON(message: CodeInfo): unknown; - fromPartial(object: DeepPartial): CodeInfo; -}; -export declare const ContractInfo: { - encode(message: ContractInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ContractInfo; - fromJSON(object: any): ContractInfo; - toJSON(message: ContractInfo): unknown; - fromPartial(object: DeepPartial): ContractInfo; -}; -export declare const ContractCodeHistoryEntry: { - encode(message: ContractCodeHistoryEntry, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ContractCodeHistoryEntry; - fromJSON(object: any): ContractCodeHistoryEntry; - toJSON(message: ContractCodeHistoryEntry): unknown; - fromPartial(object: DeepPartial): ContractCodeHistoryEntry; -}; -export declare const AbsoluteTxPosition: { - encode(message: AbsoluteTxPosition, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): AbsoluteTxPosition; - fromJSON(object: any): AbsoluteTxPosition; - toJSON(message: AbsoluteTxPosition): unknown; - fromPartial(object: DeepPartial): AbsoluteTxPosition; -}; -export declare const Model: { - encode(message: Model, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Model; - fromJSON(object: any): Model; - toJSON(message: Model): unknown; - fromPartial(object: DeepPartial): Model; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/types.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/types.js deleted file mode 100644 index ea2fac5638..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/types.js +++ /dev/null @@ -1,863 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -export const protobufPackage = "cosmwasm.wasm.v1"; -/** AccessType permission types */ -export var AccessType; -(function (AccessType) { - /** ACCESS_TYPE_UNSPECIFIED - AccessTypeUnspecified placeholder for empty value */ - AccessType[AccessType["ACCESS_TYPE_UNSPECIFIED"] = 0] = "ACCESS_TYPE_UNSPECIFIED"; - /** ACCESS_TYPE_NOBODY - AccessTypeNobody forbidden */ - AccessType[AccessType["ACCESS_TYPE_NOBODY"] = 1] = "ACCESS_TYPE_NOBODY"; - /** ACCESS_TYPE_ONLY_ADDRESS - AccessTypeOnlyAddress restricted to an address */ - AccessType[AccessType["ACCESS_TYPE_ONLY_ADDRESS"] = 2] = "ACCESS_TYPE_ONLY_ADDRESS"; - /** ACCESS_TYPE_EVERYBODY - AccessTypeEverybody unrestricted */ - AccessType[AccessType["ACCESS_TYPE_EVERYBODY"] = 3] = "ACCESS_TYPE_EVERYBODY"; - AccessType[AccessType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(AccessType || (AccessType = {})); -export function accessTypeFromJSON(object) { - switch (object) { - case 0: - case "ACCESS_TYPE_UNSPECIFIED": - return AccessType.ACCESS_TYPE_UNSPECIFIED; - case 1: - case "ACCESS_TYPE_NOBODY": - return AccessType.ACCESS_TYPE_NOBODY; - case 2: - case "ACCESS_TYPE_ONLY_ADDRESS": - return AccessType.ACCESS_TYPE_ONLY_ADDRESS; - case 3: - case "ACCESS_TYPE_EVERYBODY": - return AccessType.ACCESS_TYPE_EVERYBODY; - case -1: - case "UNRECOGNIZED": - default: - return AccessType.UNRECOGNIZED; - } -} -export function accessTypeToJSON(object) { - switch (object) { - case AccessType.ACCESS_TYPE_UNSPECIFIED: - return "ACCESS_TYPE_UNSPECIFIED"; - case AccessType.ACCESS_TYPE_NOBODY: - return "ACCESS_TYPE_NOBODY"; - case AccessType.ACCESS_TYPE_ONLY_ADDRESS: - return "ACCESS_TYPE_ONLY_ADDRESS"; - case AccessType.ACCESS_TYPE_EVERYBODY: - return "ACCESS_TYPE_EVERYBODY"; - default: - return "UNKNOWN"; - } -} -/** ContractCodeHistoryOperationType actions that caused a code change */ -export var ContractCodeHistoryOperationType; -(function (ContractCodeHistoryOperationType) { - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED - ContractCodeHistoryOperationTypeUnspecified placeholder for empty value */ - ContractCodeHistoryOperationType[ContractCodeHistoryOperationType["CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED"] = 0] = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED"; - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT - ContractCodeHistoryOperationTypeInit on chain contract instantiation */ - ContractCodeHistoryOperationType[ContractCodeHistoryOperationType["CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT"] = 1] = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT"; - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE - ContractCodeHistoryOperationTypeMigrate code migration */ - ContractCodeHistoryOperationType[ContractCodeHistoryOperationType["CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE"] = 2] = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE"; - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS - ContractCodeHistoryOperationTypeGenesis based on genesis data */ - ContractCodeHistoryOperationType[ContractCodeHistoryOperationType["CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS"] = 3] = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS"; - ContractCodeHistoryOperationType[ContractCodeHistoryOperationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(ContractCodeHistoryOperationType || (ContractCodeHistoryOperationType = {})); -export function contractCodeHistoryOperationTypeFromJSON(object) { - switch (object) { - case 0: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED; - case 1: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT; - case 2: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE; - case 3: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS; - case -1: - case "UNRECOGNIZED": - default: - return ContractCodeHistoryOperationType.UNRECOGNIZED; - } -} -export function contractCodeHistoryOperationTypeToJSON(object) { - switch (object) { - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED"; - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT"; - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE"; - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS"; - default: - return "UNKNOWN"; - } -} -const baseAccessTypeParam = { value: 0 }; -export const AccessTypeParam = { - encode(message, writer = Writer.create()) { - if (message.value !== 0) { - writer.uint32(8).int32(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAccessTypeParam }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.value = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAccessTypeParam }; - if (object.value !== undefined && object.value !== null) { - message.value = accessTypeFromJSON(object.value); - } - else { - message.value = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.value !== undefined && - (obj.value = accessTypeToJSON(message.value)); - return obj; - }, - fromPartial(object) { - const message = { ...baseAccessTypeParam }; - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = 0; - } - return message; - }, -}; -const baseAccessConfig = { permission: 0, address: "" }; -export const AccessConfig = { - encode(message, writer = Writer.create()) { - if (message.permission !== 0) { - writer.uint32(8).int32(message.permission); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAccessConfig }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.permission = reader.int32(); - break; - case 2: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAccessConfig }; - if (object.permission !== undefined && object.permission !== null) { - message.permission = accessTypeFromJSON(object.permission); - } - else { - message.permission = 0; - } - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.permission !== undefined && - (obj.permission = accessTypeToJSON(message.permission)); - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object) { - const message = { ...baseAccessConfig }; - if (object.permission !== undefined && object.permission !== null) { - message.permission = object.permission; - } - else { - message.permission = 0; - } - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - return message; - }, -}; -const baseParams = { instantiateDefaultPermission: 0 }; -export const Params = { - encode(message, writer = Writer.create()) { - if (message.codeUploadAccess !== undefined) { - AccessConfig.encode(message.codeUploadAccess, writer.uint32(10).fork()).ldelim(); - } - if (message.instantiateDefaultPermission !== 0) { - writer.uint32(16).int32(message.instantiateDefaultPermission); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeUploadAccess = AccessConfig.decode(reader, reader.uint32()); - break; - case 2: - message.instantiateDefaultPermission = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - if (object.codeUploadAccess !== undefined && - object.codeUploadAccess !== null) { - message.codeUploadAccess = AccessConfig.fromJSON(object.codeUploadAccess); - } - else { - message.codeUploadAccess = undefined; - } - if (object.instantiateDefaultPermission !== undefined && - object.instantiateDefaultPermission !== null) { - message.instantiateDefaultPermission = accessTypeFromJSON(object.instantiateDefaultPermission); - } - else { - message.instantiateDefaultPermission = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeUploadAccess !== undefined && - (obj.codeUploadAccess = message.codeUploadAccess - ? AccessConfig.toJSON(message.codeUploadAccess) - : undefined); - message.instantiateDefaultPermission !== undefined && - (obj.instantiateDefaultPermission = accessTypeToJSON(message.instantiateDefaultPermission)); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - if (object.codeUploadAccess !== undefined && - object.codeUploadAccess !== null) { - message.codeUploadAccess = AccessConfig.fromPartial(object.codeUploadAccess); - } - else { - message.codeUploadAccess = undefined; - } - if (object.instantiateDefaultPermission !== undefined && - object.instantiateDefaultPermission !== null) { - message.instantiateDefaultPermission = - object.instantiateDefaultPermission; - } - else { - message.instantiateDefaultPermission = 0; - } - return message; - }, -}; -const baseCodeInfo = { creator: "" }; -export const CodeInfo = { - encode(message, writer = Writer.create()) { - if (message.codeHash.length !== 0) { - writer.uint32(10).bytes(message.codeHash); - } - if (message.creator !== "") { - writer.uint32(18).string(message.creator); - } - if (message.instantiateConfig !== undefined) { - AccessConfig.encode(message.instantiateConfig, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCodeInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeHash = reader.bytes(); - break; - case 2: - message.creator = reader.string(); - break; - case 5: - message.instantiateConfig = AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCodeInfo }; - if (object.codeHash !== undefined && object.codeHash !== null) { - message.codeHash = bytesFromBase64(object.codeHash); - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } - else { - message.creator = ""; - } - if (object.instantiateConfig !== undefined && - object.instantiateConfig !== null) { - message.instantiateConfig = AccessConfig.fromJSON(object.instantiateConfig); - } - else { - message.instantiateConfig = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeHash !== undefined && - (obj.codeHash = base64FromBytes(message.codeHash !== undefined ? message.codeHash : new Uint8Array())); - message.creator !== undefined && (obj.creator = message.creator); - message.instantiateConfig !== undefined && - (obj.instantiateConfig = message.instantiateConfig - ? AccessConfig.toJSON(message.instantiateConfig) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseCodeInfo }; - if (object.codeHash !== undefined && object.codeHash !== null) { - message.codeHash = object.codeHash; - } - else { - message.codeHash = new Uint8Array(); - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } - else { - message.creator = ""; - } - if (object.instantiateConfig !== undefined && - object.instantiateConfig !== null) { - message.instantiateConfig = AccessConfig.fromPartial(object.instantiateConfig); - } - else { - message.instantiateConfig = undefined; - } - return message; - }, -}; -const baseContractInfo = { - codeId: 0, - creator: "", - admin: "", - label: "", - ibcPortId: "", -}; -export const ContractInfo = { - encode(message, writer = Writer.create()) { - if (message.codeId !== 0) { - writer.uint32(8).uint64(message.codeId); - } - if (message.creator !== "") { - writer.uint32(18).string(message.creator); - } - if (message.admin !== "") { - writer.uint32(26).string(message.admin); - } - if (message.label !== "") { - writer.uint32(34).string(message.label); - } - if (message.created !== undefined) { - AbsoluteTxPosition.encode(message.created, writer.uint32(42).fork()).ldelim(); - } - if (message.ibcPortId !== "") { - writer.uint32(50).string(message.ibcPortId); - } - if (message.extension !== undefined) { - Any.encode(message.extension, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseContractInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = longToNumber(reader.uint64()); - break; - case 2: - message.creator = reader.string(); - break; - case 3: - message.admin = reader.string(); - break; - case 4: - message.label = reader.string(); - break; - case 5: - message.created = AbsoluteTxPosition.decode(reader, reader.uint32()); - break; - case 6: - message.ibcPortId = reader.string(); - break; - case 7: - message.extension = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseContractInfo }; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } - else { - message.codeId = 0; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } - else { - message.creator = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = String(object.admin); - } - else { - message.admin = ""; - } - if (object.label !== undefined && object.label !== null) { - message.label = String(object.label); - } - else { - message.label = ""; - } - if (object.created !== undefined && object.created !== null) { - message.created = AbsoluteTxPosition.fromJSON(object.created); - } - else { - message.created = undefined; - } - if (object.ibcPortId !== undefined && object.ibcPortId !== null) { - message.ibcPortId = String(object.ibcPortId); - } - else { - message.ibcPortId = ""; - } - if (object.extension !== undefined && object.extension !== null) { - message.extension = Any.fromJSON(object.extension); - } - else { - message.extension = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = message.codeId); - message.creator !== undefined && (obj.creator = message.creator); - message.admin !== undefined && (obj.admin = message.admin); - message.label !== undefined && (obj.label = message.label); - message.created !== undefined && - (obj.created = message.created - ? AbsoluteTxPosition.toJSON(message.created) - : undefined); - message.ibcPortId !== undefined && (obj.ibcPortId = message.ibcPortId); - message.extension !== undefined && - (obj.extension = message.extension - ? Any.toJSON(message.extension) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseContractInfo }; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = 0; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } - else { - message.creator = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = object.admin; - } - else { - message.admin = ""; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = ""; - } - if (object.created !== undefined && object.created !== null) { - message.created = AbsoluteTxPosition.fromPartial(object.created); - } - else { - message.created = undefined; - } - if (object.ibcPortId !== undefined && object.ibcPortId !== null) { - message.ibcPortId = object.ibcPortId; - } - else { - message.ibcPortId = ""; - } - if (object.extension !== undefined && object.extension !== null) { - message.extension = Any.fromPartial(object.extension); - } - else { - message.extension = undefined; - } - return message; - }, -}; -const baseContractCodeHistoryEntry = { operation: 0, codeId: 0 }; -export const ContractCodeHistoryEntry = { - encode(message, writer = Writer.create()) { - if (message.operation !== 0) { - writer.uint32(8).int32(message.operation); - } - if (message.codeId !== 0) { - writer.uint32(16).uint64(message.codeId); - } - if (message.updated !== undefined) { - AbsoluteTxPosition.encode(message.updated, writer.uint32(26).fork()).ldelim(); - } - if (message.msg.length !== 0) { - writer.uint32(34).bytes(message.msg); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseContractCodeHistoryEntry, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.operation = reader.int32(); - break; - case 2: - message.codeId = longToNumber(reader.uint64()); - break; - case 3: - message.updated = AbsoluteTxPosition.decode(reader, reader.uint32()); - break; - case 4: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseContractCodeHistoryEntry, - }; - if (object.operation !== undefined && object.operation !== null) { - message.operation = contractCodeHistoryOperationTypeFromJSON(object.operation); - } - else { - message.operation = 0; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } - else { - message.codeId = 0; - } - if (object.updated !== undefined && object.updated !== null) { - message.updated = AbsoluteTxPosition.fromJSON(object.updated); - } - else { - message.updated = undefined; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.operation !== undefined && - (obj.operation = contractCodeHistoryOperationTypeToJSON(message.operation)); - message.codeId !== undefined && (obj.codeId = message.codeId); - message.updated !== undefined && - (obj.updated = message.updated - ? AbsoluteTxPosition.toJSON(message.updated) - : undefined); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { - ...baseContractCodeHistoryEntry, - }; - if (object.operation !== undefined && object.operation !== null) { - message.operation = object.operation; - } - else { - message.operation = 0; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = 0; - } - if (object.updated !== undefined && object.updated !== null) { - message.updated = AbsoluteTxPosition.fromPartial(object.updated); - } - else { - message.updated = undefined; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - return message; - }, -}; -const baseAbsoluteTxPosition = { blockHeight: 0, txIndex: 0 }; -export const AbsoluteTxPosition = { - encode(message, writer = Writer.create()) { - if (message.blockHeight !== 0) { - writer.uint32(8).uint64(message.blockHeight); - } - if (message.txIndex !== 0) { - writer.uint32(16).uint64(message.txIndex); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAbsoluteTxPosition }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockHeight = longToNumber(reader.uint64()); - break; - case 2: - message.txIndex = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAbsoluteTxPosition }; - if (object.blockHeight !== undefined && object.blockHeight !== null) { - message.blockHeight = Number(object.blockHeight); - } - else { - message.blockHeight = 0; - } - if (object.txIndex !== undefined && object.txIndex !== null) { - message.txIndex = Number(object.txIndex); - } - else { - message.txIndex = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.blockHeight !== undefined && - (obj.blockHeight = message.blockHeight); - message.txIndex !== undefined && (obj.txIndex = message.txIndex); - return obj; - }, - fromPartial(object) { - const message = { ...baseAbsoluteTxPosition }; - if (object.blockHeight !== undefined && object.blockHeight !== null) { - message.blockHeight = object.blockHeight; - } - else { - message.blockHeight = 0; - } - if (object.txIndex !== undefined && object.txIndex !== null) { - message.txIndex = object.txIndex; - } - else { - message.txIndex = 0; - } - return message; - }, -}; -const baseModel = {}; -export const Model = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseModel }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseModel }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseModel }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/types.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/types.ts deleted file mode 100644 index 3621cccecc..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/cosmwasm/wasm/v1/types.ts +++ /dev/null @@ -1,1043 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; - -export const protobufPackage = "cosmwasm.wasm.v1"; - -/** AccessType permission types */ -export enum AccessType { - /** ACCESS_TYPE_UNSPECIFIED - AccessTypeUnspecified placeholder for empty value */ - ACCESS_TYPE_UNSPECIFIED = 0, - /** ACCESS_TYPE_NOBODY - AccessTypeNobody forbidden */ - ACCESS_TYPE_NOBODY = 1, - /** ACCESS_TYPE_ONLY_ADDRESS - AccessTypeOnlyAddress restricted to an address */ - ACCESS_TYPE_ONLY_ADDRESS = 2, - /** ACCESS_TYPE_EVERYBODY - AccessTypeEverybody unrestricted */ - ACCESS_TYPE_EVERYBODY = 3, - UNRECOGNIZED = -1, -} - -export function accessTypeFromJSON(object: any): AccessType { - switch (object) { - case 0: - case "ACCESS_TYPE_UNSPECIFIED": - return AccessType.ACCESS_TYPE_UNSPECIFIED; - case 1: - case "ACCESS_TYPE_NOBODY": - return AccessType.ACCESS_TYPE_NOBODY; - case 2: - case "ACCESS_TYPE_ONLY_ADDRESS": - return AccessType.ACCESS_TYPE_ONLY_ADDRESS; - case 3: - case "ACCESS_TYPE_EVERYBODY": - return AccessType.ACCESS_TYPE_EVERYBODY; - case -1: - case "UNRECOGNIZED": - default: - return AccessType.UNRECOGNIZED; - } -} - -export function accessTypeToJSON(object: AccessType): string { - switch (object) { - case AccessType.ACCESS_TYPE_UNSPECIFIED: - return "ACCESS_TYPE_UNSPECIFIED"; - case AccessType.ACCESS_TYPE_NOBODY: - return "ACCESS_TYPE_NOBODY"; - case AccessType.ACCESS_TYPE_ONLY_ADDRESS: - return "ACCESS_TYPE_ONLY_ADDRESS"; - case AccessType.ACCESS_TYPE_EVERYBODY: - return "ACCESS_TYPE_EVERYBODY"; - default: - return "UNKNOWN"; - } -} - -/** ContractCodeHistoryOperationType actions that caused a code change */ -export enum ContractCodeHistoryOperationType { - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED - ContractCodeHistoryOperationTypeUnspecified placeholder for empty value */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED = 0, - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT - ContractCodeHistoryOperationTypeInit on chain contract instantiation */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT = 1, - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE - ContractCodeHistoryOperationTypeMigrate code migration */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE = 2, - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS - ContractCodeHistoryOperationTypeGenesis based on genesis data */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS = 3, - UNRECOGNIZED = -1, -} - -export function contractCodeHistoryOperationTypeFromJSON( - object: any -): ContractCodeHistoryOperationType { - switch (object) { - case 0: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED; - case 1: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT; - case 2: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE; - case 3: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS; - case -1: - case "UNRECOGNIZED": - default: - return ContractCodeHistoryOperationType.UNRECOGNIZED; - } -} - -export function contractCodeHistoryOperationTypeToJSON( - object: ContractCodeHistoryOperationType -): string { - switch (object) { - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED"; - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT"; - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE"; - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS"; - default: - return "UNKNOWN"; - } -} - -/** AccessTypeParam */ -export interface AccessTypeParam { - value: AccessType; -} - -/** AccessConfig access control type. */ -export interface AccessConfig { - permission: AccessType; - address: string; -} - -/** Params defines the set of wasm parameters. */ -export interface Params { - code_upload_access: AccessConfig | undefined; - instantiate_default_permission: AccessType; -} - -/** CodeInfo is data for the uploaded contract WASM code */ -export interface CodeInfo { - /** CodeHash is the unique identifier created by wasmvm */ - code_hash: Uint8Array; - /** Creator address who initially stored the code */ - creator: string; - /** InstantiateConfig access control to apply on contract creation, optional */ - instantiate_config: AccessConfig | undefined; -} - -/** ContractInfo stores a WASM contract instance */ -export interface ContractInfo { - /** CodeID is the reference to the stored Wasm code */ - code_id: number; - /** Creator address who initially instantiated the contract */ - creator: string; - /** Admin is an optional address that can execute migrations */ - admin: string; - /** Label is optional metadata to be stored with a contract instance. */ - label: string; - /** - * Created Tx position when the contract was instantiated. - * This data should kept internal and not be exposed via query results. Just - * use for sorting - */ - created: AbsoluteTxPosition | undefined; - ibc_port_id: string; - /** - * Extension is an extension point to store custom metadata within the - * persistence model. - */ - extension: Any | undefined; -} - -/** ContractCodeHistoryEntry metadata to a contract. */ -export interface ContractCodeHistoryEntry { - operation: ContractCodeHistoryOperationType; - /** CodeID is the reference to the stored WASM code */ - code_id: number; - /** Updated Tx position when the operation was executed. */ - updated: AbsoluteTxPosition | undefined; - msg: Uint8Array; -} - -/** - * AbsoluteTxPosition is a unique transaction position that allows for global - * ordering of transactions. - */ -export interface AbsoluteTxPosition { - /** BlockHeight is the block the contract was created at */ - block_height: number; - /** - * TxIndex is a monotonic counter within the block (actual transaction index, - * or gas consumed) - */ - tx_index: number; -} - -/** Model is a struct that holds a KV pair */ -export interface Model { - /** hex-encode key to read it better (this is often ascii) */ - key: Uint8Array; - /** base64-encode raw value */ - value: Uint8Array; -} - -const baseAccessTypeParam: object = { value: 0 }; - -export const AccessTypeParam = { - encode(message: AccessTypeParam, writer: Writer = Writer.create()): Writer { - if (message.value !== 0) { - writer.uint32(8).int32(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): AccessTypeParam { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAccessTypeParam } as AccessTypeParam; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.value = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): AccessTypeParam { - const message = { ...baseAccessTypeParam } as AccessTypeParam; - if (object.value !== undefined && object.value !== null) { - message.value = accessTypeFromJSON(object.value); - } else { - message.value = 0; - } - return message; - }, - - toJSON(message: AccessTypeParam): unknown { - const obj: any = {}; - message.value !== undefined && - (obj.value = accessTypeToJSON(message.value)); - return obj; - }, - - fromPartial(object: DeepPartial): AccessTypeParam { - const message = { ...baseAccessTypeParam } as AccessTypeParam; - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = 0; - } - return message; - }, -}; - -const baseAccessConfig: object = { permission: 0, address: "" }; - -export const AccessConfig = { - encode(message: AccessConfig, writer: Writer = Writer.create()): Writer { - if (message.permission !== 0) { - writer.uint32(8).int32(message.permission); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): AccessConfig { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAccessConfig } as AccessConfig; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.permission = reader.int32() as any; - break; - case 2: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): AccessConfig { - const message = { ...baseAccessConfig } as AccessConfig; - if (object.permission !== undefined && object.permission !== null) { - message.permission = accessTypeFromJSON(object.permission); - } else { - message.permission = 0; - } - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - return message; - }, - - toJSON(message: AccessConfig): unknown { - const obj: any = {}; - message.permission !== undefined && - (obj.permission = accessTypeToJSON(message.permission)); - message.address !== undefined && (obj.address = message.address); - return obj; - }, - - fromPartial(object: DeepPartial): AccessConfig { - const message = { ...baseAccessConfig } as AccessConfig; - if (object.permission !== undefined && object.permission !== null) { - message.permission = object.permission; - } else { - message.permission = 0; - } - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - return message; - }, -}; - -const baseParams: object = { instantiate_default_permission: 0 }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.code_upload_access !== undefined) { - AccessConfig.encode( - message.code_upload_access, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.instantiate_default_permission !== 0) { - writer.uint32(16).int32(message.instantiate_default_permission); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code_upload_access = AccessConfig.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.instantiate_default_permission = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if ( - object.code_upload_access !== undefined && - object.code_upload_access !== null - ) { - message.code_upload_access = AccessConfig.fromJSON( - object.code_upload_access - ); - } else { - message.code_upload_access = undefined; - } - if ( - object.instantiate_default_permission !== undefined && - object.instantiate_default_permission !== null - ) { - message.instantiate_default_permission = accessTypeFromJSON( - object.instantiate_default_permission - ); - } else { - message.instantiate_default_permission = 0; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.code_upload_access !== undefined && - (obj.code_upload_access = message.code_upload_access - ? AccessConfig.toJSON(message.code_upload_access) - : undefined); - message.instantiate_default_permission !== undefined && - (obj.instantiate_default_permission = accessTypeToJSON( - message.instantiate_default_permission - )); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if ( - object.code_upload_access !== undefined && - object.code_upload_access !== null - ) { - message.code_upload_access = AccessConfig.fromPartial( - object.code_upload_access - ); - } else { - message.code_upload_access = undefined; - } - if ( - object.instantiate_default_permission !== undefined && - object.instantiate_default_permission !== null - ) { - message.instantiate_default_permission = - object.instantiate_default_permission; - } else { - message.instantiate_default_permission = 0; - } - return message; - }, -}; - -const baseCodeInfo: object = { creator: "" }; - -export const CodeInfo = { - encode(message: CodeInfo, writer: Writer = Writer.create()): Writer { - if (message.code_hash.length !== 0) { - writer.uint32(10).bytes(message.code_hash); - } - if (message.creator !== "") { - writer.uint32(18).string(message.creator); - } - if (message.instantiate_config !== undefined) { - AccessConfig.encode( - message.instantiate_config, - writer.uint32(42).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCodeInfo } as CodeInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code_hash = reader.bytes(); - break; - case 2: - message.creator = reader.string(); - break; - case 5: - message.instantiate_config = AccessConfig.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CodeInfo { - const message = { ...baseCodeInfo } as CodeInfo; - if (object.code_hash !== undefined && object.code_hash !== null) { - message.code_hash = bytesFromBase64(object.code_hash); - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } else { - message.creator = ""; - } - if ( - object.instantiate_config !== undefined && - object.instantiate_config !== null - ) { - message.instantiate_config = AccessConfig.fromJSON( - object.instantiate_config - ); - } else { - message.instantiate_config = undefined; - } - return message; - }, - - toJSON(message: CodeInfo): unknown { - const obj: any = {}; - message.code_hash !== undefined && - (obj.code_hash = base64FromBytes( - message.code_hash !== undefined ? message.code_hash : new Uint8Array() - )); - message.creator !== undefined && (obj.creator = message.creator); - message.instantiate_config !== undefined && - (obj.instantiate_config = message.instantiate_config - ? AccessConfig.toJSON(message.instantiate_config) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): CodeInfo { - const message = { ...baseCodeInfo } as CodeInfo; - if (object.code_hash !== undefined && object.code_hash !== null) { - message.code_hash = object.code_hash; - } else { - message.code_hash = new Uint8Array(); - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } else { - message.creator = ""; - } - if ( - object.instantiate_config !== undefined && - object.instantiate_config !== null - ) { - message.instantiate_config = AccessConfig.fromPartial( - object.instantiate_config - ); - } else { - message.instantiate_config = undefined; - } - return message; - }, -}; - -const baseContractInfo: object = { - code_id: 0, - creator: "", - admin: "", - label: "", - ibc_port_id: "", -}; - -export const ContractInfo = { - encode(message: ContractInfo, writer: Writer = Writer.create()): Writer { - if (message.code_id !== 0) { - writer.uint32(8).uint64(message.code_id); - } - if (message.creator !== "") { - writer.uint32(18).string(message.creator); - } - if (message.admin !== "") { - writer.uint32(26).string(message.admin); - } - if (message.label !== "") { - writer.uint32(34).string(message.label); - } - if (message.created !== undefined) { - AbsoluteTxPosition.encode( - message.created, - writer.uint32(42).fork() - ).ldelim(); - } - if (message.ibc_port_id !== "") { - writer.uint32(50).string(message.ibc_port_id); - } - if (message.extension !== undefined) { - Any.encode(message.extension, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ContractInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseContractInfo } as ContractInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.creator = reader.string(); - break; - case 3: - message.admin = reader.string(); - break; - case 4: - message.label = reader.string(); - break; - case 5: - message.created = AbsoluteTxPosition.decode(reader, reader.uint32()); - break; - case 6: - message.ibc_port_id = reader.string(); - break; - case 7: - message.extension = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ContractInfo { - const message = { ...baseContractInfo } as ContractInfo; - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = Number(object.code_id); - } else { - message.code_id = 0; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } else { - message.creator = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = String(object.admin); - } else { - message.admin = ""; - } - if (object.label !== undefined && object.label !== null) { - message.label = String(object.label); - } else { - message.label = ""; - } - if (object.created !== undefined && object.created !== null) { - message.created = AbsoluteTxPosition.fromJSON(object.created); - } else { - message.created = undefined; - } - if (object.ibc_port_id !== undefined && object.ibc_port_id !== null) { - message.ibc_port_id = String(object.ibc_port_id); - } else { - message.ibc_port_id = ""; - } - if (object.extension !== undefined && object.extension !== null) { - message.extension = Any.fromJSON(object.extension); - } else { - message.extension = undefined; - } - return message; - }, - - toJSON(message: ContractInfo): unknown { - const obj: any = {}; - message.code_id !== undefined && (obj.code_id = message.code_id); - message.creator !== undefined && (obj.creator = message.creator); - message.admin !== undefined && (obj.admin = message.admin); - message.label !== undefined && (obj.label = message.label); - message.created !== undefined && - (obj.created = message.created - ? AbsoluteTxPosition.toJSON(message.created) - : undefined); - message.ibc_port_id !== undefined && - (obj.ibc_port_id = message.ibc_port_id); - message.extension !== undefined && - (obj.extension = message.extension - ? Any.toJSON(message.extension) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ContractInfo { - const message = { ...baseContractInfo } as ContractInfo; - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = object.code_id; - } else { - message.code_id = 0; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } else { - message.creator = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = object.admin; - } else { - message.admin = ""; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = ""; - } - if (object.created !== undefined && object.created !== null) { - message.created = AbsoluteTxPosition.fromPartial(object.created); - } else { - message.created = undefined; - } - if (object.ibc_port_id !== undefined && object.ibc_port_id !== null) { - message.ibc_port_id = object.ibc_port_id; - } else { - message.ibc_port_id = ""; - } - if (object.extension !== undefined && object.extension !== null) { - message.extension = Any.fromPartial(object.extension); - } else { - message.extension = undefined; - } - return message; - }, -}; - -const baseContractCodeHistoryEntry: object = { operation: 0, code_id: 0 }; - -export const ContractCodeHistoryEntry = { - encode( - message: ContractCodeHistoryEntry, - writer: Writer = Writer.create() - ): Writer { - if (message.operation !== 0) { - writer.uint32(8).int32(message.operation); - } - if (message.code_id !== 0) { - writer.uint32(16).uint64(message.code_id); - } - if (message.updated !== undefined) { - AbsoluteTxPosition.encode( - message.updated, - writer.uint32(26).fork() - ).ldelim(); - } - if (message.msg.length !== 0) { - writer.uint32(34).bytes(message.msg); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ContractCodeHistoryEntry { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseContractCodeHistoryEntry, - } as ContractCodeHistoryEntry; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.operation = reader.int32() as any; - break; - case 2: - message.code_id = longToNumber(reader.uint64() as Long); - break; - case 3: - message.updated = AbsoluteTxPosition.decode(reader, reader.uint32()); - break; - case 4: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ContractCodeHistoryEntry { - const message = { - ...baseContractCodeHistoryEntry, - } as ContractCodeHistoryEntry; - if (object.operation !== undefined && object.operation !== null) { - message.operation = contractCodeHistoryOperationTypeFromJSON( - object.operation - ); - } else { - message.operation = 0; - } - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = Number(object.code_id); - } else { - message.code_id = 0; - } - if (object.updated !== undefined && object.updated !== null) { - message.updated = AbsoluteTxPosition.fromJSON(object.updated); - } else { - message.updated = undefined; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - return message; - }, - - toJSON(message: ContractCodeHistoryEntry): unknown { - const obj: any = {}; - message.operation !== undefined && - (obj.operation = contractCodeHistoryOperationTypeToJSON( - message.operation - )); - message.code_id !== undefined && (obj.code_id = message.code_id); - message.updated !== undefined && - (obj.updated = message.updated - ? AbsoluteTxPosition.toJSON(message.updated) - : undefined); - message.msg !== undefined && - (obj.msg = base64FromBytes( - message.msg !== undefined ? message.msg : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ContractCodeHistoryEntry { - const message = { - ...baseContractCodeHistoryEntry, - } as ContractCodeHistoryEntry; - if (object.operation !== undefined && object.operation !== null) { - message.operation = object.operation; - } else { - message.operation = 0; - } - if (object.code_id !== undefined && object.code_id !== null) { - message.code_id = object.code_id; - } else { - message.code_id = 0; - } - if (object.updated !== undefined && object.updated !== null) { - message.updated = AbsoluteTxPosition.fromPartial(object.updated); - } else { - message.updated = undefined; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } else { - message.msg = new Uint8Array(); - } - return message; - }, -}; - -const baseAbsoluteTxPosition: object = { block_height: 0, tx_index: 0 }; - -export const AbsoluteTxPosition = { - encode( - message: AbsoluteTxPosition, - writer: Writer = Writer.create() - ): Writer { - if (message.block_height !== 0) { - writer.uint32(8).uint64(message.block_height); - } - if (message.tx_index !== 0) { - writer.uint32(16).uint64(message.tx_index); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): AbsoluteTxPosition { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAbsoluteTxPosition } as AbsoluteTxPosition; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_height = longToNumber(reader.uint64() as Long); - break; - case 2: - message.tx_index = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): AbsoluteTxPosition { - const message = { ...baseAbsoluteTxPosition } as AbsoluteTxPosition; - if (object.block_height !== undefined && object.block_height !== null) { - message.block_height = Number(object.block_height); - } else { - message.block_height = 0; - } - if (object.tx_index !== undefined && object.tx_index !== null) { - message.tx_index = Number(object.tx_index); - } else { - message.tx_index = 0; - } - return message; - }, - - toJSON(message: AbsoluteTxPosition): unknown { - const obj: any = {}; - message.block_height !== undefined && - (obj.block_height = message.block_height); - message.tx_index !== undefined && (obj.tx_index = message.tx_index); - return obj; - }, - - fromPartial(object: DeepPartial): AbsoluteTxPosition { - const message = { ...baseAbsoluteTxPosition } as AbsoluteTxPosition; - if (object.block_height !== undefined && object.block_height !== null) { - message.block_height = object.block_height; - } else { - message.block_height = 0; - } - if (object.tx_index !== undefined && object.tx_index !== null) { - message.tx_index = object.tx_index; - } else { - message.tx_index = 0; - } - return message; - }, -}; - -const baseModel: object = {}; - -export const Model = { - encode(message: Model, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Model { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseModel } as Model; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Model { - const message = { ...baseModel } as Model; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Model): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Model { - const message = { ...baseModel } as Model; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30bdc6..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/gogoproto/gogo.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0776..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/annotations.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/annotations.js deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/annotations.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/http.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7fb6d..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/http.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b699..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/http.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index bb088caa2a..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/any.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809039..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/any.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/any.ts deleted file mode 100644 index 233eae465d..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - type_url: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { type_url: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.type_url !== "") { - writer.uint32(10).string(message.type_url); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = String(object.type_url); - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.type_url !== undefined && (obj.type_url = message.type_url); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = object.type_url; - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index a3076569af..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,1022 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 252725808b..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4144 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } - else { - message.proto3Optional = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } - else { - message.proto3Optional = false; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/package.json b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/package.json deleted file mode 100755 index e2fb21f774..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmwasm-wasm-v1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmwasm.wasm.v1", - "author": "Starport Codegen ", - "homepage": "http://github.com/CosmWasm/wasmd/x/wasm/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/vuex-root b/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/CosmWasm/wasmd/cosmwasm.wasm.v1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/index.ts deleted file mode 100755 index a879a2de3f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/index.ts +++ /dev/null @@ -1,207 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { BaseAccount } from "./module/types/cosmos/auth/v1beta1/auth" -import { ModuleAccount } from "./module/types/cosmos/auth/v1beta1/auth" -import { Params } from "./module/types/cosmos/auth/v1beta1/auth" - - -export { BaseAccount, ModuleAccount, Params }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Accounts: {}, - Account: {}, - Params: {}, - - _Structure: { - BaseAccount: getStructure(BaseAccount.fromPartial({})), - ModuleAccount: getStructure(ModuleAccount.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getAccounts: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Accounts[JSON.stringify(params)] ?? {} - }, - getAccount: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Account[JSON.stringify(params)] ?? {} - }, - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.auth.v1beta1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryAccounts({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryAccounts(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryAccounts({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Accounts', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAccounts', payload: { options: { all }, params: {...key},query }}) - return getters['getAccounts']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryAccounts API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryAccount({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryAccount( key.address)).data - - - commit('QUERY', { query: 'Account', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAccount', payload: { options: { all }, params: {...key},query }}) - return getters['getAccount']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryAccount API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams()).data - - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/index.ts deleted file mode 100755 index 67d4b093f0..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; - - -const types = [ - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/rest.ts deleted file mode 100644 index 95a734fdde..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/rest.ts +++ /dev/null @@ -1,500 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - 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; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -/** - * Params defines the parameters for the auth module. - */ -export interface V1Beta1Params { - /** @format uint64 */ - max_memo_characters?: string; - - /** @format uint64 */ - tx_sig_limit?: string; - - /** @format uint64 */ - tx_size_cost_per_byte?: string; - - /** @format uint64 */ - sig_verify_cost_ed25519?: string; - - /** @format uint64 */ - sig_verify_cost_secp256k1?: string; -} - -/** - * QueryAccountResponse is the response type for the Query/Account RPC method. - */ -export interface V1Beta1QueryAccountResponse { - /** account defines the account of the corresponding address. */ - account?: ProtobufAny; -} - -/** -* QueryAccountsResponse is the response type for the Query/Accounts RPC method. - -Since: cosmos-sdk 0.43 -*/ -export interface V1Beta1QueryAccountsResponse { - accounts?: ProtobufAny[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1Beta1QueryParamsResponse { - /** params defines the parameters of the module. */ - params?: V1Beta1Params; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/auth/v1beta1/auth.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * @description Since: cosmos-sdk 0.43 - * - * @tags Query - * @name QueryAccounts - * @summary Accounts returns all the existing accounts - * @request GET:/cosmos/auth/v1beta1/accounts - */ - queryAccounts = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/auth/v1beta1/accounts`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryAccount - * @summary Account returns account details based on address. - * @request GET:/cosmos/auth/v1beta1/accounts/{address} - */ - queryAccount = (address: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/auth/v1beta1/accounts/${address}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters. - * @request GET:/cosmos/auth/v1beta1/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/auth/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/auth/v1beta1/auth.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/auth/v1beta1/auth.ts deleted file mode 100644 index c7448a2592..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/auth/v1beta1/auth.ts +++ /dev/null @@ -1,441 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; - -export const protobufPackage = "cosmos.auth.v1beta1"; - -/** - * BaseAccount defines a base account type. It contains all the necessary fields - * for basic account functionality. Any custom account type should extend this - * type for additional functionality (e.g. vesting). - */ -export interface BaseAccount { - address: string; - pub_key: Any | undefined; - account_number: number; - sequence: number; -} - -/** ModuleAccount defines an account for modules that holds coins on a pool. */ -export interface ModuleAccount { - base_account: BaseAccount | undefined; - name: string; - permissions: string[]; -} - -/** Params defines the parameters for the auth module. */ -export interface Params { - max_memo_characters: number; - tx_sig_limit: number; - tx_size_cost_per_byte: number; - sig_verify_cost_ed25519: number; - sig_verify_cost_secp256k1: number; -} - -const baseBaseAccount: object = { address: "", account_number: 0, sequence: 0 }; - -export const BaseAccount = { - encode(message: BaseAccount, writer: Writer = Writer.create()): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pub_key !== undefined) { - Any.encode(message.pub_key, writer.uint32(18).fork()).ldelim(); - } - if (message.account_number !== 0) { - writer.uint32(24).uint64(message.account_number); - } - if (message.sequence !== 0) { - writer.uint32(32).uint64(message.sequence); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BaseAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBaseAccount } as BaseAccount; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pub_key = Any.decode(reader, reader.uint32()); - break; - case 3: - message.account_number = longToNumber(reader.uint64() as Long); - break; - case 4: - message.sequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BaseAccount { - const message = { ...baseBaseAccount } as BaseAccount; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = Any.fromJSON(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.account_number !== undefined && object.account_number !== null) { - message.account_number = Number(object.account_number); - } else { - message.account_number = 0; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - return message; - }, - - toJSON(message: BaseAccount): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pub_key !== undefined && - (obj.pub_key = message.pub_key ? Any.toJSON(message.pub_key) : undefined); - message.account_number !== undefined && - (obj.account_number = message.account_number); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - - fromPartial(object: DeepPartial): BaseAccount { - const message = { ...baseBaseAccount } as BaseAccount; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = Any.fromPartial(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.account_number !== undefined && object.account_number !== null) { - message.account_number = object.account_number; - } else { - message.account_number = 0; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - return message; - }, -}; - -const baseModuleAccount: object = { name: "", permissions: "" }; - -export const ModuleAccount = { - encode(message: ModuleAccount, writer: Writer = Writer.create()): Writer { - if (message.base_account !== undefined) { - BaseAccount.encode( - message.base_account, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - for (const v of message.permissions) { - writer.uint32(26).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ModuleAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseModuleAccount } as ModuleAccount; - message.permissions = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.base_account = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.permissions.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ModuleAccount { - const message = { ...baseModuleAccount } as ModuleAccount; - message.permissions = []; - if (object.base_account !== undefined && object.base_account !== null) { - message.base_account = BaseAccount.fromJSON(object.base_account); - } else { - message.base_account = undefined; - } - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.permissions !== undefined && object.permissions !== null) { - for (const e of object.permissions) { - message.permissions.push(String(e)); - } - } - return message; - }, - - toJSON(message: ModuleAccount): unknown { - const obj: any = {}; - message.base_account !== undefined && - (obj.base_account = message.base_account - ? BaseAccount.toJSON(message.base_account) - : undefined); - message.name !== undefined && (obj.name = message.name); - if (message.permissions) { - obj.permissions = message.permissions.map((e) => e); - } else { - obj.permissions = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ModuleAccount { - const message = { ...baseModuleAccount } as ModuleAccount; - message.permissions = []; - if (object.base_account !== undefined && object.base_account !== null) { - message.base_account = BaseAccount.fromPartial(object.base_account); - } else { - message.base_account = undefined; - } - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.permissions !== undefined && object.permissions !== null) { - for (const e of object.permissions) { - message.permissions.push(e); - } - } - return message; - }, -}; - -const baseParams: object = { - max_memo_characters: 0, - tx_sig_limit: 0, - tx_size_cost_per_byte: 0, - sig_verify_cost_ed25519: 0, - sig_verify_cost_secp256k1: 0, -}; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.max_memo_characters !== 0) { - writer.uint32(8).uint64(message.max_memo_characters); - } - if (message.tx_sig_limit !== 0) { - writer.uint32(16).uint64(message.tx_sig_limit); - } - if (message.tx_size_cost_per_byte !== 0) { - writer.uint32(24).uint64(message.tx_size_cost_per_byte); - } - if (message.sig_verify_cost_ed25519 !== 0) { - writer.uint32(32).uint64(message.sig_verify_cost_ed25519); - } - if (message.sig_verify_cost_secp256k1 !== 0) { - writer.uint32(40).uint64(message.sig_verify_cost_secp256k1); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_memo_characters = longToNumber(reader.uint64() as Long); - break; - case 2: - message.tx_sig_limit = longToNumber(reader.uint64() as Long); - break; - case 3: - message.tx_size_cost_per_byte = longToNumber(reader.uint64() as Long); - break; - case 4: - message.sig_verify_cost_ed25519 = longToNumber( - reader.uint64() as Long - ); - break; - case 5: - message.sig_verify_cost_secp256k1 = longToNumber( - reader.uint64() as Long - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if ( - object.max_memo_characters !== undefined && - object.max_memo_characters !== null - ) { - message.max_memo_characters = Number(object.max_memo_characters); - } else { - message.max_memo_characters = 0; - } - if (object.tx_sig_limit !== undefined && object.tx_sig_limit !== null) { - message.tx_sig_limit = Number(object.tx_sig_limit); - } else { - message.tx_sig_limit = 0; - } - if ( - object.tx_size_cost_per_byte !== undefined && - object.tx_size_cost_per_byte !== null - ) { - message.tx_size_cost_per_byte = Number(object.tx_size_cost_per_byte); - } else { - message.tx_size_cost_per_byte = 0; - } - if ( - object.sig_verify_cost_ed25519 !== undefined && - object.sig_verify_cost_ed25519 !== null - ) { - message.sig_verify_cost_ed25519 = Number(object.sig_verify_cost_ed25519); - } else { - message.sig_verify_cost_ed25519 = 0; - } - if ( - object.sig_verify_cost_secp256k1 !== undefined && - object.sig_verify_cost_secp256k1 !== null - ) { - message.sig_verify_cost_secp256k1 = Number( - object.sig_verify_cost_secp256k1 - ); - } else { - message.sig_verify_cost_secp256k1 = 0; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.max_memo_characters !== undefined && - (obj.max_memo_characters = message.max_memo_characters); - message.tx_sig_limit !== undefined && - (obj.tx_sig_limit = message.tx_sig_limit); - message.tx_size_cost_per_byte !== undefined && - (obj.tx_size_cost_per_byte = message.tx_size_cost_per_byte); - message.sig_verify_cost_ed25519 !== undefined && - (obj.sig_verify_cost_ed25519 = message.sig_verify_cost_ed25519); - message.sig_verify_cost_secp256k1 !== undefined && - (obj.sig_verify_cost_secp256k1 = message.sig_verify_cost_secp256k1); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if ( - object.max_memo_characters !== undefined && - object.max_memo_characters !== null - ) { - message.max_memo_characters = object.max_memo_characters; - } else { - message.max_memo_characters = 0; - } - if (object.tx_sig_limit !== undefined && object.tx_sig_limit !== null) { - message.tx_sig_limit = object.tx_sig_limit; - } else { - message.tx_sig_limit = 0; - } - if ( - object.tx_size_cost_per_byte !== undefined && - object.tx_size_cost_per_byte !== null - ) { - message.tx_size_cost_per_byte = object.tx_size_cost_per_byte; - } else { - message.tx_size_cost_per_byte = 0; - } - if ( - object.sig_verify_cost_ed25519 !== undefined && - object.sig_verify_cost_ed25519 !== null - ) { - message.sig_verify_cost_ed25519 = object.sig_verify_cost_ed25519; - } else { - message.sig_verify_cost_ed25519 = 0; - } - if ( - object.sig_verify_cost_secp256k1 !== undefined && - object.sig_verify_cost_secp256k1 !== null - ) { - message.sig_verify_cost_secp256k1 = object.sig_verify_cost_secp256k1; - } else { - message.sig_verify_cost_secp256k1 = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/auth/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/auth/v1beta1/genesis.ts deleted file mode 100644 index f4571bfd86..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/auth/v1beta1/genesis.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* eslint-disable */ -import { Params } from "../../../cosmos/auth/v1beta1/auth"; -import { Any } from "../../../google/protobuf/any"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.auth.v1beta1"; - -/** GenesisState defines the auth module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of the module. */ - params: Params | undefined; - /** accounts are the accounts present at genesis. */ - accounts: Any[]; -} - -const baseGenesisState: object = {}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.accounts) { - Any.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.accounts = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.accounts.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.accounts = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if (object.accounts !== undefined && object.accounts !== null) { - for (const e of object.accounts) { - message.accounts.push(Any.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.accounts) { - obj.accounts = message.accounts.map((e) => - e ? Any.toJSON(e) : undefined - ); - } else { - obj.accounts = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.accounts = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if (object.accounts !== undefined && object.accounts !== null) { - for (const e of object.accounts) { - message.accounts.push(Any.fromPartial(e)); - } - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/auth/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/auth/v1beta1/query.ts deleted file mode 100644 index dd00e2007e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/auth/v1beta1/query.ts +++ /dev/null @@ -1,493 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; -import { Any } from "../../../google/protobuf/any"; -import { Params } from "../../../cosmos/auth/v1beta1/auth"; - -export const protobufPackage = "cosmos.auth.v1beta1"; - -/** - * QueryAccountsRequest is the request type for the Query/Accounts RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryAccountsRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryAccountsResponse is the response type for the Query/Accounts RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryAccountsResponse { - /** accounts are the existing accounts */ - accounts: Any[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryAccountRequest is the request type for the Query/Account RPC method. */ -export interface QueryAccountRequest { - /** address defines the address to query for. */ - address: string; -} - -/** QueryAccountResponse is the response type for the Query/Account RPC method. */ -export interface QueryAccountResponse { - /** account defines the account of the corresponding address. */ - account: Any | undefined; -} - -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} - -const baseQueryAccountsRequest: object = {}; - -export const QueryAccountsRequest = { - encode( - message: QueryAccountsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryAccountsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAccountsRequest } as QueryAccountsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAccountsRequest { - const message = { ...baseQueryAccountsRequest } as QueryAccountsRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAccountsRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryAccountsRequest { - const message = { ...baseQueryAccountsRequest } as QueryAccountsRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryAccountsResponse: object = {}; - -export const QueryAccountsResponse = { - encode( - message: QueryAccountsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.accounts) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryAccountsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAccountsResponse } as QueryAccountsResponse; - message.accounts = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.accounts.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAccountsResponse { - const message = { ...baseQueryAccountsResponse } as QueryAccountsResponse; - message.accounts = []; - if (object.accounts !== undefined && object.accounts !== null) { - for (const e of object.accounts) { - message.accounts.push(Any.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAccountsResponse): unknown { - const obj: any = {}; - if (message.accounts) { - obj.accounts = message.accounts.map((e) => - e ? Any.toJSON(e) : undefined - ); - } else { - obj.accounts = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAccountsResponse { - const message = { ...baseQueryAccountsResponse } as QueryAccountsResponse; - message.accounts = []; - if (object.accounts !== undefined && object.accounts !== null) { - for (const e of object.accounts) { - message.accounts.push(Any.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryAccountRequest: object = { address: "" }; - -export const QueryAccountRequest = { - encode( - message: QueryAccountRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryAccountRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAccountRequest } as QueryAccountRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAccountRequest { - const message = { ...baseQueryAccountRequest } as QueryAccountRequest; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - return message; - }, - - toJSON(message: QueryAccountRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - return obj; - }, - - fromPartial(object: DeepPartial): QueryAccountRequest { - const message = { ...baseQueryAccountRequest } as QueryAccountRequest; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - return message; - }, -}; - -const baseQueryAccountResponse: object = {}; - -export const QueryAccountResponse = { - encode( - message: QueryAccountResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.account !== undefined) { - Any.encode(message.account, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryAccountResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAccountResponse } as QueryAccountResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAccountResponse { - const message = { ...baseQueryAccountResponse } as QueryAccountResponse; - if (object.account !== undefined && object.account !== null) { - message.account = Any.fromJSON(object.account); - } else { - message.account = undefined; - } - return message; - }, - - toJSON(message: QueryAccountResponse): unknown { - const obj: any = {}; - message.account !== undefined && - (obj.account = message.account ? Any.toJSON(message.account) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryAccountResponse { - const message = { ...baseQueryAccountResponse } as QueryAccountResponse; - if (object.account !== undefined && object.account !== null) { - message.account = Any.fromPartial(object.account); - } else { - message.account = undefined; - } - return message; - }, -}; - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -/** Query defines the gRPC querier service. */ -export interface Query { - /** - * Accounts returns all the existing accounts - * - * Since: cosmos-sdk 0.43 - */ - Accounts(request: QueryAccountsRequest): Promise; - /** Account returns account details based on address. */ - Account(request: QueryAccountRequest): Promise; - /** Params queries all parameters. */ - Params(request: QueryParamsRequest): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Accounts(request: QueryAccountsRequest): Promise { - const data = QueryAccountsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.auth.v1beta1.Query", - "Accounts", - data - ); - return promise.then((data) => - QueryAccountsResponse.decode(new Reader(data)) - ); - } - - Account(request: QueryAccountRequest): Promise { - const data = QueryAccountRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.auth.v1beta1.Query", - "Account", - data - ); - return promise.then((data) => - QueryAccountResponse.decode(new Reader(data)) - ); - } - - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.auth.v1beta1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 9c87ac0c9c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - 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; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { - offset: 0, - limit: 0, - count_total: false, - reverse: false, -}; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } else { - message.reverse = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - 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; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } else { - message.reverse = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/protobuf/any.ts deleted file mode 100644 index 233eae465d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - type_url: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { type_url: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.type_url !== "") { - writer.uint32(10).string(message.type_url); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = String(object.type_url); - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.type_url !== undefined && (obj.type_url = message.type_url); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = object.type_url; - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/package.json b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/package.json deleted file mode 100755 index fcd5e39e97..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmos-auth-v1beta1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmos.auth.v1beta1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/cosmos-sdk/x/auth/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.auth.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/index.d.ts deleted file mode 100644 index 8153a92b96..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { GenericAuthorization } from "./module/types/cosmos/authz/v1beta1/authz"; -import { Grant } from "./module/types/cosmos/authz/v1beta1/authz"; -import { GrantAuthorization } from "./module/types/cosmos/authz/v1beta1/authz"; -import { EventGrant } from "./module/types/cosmos/authz/v1beta1/event"; -import { EventRevoke } from "./module/types/cosmos/authz/v1beta1/event"; -export { GenericAuthorization, Grant, GrantAuthorization, EventGrant, EventRevoke }; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/index.js deleted file mode 100644 index b3dfd1d08e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/index.js +++ /dev/null @@ -1,279 +0,0 @@ -import { txClient, queryClient, MissingWalletError, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { GenericAuthorization } from "./module/types/cosmos/authz/v1beta1/authz"; -import { Grant } from "./module/types/cosmos/authz/v1beta1/authz"; -import { GrantAuthorization } from "./module/types/cosmos/authz/v1beta1/authz"; -import { EventGrant } from "./module/types/cosmos/authz/v1beta1/event"; -import { EventRevoke } from "./module/types/cosmos/authz/v1beta1/event"; -export { GenericAuthorization, Grant, GrantAuthorization, EventGrant, EventRevoke }; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Grants: {}, - GranterGrants: {}, - GranteeGrants: {}, - _Structure: { - GenericAuthorization: getStructure(GenericAuthorization.fromPartial({})), - Grant: getStructure(Grant.fromPartial({})), - GrantAuthorization: getStructure(GrantAuthorization.fromPartial({})), - EventGrant: getStructure(EventGrant.fromPartial({})), - EventRevoke: getStructure(EventRevoke.fromPartial({})), - }, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getGrants: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Grants[JSON.stringify(params)] ?? {}; - }, - getGranterGrants: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.GranterGrants[JSON.stringify(params)] ?? {}; - }, - getGranteeGrants: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.GranteeGrants[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.authz.v1beta1 initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - async QueryGrants({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryGrants(query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryGrants({ ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Grants', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryGrants', payload: { options: { all }, params: { ...key }, query } }); - return getters['getGrants']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryGrants', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryGranterGrants({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryGranterGrants(key.granter, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryGranterGrants(key.granter, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'GranterGrants', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryGranterGrants', payload: { options: { all }, params: { ...key }, query } }); - return getters['getGranterGrants']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryGranterGrants', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryGranteeGrants({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryGranteeGrants(key.grantee, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryGranteeGrants(key.grantee, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'GranteeGrants', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryGranteeGrants', payload: { options: { all }, params: { ...key }, query } }); - return getters['getGranteeGrants']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryGranteeGrants', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async sendMsgGrant({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgGrant(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgGrant:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgGrant:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgExec({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgExec(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgExec:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgExec:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgRevoke({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgRevoke(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgRevoke:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgRevoke:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async MsgGrant({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgGrant(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgGrant:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgGrant:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgExec({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgExec(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgExec:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgExec:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgRevoke({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgRevoke(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgRevoke:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgRevoke:Create', 'Could not create message: ' + e.message); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/index.ts deleted file mode 100755 index e86404aa89..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/index.ts +++ /dev/null @@ -1,308 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { GenericAuthorization } from "./module/types/cosmos/authz/v1beta1/authz" -import { Grant } from "./module/types/cosmos/authz/v1beta1/authz" -import { GrantAuthorization } from "./module/types/cosmos/authz/v1beta1/authz" -import { EventGrant } from "./module/types/cosmos/authz/v1beta1/event" -import { EventRevoke } from "./module/types/cosmos/authz/v1beta1/event" - - -export { GenericAuthorization, Grant, GrantAuthorization, EventGrant, EventRevoke }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Grants: {}, - GranterGrants: {}, - GranteeGrants: {}, - - _Structure: { - GenericAuthorization: getStructure(GenericAuthorization.fromPartial({})), - Grant: getStructure(Grant.fromPartial({})), - GrantAuthorization: getStructure(GrantAuthorization.fromPartial({})), - EventGrant: getStructure(EventGrant.fromPartial({})), - EventRevoke: getStructure(EventRevoke.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getGrants: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Grants[JSON.stringify(params)] ?? {} - }, - getGranterGrants: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GranterGrants[JSON.stringify(params)] ?? {} - }, - getGranteeGrants: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GranteeGrants[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.authz.v1beta1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new SpVuexError('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryGrants({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryGrants(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryGrants({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Grants', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryGrants', payload: { options: { all }, params: {...key},query }}) - return getters['getGrants']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new SpVuexError('QueryClient:QueryGrants', 'API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryGranterGrants({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryGranterGrants( key.granter, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryGranterGrants( key.granter, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'GranterGrants', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryGranterGrants', payload: { options: { all }, params: {...key},query }}) - return getters['getGranterGrants']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new SpVuexError('QueryClient:QueryGranterGrants', 'API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryGranteeGrants({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryGranteeGrants( key.grantee, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryGranteeGrants( key.grantee, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'GranteeGrants', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryGranteeGrants', payload: { options: { all }, params: {...key},query }}) - return getters['getGranteeGrants']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new SpVuexError('QueryClient:QueryGranteeGrants', 'API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - async sendMsgGrant({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgGrant(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgGrant:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgGrant:Send', 'Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgExec({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgExec(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgExec:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgExec:Send', 'Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgRevoke({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgRevoke(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgRevoke:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgRevoke:Send', 'Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgGrant({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgGrant(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgGrant:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgGrant:Create', 'Could not create message: ' + e.message) - - } - } - }, - async MsgExec({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgExec(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgExec:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgExec:Create', 'Could not create message: ' + e.message) - - } - } - }, - async MsgRevoke({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgRevoke(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgRevoke:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgRevoke:Create', 'Could not create message: ' + e.message) - - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/index.d.ts deleted file mode 100644 index a8a382c5cc..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/index.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx"; -import { MsgExec } from "./types/cosmos/authz/v1beta1/tx"; -import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; - msgGrant: (data: MsgGrant) => EncodeObject; - msgExec: (data: MsgExec) => EncodeObject; - msgRevoke: (data: MsgRevoke) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/index.js deleted file mode 100644 index 69e317ea22..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/index.js +++ /dev/null @@ -1,40 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx"; -import { MsgExec } from "./types/cosmos/authz/v1beta1/tx"; -import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx"; -const types = [ - ["/cosmos.authz.v1beta1.MsgGrant", MsgGrant], - ["/cosmos.authz.v1beta1.MsgExec", MsgExec], - ["/cosmos.authz.v1beta1.MsgRevoke", MsgRevoke], -]; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - msgGrant: (data) => ({ typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.fromPartial(data) }), - msgExec: (data) => ({ typeUrl: "/cosmos.authz.v1beta1.MsgExec", value: MsgExec.fromPartial(data) }), - msgRevoke: (data) => ({ typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", value: MsgRevoke.fromPartial(data) }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/index.ts deleted file mode 100755 index a4616e045d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/index.ts +++ /dev/null @@ -1,66 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx"; -import { MsgExec } from "./types/cosmos/authz/v1beta1/tx"; -import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx"; - - -const types = [ - ["/cosmos.authz.v1beta1.MsgGrant", MsgGrant], - ["/cosmos.authz.v1beta1.MsgExec", MsgExec], - ["/cosmos.authz.v1beta1.MsgRevoke", MsgRevoke], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgGrant: (data: MsgGrant): EncodeObject => ({ typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.fromPartial( data ) }), - msgExec: (data: MsgExec): EncodeObject => ({ typeUrl: "/cosmos.authz.v1beta1.MsgExec", value: MsgExec.fromPartial( data ) }), - msgRevoke: (data: MsgRevoke): EncodeObject => ({ typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", value: MsgRevoke.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/rest.d.ts deleted file mode 100644 index 6e626f3c1d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,514 +0,0 @@ -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* Grant gives permissions to execute -the provide method with expiration time. -*/ -export interface V1Beta1Grant { - /** - * `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" - * } - */ - authorization?: ProtobufAny; - /** @format date-time */ - expiration?: string; -} -/** - * Since: cosmos-sdk 0.45.2 - */ -export interface V1Beta1GrantAuthorization { - granter?: string; - grantee?: string; - /** - * `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" - * } - */ - authorization?: ProtobufAny; - /** @format date-time */ - expiration?: string; -} -/** - * MsgExecResponse defines the Msg/MsgExecResponse response type. - */ -export interface V1Beta1MsgExecResponse { - results?: string[]; -} -/** - * MsgGrantResponse defines the Msg/MsgGrant response type. - */ -export declare type V1Beta1MsgGrantResponse = object; -/** - * MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. - */ -export declare type V1Beta1MsgRevokeResponse = object; -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - /** - * 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. - * @format uint64 - */ - offset?: string; - /** - * 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. - * @format uint64 - */ - limit?: string; - /** - * 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. - */ - countTotal?: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse?: boolean; -} -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -/** - * QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. - */ -export interface V1Beta1QueryGranteeGrantsResponse { - /** grants is a list of grants granted to the grantee. */ - grants?: V1Beta1GrantAuthorization[]; - /** pagination defines an pagination for the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. - */ -export interface V1Beta1QueryGranterGrantsResponse { - /** grants is a list of grants granted by the granter. */ - grants?: V1Beta1GrantAuthorization[]; - /** pagination defines an pagination for the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * QueryGrantsResponse is the response type for the Query/Authorizations RPC method. - */ -export interface V1Beta1QueryGrantsResponse { - /** authorizations is a list of grants granted for grantee by granter. */ - grants?: V1Beta1Grant[]; - /** pagination defines an pagination for the response. */ - pagination?: V1Beta1PageResponse; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/authz/v1beta1/authz.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryGrants - * @summary Returns list of `Authorization`, granted to the grantee by the granter. - * @request GET:/cosmos/authz/v1beta1/grants - */ - queryGrants: (query?: { - granter?: string; - grantee?: string; - msgTypeUrl?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * @description Since: cosmos-sdk 0.45.2 - * - * @tags Query - * @name QueryGranteeGrants - * @summary GranteeGrants returns a list of `GrantAuthorization` by grantee. - * @request GET:/cosmos/authz/v1beta1/grants/grantee/{grantee} - */ - queryGranteeGrants: (grantee: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * @description Since: cosmos-sdk 0.45.2 - * - * @tags Query - * @name QueryGranterGrants - * @summary GranterGrants returns list of `GrantAuthorization`, granted by granter. - * @request GET:/cosmos/authz/v1beta1/grants/granter/{granter} - */ - queryGranterGrants: (granter: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/rest.js deleted file mode 100644 index 8e9fdb4cb4..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/rest.js +++ /dev/null @@ -1,185 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/authz/v1beta1/authz.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryGrants - * @summary Returns list of `Authorization`, granted to the grantee by the granter. - * @request GET:/cosmos/authz/v1beta1/grants - */ - this.queryGrants = (query, params = {}) => this.request({ - path: `/cosmos/authz/v1beta1/grants`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * @description Since: cosmos-sdk 0.45.2 - * - * @tags Query - * @name QueryGranteeGrants - * @summary GranteeGrants returns a list of `GrantAuthorization` by grantee. - * @request GET:/cosmos/authz/v1beta1/grants/grantee/{grantee} - */ - this.queryGranteeGrants = (grantee, query, params = {}) => this.request({ - path: `/cosmos/authz/v1beta1/grants/grantee/${grantee}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * @description Since: cosmos-sdk 0.45.2 - * - * @tags Query - * @name QueryGranterGrants - * @summary GranterGrants returns list of `GrantAuthorization`, granted by granter. - * @request GET:/cosmos/authz/v1beta1/grants/granter/{granter} - */ - this.queryGranterGrants = (granter, query, params = {}) => this.request({ - path: `/cosmos/authz/v1beta1/grants/granter/${granter}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/rest.ts deleted file mode 100644 index 87ea349d2e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/rest.ts +++ /dev/null @@ -1,719 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* Grant gives permissions to execute -the provide method with expiration time. -*/ -export interface V1Beta1Grant { - /** - * `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" - * } - */ - authorization?: ProtobufAny; - - /** @format date-time */ - expiration?: string; -} - -/** - * Since: cosmos-sdk 0.45.2 - */ -export interface V1Beta1GrantAuthorization { - granter?: string; - grantee?: string; - - /** - * `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" - * } - */ - authorization?: ProtobufAny; - - /** @format date-time */ - expiration?: string; -} - -/** - * MsgExecResponse defines the Msg/MsgExecResponse response type. - */ -export interface V1Beta1MsgExecResponse { - results?: string[]; -} - -/** - * MsgGrantResponse defines the Msg/MsgGrant response type. - */ -export type V1Beta1MsgGrantResponse = object; - -/** - * MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. - */ -export type V1Beta1MsgRevokeResponse = object; - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - countTotal?: boolean; - - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse?: boolean; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - - /** @format uint64 */ - total?: string; -} - -/** - * QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. - */ -export interface V1Beta1QueryGranteeGrantsResponse { - /** grants is a list of grants granted to the grantee. */ - grants?: V1Beta1GrantAuthorization[]; - - /** pagination defines an pagination for the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. - */ -export interface V1Beta1QueryGranterGrantsResponse { - /** grants is a list of grants granted by the granter. */ - grants?: V1Beta1GrantAuthorization[]; - - /** pagination defines an pagination for the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryGrantsResponse is the response type for the Query/Authorizations RPC method. - */ -export interface V1Beta1QueryGrantsResponse { - /** authorizations is a list of grants granted for grantee by granter. */ - grants?: V1Beta1Grant[]; - - /** pagination defines an pagination for the response. */ - pagination?: V1Beta1PageResponse; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/authz/v1beta1/authz.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryGrants - * @summary Returns list of `Authorization`, granted to the grantee by the granter. - * @request GET:/cosmos/authz/v1beta1/grants - */ - queryGrants = ( - query?: { - granter?: string; - grantee?: string; - msgTypeUrl?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/authz/v1beta1/grants`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * @description Since: cosmos-sdk 0.45.2 - * - * @tags Query - * @name QueryGranteeGrants - * @summary GranteeGrants returns a list of `GrantAuthorization` by grantee. - * @request GET:/cosmos/authz/v1beta1/grants/grantee/{grantee} - */ - queryGranteeGrants = ( - grantee: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/authz/v1beta1/grants/grantee/${grantee}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * @description Since: cosmos-sdk 0.45.2 - * - * @tags Query - * @name QueryGranterGrants - * @summary GranterGrants returns list of `GrantAuthorization`, granted by granter. - * @request GET:/cosmos/authz/v1beta1/grants/granter/{granter} - */ - queryGranterGrants = ( - granter: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/authz/v1beta1/grants/granter/${granter}`, - method: "GET", - query: query, - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/authz.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/authz.d.ts deleted file mode 100644 index 4b2427346a..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/authz.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Any } from "../../../google/protobuf/any"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.authz.v1beta1"; -/** Since: cosmos-sdk 0.43 */ -/** - * GenericAuthorization gives the grantee unrestricted permissions to execute - * the provided method on behalf of the granter's account. - */ -export interface GenericAuthorization { - /** Msg, identified by it's type URL, to grant unrestricted permissions to execute */ - msg: string; -} -/** - * Grant gives permissions to execute - * the provide method with expiration time. - */ -export interface Grant { - authorization: Any | undefined; - expiration: Date | undefined; -} -/** - * GrantAuthorization extends a grant with both the addresses of the grantee and granter. - * It is used in genesis.proto and query.proto - * - * Since: cosmos-sdk 0.45.2 - */ -export interface GrantAuthorization { - granter: string; - grantee: string; - authorization: Any | undefined; - expiration: Date | undefined; -} -export declare const GenericAuthorization: { - encode(message: GenericAuthorization, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenericAuthorization; - fromJSON(object: any): GenericAuthorization; - toJSON(message: GenericAuthorization): unknown; - fromPartial(object: DeepPartial): GenericAuthorization; -}; -export declare const Grant: { - encode(message: Grant, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Grant; - fromJSON(object: any): Grant; - toJSON(message: Grant): unknown; - fromPartial(object: DeepPartial): Grant; -}; -export declare const GrantAuthorization: { - encode(message: GrantAuthorization, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GrantAuthorization; - fromJSON(object: any): GrantAuthorization; - toJSON(message: GrantAuthorization): unknown; - fromPartial(object: DeepPartial): GrantAuthorization; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/authz.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/authz.js deleted file mode 100644 index a0a0813227..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/authz.js +++ /dev/null @@ -1,269 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Any } from "../../../google/protobuf/any"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.authz.v1beta1"; -const baseGenericAuthorization = { msg: "" }; -export const GenericAuthorization = { - encode(message, writer = Writer.create()) { - if (message.msg !== "") { - writer.uint32(10).string(message.msg); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenericAuthorization }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msg = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenericAuthorization }; - if (object.msg !== undefined && object.msg !== null) { - message.msg = String(object.msg); - } - else { - message.msg = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.msg !== undefined && (obj.msg = message.msg); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenericAuthorization }; - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = ""; - } - return message; - }, -}; -const baseGrant = {}; -export const Grant = { - encode(message, writer = Writer.create()) { - if (message.authorization !== undefined) { - Any.encode(message.authorization, writer.uint32(10).fork()).ldelim(); - } - if (message.expiration !== undefined) { - Timestamp.encode(toTimestamp(message.expiration), writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGrant }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authorization = Any.decode(reader, reader.uint32()); - break; - case 2: - message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGrant }; - if (object.authorization !== undefined && object.authorization !== null) { - message.authorization = Any.fromJSON(object.authorization); - } - else { - message.authorization = undefined; - } - if (object.expiration !== undefined && object.expiration !== null) { - message.expiration = fromJsonTimestamp(object.expiration); - } - else { - message.expiration = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.authorization !== undefined && - (obj.authorization = message.authorization - ? Any.toJSON(message.authorization) - : undefined); - message.expiration !== undefined && - (obj.expiration = - message.expiration !== undefined - ? message.expiration.toISOString() - : null); - return obj; - }, - fromPartial(object) { - const message = { ...baseGrant }; - if (object.authorization !== undefined && object.authorization !== null) { - message.authorization = Any.fromPartial(object.authorization); - } - else { - message.authorization = undefined; - } - if (object.expiration !== undefined && object.expiration !== null) { - message.expiration = object.expiration; - } - else { - message.expiration = undefined; - } - return message; - }, -}; -const baseGrantAuthorization = { granter: "", grantee: "" }; -export const GrantAuthorization = { - encode(message, writer = Writer.create()) { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.authorization !== undefined) { - Any.encode(message.authorization, writer.uint32(26).fork()).ldelim(); - } - if (message.expiration !== undefined) { - Timestamp.encode(toTimestamp(message.expiration), writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGrantAuthorization }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.authorization = Any.decode(reader, reader.uint32()); - break; - case 4: - message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGrantAuthorization }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } - else { - message.grantee = ""; - } - if (object.authorization !== undefined && object.authorization !== null) { - message.authorization = Any.fromJSON(object.authorization); - } - else { - message.authorization = undefined; - } - if (object.expiration !== undefined && object.expiration !== null) { - message.expiration = fromJsonTimestamp(object.expiration); - } - else { - message.expiration = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.authorization !== undefined && - (obj.authorization = message.authorization - ? Any.toJSON(message.authorization) - : undefined); - message.expiration !== undefined && - (obj.expiration = - message.expiration !== undefined - ? message.expiration.toISOString() - : null); - return obj; - }, - fromPartial(object) { - const message = { ...baseGrantAuthorization }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } - else { - message.grantee = ""; - } - if (object.authorization !== undefined && object.authorization !== null) { - message.authorization = Any.fromPartial(object.authorization); - } - else { - message.authorization = undefined; - } - if (object.expiration !== undefined && object.expiration !== null) { - message.expiration = object.expiration; - } - else { - message.expiration = undefined; - } - return message; - }, -}; -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/authz.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/authz.ts deleted file mode 100644 index 8cb255148b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/authz.ts +++ /dev/null @@ -1,335 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Any } from "../../../google/protobuf/any"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.authz.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - -/** - * GenericAuthorization gives the grantee unrestricted permissions to execute - * the provided method on behalf of the granter's account. - */ -export interface GenericAuthorization { - /** Msg, identified by it's type URL, to grant unrestricted permissions to execute */ - msg: string; -} - -/** - * Grant gives permissions to execute - * the provide method with expiration time. - */ -export interface Grant { - authorization: Any | undefined; - expiration: Date | undefined; -} - -/** - * GrantAuthorization extends a grant with both the addresses of the grantee and granter. - * It is used in genesis.proto and query.proto - * - * Since: cosmos-sdk 0.45.2 - */ -export interface GrantAuthorization { - granter: string; - grantee: string; - authorization: Any | undefined; - expiration: Date | undefined; -} - -const baseGenericAuthorization: object = { msg: "" }; - -export const GenericAuthorization = { - encode( - message: GenericAuthorization, - writer: Writer = Writer.create() - ): Writer { - if (message.msg !== "") { - writer.uint32(10).string(message.msg); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenericAuthorization { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenericAuthorization } as GenericAuthorization; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msg = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenericAuthorization { - const message = { ...baseGenericAuthorization } as GenericAuthorization; - if (object.msg !== undefined && object.msg !== null) { - message.msg = String(object.msg); - } else { - message.msg = ""; - } - return message; - }, - - toJSON(message: GenericAuthorization): unknown { - const obj: any = {}; - message.msg !== undefined && (obj.msg = message.msg); - return obj; - }, - - fromPartial(object: DeepPartial): GenericAuthorization { - const message = { ...baseGenericAuthorization } as GenericAuthorization; - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } else { - message.msg = ""; - } - return message; - }, -}; - -const baseGrant: object = {}; - -export const Grant = { - encode(message: Grant, writer: Writer = Writer.create()): Writer { - if (message.authorization !== undefined) { - Any.encode(message.authorization, writer.uint32(10).fork()).ldelim(); - } - if (message.expiration !== undefined) { - Timestamp.encode( - toTimestamp(message.expiration), - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Grant { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGrant } as Grant; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authorization = Any.decode(reader, reader.uint32()); - break; - case 2: - message.expiration = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Grant { - const message = { ...baseGrant } as Grant; - if (object.authorization !== undefined && object.authorization !== null) { - message.authorization = Any.fromJSON(object.authorization); - } else { - message.authorization = undefined; - } - if (object.expiration !== undefined && object.expiration !== null) { - message.expiration = fromJsonTimestamp(object.expiration); - } else { - message.expiration = undefined; - } - return message; - }, - - toJSON(message: Grant): unknown { - const obj: any = {}; - message.authorization !== undefined && - (obj.authorization = message.authorization - ? Any.toJSON(message.authorization) - : undefined); - message.expiration !== undefined && - (obj.expiration = - message.expiration !== undefined - ? message.expiration.toISOString() - : null); - return obj; - }, - - fromPartial(object: DeepPartial): Grant { - const message = { ...baseGrant } as Grant; - if (object.authorization !== undefined && object.authorization !== null) { - message.authorization = Any.fromPartial(object.authorization); - } else { - message.authorization = undefined; - } - if (object.expiration !== undefined && object.expiration !== null) { - message.expiration = object.expiration; - } else { - message.expiration = undefined; - } - return message; - }, -}; - -const baseGrantAuthorization: object = { granter: "", grantee: "" }; - -export const GrantAuthorization = { - encode( - message: GrantAuthorization, - writer: Writer = Writer.create() - ): Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.authorization !== undefined) { - Any.encode(message.authorization, writer.uint32(26).fork()).ldelim(); - } - if (message.expiration !== undefined) { - Timestamp.encode( - toTimestamp(message.expiration), - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GrantAuthorization { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGrantAuthorization } as GrantAuthorization; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.authorization = Any.decode(reader, reader.uint32()); - break; - case 4: - message.expiration = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GrantAuthorization { - const message = { ...baseGrantAuthorization } as GrantAuthorization; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } else { - message.grantee = ""; - } - if (object.authorization !== undefined && object.authorization !== null) { - message.authorization = Any.fromJSON(object.authorization); - } else { - message.authorization = undefined; - } - if (object.expiration !== undefined && object.expiration !== null) { - message.expiration = fromJsonTimestamp(object.expiration); - } else { - message.expiration = undefined; - } - return message; - }, - - toJSON(message: GrantAuthorization): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.authorization !== undefined && - (obj.authorization = message.authorization - ? Any.toJSON(message.authorization) - : undefined); - message.expiration !== undefined && - (obj.expiration = - message.expiration !== undefined - ? message.expiration.toISOString() - : null); - return obj; - }, - - fromPartial(object: DeepPartial): GrantAuthorization { - const message = { ...baseGrantAuthorization } as GrantAuthorization; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } else { - message.grantee = ""; - } - if (object.authorization !== undefined && object.authorization !== null) { - message.authorization = Any.fromPartial(object.authorization); - } else { - message.authorization = undefined; - } - if (object.expiration !== undefined && object.expiration !== null) { - message.expiration = object.expiration; - } else { - message.expiration = undefined; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/event.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/event.d.ts deleted file mode 100644 index 184ac9bf85..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/event.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.authz.v1beta1"; -/** Since: cosmos-sdk 0.43 */ -/** EventGrant is emitted on Msg/Grant */ -export interface EventGrant { - /** Msg type URL for which an autorization is granted */ - msgTypeUrl: string; - /** Granter account address */ - granter: string; - /** Grantee account address */ - grantee: string; -} -/** EventRevoke is emitted on Msg/Revoke */ -export interface EventRevoke { - /** Msg type URL for which an autorization is revoked */ - msgTypeUrl: string; - /** Granter account address */ - granter: string; - /** Grantee account address */ - grantee: string; -} -export declare const EventGrant: { - encode(message: EventGrant, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EventGrant; - fromJSON(object: any): EventGrant; - toJSON(message: EventGrant): unknown; - fromPartial(object: DeepPartial): EventGrant; -}; -export declare const EventRevoke: { - encode(message: EventRevoke, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EventRevoke; - fromJSON(object: any): EventRevoke; - toJSON(message: EventRevoke): unknown; - fromPartial(object: DeepPartial): EventRevoke; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/event.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/event.js deleted file mode 100644 index 70a3c49e13..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/event.js +++ /dev/null @@ -1,181 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.authz.v1beta1"; -const baseEventGrant = { msgTypeUrl: "", granter: "", grantee: "" }; -export const EventGrant = { - encode(message, writer = Writer.create()) { - if (message.msgTypeUrl !== "") { - writer.uint32(18).string(message.msgTypeUrl); - } - if (message.granter !== "") { - writer.uint32(26).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(34).string(message.grantee); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEventGrant }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.msgTypeUrl = reader.string(); - break; - case 3: - message.granter = reader.string(); - break; - case 4: - message.grantee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEventGrant }; - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = String(object.msgTypeUrl); - } - else { - message.msgTypeUrl = ""; - } - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } - else { - message.grantee = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl); - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - return obj; - }, - fromPartial(object) { - const message = { ...baseEventGrant }; - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = object.msgTypeUrl; - } - else { - message.msgTypeUrl = ""; - } - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } - else { - message.grantee = ""; - } - return message; - }, -}; -const baseEventRevoke = { msgTypeUrl: "", granter: "", grantee: "" }; -export const EventRevoke = { - encode(message, writer = Writer.create()) { - if (message.msgTypeUrl !== "") { - writer.uint32(18).string(message.msgTypeUrl); - } - if (message.granter !== "") { - writer.uint32(26).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(34).string(message.grantee); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEventRevoke }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.msgTypeUrl = reader.string(); - break; - case 3: - message.granter = reader.string(); - break; - case 4: - message.grantee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEventRevoke }; - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = String(object.msgTypeUrl); - } - else { - message.msgTypeUrl = ""; - } - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } - else { - message.grantee = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl); - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - return obj; - }, - fromPartial(object) { - const message = { ...baseEventRevoke }; - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = object.msgTypeUrl; - } - else { - message.msgTypeUrl = ""; - } - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } - else { - message.grantee = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/event.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/event.ts deleted file mode 100644 index bc8aecd04f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/event.ts +++ /dev/null @@ -1,215 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.authz.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - -/** EventGrant is emitted on Msg/Grant */ -export interface EventGrant { - /** Msg type URL for which an autorization is granted */ - msgTypeUrl: string; - /** Granter account address */ - granter: string; - /** Grantee account address */ - grantee: string; -} - -/** EventRevoke is emitted on Msg/Revoke */ -export interface EventRevoke { - /** Msg type URL for which an autorization is revoked */ - msgTypeUrl: string; - /** Granter account address */ - granter: string; - /** Grantee account address */ - grantee: string; -} - -const baseEventGrant: object = { msgTypeUrl: "", granter: "", grantee: "" }; - -export const EventGrant = { - encode(message: EventGrant, writer: Writer = Writer.create()): Writer { - if (message.msgTypeUrl !== "") { - writer.uint32(18).string(message.msgTypeUrl); - } - if (message.granter !== "") { - writer.uint32(26).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(34).string(message.grantee); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EventGrant { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEventGrant } as EventGrant; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.msgTypeUrl = reader.string(); - break; - case 3: - message.granter = reader.string(); - break; - case 4: - message.grantee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EventGrant { - const message = { ...baseEventGrant } as EventGrant; - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = String(object.msgTypeUrl); - } else { - message.msgTypeUrl = ""; - } - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } else { - message.grantee = ""; - } - return message; - }, - - toJSON(message: EventGrant): unknown { - const obj: any = {}; - message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl); - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - return obj; - }, - - fromPartial(object: DeepPartial): EventGrant { - const message = { ...baseEventGrant } as EventGrant; - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = object.msgTypeUrl; - } else { - message.msgTypeUrl = ""; - } - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } else { - message.grantee = ""; - } - return message; - }, -}; - -const baseEventRevoke: object = { msgTypeUrl: "", granter: "", grantee: "" }; - -export const EventRevoke = { - encode(message: EventRevoke, writer: Writer = Writer.create()): Writer { - if (message.msgTypeUrl !== "") { - writer.uint32(18).string(message.msgTypeUrl); - } - if (message.granter !== "") { - writer.uint32(26).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(34).string(message.grantee); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EventRevoke { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEventRevoke } as EventRevoke; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.msgTypeUrl = reader.string(); - break; - case 3: - message.granter = reader.string(); - break; - case 4: - message.grantee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EventRevoke { - const message = { ...baseEventRevoke } as EventRevoke; - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = String(object.msgTypeUrl); - } else { - message.msgTypeUrl = ""; - } - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } else { - message.grantee = ""; - } - return message; - }, - - toJSON(message: EventRevoke): unknown { - const obj: any = {}; - message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl); - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - return obj; - }, - - fromPartial(object: DeepPartial): EventRevoke { - const message = { ...baseEventRevoke } as EventRevoke; - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = object.msgTypeUrl; - } else { - message.msgTypeUrl = ""; - } - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } else { - message.grantee = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/genesis.d.ts deleted file mode 100644 index c44abc3f66..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/genesis.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { GrantAuthorization } from "../../../cosmos/authz/v1beta1/authz"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.authz.v1beta1"; -/** Since: cosmos-sdk 0.43 */ -/** GenesisState defines the authz module's genesis state. */ -export interface GenesisState { - authorization: GrantAuthorization[]; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/genesis.js deleted file mode 100644 index 154d7595b8..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/genesis.js +++ /dev/null @@ -1,61 +0,0 @@ -/* eslint-disable */ -import { GrantAuthorization } from "../../../cosmos/authz/v1beta1/authz"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.authz.v1beta1"; -const baseGenesisState = {}; -export const GenesisState = { - encode(message, writer = Writer.create()) { - for (const v of message.authorization) { - GrantAuthorization.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.authorization = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authorization.push(GrantAuthorization.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.authorization = []; - if (object.authorization !== undefined && object.authorization !== null) { - for (const e of object.authorization) { - message.authorization.push(GrantAuthorization.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.authorization) { - obj.authorization = message.authorization.map((e) => e ? GrantAuthorization.toJSON(e) : undefined); - } - else { - obj.authorization = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.authorization = []; - if (object.authorization !== undefined && object.authorization !== null) { - for (const e of object.authorization) { - message.authorization.push(GrantAuthorization.fromPartial(e)); - } - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/genesis.ts deleted file mode 100644 index ae07db55a0..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/genesis.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* eslint-disable */ -import { GrantAuthorization } from "../../../cosmos/authz/v1beta1/authz"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.authz.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - -/** GenesisState defines the authz module's genesis state. */ -export interface GenesisState { - authorization: GrantAuthorization[]; -} - -const baseGenesisState: object = {}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - for (const v of message.authorization) { - GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.authorization = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authorization.push( - GrantAuthorization.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.authorization = []; - if (object.authorization !== undefined && object.authorization !== null) { - for (const e of object.authorization) { - message.authorization.push(GrantAuthorization.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.authorization) { - obj.authorization = message.authorization.map((e) => - e ? GrantAuthorization.toJSON(e) : undefined - ); - } else { - obj.authorization = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.authorization = []; - if (object.authorization !== undefined && object.authorization !== null) { - for (const e of object.authorization) { - message.authorization.push(GrantAuthorization.fromPartial(e)); - } - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/query.d.ts deleted file mode 100644 index 1a41f13719..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/query.d.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -import { Grant, GrantAuthorization } from "../../../cosmos/authz/v1beta1/authz"; -export declare const protobufPackage = "cosmos.authz.v1beta1"; -/** Since: cosmos-sdk 0.43 */ -/** QueryGrantsRequest is the request type for the Query/Grants RPC method. */ -export interface QueryGrantsRequest { - granter: string; - grantee: string; - /** Optional, msg_type_url, when set, will query only grants matching given msg type. */ - msgTypeUrl: string; - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} -/** QueryGrantsResponse is the response type for the Query/Authorizations RPC method. */ -export interface QueryGrantsResponse { - /** authorizations is a list of grants granted for grantee by granter. */ - grants: Grant[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} -/** QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. */ -export interface QueryGranterGrantsRequest { - granter: string; - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} -/** QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. */ -export interface QueryGranterGrantsResponse { - /** grants is a list of grants granted by the granter. */ - grants: GrantAuthorization[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} -/** QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. */ -export interface QueryGranteeGrantsRequest { - grantee: string; - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} -/** QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. */ -export interface QueryGranteeGrantsResponse { - /** grants is a list of grants granted to the grantee. */ - grants: GrantAuthorization[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} -export declare const QueryGrantsRequest: { - encode(message: QueryGrantsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGrantsRequest; - fromJSON(object: any): QueryGrantsRequest; - toJSON(message: QueryGrantsRequest): unknown; - fromPartial(object: DeepPartial): QueryGrantsRequest; -}; -export declare const QueryGrantsResponse: { - encode(message: QueryGrantsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGrantsResponse; - fromJSON(object: any): QueryGrantsResponse; - toJSON(message: QueryGrantsResponse): unknown; - fromPartial(object: DeepPartial): QueryGrantsResponse; -}; -export declare const QueryGranterGrantsRequest: { - encode(message: QueryGranterGrantsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGranterGrantsRequest; - fromJSON(object: any): QueryGranterGrantsRequest; - toJSON(message: QueryGranterGrantsRequest): unknown; - fromPartial(object: DeepPartial): QueryGranterGrantsRequest; -}; -export declare const QueryGranterGrantsResponse: { - encode(message: QueryGranterGrantsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGranterGrantsResponse; - fromJSON(object: any): QueryGranterGrantsResponse; - toJSON(message: QueryGranterGrantsResponse): unknown; - fromPartial(object: DeepPartial): QueryGranterGrantsResponse; -}; -export declare const QueryGranteeGrantsRequest: { - encode(message: QueryGranteeGrantsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGranteeGrantsRequest; - fromJSON(object: any): QueryGranteeGrantsRequest; - toJSON(message: QueryGranteeGrantsRequest): unknown; - fromPartial(object: DeepPartial): QueryGranteeGrantsRequest; -}; -export declare const QueryGranteeGrantsResponse: { - encode(message: QueryGranteeGrantsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGranteeGrantsResponse; - fromJSON(object: any): QueryGranteeGrantsResponse; - toJSON(message: QueryGranteeGrantsResponse): unknown; - fromPartial(object: DeepPartial): QueryGranteeGrantsResponse; -}; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Returns list of `Authorization`, granted to the grantee by the granter. */ - Grants(request: QueryGrantsRequest): Promise; - /** - * GranterGrants returns list of `GrantAuthorization`, granted by granter. - * - * Since: cosmos-sdk 0.45.2 - */ - GranterGrants(request: QueryGranterGrantsRequest): Promise; - /** - * GranteeGrants returns a list of `GrantAuthorization` by grantee. - * - * Since: cosmos-sdk 0.45.2 - */ - GranteeGrants(request: QueryGranteeGrantsRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Grants(request: QueryGrantsRequest): Promise; - GranterGrants(request: QueryGranterGrantsRequest): Promise; - GranteeGrants(request: QueryGranteeGrantsRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/query.js deleted file mode 100644 index fdb0aaae9c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/query.js +++ /dev/null @@ -1,547 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { PageRequest, PageResponse, } from "../../../cosmos/base/query/v1beta1/pagination"; -import { Grant, GrantAuthorization } from "../../../cosmos/authz/v1beta1/authz"; -export const protobufPackage = "cosmos.authz.v1beta1"; -const baseQueryGrantsRequest = { - granter: "", - grantee: "", - msgTypeUrl: "", -}; -export const QueryGrantsRequest = { - encode(message, writer = Writer.create()) { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.msgTypeUrl !== "") { - writer.uint32(26).string(message.msgTypeUrl); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGrantsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.msgTypeUrl = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryGrantsRequest }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } - else { - message.grantee = ""; - } - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = String(object.msgTypeUrl); - } - else { - message.msgTypeUrl = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryGrantsRequest }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } - else { - message.grantee = ""; - } - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = object.msgTypeUrl; - } - else { - message.msgTypeUrl = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryGrantsResponse = {}; -export const QueryGrantsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.grants) { - Grant.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGrantsResponse }; - message.grants = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grants.push(Grant.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryGrantsResponse }; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(Grant.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.grants) { - obj.grants = message.grants.map((e) => (e ? Grant.toJSON(e) : undefined)); - } - else { - obj.grants = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryGrantsResponse }; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(Grant.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryGranterGrantsRequest = { granter: "" }; -export const QueryGranterGrantsRequest = { - encode(message, writer = Writer.create()) { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGranterGrantsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGranterGrantsRequest, - }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } - else { - message.granter = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGranterGrantsRequest, - }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } - else { - message.granter = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryGranterGrantsResponse = {}; -export const QueryGranterGrantsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.grants) { - GrantAuthorization.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGranterGrantsResponse, - }; - message.grants = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grants.push(GrantAuthorization.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGranterGrantsResponse, - }; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(GrantAuthorization.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.grants) { - obj.grants = message.grants.map((e) => e ? GrantAuthorization.toJSON(e) : undefined); - } - else { - obj.grants = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGranterGrantsResponse, - }; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(GrantAuthorization.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryGranteeGrantsRequest = { grantee: "" }; -export const QueryGranteeGrantsRequest = { - encode(message, writer = Writer.create()) { - if (message.grantee !== "") { - writer.uint32(10).string(message.grantee); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGranteeGrantsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grantee = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGranteeGrantsRequest, - }; - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } - else { - message.grantee = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.grantee !== undefined && (obj.grantee = message.grantee); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGranteeGrantsRequest, - }; - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } - else { - message.grantee = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryGranteeGrantsResponse = {}; -export const QueryGranteeGrantsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.grants) { - GrantAuthorization.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGranteeGrantsResponse, - }; - message.grants = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grants.push(GrantAuthorization.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGranteeGrantsResponse, - }; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(GrantAuthorization.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.grants) { - obj.grants = message.grants.map((e) => e ? GrantAuthorization.toJSON(e) : undefined); - } - else { - obj.grants = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGranteeGrantsResponse, - }; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(GrantAuthorization.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Grants(request) { - const data = QueryGrantsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "Grants", data); - return promise.then((data) => QueryGrantsResponse.decode(new Reader(data))); - } - GranterGrants(request) { - const data = QueryGranterGrantsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "GranterGrants", data); - return promise.then((data) => QueryGranterGrantsResponse.decode(new Reader(data))); - } - GranteeGrants(request) { - const data = QueryGranteeGrantsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "GranteeGrants", data); - return promise.then((data) => QueryGranteeGrantsResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/query.ts deleted file mode 100644 index 0abee77dc5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/query.ts +++ /dev/null @@ -1,732 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; -import { Grant, GrantAuthorization } from "../../../cosmos/authz/v1beta1/authz"; - -export const protobufPackage = "cosmos.authz.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - -/** QueryGrantsRequest is the request type for the Query/Grants RPC method. */ -export interface QueryGrantsRequest { - granter: string; - grantee: string; - /** Optional, msg_type_url, when set, will query only grants matching given msg type. */ - msgTypeUrl: string; - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** QueryGrantsResponse is the response type for the Query/Authorizations RPC method. */ -export interface QueryGrantsResponse { - /** authorizations is a list of grants granted for grantee by granter. */ - grants: Grant[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} - -/** QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. */ -export interface QueryGranterGrantsRequest { - granter: string; - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. */ -export interface QueryGranterGrantsResponse { - /** grants is a list of grants granted by the granter. */ - grants: GrantAuthorization[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} - -/** QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. */ -export interface QueryGranteeGrantsRequest { - grantee: string; - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. */ -export interface QueryGranteeGrantsResponse { - /** grants is a list of grants granted to the grantee. */ - grants: GrantAuthorization[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} - -const baseQueryGrantsRequest: object = { - granter: "", - grantee: "", - msgTypeUrl: "", -}; - -export const QueryGrantsRequest = { - encode( - message: QueryGrantsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.msgTypeUrl !== "") { - writer.uint32(26).string(message.msgTypeUrl); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryGrantsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGrantsRequest } as QueryGrantsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.msgTypeUrl = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGrantsRequest { - const message = { ...baseQueryGrantsRequest } as QueryGrantsRequest; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } else { - message.grantee = ""; - } - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = String(object.msgTypeUrl); - } else { - message.msgTypeUrl = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryGrantsRequest): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryGrantsRequest { - const message = { ...baseQueryGrantsRequest } as QueryGrantsRequest; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } else { - message.grantee = ""; - } - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = object.msgTypeUrl; - } else { - message.msgTypeUrl = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryGrantsResponse: object = {}; - -export const QueryGrantsResponse = { - encode( - message: QueryGrantsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.grants) { - Grant.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryGrantsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGrantsResponse } as QueryGrantsResponse; - message.grants = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grants.push(Grant.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGrantsResponse { - const message = { ...baseQueryGrantsResponse } as QueryGrantsResponse; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(Grant.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryGrantsResponse): unknown { - const obj: any = {}; - if (message.grants) { - obj.grants = message.grants.map((e) => (e ? Grant.toJSON(e) : undefined)); - } else { - obj.grants = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryGrantsResponse { - const message = { ...baseQueryGrantsResponse } as QueryGrantsResponse; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(Grant.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryGranterGrantsRequest: object = { granter: "" }; - -export const QueryGranterGrantsRequest = { - encode( - message: QueryGranterGrantsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryGranterGrantsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGranterGrantsRequest, - } as QueryGranterGrantsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGranterGrantsRequest { - const message = { - ...baseQueryGranterGrantsRequest, - } as QueryGranterGrantsRequest; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } else { - message.granter = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryGranterGrantsRequest): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGranterGrantsRequest { - const message = { - ...baseQueryGranterGrantsRequest, - } as QueryGranterGrantsRequest; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } else { - message.granter = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryGranterGrantsResponse: object = {}; - -export const QueryGranterGrantsResponse = { - encode( - message: QueryGranterGrantsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.grants) { - GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryGranterGrantsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGranterGrantsResponse, - } as QueryGranterGrantsResponse; - message.grants = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grants.push( - GrantAuthorization.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGranterGrantsResponse { - const message = { - ...baseQueryGranterGrantsResponse, - } as QueryGranterGrantsResponse; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(GrantAuthorization.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryGranterGrantsResponse): unknown { - const obj: any = {}; - if (message.grants) { - obj.grants = message.grants.map((e) => - e ? GrantAuthorization.toJSON(e) : undefined - ); - } else { - obj.grants = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGranterGrantsResponse { - const message = { - ...baseQueryGranterGrantsResponse, - } as QueryGranterGrantsResponse; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(GrantAuthorization.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryGranteeGrantsRequest: object = { grantee: "" }; - -export const QueryGranteeGrantsRequest = { - encode( - message: QueryGranteeGrantsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.grantee !== "") { - writer.uint32(10).string(message.grantee); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryGranteeGrantsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGranteeGrantsRequest, - } as QueryGranteeGrantsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grantee = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGranteeGrantsRequest { - const message = { - ...baseQueryGranteeGrantsRequest, - } as QueryGranteeGrantsRequest; - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } else { - message.grantee = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryGranteeGrantsRequest): unknown { - const obj: any = {}; - message.grantee !== undefined && (obj.grantee = message.grantee); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGranteeGrantsRequest { - const message = { - ...baseQueryGranteeGrantsRequest, - } as QueryGranteeGrantsRequest; - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } else { - message.grantee = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryGranteeGrantsResponse: object = {}; - -export const QueryGranteeGrantsResponse = { - encode( - message: QueryGranteeGrantsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.grants) { - GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryGranteeGrantsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGranteeGrantsResponse, - } as QueryGranteeGrantsResponse; - message.grants = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grants.push( - GrantAuthorization.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGranteeGrantsResponse { - const message = { - ...baseQueryGranteeGrantsResponse, - } as QueryGranteeGrantsResponse; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(GrantAuthorization.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryGranteeGrantsResponse): unknown { - const obj: any = {}; - if (message.grants) { - obj.grants = message.grants.map((e) => - e ? GrantAuthorization.toJSON(e) : undefined - ); - } else { - obj.grants = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGranteeGrantsResponse { - const message = { - ...baseQueryGranteeGrantsResponse, - } as QueryGranteeGrantsResponse; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(GrantAuthorization.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -/** Query defines the gRPC querier service. */ -export interface Query { - /** Returns list of `Authorization`, granted to the grantee by the granter. */ - Grants(request: QueryGrantsRequest): Promise; - /** - * GranterGrants returns list of `GrantAuthorization`, granted by granter. - * - * Since: cosmos-sdk 0.45.2 - */ - GranterGrants( - request: QueryGranterGrantsRequest - ): Promise; - /** - * GranteeGrants returns a list of `GrantAuthorization` by grantee. - * - * Since: cosmos-sdk 0.45.2 - */ - GranteeGrants( - request: QueryGranteeGrantsRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Grants(request: QueryGrantsRequest): Promise { - const data = QueryGrantsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.authz.v1beta1.Query", - "Grants", - data - ); - return promise.then((data) => QueryGrantsResponse.decode(new Reader(data))); - } - - GranterGrants( - request: QueryGranterGrantsRequest - ): Promise { - const data = QueryGranterGrantsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.authz.v1beta1.Query", - "GranterGrants", - data - ); - return promise.then((data) => - QueryGranterGrantsResponse.decode(new Reader(data)) - ); - } - - GranteeGrants( - request: QueryGranteeGrantsRequest - ): Promise { - const data = QueryGranteeGrantsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.authz.v1beta1.Query", - "GranteeGrants", - data - ); - return promise.then((data) => - QueryGranteeGrantsResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/tx.d.ts deleted file mode 100644 index 05e9083788..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/tx.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Grant } from "../../../cosmos/authz/v1beta1/authz"; -import { Any } from "../../../google/protobuf/any"; -export declare const protobufPackage = "cosmos.authz.v1beta1"; -/** Since: cosmos-sdk 0.43 */ -/** - * MsgGrant is a request type for Grant method. It declares authorization to the grantee - * on behalf of the granter with the provided expiration time. - */ -export interface MsgGrant { - granter: string; - grantee: string; - grant: Grant | undefined; -} -/** MsgExecResponse defines the Msg/MsgExecResponse response type. */ -export interface MsgExecResponse { - results: Uint8Array[]; -} -/** - * MsgExec attempts to execute the provided messages using - * authorizations granted to the grantee. Each message should have only - * one signer corresponding to the granter of the authorization. - */ -export interface MsgExec { - grantee: string; - /** - * Authorization Msg requests to execute. Each msg must implement Authorization interface - * The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) - * triple and validate it. - */ - msgs: Any[]; -} -/** MsgGrantResponse defines the Msg/MsgGrant response type. */ -export interface MsgGrantResponse { -} -/** - * MsgRevoke revokes any authorization with the provided sdk.Msg type on the - * granter's account with that has been granted to the grantee. - */ -export interface MsgRevoke { - granter: string; - grantee: string; - msgTypeUrl: string; -} -/** MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. */ -export interface MsgRevokeResponse { -} -export declare const MsgGrant: { - encode(message: MsgGrant, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgGrant; - fromJSON(object: any): MsgGrant; - toJSON(message: MsgGrant): unknown; - fromPartial(object: DeepPartial): MsgGrant; -}; -export declare const MsgExecResponse: { - encode(message: MsgExecResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgExecResponse; - fromJSON(object: any): MsgExecResponse; - toJSON(message: MsgExecResponse): unknown; - fromPartial(object: DeepPartial): MsgExecResponse; -}; -export declare const MsgExec: { - encode(message: MsgExec, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgExec; - fromJSON(object: any): MsgExec; - toJSON(message: MsgExec): unknown; - fromPartial(object: DeepPartial): MsgExec; -}; -export declare const MsgGrantResponse: { - encode(_: MsgGrantResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgGrantResponse; - fromJSON(_: any): MsgGrantResponse; - toJSON(_: MsgGrantResponse): unknown; - fromPartial(_: DeepPartial): MsgGrantResponse; -}; -export declare const MsgRevoke: { - encode(message: MsgRevoke, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgRevoke; - fromJSON(object: any): MsgRevoke; - toJSON(message: MsgRevoke): unknown; - fromPartial(object: DeepPartial): MsgRevoke; -}; -export declare const MsgRevokeResponse: { - encode(_: MsgRevokeResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgRevokeResponse; - fromJSON(_: any): MsgRevokeResponse; - toJSON(_: MsgRevokeResponse): unknown; - fromPartial(_: DeepPartial): MsgRevokeResponse; -}; -/** Msg defines the authz Msg service. */ -export interface Msg { - /** - * Grant grants the provided authorization to the grantee on the granter's - * account with the provided expiration time. If there is already a grant - * for the given (granter, grantee, Authorization) triple, then the grant - * will be overwritten. - */ - Grant(request: MsgGrant): Promise; - /** - * Exec attempts to execute the provided messages using - * authorizations granted to the grantee. Each message should have only - * one signer corresponding to the granter of the authorization. - */ - Exec(request: MsgExec): Promise; - /** - * Revoke revokes any authorization corresponding to the provided method name on the - * granter's account that has been granted to the grantee. - */ - Revoke(request: MsgRevoke): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - Grant(request: MsgGrant): Promise; - Exec(request: MsgExec): Promise; - Revoke(request: MsgRevoke): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/tx.js deleted file mode 100644 index 47836f3f86..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/tx.js +++ /dev/null @@ -1,431 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Grant } from "../../../cosmos/authz/v1beta1/authz"; -import { Any } from "../../../google/protobuf/any"; -export const protobufPackage = "cosmos.authz.v1beta1"; -const baseMsgGrant = { granter: "", grantee: "" }; -export const MsgGrant = { - encode(message, writer = Writer.create()) { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.grant !== undefined) { - Grant.encode(message.grant, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgGrant }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.grant = Grant.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgGrant }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } - else { - message.grantee = ""; - } - if (object.grant !== undefined && object.grant !== null) { - message.grant = Grant.fromJSON(object.grant); - } - else { - message.grant = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.grant !== undefined && - (obj.grant = message.grant ? Grant.toJSON(message.grant) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgGrant }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } - else { - message.grantee = ""; - } - if (object.grant !== undefined && object.grant !== null) { - message.grant = Grant.fromPartial(object.grant); - } - else { - message.grant = undefined; - } - return message; - }, -}; -const baseMsgExecResponse = {}; -export const MsgExecResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.results) { - writer.uint32(10).bytes(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgExecResponse }; - message.results = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.results.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgExecResponse }; - message.results = []; - if (object.results !== undefined && object.results !== null) { - for (const e of object.results) { - message.results.push(bytesFromBase64(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.results) { - obj.results = message.results.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } - else { - obj.results = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgExecResponse }; - message.results = []; - if (object.results !== undefined && object.results !== null) { - for (const e of object.results) { - message.results.push(e); - } - } - return message; - }, -}; -const baseMsgExec = { grantee: "" }; -export const MsgExec = { - encode(message, writer = Writer.create()) { - if (message.grantee !== "") { - writer.uint32(10).string(message.grantee); - } - for (const v of message.msgs) { - Any.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgExec }; - message.msgs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grantee = reader.string(); - break; - case 2: - message.msgs.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgExec }; - message.msgs = []; - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } - else { - message.grantee = ""; - } - if (object.msgs !== undefined && object.msgs !== null) { - for (const e of object.msgs) { - message.msgs.push(Any.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.grantee !== undefined && (obj.grantee = message.grantee); - if (message.msgs) { - obj.msgs = message.msgs.map((e) => (e ? Any.toJSON(e) : undefined)); - } - else { - obj.msgs = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgExec }; - message.msgs = []; - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } - else { - message.grantee = ""; - } - if (object.msgs !== undefined && object.msgs !== null) { - for (const e of object.msgs) { - message.msgs.push(Any.fromPartial(e)); - } - } - return message; - }, -}; -const baseMsgGrantResponse = {}; -export const MsgGrantResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgGrantResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgGrantResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgGrantResponse }; - return message; - }, -}; -const baseMsgRevoke = { granter: "", grantee: "", msgTypeUrl: "" }; -export const MsgRevoke = { - encode(message, writer = Writer.create()) { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.msgTypeUrl !== "") { - writer.uint32(26).string(message.msgTypeUrl); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgRevoke }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.msgTypeUrl = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgRevoke }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } - else { - message.grantee = ""; - } - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = String(object.msgTypeUrl); - } - else { - message.msgTypeUrl = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgRevoke }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } - else { - message.grantee = ""; - } - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = object.msgTypeUrl; - } - else { - message.msgTypeUrl = ""; - } - return message; - }, -}; -const baseMsgRevokeResponse = {}; -export const MsgRevokeResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgRevokeResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgRevokeResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgRevokeResponse }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Grant(request) { - const data = MsgGrant.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Msg", "Grant", data); - return promise.then((data) => MsgGrantResponse.decode(new Reader(data))); - } - Exec(request) { - const data = MsgExec.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Msg", "Exec", data); - return promise.then((data) => MsgExecResponse.decode(new Reader(data))); - } - Revoke(request) { - const data = MsgRevoke.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Msg", "Revoke", data); - return promise.then((data) => MsgRevokeResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/tx.ts deleted file mode 100644 index 7419f46d9c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/tx.ts +++ /dev/null @@ -1,554 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Grant } from "../../../cosmos/authz/v1beta1/authz"; -import { Any } from "../../../google/protobuf/any"; - -export const protobufPackage = "cosmos.authz.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - -/** - * MsgGrant is a request type for Grant method. It declares authorization to the grantee - * on behalf of the granter with the provided expiration time. - */ -export interface MsgGrant { - granter: string; - grantee: string; - grant: Grant | undefined; -} - -/** MsgExecResponse defines the Msg/MsgExecResponse response type. */ -export interface MsgExecResponse { - results: Uint8Array[]; -} - -/** - * MsgExec attempts to execute the provided messages using - * authorizations granted to the grantee. Each message should have only - * one signer corresponding to the granter of the authorization. - */ -export interface MsgExec { - grantee: string; - /** - * Authorization Msg requests to execute. Each msg must implement Authorization interface - * The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) - * triple and validate it. - */ - msgs: Any[]; -} - -/** MsgGrantResponse defines the Msg/MsgGrant response type. */ -export interface MsgGrantResponse {} - -/** - * MsgRevoke revokes any authorization with the provided sdk.Msg type on the - * granter's account with that has been granted to the grantee. - */ -export interface MsgRevoke { - granter: string; - grantee: string; - msgTypeUrl: string; -} - -/** MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. */ -export interface MsgRevokeResponse {} - -const baseMsgGrant: object = { granter: "", grantee: "" }; - -export const MsgGrant = { - encode(message: MsgGrant, writer: Writer = Writer.create()): Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.grant !== undefined) { - Grant.encode(message.grant, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgGrant { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgGrant } as MsgGrant; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.grant = Grant.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgGrant { - const message = { ...baseMsgGrant } as MsgGrant; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } else { - message.grantee = ""; - } - if (object.grant !== undefined && object.grant !== null) { - message.grant = Grant.fromJSON(object.grant); - } else { - message.grant = undefined; - } - return message; - }, - - toJSON(message: MsgGrant): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.grant !== undefined && - (obj.grant = message.grant ? Grant.toJSON(message.grant) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgGrant { - const message = { ...baseMsgGrant } as MsgGrant; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } else { - message.grantee = ""; - } - if (object.grant !== undefined && object.grant !== null) { - message.grant = Grant.fromPartial(object.grant); - } else { - message.grant = undefined; - } - return message; - }, -}; - -const baseMsgExecResponse: object = {}; - -export const MsgExecResponse = { - encode(message: MsgExecResponse, writer: Writer = Writer.create()): Writer { - for (const v of message.results) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgExecResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgExecResponse } as MsgExecResponse; - message.results = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.results.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgExecResponse { - const message = { ...baseMsgExecResponse } as MsgExecResponse; - message.results = []; - if (object.results !== undefined && object.results !== null) { - for (const e of object.results) { - message.results.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: MsgExecResponse): unknown { - const obj: any = {}; - if (message.results) { - obj.results = message.results.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.results = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MsgExecResponse { - const message = { ...baseMsgExecResponse } as MsgExecResponse; - message.results = []; - if (object.results !== undefined && object.results !== null) { - for (const e of object.results) { - message.results.push(e); - } - } - return message; - }, -}; - -const baseMsgExec: object = { grantee: "" }; - -export const MsgExec = { - encode(message: MsgExec, writer: Writer = Writer.create()): Writer { - if (message.grantee !== "") { - writer.uint32(10).string(message.grantee); - } - for (const v of message.msgs) { - Any.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgExec { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgExec } as MsgExec; - message.msgs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grantee = reader.string(); - break; - case 2: - message.msgs.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgExec { - const message = { ...baseMsgExec } as MsgExec; - message.msgs = []; - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } else { - message.grantee = ""; - } - if (object.msgs !== undefined && object.msgs !== null) { - for (const e of object.msgs) { - message.msgs.push(Any.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MsgExec): unknown { - const obj: any = {}; - message.grantee !== undefined && (obj.grantee = message.grantee); - if (message.msgs) { - obj.msgs = message.msgs.map((e) => (e ? Any.toJSON(e) : undefined)); - } else { - obj.msgs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MsgExec { - const message = { ...baseMsgExec } as MsgExec; - message.msgs = []; - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } else { - message.grantee = ""; - } - if (object.msgs !== undefined && object.msgs !== null) { - for (const e of object.msgs) { - message.msgs.push(Any.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMsgGrantResponse: object = {}; - -export const MsgGrantResponse = { - encode(_: MsgGrantResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgGrantResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgGrantResponse } as MsgGrantResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgGrantResponse { - const message = { ...baseMsgGrantResponse } as MsgGrantResponse; - return message; - }, - - toJSON(_: MsgGrantResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgGrantResponse { - const message = { ...baseMsgGrantResponse } as MsgGrantResponse; - return message; - }, -}; - -const baseMsgRevoke: object = { granter: "", grantee: "", msgTypeUrl: "" }; - -export const MsgRevoke = { - encode(message: MsgRevoke, writer: Writer = Writer.create()): Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.msgTypeUrl !== "") { - writer.uint32(26).string(message.msgTypeUrl); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgRevoke { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgRevoke } as MsgRevoke; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.msgTypeUrl = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgRevoke { - const message = { ...baseMsgRevoke } as MsgRevoke; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } else { - message.grantee = ""; - } - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = String(object.msgTypeUrl); - } else { - message.msgTypeUrl = ""; - } - return message; - }, - - toJSON(message: MsgRevoke): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl); - return obj; - }, - - fromPartial(object: DeepPartial): MsgRevoke { - const message = { ...baseMsgRevoke } as MsgRevoke; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } else { - message.grantee = ""; - } - if (object.msgTypeUrl !== undefined && object.msgTypeUrl !== null) { - message.msgTypeUrl = object.msgTypeUrl; - } else { - message.msgTypeUrl = ""; - } - return message; - }, -}; - -const baseMsgRevokeResponse: object = {}; - -export const MsgRevokeResponse = { - encode(_: MsgRevokeResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgRevokeResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgRevokeResponse } as MsgRevokeResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgRevokeResponse { - const message = { ...baseMsgRevokeResponse } as MsgRevokeResponse; - return message; - }, - - toJSON(_: MsgRevokeResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgRevokeResponse { - const message = { ...baseMsgRevokeResponse } as MsgRevokeResponse; - return message; - }, -}; - -/** Msg defines the authz Msg service. */ -export interface Msg { - /** - * Grant grants the provided authorization to the grantee on the granter's - * account with the provided expiration time. If there is already a grant - * for the given (granter, grantee, Authorization) triple, then the grant - * will be overwritten. - */ - Grant(request: MsgGrant): Promise; - /** - * Exec attempts to execute the provided messages using - * authorizations granted to the grantee. Each message should have only - * one signer corresponding to the granter of the authorization. - */ - Exec(request: MsgExec): Promise; - /** - * Revoke revokes any authorization corresponding to the provided method name on the - * granter's account that has been granted to the grantee. - */ - Revoke(request: MsgRevoke): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Grant(request: MsgGrant): Promise { - const data = MsgGrant.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Msg", "Grant", data); - return promise.then((data) => MsgGrantResponse.decode(new Reader(data))); - } - - Exec(request: MsgExec): Promise { - const data = MsgExec.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Msg", "Exec", data); - return promise.then((data) => MsgExecResponse.decode(new Reader(data))); - } - - Revoke(request: MsgRevoke): Promise { - const data = MsgRevoke.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.authz.v1beta1.Msg", - "Revoke", - data - ); - return promise.then((data) => MsgRevokeResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.d.ts deleted file mode 100644 index 2a5b71d976..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { Event } from "../../../../tendermint/abci/types"; -export declare const protobufPackage = "cosmos.base.abci.v1beta1"; -/** - * TxResponse defines a structure containing relevant tx data and metadata. The - * tags are stringified and the log is JSON decoded. - */ -export interface TxResponse { - /** The block height */ - height: number; - /** The transaction hash. */ - txhash: string; - /** Namespace for the Code */ - codespace: string; - /** Response code. */ - code: number; - /** Result bytes, if any. */ - data: string; - /** - * The output of the application's logger (raw string). May be - * non-deterministic. - */ - rawLog: string; - /** The output of the application's logger (typed). May be non-deterministic. */ - logs: ABCIMessageLog[]; - /** Additional information. May be non-deterministic. */ - info: string; - /** Amount of gas requested for transaction. */ - gasWanted: number; - /** Amount of gas consumed by transaction. */ - gasUsed: number; - /** The request transaction bytes. */ - tx: Any | undefined; - /** - * Time of the previous block. For heights > 1, it's the weighted median of - * the timestamps of the valid votes in the block.LastCommit. For height == 1, - * it's genesis time. - */ - timestamp: string; - /** - * 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. - * - * Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - */ - events: Event[]; -} -/** ABCIMessageLog defines a structure containing an indexed tx ABCI message log. */ -export interface ABCIMessageLog { - msgIndex: number; - log: string; - /** - * Events contains a slice of Event objects that were emitted during some - * execution. - */ - events: StringEvent[]; -} -/** - * StringEvent defines en Event object wrapper where all the attributes - * contain key/value pairs that are strings instead of raw bytes. - */ -export interface StringEvent { - type: string; - attributes: Attribute[]; -} -/** - * Attribute defines an attribute wrapper where the key and value are - * strings instead of raw bytes. - */ -export interface Attribute { - key: string; - value: string; -} -/** GasInfo defines tx execution gas context. */ -export interface GasInfo { - /** GasWanted is the maximum units of work we allow this tx to perform. */ - gasWanted: number; - /** GasUsed is the amount of gas actually consumed. */ - gasUsed: number; -} -/** Result is the union of ResponseFormat and ResponseCheckTx. */ -export interface Result { - /** - * Data is any data returned from message or handler execution. It MUST be - * length prefixed in order to separate data from multiple message executions. - */ - data: Uint8Array; - /** Log contains the log information from message or handler execution. */ - log: string; - /** - * Events contains a slice of Event objects that were emitted during message - * or handler execution. - */ - events: Event[]; -} -/** - * SimulationResponse defines the response generated when a transaction is - * successfully simulated. - */ -export interface SimulationResponse { - gasInfo: GasInfo | undefined; - result: Result | undefined; -} -/** - * MsgData defines the data returned in a Result object during message - * execution. - */ -export interface MsgData { - msgType: string; - data: Uint8Array; -} -/** - * TxMsgData defines a list of MsgData. A transaction will have a MsgData object - * for each message. - */ -export interface TxMsgData { - data: MsgData[]; -} -/** SearchTxsResult defines a structure for querying txs pageable */ -export interface SearchTxsResult { - /** Count of all txs */ - totalCount: number; - /** Count of txs in current page */ - count: number; - /** Index of current page, start from 1 */ - pageNumber: number; - /** Count of total pages */ - pageTotal: number; - /** Max count txs per page */ - limit: number; - /** List of txs in current page */ - txs: TxResponse[]; -} -export declare const TxResponse: { - encode(message: TxResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TxResponse; - fromJSON(object: any): TxResponse; - toJSON(message: TxResponse): unknown; - fromPartial(object: DeepPartial): TxResponse; -}; -export declare const ABCIMessageLog: { - encode(message: ABCIMessageLog, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ABCIMessageLog; - fromJSON(object: any): ABCIMessageLog; - toJSON(message: ABCIMessageLog): unknown; - fromPartial(object: DeepPartial): ABCIMessageLog; -}; -export declare const StringEvent: { - encode(message: StringEvent, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): StringEvent; - fromJSON(object: any): StringEvent; - toJSON(message: StringEvent): unknown; - fromPartial(object: DeepPartial): StringEvent; -}; -export declare const Attribute: { - encode(message: Attribute, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Attribute; - fromJSON(object: any): Attribute; - toJSON(message: Attribute): unknown; - fromPartial(object: DeepPartial): Attribute; -}; -export declare const GasInfo: { - encode(message: GasInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GasInfo; - fromJSON(object: any): GasInfo; - toJSON(message: GasInfo): unknown; - fromPartial(object: DeepPartial): GasInfo; -}; -export declare const Result: { - encode(message: Result, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Result; - fromJSON(object: any): Result; - toJSON(message: Result): unknown; - fromPartial(object: DeepPartial): Result; -}; -export declare const SimulationResponse: { - encode(message: SimulationResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SimulationResponse; - fromJSON(object: any): SimulationResponse; - toJSON(message: SimulationResponse): unknown; - fromPartial(object: DeepPartial): SimulationResponse; -}; -export declare const MsgData: { - encode(message: MsgData, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgData; - fromJSON(object: any): MsgData; - toJSON(message: MsgData): unknown; - fromPartial(object: DeepPartial): MsgData; -}; -export declare const TxMsgData: { - encode(message: TxMsgData, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TxMsgData; - fromJSON(object: any): TxMsgData; - toJSON(message: TxMsgData): unknown; - fromPartial(object: DeepPartial): TxMsgData; -}; -export declare const SearchTxsResult: { - encode(message: SearchTxsResult, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SearchTxsResult; - fromJSON(object: any): SearchTxsResult; - toJSON(message: SearchTxsResult): unknown; - fromPartial(object: DeepPartial): SearchTxsResult; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.js deleted file mode 100644 index a3f4469969..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.js +++ /dev/null @@ -1,1110 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { Event } from "../../../../tendermint/abci/types"; -export const protobufPackage = "cosmos.base.abci.v1beta1"; -const baseTxResponse = { - height: 0, - txhash: "", - codespace: "", - code: 0, - data: "", - rawLog: "", - info: "", - gasWanted: 0, - gasUsed: 0, - timestamp: "", -}; -export const TxResponse = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.txhash !== "") { - writer.uint32(18).string(message.txhash); - } - if (message.codespace !== "") { - writer.uint32(26).string(message.codespace); - } - if (message.code !== 0) { - writer.uint32(32).uint32(message.code); - } - if (message.data !== "") { - writer.uint32(42).string(message.data); - } - if (message.rawLog !== "") { - writer.uint32(50).string(message.rawLog); - } - for (const v of message.logs) { - ABCIMessageLog.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.info !== "") { - writer.uint32(66).string(message.info); - } - if (message.gasWanted !== 0) { - writer.uint32(72).int64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(80).int64(message.gasUsed); - } - if (message.tx !== undefined) { - Any.encode(message.tx, writer.uint32(90).fork()).ldelim(); - } - if (message.timestamp !== "") { - writer.uint32(98).string(message.timestamp); - } - for (const v of message.events) { - Event.encode(v, writer.uint32(106).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxResponse }; - message.logs = []; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64()); - break; - case 2: - message.txhash = reader.string(); - break; - case 3: - message.codespace = reader.string(); - break; - case 4: - message.code = reader.uint32(); - break; - case 5: - message.data = reader.string(); - break; - case 6: - message.rawLog = reader.string(); - break; - case 7: - message.logs.push(ABCIMessageLog.decode(reader, reader.uint32())); - break; - case 8: - message.info = reader.string(); - break; - case 9: - message.gasWanted = longToNumber(reader.int64()); - break; - case 10: - message.gasUsed = longToNumber(reader.int64()); - break; - case 11: - message.tx = Any.decode(reader, reader.uint32()); - break; - case 12: - message.timestamp = reader.string(); - break; - case 13: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTxResponse }; - message.logs = []; - message.events = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.txhash !== undefined && object.txhash !== null) { - message.txhash = String(object.txhash); - } - else { - message.txhash = ""; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } - else { - message.codespace = ""; - } - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } - else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = String(object.data); - } - else { - message.data = ""; - } - if (object.rawLog !== undefined && object.rawLog !== null) { - message.rawLog = String(object.rawLog); - } - else { - message.rawLog = ""; - } - if (object.logs !== undefined && object.logs !== null) { - for (const e of object.logs) { - message.logs.push(ABCIMessageLog.fromJSON(e)); - } - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } - else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } - else { - message.gasUsed = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = Any.fromJSON(object.tx); - } - else { - message.tx = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = String(object.timestamp); - } - else { - message.timestamp = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - message.txhash !== undefined && (obj.txhash = message.txhash); - message.codespace !== undefined && (obj.codespace = message.codespace); - message.code !== undefined && (obj.code = message.code); - message.data !== undefined && (obj.data = message.data); - message.rawLog !== undefined && (obj.rawLog = message.rawLog); - if (message.logs) { - obj.logs = message.logs.map((e) => e ? ABCIMessageLog.toJSON(e) : undefined); - } - else { - obj.logs = []; - } - message.info !== undefined && (obj.info = message.info); - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - message.tx !== undefined && - (obj.tx = message.tx ? Any.toJSON(message.tx) : undefined); - message.timestamp !== undefined && (obj.timestamp = message.timestamp); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } - else { - obj.events = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseTxResponse }; - message.logs = []; - message.events = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.txhash !== undefined && object.txhash !== null) { - message.txhash = object.txhash; - } - else { - message.txhash = ""; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } - else { - message.codespace = ""; - } - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } - else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = ""; - } - if (object.rawLog !== undefined && object.rawLog !== null) { - message.rawLog = object.rawLog; - } - else { - message.rawLog = ""; - } - if (object.logs !== undefined && object.logs !== null) { - for (const e of object.logs) { - message.logs.push(ABCIMessageLog.fromPartial(e)); - } - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } - else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } - else { - message.gasUsed = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = Any.fromPartial(object.tx); - } - else { - message.tx = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } - else { - message.timestamp = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; -const baseABCIMessageLog = { msgIndex: 0, log: "" }; -export const ABCIMessageLog = { - encode(message, writer = Writer.create()) { - if (message.msgIndex !== 0) { - writer.uint32(8).uint32(message.msgIndex); - } - if (message.log !== "") { - writer.uint32(18).string(message.log); - } - for (const v of message.events) { - StringEvent.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseABCIMessageLog }; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgIndex = reader.uint32(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - message.events.push(StringEvent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseABCIMessageLog }; - message.events = []; - if (object.msgIndex !== undefined && object.msgIndex !== null) { - message.msgIndex = Number(object.msgIndex); - } - else { - message.msgIndex = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } - else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(StringEvent.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.msgIndex !== undefined && (obj.msgIndex = message.msgIndex); - message.log !== undefined && (obj.log = message.log); - if (message.events) { - obj.events = message.events.map((e) => e ? StringEvent.toJSON(e) : undefined); - } - else { - obj.events = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseABCIMessageLog }; - message.events = []; - if (object.msgIndex !== undefined && object.msgIndex !== null) { - message.msgIndex = object.msgIndex; - } - else { - message.msgIndex = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } - else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(StringEvent.fromPartial(e)); - } - } - return message; - }, -}; -const baseStringEvent = { type: "" }; -export const StringEvent = { - encode(message, writer = Writer.create()) { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - for (const v of message.attributes) { - Attribute.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseStringEvent }; - message.attributes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.attributes.push(Attribute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseStringEvent }; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } - else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(Attribute.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && (obj.type = message.type); - if (message.attributes) { - obj.attributes = message.attributes.map((e) => e ? Attribute.toJSON(e) : undefined); - } - else { - obj.attributes = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseStringEvent }; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(Attribute.fromPartial(e)); - } - } - return message; - }, -}; -const baseAttribute = { key: "", value: "" }; -export const Attribute = { - encode(message, writer = Writer.create()) { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAttribute }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAttribute }; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } - else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = String(object.value); - } - else { - message.value = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - fromPartial(object) { - const message = { ...baseAttribute }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = ""; - } - return message; - }, -}; -const baseGasInfo = { gasWanted: 0, gasUsed: 0 }; -export const GasInfo = { - encode(message, writer = Writer.create()) { - if (message.gasWanted !== 0) { - writer.uint32(8).uint64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(16).uint64(message.gasUsed); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGasInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasWanted = longToNumber(reader.uint64()); - break; - case 2: - message.gasUsed = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGasInfo }; - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } - else { - message.gasUsed = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - return obj; - }, - fromPartial(object) { - const message = { ...baseGasInfo }; - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } - else { - message.gasUsed = 0; - } - return message; - }, -}; -const baseResult = { log: "" }; -export const Result = { - encode(message, writer = Writer.create()) { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(18).string(message.log); - } - for (const v of message.events) { - Event.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResult }; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResult }; - message.events = []; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } - else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.log !== undefined && (obj.log = message.log); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } - else { - obj.events = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseResult }; - message.events = []; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } - else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; -const baseSimulationResponse = {}; -export const SimulationResponse = { - encode(message, writer = Writer.create()) { - if (message.gasInfo !== undefined) { - GasInfo.encode(message.gasInfo, writer.uint32(10).fork()).ldelim(); - } - if (message.result !== undefined) { - Result.encode(message.result, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimulationResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasInfo = GasInfo.decode(reader, reader.uint32()); - break; - case 2: - message.result = Result.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSimulationResponse }; - if (object.gasInfo !== undefined && object.gasInfo !== null) { - message.gasInfo = GasInfo.fromJSON(object.gasInfo); - } - else { - message.gasInfo = undefined; - } - if (object.result !== undefined && object.result !== null) { - message.result = Result.fromJSON(object.result); - } - else { - message.result = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.gasInfo !== undefined && - (obj.gasInfo = message.gasInfo - ? GasInfo.toJSON(message.gasInfo) - : undefined); - message.result !== undefined && - (obj.result = message.result ? Result.toJSON(message.result) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseSimulationResponse }; - if (object.gasInfo !== undefined && object.gasInfo !== null) { - message.gasInfo = GasInfo.fromPartial(object.gasInfo); - } - else { - message.gasInfo = undefined; - } - if (object.result !== undefined && object.result !== null) { - message.result = Result.fromPartial(object.result); - } - else { - message.result = undefined; - } - return message; - }, -}; -const baseMsgData = { msgType: "" }; -export const MsgData = { - encode(message, writer = Writer.create()) { - if (message.msgType !== "") { - writer.uint32(10).string(message.msgType); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgData }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgType = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgData }; - if (object.msgType !== undefined && object.msgType !== null) { - message.msgType = String(object.msgType); - } - else { - message.msgType = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.msgType !== undefined && (obj.msgType = message.msgType); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgData }; - if (object.msgType !== undefined && object.msgType !== null) { - message.msgType = object.msgType; - } - else { - message.msgType = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseTxMsgData = {}; -export const TxMsgData = { - encode(message, writer = Writer.create()) { - for (const v of message.data) { - MsgData.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxMsgData }; - message.data = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data.push(MsgData.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTxMsgData }; - message.data = []; - if (object.data !== undefined && object.data !== null) { - for (const e of object.data) { - message.data.push(MsgData.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.data) { - obj.data = message.data.map((e) => (e ? MsgData.toJSON(e) : undefined)); - } - else { - obj.data = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseTxMsgData }; - message.data = []; - if (object.data !== undefined && object.data !== null) { - for (const e of object.data) { - message.data.push(MsgData.fromPartial(e)); - } - } - return message; - }, -}; -const baseSearchTxsResult = { - totalCount: 0, - count: 0, - pageNumber: 0, - pageTotal: 0, - limit: 0, -}; -export const SearchTxsResult = { - encode(message, writer = Writer.create()) { - if (message.totalCount !== 0) { - writer.uint32(8).uint64(message.totalCount); - } - if (message.count !== 0) { - writer.uint32(16).uint64(message.count); - } - if (message.pageNumber !== 0) { - writer.uint32(24).uint64(message.pageNumber); - } - if (message.pageTotal !== 0) { - writer.uint32(32).uint64(message.pageTotal); - } - if (message.limit !== 0) { - writer.uint32(40).uint64(message.limit); - } - for (const v of message.txs) { - TxResponse.encode(v, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSearchTxsResult }; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.totalCount = longToNumber(reader.uint64()); - break; - case 2: - message.count = longToNumber(reader.uint64()); - break; - case 3: - message.pageNumber = longToNumber(reader.uint64()); - break; - case 4: - message.pageTotal = longToNumber(reader.uint64()); - break; - case 5: - message.limit = longToNumber(reader.uint64()); - break; - case 6: - message.txs.push(TxResponse.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSearchTxsResult }; - message.txs = []; - if (object.totalCount !== undefined && object.totalCount !== null) { - message.totalCount = Number(object.totalCount); - } - else { - message.totalCount = 0; - } - if (object.count !== undefined && object.count !== null) { - message.count = Number(object.count); - } - else { - message.count = 0; - } - if (object.pageNumber !== undefined && object.pageNumber !== null) { - message.pageNumber = Number(object.pageNumber); - } - else { - message.pageNumber = 0; - } - if (object.pageTotal !== undefined && object.pageTotal !== null) { - message.pageTotal = Number(object.pageTotal); - } - else { - message.pageTotal = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(TxResponse.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.totalCount !== undefined && (obj.totalCount = message.totalCount); - message.count !== undefined && (obj.count = message.count); - message.pageNumber !== undefined && (obj.pageNumber = message.pageNumber); - message.pageTotal !== undefined && (obj.pageTotal = message.pageTotal); - message.limit !== undefined && (obj.limit = message.limit); - if (message.txs) { - obj.txs = message.txs.map((e) => (e ? TxResponse.toJSON(e) : undefined)); - } - else { - obj.txs = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSearchTxsResult }; - message.txs = []; - if (object.totalCount !== undefined && object.totalCount !== null) { - message.totalCount = object.totalCount; - } - else { - message.totalCount = 0; - } - if (object.count !== undefined && object.count !== null) { - message.count = object.count; - } - else { - message.count = 0; - } - if (object.pageNumber !== undefined && object.pageNumber !== null) { - message.pageNumber = object.pageNumber; - } - else { - message.pageNumber = 0; - } - if (object.pageTotal !== undefined && object.pageTotal !== null) { - message.pageTotal = object.pageTotal; - } - else { - message.pageTotal = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(TxResponse.fromPartial(e)); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.ts deleted file mode 100644 index 5f1e5e7efe..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.ts +++ /dev/null @@ -1,1279 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { Event } from "../../../../tendermint/abci/types"; - -export const protobufPackage = "cosmos.base.abci.v1beta1"; - -/** - * TxResponse defines a structure containing relevant tx data and metadata. The - * tags are stringified and the log is JSON decoded. - */ -export interface TxResponse { - /** The block height */ - height: number; - /** The transaction hash. */ - txhash: string; - /** Namespace for the Code */ - codespace: string; - /** Response code. */ - code: number; - /** Result bytes, if any. */ - data: string; - /** - * The output of the application's logger (raw string). May be - * non-deterministic. - */ - rawLog: string; - /** The output of the application's logger (typed). May be non-deterministic. */ - logs: ABCIMessageLog[]; - /** Additional information. May be non-deterministic. */ - info: string; - /** Amount of gas requested for transaction. */ - gasWanted: number; - /** Amount of gas consumed by transaction. */ - gasUsed: number; - /** The request transaction bytes. */ - tx: Any | undefined; - /** - * Time of the previous block. For heights > 1, it's the weighted median of - * the timestamps of the valid votes in the block.LastCommit. For height == 1, - * it's genesis time. - */ - timestamp: string; - /** - * 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. - * - * Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - */ - events: Event[]; -} - -/** ABCIMessageLog defines a structure containing an indexed tx ABCI message log. */ -export interface ABCIMessageLog { - msgIndex: number; - log: string; - /** - * Events contains a slice of Event objects that were emitted during some - * execution. - */ - events: StringEvent[]; -} - -/** - * StringEvent defines en Event object wrapper where all the attributes - * contain key/value pairs that are strings instead of raw bytes. - */ -export interface StringEvent { - type: string; - attributes: Attribute[]; -} - -/** - * Attribute defines an attribute wrapper where the key and value are - * strings instead of raw bytes. - */ -export interface Attribute { - key: string; - value: string; -} - -/** GasInfo defines tx execution gas context. */ -export interface GasInfo { - /** GasWanted is the maximum units of work we allow this tx to perform. */ - gasWanted: number; - /** GasUsed is the amount of gas actually consumed. */ - gasUsed: number; -} - -/** Result is the union of ResponseFormat and ResponseCheckTx. */ -export interface Result { - /** - * Data is any data returned from message or handler execution. It MUST be - * length prefixed in order to separate data from multiple message executions. - */ - data: Uint8Array; - /** Log contains the log information from message or handler execution. */ - log: string; - /** - * Events contains a slice of Event objects that were emitted during message - * or handler execution. - */ - events: Event[]; -} - -/** - * SimulationResponse defines the response generated when a transaction is - * successfully simulated. - */ -export interface SimulationResponse { - gasInfo: GasInfo | undefined; - result: Result | undefined; -} - -/** - * MsgData defines the data returned in a Result object during message - * execution. - */ -export interface MsgData { - msgType: string; - data: Uint8Array; -} - -/** - * TxMsgData defines a list of MsgData. A transaction will have a MsgData object - * for each message. - */ -export interface TxMsgData { - data: MsgData[]; -} - -/** SearchTxsResult defines a structure for querying txs pageable */ -export interface SearchTxsResult { - /** Count of all txs */ - totalCount: number; - /** Count of txs in current page */ - count: number; - /** Index of current page, start from 1 */ - pageNumber: number; - /** Count of total pages */ - pageTotal: number; - /** Max count txs per page */ - limit: number; - /** List of txs in current page */ - txs: TxResponse[]; -} - -const baseTxResponse: object = { - height: 0, - txhash: "", - codespace: "", - code: 0, - data: "", - rawLog: "", - info: "", - gasWanted: 0, - gasUsed: 0, - timestamp: "", -}; - -export const TxResponse = { - encode(message: TxResponse, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.txhash !== "") { - writer.uint32(18).string(message.txhash); - } - if (message.codespace !== "") { - writer.uint32(26).string(message.codespace); - } - if (message.code !== 0) { - writer.uint32(32).uint32(message.code); - } - if (message.data !== "") { - writer.uint32(42).string(message.data); - } - if (message.rawLog !== "") { - writer.uint32(50).string(message.rawLog); - } - for (const v of message.logs) { - ABCIMessageLog.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.info !== "") { - writer.uint32(66).string(message.info); - } - if (message.gasWanted !== 0) { - writer.uint32(72).int64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(80).int64(message.gasUsed); - } - if (message.tx !== undefined) { - Any.encode(message.tx, writer.uint32(90).fork()).ldelim(); - } - if (message.timestamp !== "") { - writer.uint32(98).string(message.timestamp); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(106).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxResponse } as TxResponse; - message.logs = []; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.txhash = reader.string(); - break; - case 3: - message.codespace = reader.string(); - break; - case 4: - message.code = reader.uint32(); - break; - case 5: - message.data = reader.string(); - break; - case 6: - message.rawLog = reader.string(); - break; - case 7: - message.logs.push(ABCIMessageLog.decode(reader, reader.uint32())); - break; - case 8: - message.info = reader.string(); - break; - case 9: - message.gasWanted = longToNumber(reader.int64() as Long); - break; - case 10: - message.gasUsed = longToNumber(reader.int64() as Long); - break; - case 11: - message.tx = Any.decode(reader, reader.uint32()); - break; - case 12: - message.timestamp = reader.string(); - break; - case 13: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxResponse { - const message = { ...baseTxResponse } as TxResponse; - message.logs = []; - message.events = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.txhash !== undefined && object.txhash !== null) { - message.txhash = String(object.txhash); - } else { - message.txhash = ""; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } else { - message.codespace = ""; - } - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = String(object.data); - } else { - message.data = ""; - } - if (object.rawLog !== undefined && object.rawLog !== null) { - message.rawLog = String(object.rawLog); - } else { - message.rawLog = ""; - } - if (object.logs !== undefined && object.logs !== null) { - for (const e of object.logs) { - message.logs.push(ABCIMessageLog.fromJSON(e)); - } - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } else { - message.gasUsed = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = Any.fromJSON(object.tx); - } else { - message.tx = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = String(object.timestamp); - } else { - message.timestamp = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: TxResponse): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.txhash !== undefined && (obj.txhash = message.txhash); - message.codespace !== undefined && (obj.codespace = message.codespace); - message.code !== undefined && (obj.code = message.code); - message.data !== undefined && (obj.data = message.data); - message.rawLog !== undefined && (obj.rawLog = message.rawLog); - if (message.logs) { - obj.logs = message.logs.map((e) => - e ? ABCIMessageLog.toJSON(e) : undefined - ); - } else { - obj.logs = []; - } - message.info !== undefined && (obj.info = message.info); - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - message.tx !== undefined && - (obj.tx = message.tx ? Any.toJSON(message.tx) : undefined); - message.timestamp !== undefined && (obj.timestamp = message.timestamp); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): TxResponse { - const message = { ...baseTxResponse } as TxResponse; - message.logs = []; - message.events = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.txhash !== undefined && object.txhash !== null) { - message.txhash = object.txhash; - } else { - message.txhash = ""; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } else { - message.codespace = ""; - } - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = ""; - } - if (object.rawLog !== undefined && object.rawLog !== null) { - message.rawLog = object.rawLog; - } else { - message.rawLog = ""; - } - if (object.logs !== undefined && object.logs !== null) { - for (const e of object.logs) { - message.logs.push(ABCIMessageLog.fromPartial(e)); - } - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } else { - message.gasUsed = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = Any.fromPartial(object.tx); - } else { - message.tx = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; - -const baseABCIMessageLog: object = { msgIndex: 0, log: "" }; - -export const ABCIMessageLog = { - encode(message: ABCIMessageLog, writer: Writer = Writer.create()): Writer { - if (message.msgIndex !== 0) { - writer.uint32(8).uint32(message.msgIndex); - } - if (message.log !== "") { - writer.uint32(18).string(message.log); - } - for (const v of message.events) { - StringEvent.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ABCIMessageLog { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseABCIMessageLog } as ABCIMessageLog; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgIndex = reader.uint32(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - message.events.push(StringEvent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ABCIMessageLog { - const message = { ...baseABCIMessageLog } as ABCIMessageLog; - message.events = []; - if (object.msgIndex !== undefined && object.msgIndex !== null) { - message.msgIndex = Number(object.msgIndex); - } else { - message.msgIndex = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(StringEvent.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ABCIMessageLog): unknown { - const obj: any = {}; - message.msgIndex !== undefined && (obj.msgIndex = message.msgIndex); - message.log !== undefined && (obj.log = message.log); - if (message.events) { - obj.events = message.events.map((e) => - e ? StringEvent.toJSON(e) : undefined - ); - } else { - obj.events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ABCIMessageLog { - const message = { ...baseABCIMessageLog } as ABCIMessageLog; - message.events = []; - if (object.msgIndex !== undefined && object.msgIndex !== null) { - message.msgIndex = object.msgIndex; - } else { - message.msgIndex = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(StringEvent.fromPartial(e)); - } - } - return message; - }, -}; - -const baseStringEvent: object = { type: "" }; - -export const StringEvent = { - encode(message: StringEvent, writer: Writer = Writer.create()): Writer { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - for (const v of message.attributes) { - Attribute.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): StringEvent { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseStringEvent } as StringEvent; - message.attributes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.attributes.push(Attribute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): StringEvent { - const message = { ...baseStringEvent } as StringEvent; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(Attribute.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: StringEvent): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); - } else { - obj.attributes = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): StringEvent { - const message = { ...baseStringEvent } as StringEvent; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(Attribute.fromPartial(e)); - } - } - return message; - }, -}; - -const baseAttribute: object = { key: "", value: "" }; - -export const Attribute = { - encode(message: Attribute, writer: Writer = Writer.create()): Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Attribute { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAttribute } as Attribute; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Attribute { - const message = { ...baseAttribute } as Attribute; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = String(object.value); - } else { - message.value = ""; - } - return message; - }, - - toJSON(message: Attribute): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - - fromPartial(object: DeepPartial): Attribute { - const message = { ...baseAttribute } as Attribute; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = ""; - } - return message; - }, -}; - -const baseGasInfo: object = { gasWanted: 0, gasUsed: 0 }; - -export const GasInfo = { - encode(message: GasInfo, writer: Writer = Writer.create()): Writer { - if (message.gasWanted !== 0) { - writer.uint32(8).uint64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(16).uint64(message.gasUsed); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GasInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGasInfo } as GasInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasWanted = longToNumber(reader.uint64() as Long); - break; - case 2: - message.gasUsed = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GasInfo { - const message = { ...baseGasInfo } as GasInfo; - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } else { - message.gasUsed = 0; - } - return message; - }, - - toJSON(message: GasInfo): unknown { - const obj: any = {}; - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - return obj; - }, - - fromPartial(object: DeepPartial): GasInfo { - const message = { ...baseGasInfo } as GasInfo; - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } else { - message.gasUsed = 0; - } - return message; - }, -}; - -const baseResult: object = { log: "" }; - -export const Result = { - encode(message: Result, writer: Writer = Writer.create()): Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(18).string(message.log); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Result { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResult } as Result; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Result { - const message = { ...baseResult } as Result; - message.events = []; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Result): unknown { - const obj: any = {}; - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.log !== undefined && (obj.log = message.log); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Result { - const message = { ...baseResult } as Result; - message.events = []; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSimulationResponse: object = {}; - -export const SimulationResponse = { - encode( - message: SimulationResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.gasInfo !== undefined) { - GasInfo.encode(message.gasInfo, writer.uint32(10).fork()).ldelim(); - } - if (message.result !== undefined) { - Result.encode(message.result, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SimulationResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimulationResponse } as SimulationResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasInfo = GasInfo.decode(reader, reader.uint32()); - break; - case 2: - message.result = Result.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SimulationResponse { - const message = { ...baseSimulationResponse } as SimulationResponse; - if (object.gasInfo !== undefined && object.gasInfo !== null) { - message.gasInfo = GasInfo.fromJSON(object.gasInfo); - } else { - message.gasInfo = undefined; - } - if (object.result !== undefined && object.result !== null) { - message.result = Result.fromJSON(object.result); - } else { - message.result = undefined; - } - return message; - }, - - toJSON(message: SimulationResponse): unknown { - const obj: any = {}; - message.gasInfo !== undefined && - (obj.gasInfo = message.gasInfo - ? GasInfo.toJSON(message.gasInfo) - : undefined); - message.result !== undefined && - (obj.result = message.result ? Result.toJSON(message.result) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): SimulationResponse { - const message = { ...baseSimulationResponse } as SimulationResponse; - if (object.gasInfo !== undefined && object.gasInfo !== null) { - message.gasInfo = GasInfo.fromPartial(object.gasInfo); - } else { - message.gasInfo = undefined; - } - if (object.result !== undefined && object.result !== null) { - message.result = Result.fromPartial(object.result); - } else { - message.result = undefined; - } - return message; - }, -}; - -const baseMsgData: object = { msgType: "" }; - -export const MsgData = { - encode(message: MsgData, writer: Writer = Writer.create()): Writer { - if (message.msgType !== "") { - writer.uint32(10).string(message.msgType); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgData { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgData } as MsgData; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgType = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgData { - const message = { ...baseMsgData } as MsgData; - if (object.msgType !== undefined && object.msgType !== null) { - message.msgType = String(object.msgType); - } else { - message.msgType = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: MsgData): unknown { - const obj: any = {}; - message.msgType !== undefined && (obj.msgType = message.msgType); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): MsgData { - const message = { ...baseMsgData } as MsgData; - if (object.msgType !== undefined && object.msgType !== null) { - message.msgType = object.msgType; - } else { - message.msgType = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseTxMsgData: object = {}; - -export const TxMsgData = { - encode(message: TxMsgData, writer: Writer = Writer.create()): Writer { - for (const v of message.data) { - MsgData.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxMsgData { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxMsgData } as TxMsgData; - message.data = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data.push(MsgData.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxMsgData { - const message = { ...baseTxMsgData } as TxMsgData; - message.data = []; - if (object.data !== undefined && object.data !== null) { - for (const e of object.data) { - message.data.push(MsgData.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: TxMsgData): unknown { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map((e) => (e ? MsgData.toJSON(e) : undefined)); - } else { - obj.data = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): TxMsgData { - const message = { ...baseTxMsgData } as TxMsgData; - message.data = []; - if (object.data !== undefined && object.data !== null) { - for (const e of object.data) { - message.data.push(MsgData.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSearchTxsResult: object = { - totalCount: 0, - count: 0, - pageNumber: 0, - pageTotal: 0, - limit: 0, -}; - -export const SearchTxsResult = { - encode(message: SearchTxsResult, writer: Writer = Writer.create()): Writer { - if (message.totalCount !== 0) { - writer.uint32(8).uint64(message.totalCount); - } - if (message.count !== 0) { - writer.uint32(16).uint64(message.count); - } - if (message.pageNumber !== 0) { - writer.uint32(24).uint64(message.pageNumber); - } - if (message.pageTotal !== 0) { - writer.uint32(32).uint64(message.pageTotal); - } - if (message.limit !== 0) { - writer.uint32(40).uint64(message.limit); - } - for (const v of message.txs) { - TxResponse.encode(v!, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SearchTxsResult { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSearchTxsResult } as SearchTxsResult; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.totalCount = longToNumber(reader.uint64() as Long); - break; - case 2: - message.count = longToNumber(reader.uint64() as Long); - break; - case 3: - message.pageNumber = longToNumber(reader.uint64() as Long); - break; - case 4: - message.pageTotal = longToNumber(reader.uint64() as Long); - break; - case 5: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 6: - message.txs.push(TxResponse.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SearchTxsResult { - const message = { ...baseSearchTxsResult } as SearchTxsResult; - message.txs = []; - if (object.totalCount !== undefined && object.totalCount !== null) { - message.totalCount = Number(object.totalCount); - } else { - message.totalCount = 0; - } - if (object.count !== undefined && object.count !== null) { - message.count = Number(object.count); - } else { - message.count = 0; - } - if (object.pageNumber !== undefined && object.pageNumber !== null) { - message.pageNumber = Number(object.pageNumber); - } else { - message.pageNumber = 0; - } - if (object.pageTotal !== undefined && object.pageTotal !== null) { - message.pageTotal = Number(object.pageTotal); - } else { - message.pageTotal = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(TxResponse.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SearchTxsResult): unknown { - const obj: any = {}; - message.totalCount !== undefined && (obj.totalCount = message.totalCount); - message.count !== undefined && (obj.count = message.count); - message.pageNumber !== undefined && (obj.pageNumber = message.pageNumber); - message.pageTotal !== undefined && (obj.pageTotal = message.pageTotal); - message.limit !== undefined && (obj.limit = message.limit); - if (message.txs) { - obj.txs = message.txs.map((e) => (e ? TxResponse.toJSON(e) : undefined)); - } else { - obj.txs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SearchTxsResult { - const message = { ...baseSearchTxsResult } as SearchTxsResult; - message.txs = []; - if (object.totalCount !== undefined && object.totalCount !== null) { - message.totalCount = object.totalCount; - } else { - message.totalCount = 0; - } - if (object.count !== undefined && object.count !== null) { - message.count = object.count; - } else { - message.count = 0; - } - if (object.pageNumber !== undefined && object.pageNumber !== null) { - message.pageNumber = object.pageNumber; - } else { - message.pageNumber = 0; - } - if (object.pageTotal !== undefined && object.pageTotal !== null) { - message.pageTotal = object.pageTotal; - } else { - message.pageTotal = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(TxResponse.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index 767d2c358f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - countTotal: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; -} -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index b5f5ced3d6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,242 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { - offset: 0, - limit: 0, - countTotal: false, - reverse: false, -}; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } - else { - message.reverse = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - message.reverse !== undefined && (obj.reverse = message.reverse); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } - else { - message.reverse = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index cd4b2d789d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,327 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - countTotal: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { - offset: 0, - limit: 0, - countTotal: false, - reverse: false, -}; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.countTotal = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } else { - message.reverse = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - message.reverse !== undefined && (obj.reverse = message.reverse); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } else { - message.reverse = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes( - message.nextKey !== undefined ? message.nextKey : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos_proto/cosmos.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos_proto/cosmos.d.ts deleted file mode 100644 index ac37814871..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos_proto/cosmos.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos_proto/cosmos.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos_proto/cosmos.js deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos_proto/cosmos.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30bdc6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0776..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/annotations.js deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7fb6d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b699..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ddc00f8b42..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,705 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fullyDecodeReservedExpansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = Boolean( - object.fullyDecodeReservedExpansion - ); - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", responseBody: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additionalBindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index bb088caa2a..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809039..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/any.ts deleted file mode 100644 index b137a629ea..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { typeUrl: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index a3076569af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,1022 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 252725808b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4144 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } - else { - message.proto3Optional = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } - else { - message.proto3Optional = false; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 9e508660d1..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5261 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } else { - message.proto3Optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } else { - message.proto3Optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/duration.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/duration.d.ts deleted file mode 100644 index 3493f63277..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/duration.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (duration.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} -export declare const Duration: { - encode(message: Duration, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Duration; - fromJSON(object: any): Duration; - toJSON(message: Duration): unknown; - fromPartial(object: DeepPartial): Duration; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/duration.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/duration.js deleted file mode 100644 index ea556facef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/duration.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseDuration = { seconds: 0, nanos: 0 }; -export const Duration = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/duration.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/duration.ts deleted file mode 100644 index fffd5b14ef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/duration.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (duration.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} - -const baseDuration: object = { seconds: 0, nanos: 0 }; - -export const Duration = { - encode(message: Duration, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Duration { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration } as Duration; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Duration): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/timestamp.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/timestamp.d.ts deleted file mode 100644 index 0c9db0bc0d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/timestamp.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} -export declare const Timestamp: { - encode(message: Timestamp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Timestamp; - fromJSON(object: any): Timestamp; - toJSON(message: Timestamp): unknown; - fromPartial(object: DeepPartial): Timestamp; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/timestamp.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/timestamp.js deleted file mode 100644 index 37b4119aef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/timestamp.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseTimestamp = { seconds: 0, nanos: 0 }; -export const Timestamp = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 11864afc86..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/abci/types.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/abci/types.d.ts deleted file mode 100644 index 7e37d4f216..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/abci/types.d.ts +++ /dev/null @@ -1,697 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Header } from "../../tendermint/types/types"; -import { ProofOps } from "../../tendermint/crypto/proof"; -import { EvidenceParams, ValidatorParams, VersionParams } from "../../tendermint/types/params"; -import { PublicKey } from "../../tendermint/crypto/keys"; -export declare const protobufPackage = "tendermint.abci"; -export declare enum CheckTxType { - NEW = 0, - RECHECK = 1, - UNRECOGNIZED = -1 -} -export declare function checkTxTypeFromJSON(object: any): CheckTxType; -export declare function checkTxTypeToJSON(object: CheckTxType): string; -export declare enum EvidenceType { - UNKNOWN = 0, - DUPLICATE_VOTE = 1, - LIGHT_CLIENT_ATTACK = 2, - UNRECOGNIZED = -1 -} -export declare function evidenceTypeFromJSON(object: any): EvidenceType; -export declare function evidenceTypeToJSON(object: EvidenceType): string; -export interface Request { - echo: RequestEcho | undefined; - flush: RequestFlush | undefined; - info: RequestInfo | undefined; - setOption: RequestSetOption | undefined; - initChain: RequestInitChain | undefined; - query: RequestQuery | undefined; - beginBlock: RequestBeginBlock | undefined; - checkTx: RequestCheckTx | undefined; - deliverTx: RequestDeliverTx | undefined; - endBlock: RequestEndBlock | undefined; - commit: RequestCommit | undefined; - listSnapshots: RequestListSnapshots | undefined; - offerSnapshot: RequestOfferSnapshot | undefined; - loadSnapshotChunk: RequestLoadSnapshotChunk | undefined; - applySnapshotChunk: RequestApplySnapshotChunk | undefined; -} -export interface RequestEcho { - message: string; -} -export interface RequestFlush { -} -export interface RequestInfo { - version: string; - blockVersion: number; - p2pVersion: number; -} -/** nondeterministic */ -export interface RequestSetOption { - key: string; - value: string; -} -export interface RequestInitChain { - time: Date | undefined; - chainId: string; - consensusParams: ConsensusParams | undefined; - validators: ValidatorUpdate[]; - appStateBytes: Uint8Array; - initialHeight: number; -} -export interface RequestQuery { - data: Uint8Array; - path: string; - height: number; - prove: boolean; -} -export interface RequestBeginBlock { - hash: Uint8Array; - header: Header | undefined; - lastCommitInfo: LastCommitInfo | undefined; - byzantineValidators: Evidence[]; -} -export interface RequestCheckTx { - tx: Uint8Array; - type: CheckTxType; -} -export interface RequestDeliverTx { - tx: Uint8Array; -} -export interface RequestEndBlock { - height: number; -} -export interface RequestCommit { -} -/** lists available snapshots */ -export interface RequestListSnapshots { -} -/** offers a snapshot to the application */ -export interface RequestOfferSnapshot { - /** snapshot offered by peers */ - snapshot: Snapshot | undefined; - /** light client-verified app hash for snapshot height */ - appHash: Uint8Array; -} -/** loads a snapshot chunk */ -export interface RequestLoadSnapshotChunk { - height: number; - format: number; - chunk: number; -} -/** Applies a snapshot chunk */ -export interface RequestApplySnapshotChunk { - index: number; - chunk: Uint8Array; - sender: string; -} -export interface Response { - exception: ResponseException | undefined; - echo: ResponseEcho | undefined; - flush: ResponseFlush | undefined; - info: ResponseInfo | undefined; - setOption: ResponseSetOption | undefined; - initChain: ResponseInitChain | undefined; - query: ResponseQuery | undefined; - beginBlock: ResponseBeginBlock | undefined; - checkTx: ResponseCheckTx | undefined; - deliverTx: ResponseDeliverTx | undefined; - endBlock: ResponseEndBlock | undefined; - commit: ResponseCommit | undefined; - listSnapshots: ResponseListSnapshots | undefined; - offerSnapshot: ResponseOfferSnapshot | undefined; - loadSnapshotChunk: ResponseLoadSnapshotChunk | undefined; - applySnapshotChunk: ResponseApplySnapshotChunk | undefined; -} -/** nondeterministic */ -export interface ResponseException { - error: string; -} -export interface ResponseEcho { - message: string; -} -export interface ResponseFlush { -} -export interface ResponseInfo { - data: string; - version: string; - appVersion: number; - lastBlockHeight: number; - lastBlockAppHash: Uint8Array; -} -/** nondeterministic */ -export interface ResponseSetOption { - code: number; - /** bytes data = 2; */ - log: string; - info: string; -} -export interface ResponseInitChain { - consensusParams: ConsensusParams | undefined; - validators: ValidatorUpdate[]; - appHash: Uint8Array; -} -export interface ResponseQuery { - code: number; - /** bytes data = 2; // use "value" instead. */ - log: string; - /** nondeterministic */ - info: string; - index: number; - key: Uint8Array; - value: Uint8Array; - proofOps: ProofOps | undefined; - height: number; - codespace: string; -} -export interface ResponseBeginBlock { - events: Event[]; -} -export interface ResponseCheckTx { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gasWanted: number; - gasUsed: number; - events: Event[]; - codespace: string; -} -export interface ResponseDeliverTx { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gasWanted: number; - gasUsed: number; - events: Event[]; - codespace: string; -} -export interface ResponseEndBlock { - validatorUpdates: ValidatorUpdate[]; - consensusParamUpdates: ConsensusParams | undefined; - events: Event[]; -} -export interface ResponseCommit { - /** reserve 1 */ - data: Uint8Array; - retainHeight: number; -} -export interface ResponseListSnapshots { - snapshots: Snapshot[]; -} -export interface ResponseOfferSnapshot { - result: ResponseOfferSnapshot_Result; -} -export declare enum ResponseOfferSnapshot_Result { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - UNKNOWN = 0, - /** ACCEPT - Snapshot accepted, apply chunks */ - ACCEPT = 1, - /** ABORT - Abort all snapshot restoration */ - ABORT = 2, - /** REJECT - Reject this specific snapshot, try others */ - REJECT = 3, - /** REJECT_FORMAT - Reject all snapshots of this format, try others */ - REJECT_FORMAT = 4, - /** REJECT_SENDER - Reject all snapshots from the sender(s), try others */ - REJECT_SENDER = 5, - UNRECOGNIZED = -1 -} -export declare function responseOfferSnapshot_ResultFromJSON(object: any): ResponseOfferSnapshot_Result; -export declare function responseOfferSnapshot_ResultToJSON(object: ResponseOfferSnapshot_Result): string; -export interface ResponseLoadSnapshotChunk { - chunk: Uint8Array; -} -export interface ResponseApplySnapshotChunk { - result: ResponseApplySnapshotChunk_Result; - /** Chunks to refetch and reapply */ - refetchChunks: number[]; - /** Chunk senders to reject and ban */ - rejectSenders: string[]; -} -export declare enum ResponseApplySnapshotChunk_Result { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - UNKNOWN = 0, - /** ACCEPT - Chunk successfully accepted */ - ACCEPT = 1, - /** ABORT - Abort all snapshot restoration */ - ABORT = 2, - /** RETRY - Retry chunk (combine with refetch and reject) */ - RETRY = 3, - /** RETRY_SNAPSHOT - Retry snapshot (combine with refetch and reject) */ - RETRY_SNAPSHOT = 4, - /** REJECT_SNAPSHOT - Reject this snapshot, try others */ - REJECT_SNAPSHOT = 5, - UNRECOGNIZED = -1 -} -export declare function responseApplySnapshotChunk_ResultFromJSON(object: any): ResponseApplySnapshotChunk_Result; -export declare function responseApplySnapshotChunk_ResultToJSON(object: ResponseApplySnapshotChunk_Result): string; -/** - * ConsensusParams contains all consensus-relevant parameters - * that can be adjusted by the abci app - */ -export interface ConsensusParams { - block: BlockParams | undefined; - evidence: EvidenceParams | undefined; - validator: ValidatorParams | undefined; - version: VersionParams | undefined; -} -/** BlockParams contains limits on the block size. */ -export interface BlockParams { - /** Note: must be greater than 0 */ - maxBytes: number; - /** Note: must be greater or equal to -1 */ - maxGas: number; -} -export interface LastCommitInfo { - round: number; - votes: VoteInfo[]; -} -/** - * Event allows application developers to attach additional information to - * ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. - * Later, transactions may be queried using these events. - */ -export interface Event { - type: string; - attributes: EventAttribute[]; -} -/** EventAttribute is a single key-value pair, associated with an event. */ -export interface EventAttribute { - key: Uint8Array; - value: Uint8Array; - /** nondeterministic */ - index: boolean; -} -/** - * TxResult contains results of executing the transaction. - * - * One usage is indexing transaction results. - */ -export interface TxResult { - height: number; - index: number; - tx: Uint8Array; - result: ResponseDeliverTx | undefined; -} -/** Validator */ -export interface Validator { - /** The first 20 bytes of SHA256(public key) */ - address: Uint8Array; - /** PubKey pub_key = 2 [(gogoproto.nullable)=false]; */ - power: number; -} -/** ValidatorUpdate */ -export interface ValidatorUpdate { - pubKey: PublicKey | undefined; - power: number; -} -/** VoteInfo */ -export interface VoteInfo { - validator: Validator | undefined; - signedLastBlock: boolean; -} -export interface Evidence { - type: EvidenceType; - /** The offending validator */ - validator: Validator | undefined; - /** The height when the offense occurred */ - height: number; - /** The corresponding time where the offense occurred */ - time: Date | undefined; - /** - * Total voting power of the validator set in case the ABCI application does - * not store historical validators. - * https://github.com/tendermint/tendermint/issues/4581 - */ - totalVotingPower: number; -} -export interface Snapshot { - /** The height at which the snapshot was taken */ - height: number; - /** The application-specific snapshot format */ - format: number; - /** Number of chunks in the snapshot */ - chunks: number; - /** Arbitrary snapshot hash, equal only if identical */ - hash: Uint8Array; - /** Arbitrary application metadata */ - metadata: Uint8Array; -} -export declare const Request: { - encode(message: Request, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Request; - fromJSON(object: any): Request; - toJSON(message: Request): unknown; - fromPartial(object: DeepPartial): Request; -}; -export declare const RequestEcho: { - encode(message: RequestEcho, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestEcho; - fromJSON(object: any): RequestEcho; - toJSON(message: RequestEcho): unknown; - fromPartial(object: DeepPartial): RequestEcho; -}; -export declare const RequestFlush: { - encode(_: RequestFlush, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestFlush; - fromJSON(_: any): RequestFlush; - toJSON(_: RequestFlush): unknown; - fromPartial(_: DeepPartial): RequestFlush; -}; -export declare const RequestInfo: { - encode(message: RequestInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestInfo; - fromJSON(object: any): RequestInfo; - toJSON(message: RequestInfo): unknown; - fromPartial(object: DeepPartial): RequestInfo; -}; -export declare const RequestSetOption: { - encode(message: RequestSetOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestSetOption; - fromJSON(object: any): RequestSetOption; - toJSON(message: RequestSetOption): unknown; - fromPartial(object: DeepPartial): RequestSetOption; -}; -export declare const RequestInitChain: { - encode(message: RequestInitChain, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestInitChain; - fromJSON(object: any): RequestInitChain; - toJSON(message: RequestInitChain): unknown; - fromPartial(object: DeepPartial): RequestInitChain; -}; -export declare const RequestQuery: { - encode(message: RequestQuery, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestQuery; - fromJSON(object: any): RequestQuery; - toJSON(message: RequestQuery): unknown; - fromPartial(object: DeepPartial): RequestQuery; -}; -export declare const RequestBeginBlock: { - encode(message: RequestBeginBlock, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestBeginBlock; - fromJSON(object: any): RequestBeginBlock; - toJSON(message: RequestBeginBlock): unknown; - fromPartial(object: DeepPartial): RequestBeginBlock; -}; -export declare const RequestCheckTx: { - encode(message: RequestCheckTx, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestCheckTx; - fromJSON(object: any): RequestCheckTx; - toJSON(message: RequestCheckTx): unknown; - fromPartial(object: DeepPartial): RequestCheckTx; -}; -export declare const RequestDeliverTx: { - encode(message: RequestDeliverTx, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestDeliverTx; - fromJSON(object: any): RequestDeliverTx; - toJSON(message: RequestDeliverTx): unknown; - fromPartial(object: DeepPartial): RequestDeliverTx; -}; -export declare const RequestEndBlock: { - encode(message: RequestEndBlock, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestEndBlock; - fromJSON(object: any): RequestEndBlock; - toJSON(message: RequestEndBlock): unknown; - fromPartial(object: DeepPartial): RequestEndBlock; -}; -export declare const RequestCommit: { - encode(_: RequestCommit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestCommit; - fromJSON(_: any): RequestCommit; - toJSON(_: RequestCommit): unknown; - fromPartial(_: DeepPartial): RequestCommit; -}; -export declare const RequestListSnapshots: { - encode(_: RequestListSnapshots, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestListSnapshots; - fromJSON(_: any): RequestListSnapshots; - toJSON(_: RequestListSnapshots): unknown; - fromPartial(_: DeepPartial): RequestListSnapshots; -}; -export declare const RequestOfferSnapshot: { - encode(message: RequestOfferSnapshot, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestOfferSnapshot; - fromJSON(object: any): RequestOfferSnapshot; - toJSON(message: RequestOfferSnapshot): unknown; - fromPartial(object: DeepPartial): RequestOfferSnapshot; -}; -export declare const RequestLoadSnapshotChunk: { - encode(message: RequestLoadSnapshotChunk, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestLoadSnapshotChunk; - fromJSON(object: any): RequestLoadSnapshotChunk; - toJSON(message: RequestLoadSnapshotChunk): unknown; - fromPartial(object: DeepPartial): RequestLoadSnapshotChunk; -}; -export declare const RequestApplySnapshotChunk: { - encode(message: RequestApplySnapshotChunk, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RequestApplySnapshotChunk; - fromJSON(object: any): RequestApplySnapshotChunk; - toJSON(message: RequestApplySnapshotChunk): unknown; - fromPartial(object: DeepPartial): RequestApplySnapshotChunk; -}; -export declare const Response: { - encode(message: Response, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Response; - fromJSON(object: any): Response; - toJSON(message: Response): unknown; - fromPartial(object: DeepPartial): Response; -}; -export declare const ResponseException: { - encode(message: ResponseException, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseException; - fromJSON(object: any): ResponseException; - toJSON(message: ResponseException): unknown; - fromPartial(object: DeepPartial): ResponseException; -}; -export declare const ResponseEcho: { - encode(message: ResponseEcho, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseEcho; - fromJSON(object: any): ResponseEcho; - toJSON(message: ResponseEcho): unknown; - fromPartial(object: DeepPartial): ResponseEcho; -}; -export declare const ResponseFlush: { - encode(_: ResponseFlush, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseFlush; - fromJSON(_: any): ResponseFlush; - toJSON(_: ResponseFlush): unknown; - fromPartial(_: DeepPartial): ResponseFlush; -}; -export declare const ResponseInfo: { - encode(message: ResponseInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseInfo; - fromJSON(object: any): ResponseInfo; - toJSON(message: ResponseInfo): unknown; - fromPartial(object: DeepPartial): ResponseInfo; -}; -export declare const ResponseSetOption: { - encode(message: ResponseSetOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseSetOption; - fromJSON(object: any): ResponseSetOption; - toJSON(message: ResponseSetOption): unknown; - fromPartial(object: DeepPartial): ResponseSetOption; -}; -export declare const ResponseInitChain: { - encode(message: ResponseInitChain, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseInitChain; - fromJSON(object: any): ResponseInitChain; - toJSON(message: ResponseInitChain): unknown; - fromPartial(object: DeepPartial): ResponseInitChain; -}; -export declare const ResponseQuery: { - encode(message: ResponseQuery, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseQuery; - fromJSON(object: any): ResponseQuery; - toJSON(message: ResponseQuery): unknown; - fromPartial(object: DeepPartial): ResponseQuery; -}; -export declare const ResponseBeginBlock: { - encode(message: ResponseBeginBlock, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseBeginBlock; - fromJSON(object: any): ResponseBeginBlock; - toJSON(message: ResponseBeginBlock): unknown; - fromPartial(object: DeepPartial): ResponseBeginBlock; -}; -export declare const ResponseCheckTx: { - encode(message: ResponseCheckTx, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseCheckTx; - fromJSON(object: any): ResponseCheckTx; - toJSON(message: ResponseCheckTx): unknown; - fromPartial(object: DeepPartial): ResponseCheckTx; -}; -export declare const ResponseDeliverTx: { - encode(message: ResponseDeliverTx, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseDeliverTx; - fromJSON(object: any): ResponseDeliverTx; - toJSON(message: ResponseDeliverTx): unknown; - fromPartial(object: DeepPartial): ResponseDeliverTx; -}; -export declare const ResponseEndBlock: { - encode(message: ResponseEndBlock, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseEndBlock; - fromJSON(object: any): ResponseEndBlock; - toJSON(message: ResponseEndBlock): unknown; - fromPartial(object: DeepPartial): ResponseEndBlock; -}; -export declare const ResponseCommit: { - encode(message: ResponseCommit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseCommit; - fromJSON(object: any): ResponseCommit; - toJSON(message: ResponseCommit): unknown; - fromPartial(object: DeepPartial): ResponseCommit; -}; -export declare const ResponseListSnapshots: { - encode(message: ResponseListSnapshots, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseListSnapshots; - fromJSON(object: any): ResponseListSnapshots; - toJSON(message: ResponseListSnapshots): unknown; - fromPartial(object: DeepPartial): ResponseListSnapshots; -}; -export declare const ResponseOfferSnapshot: { - encode(message: ResponseOfferSnapshot, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseOfferSnapshot; - fromJSON(object: any): ResponseOfferSnapshot; - toJSON(message: ResponseOfferSnapshot): unknown; - fromPartial(object: DeepPartial): ResponseOfferSnapshot; -}; -export declare const ResponseLoadSnapshotChunk: { - encode(message: ResponseLoadSnapshotChunk, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseLoadSnapshotChunk; - fromJSON(object: any): ResponseLoadSnapshotChunk; - toJSON(message: ResponseLoadSnapshotChunk): unknown; - fromPartial(object: DeepPartial): ResponseLoadSnapshotChunk; -}; -export declare const ResponseApplySnapshotChunk: { - encode(message: ResponseApplySnapshotChunk, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ResponseApplySnapshotChunk; - fromJSON(object: any): ResponseApplySnapshotChunk; - toJSON(message: ResponseApplySnapshotChunk): unknown; - fromPartial(object: DeepPartial): ResponseApplySnapshotChunk; -}; -export declare const ConsensusParams: { - encode(message: ConsensusParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ConsensusParams; - fromJSON(object: any): ConsensusParams; - toJSON(message: ConsensusParams): unknown; - fromPartial(object: DeepPartial): ConsensusParams; -}; -export declare const BlockParams: { - encode(message: BlockParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BlockParams; - fromJSON(object: any): BlockParams; - toJSON(message: BlockParams): unknown; - fromPartial(object: DeepPartial): BlockParams; -}; -export declare const LastCommitInfo: { - encode(message: LastCommitInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): LastCommitInfo; - fromJSON(object: any): LastCommitInfo; - toJSON(message: LastCommitInfo): unknown; - fromPartial(object: DeepPartial): LastCommitInfo; -}; -export declare const Event: { - encode(message: Event, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Event; - fromJSON(object: any): Event; - toJSON(message: Event): unknown; - fromPartial(object: DeepPartial): Event; -}; -export declare const EventAttribute: { - encode(message: EventAttribute, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EventAttribute; - fromJSON(object: any): EventAttribute; - toJSON(message: EventAttribute): unknown; - fromPartial(object: DeepPartial): EventAttribute; -}; -export declare const TxResult: { - encode(message: TxResult, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TxResult; - fromJSON(object: any): TxResult; - toJSON(message: TxResult): unknown; - fromPartial(object: DeepPartial): TxResult; -}; -export declare const Validator: { - encode(message: Validator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Validator; - fromJSON(object: any): Validator; - toJSON(message: Validator): unknown; - fromPartial(object: DeepPartial): Validator; -}; -export declare const ValidatorUpdate: { - encode(message: ValidatorUpdate, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorUpdate; - fromJSON(object: any): ValidatorUpdate; - toJSON(message: ValidatorUpdate): unknown; - fromPartial(object: DeepPartial): ValidatorUpdate; -}; -export declare const VoteInfo: { - encode(message: VoteInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): VoteInfo; - fromJSON(object: any): VoteInfo; - toJSON(message: VoteInfo): unknown; - fromPartial(object: DeepPartial): VoteInfo; -}; -export declare const Evidence: { - encode(message: Evidence, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Evidence; - fromJSON(object: any): Evidence; - toJSON(message: Evidence): unknown; - fromPartial(object: DeepPartial): Evidence; -}; -export declare const Snapshot: { - encode(message: Snapshot, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Snapshot; - fromJSON(object: any): Snapshot; - toJSON(message: Snapshot): unknown; - fromPartial(object: DeepPartial): Snapshot; -}; -export interface ABCIApplication { - Echo(request: RequestEcho): Promise; - Flush(request: RequestFlush): Promise; - Info(request: RequestInfo): Promise; - SetOption(request: RequestSetOption): Promise; - DeliverTx(request: RequestDeliverTx): Promise; - CheckTx(request: RequestCheckTx): Promise; - Query(request: RequestQuery): Promise; - Commit(request: RequestCommit): Promise; - InitChain(request: RequestInitChain): Promise; - BeginBlock(request: RequestBeginBlock): Promise; - EndBlock(request: RequestEndBlock): Promise; - ListSnapshots(request: RequestListSnapshots): Promise; - OfferSnapshot(request: RequestOfferSnapshot): Promise; - LoadSnapshotChunk(request: RequestLoadSnapshotChunk): Promise; - ApplySnapshotChunk(request: RequestApplySnapshotChunk): Promise; -} -export declare class ABCIApplicationClientImpl implements ABCIApplication { - private readonly rpc; - constructor(rpc: Rpc); - Echo(request: RequestEcho): Promise; - Flush(request: RequestFlush): Promise; - Info(request: RequestInfo): Promise; - SetOption(request: RequestSetOption): Promise; - DeliverTx(request: RequestDeliverTx): Promise; - CheckTx(request: RequestCheckTx): Promise; - Query(request: RequestQuery): Promise; - Commit(request: RequestCommit): Promise; - InitChain(request: RequestInitChain): Promise; - BeginBlock(request: RequestBeginBlock): Promise; - EndBlock(request: RequestEndBlock): Promise; - ListSnapshots(request: RequestListSnapshots): Promise; - OfferSnapshot(request: RequestOfferSnapshot): Promise; - LoadSnapshotChunk(request: RequestLoadSnapshotChunk): Promise; - ApplySnapshotChunk(request: RequestApplySnapshotChunk): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/abci/types.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/abci/types.js deleted file mode 100644 index db05dcc1b6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/abci/types.js +++ /dev/null @@ -1,4788 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { Header } from "../../tendermint/types/types"; -import { ProofOps } from "../../tendermint/crypto/proof"; -import { EvidenceParams, ValidatorParams, VersionParams, } from "../../tendermint/types/params"; -import { PublicKey } from "../../tendermint/crypto/keys"; -export const protobufPackage = "tendermint.abci"; -export var CheckTxType; -(function (CheckTxType) { - CheckTxType[CheckTxType["NEW"] = 0] = "NEW"; - CheckTxType[CheckTxType["RECHECK"] = 1] = "RECHECK"; - CheckTxType[CheckTxType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(CheckTxType || (CheckTxType = {})); -export function checkTxTypeFromJSON(object) { - switch (object) { - case 0: - case "NEW": - return CheckTxType.NEW; - case 1: - case "RECHECK": - return CheckTxType.RECHECK; - case -1: - case "UNRECOGNIZED": - default: - return CheckTxType.UNRECOGNIZED; - } -} -export function checkTxTypeToJSON(object) { - switch (object) { - case CheckTxType.NEW: - return "NEW"; - case CheckTxType.RECHECK: - return "RECHECK"; - default: - return "UNKNOWN"; - } -} -export var EvidenceType; -(function (EvidenceType) { - EvidenceType[EvidenceType["UNKNOWN"] = 0] = "UNKNOWN"; - EvidenceType[EvidenceType["DUPLICATE_VOTE"] = 1] = "DUPLICATE_VOTE"; - EvidenceType[EvidenceType["LIGHT_CLIENT_ATTACK"] = 2] = "LIGHT_CLIENT_ATTACK"; - EvidenceType[EvidenceType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(EvidenceType || (EvidenceType = {})); -export function evidenceTypeFromJSON(object) { - switch (object) { - case 0: - case "UNKNOWN": - return EvidenceType.UNKNOWN; - case 1: - case "DUPLICATE_VOTE": - return EvidenceType.DUPLICATE_VOTE; - case 2: - case "LIGHT_CLIENT_ATTACK": - return EvidenceType.LIGHT_CLIENT_ATTACK; - case -1: - case "UNRECOGNIZED": - default: - return EvidenceType.UNRECOGNIZED; - } -} -export function evidenceTypeToJSON(object) { - switch (object) { - case EvidenceType.UNKNOWN: - return "UNKNOWN"; - case EvidenceType.DUPLICATE_VOTE: - return "DUPLICATE_VOTE"; - case EvidenceType.LIGHT_CLIENT_ATTACK: - return "LIGHT_CLIENT_ATTACK"; - default: - return "UNKNOWN"; - } -} -export var ResponseOfferSnapshot_Result; -(function (ResponseOfferSnapshot_Result) { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["UNKNOWN"] = 0] = "UNKNOWN"; - /** ACCEPT - Snapshot accepted, apply chunks */ - ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["ACCEPT"] = 1] = "ACCEPT"; - /** ABORT - Abort all snapshot restoration */ - ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["ABORT"] = 2] = "ABORT"; - /** REJECT - Reject this specific snapshot, try others */ - ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["REJECT"] = 3] = "REJECT"; - /** REJECT_FORMAT - Reject all snapshots of this format, try others */ - ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["REJECT_FORMAT"] = 4] = "REJECT_FORMAT"; - /** REJECT_SENDER - Reject all snapshots from the sender(s), try others */ - ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["REJECT_SENDER"] = 5] = "REJECT_SENDER"; - ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(ResponseOfferSnapshot_Result || (ResponseOfferSnapshot_Result = {})); -export function responseOfferSnapshot_ResultFromJSON(object) { - switch (object) { - case 0: - case "UNKNOWN": - return ResponseOfferSnapshot_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseOfferSnapshot_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseOfferSnapshot_Result.ABORT; - case 3: - case "REJECT": - return ResponseOfferSnapshot_Result.REJECT; - case 4: - case "REJECT_FORMAT": - return ResponseOfferSnapshot_Result.REJECT_FORMAT; - case 5: - case "REJECT_SENDER": - return ResponseOfferSnapshot_Result.REJECT_SENDER; - case -1: - case "UNRECOGNIZED": - default: - return ResponseOfferSnapshot_Result.UNRECOGNIZED; - } -} -export function responseOfferSnapshot_ResultToJSON(object) { - switch (object) { - case ResponseOfferSnapshot_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseOfferSnapshot_Result.ACCEPT: - return "ACCEPT"; - case ResponseOfferSnapshot_Result.ABORT: - return "ABORT"; - case ResponseOfferSnapshot_Result.REJECT: - return "REJECT"; - case ResponseOfferSnapshot_Result.REJECT_FORMAT: - return "REJECT_FORMAT"; - case ResponseOfferSnapshot_Result.REJECT_SENDER: - return "REJECT_SENDER"; - default: - return "UNKNOWN"; - } -} -export var ResponseApplySnapshotChunk_Result; -(function (ResponseApplySnapshotChunk_Result) { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["UNKNOWN"] = 0] = "UNKNOWN"; - /** ACCEPT - Chunk successfully accepted */ - ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["ACCEPT"] = 1] = "ACCEPT"; - /** ABORT - Abort all snapshot restoration */ - ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["ABORT"] = 2] = "ABORT"; - /** RETRY - Retry chunk (combine with refetch and reject) */ - ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["RETRY"] = 3] = "RETRY"; - /** RETRY_SNAPSHOT - Retry snapshot (combine with refetch and reject) */ - ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["RETRY_SNAPSHOT"] = 4] = "RETRY_SNAPSHOT"; - /** REJECT_SNAPSHOT - Reject this snapshot, try others */ - ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["REJECT_SNAPSHOT"] = 5] = "REJECT_SNAPSHOT"; - ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(ResponseApplySnapshotChunk_Result || (ResponseApplySnapshotChunk_Result = {})); -export function responseApplySnapshotChunk_ResultFromJSON(object) { - switch (object) { - case 0: - case "UNKNOWN": - return ResponseApplySnapshotChunk_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseApplySnapshotChunk_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseApplySnapshotChunk_Result.ABORT; - case 3: - case "RETRY": - return ResponseApplySnapshotChunk_Result.RETRY; - case 4: - case "RETRY_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT; - case 5: - case "REJECT_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT; - case -1: - case "UNRECOGNIZED": - default: - return ResponseApplySnapshotChunk_Result.UNRECOGNIZED; - } -} -export function responseApplySnapshotChunk_ResultToJSON(object) { - switch (object) { - case ResponseApplySnapshotChunk_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseApplySnapshotChunk_Result.ACCEPT: - return "ACCEPT"; - case ResponseApplySnapshotChunk_Result.ABORT: - return "ABORT"; - case ResponseApplySnapshotChunk_Result.RETRY: - return "RETRY"; - case ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT: - return "RETRY_SNAPSHOT"; - case ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT: - return "REJECT_SNAPSHOT"; - default: - return "UNKNOWN"; - } -} -const baseRequest = {}; -export const Request = { - encode(message, writer = Writer.create()) { - if (message.echo !== undefined) { - RequestEcho.encode(message.echo, writer.uint32(10).fork()).ldelim(); - } - if (message.flush !== undefined) { - RequestFlush.encode(message.flush, writer.uint32(18).fork()).ldelim(); - } - if (message.info !== undefined) { - RequestInfo.encode(message.info, writer.uint32(26).fork()).ldelim(); - } - if (message.setOption !== undefined) { - RequestSetOption.encode(message.setOption, writer.uint32(34).fork()).ldelim(); - } - if (message.initChain !== undefined) { - RequestInitChain.encode(message.initChain, writer.uint32(42).fork()).ldelim(); - } - if (message.query !== undefined) { - RequestQuery.encode(message.query, writer.uint32(50).fork()).ldelim(); - } - if (message.beginBlock !== undefined) { - RequestBeginBlock.encode(message.beginBlock, writer.uint32(58).fork()).ldelim(); - } - if (message.checkTx !== undefined) { - RequestCheckTx.encode(message.checkTx, writer.uint32(66).fork()).ldelim(); - } - if (message.deliverTx !== undefined) { - RequestDeliverTx.encode(message.deliverTx, writer.uint32(74).fork()).ldelim(); - } - if (message.endBlock !== undefined) { - RequestEndBlock.encode(message.endBlock, writer.uint32(82).fork()).ldelim(); - } - if (message.commit !== undefined) { - RequestCommit.encode(message.commit, writer.uint32(90).fork()).ldelim(); - } - if (message.listSnapshots !== undefined) { - RequestListSnapshots.encode(message.listSnapshots, writer.uint32(98).fork()).ldelim(); - } - if (message.offerSnapshot !== undefined) { - RequestOfferSnapshot.encode(message.offerSnapshot, writer.uint32(106).fork()).ldelim(); - } - if (message.loadSnapshotChunk !== undefined) { - RequestLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(114).fork()).ldelim(); - } - if (message.applySnapshotChunk !== undefined) { - RequestApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(122).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.echo = RequestEcho.decode(reader, reader.uint32()); - break; - case 2: - message.flush = RequestFlush.decode(reader, reader.uint32()); - break; - case 3: - message.info = RequestInfo.decode(reader, reader.uint32()); - break; - case 4: - message.setOption = RequestSetOption.decode(reader, reader.uint32()); - break; - case 5: - message.initChain = RequestInitChain.decode(reader, reader.uint32()); - break; - case 6: - message.query = RequestQuery.decode(reader, reader.uint32()); - break; - case 7: - message.beginBlock = RequestBeginBlock.decode(reader, reader.uint32()); - break; - case 8: - message.checkTx = RequestCheckTx.decode(reader, reader.uint32()); - break; - case 9: - message.deliverTx = RequestDeliverTx.decode(reader, reader.uint32()); - break; - case 10: - message.endBlock = RequestEndBlock.decode(reader, reader.uint32()); - break; - case 11: - message.commit = RequestCommit.decode(reader, reader.uint32()); - break; - case 12: - message.listSnapshots = RequestListSnapshots.decode(reader, reader.uint32()); - break; - case 13: - message.offerSnapshot = RequestOfferSnapshot.decode(reader, reader.uint32()); - break; - case 14: - message.loadSnapshotChunk = RequestLoadSnapshotChunk.decode(reader, reader.uint32()); - break; - case 15: - message.applySnapshotChunk = RequestApplySnapshotChunk.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequest }; - if (object.echo !== undefined && object.echo !== null) { - message.echo = RequestEcho.fromJSON(object.echo); - } - else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = RequestFlush.fromJSON(object.flush); - } - else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = RequestInfo.fromJSON(object.info); - } - else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = RequestSetOption.fromJSON(object.setOption); - } - else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = RequestInitChain.fromJSON(object.initChain); - } - else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = RequestQuery.fromJSON(object.query); - } - else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = RequestBeginBlock.fromJSON(object.beginBlock); - } - else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = RequestCheckTx.fromJSON(object.checkTx); - } - else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = RequestDeliverTx.fromJSON(object.deliverTx); - } - else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = RequestEndBlock.fromJSON(object.endBlock); - } - else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = RequestCommit.fromJSON(object.commit); - } - else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = RequestListSnapshots.fromJSON(object.listSnapshots); - } - else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = RequestOfferSnapshot.fromJSON(object.offerSnapshot); - } - else { - message.offerSnapshot = undefined; - } - if (object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null) { - message.loadSnapshotChunk = RequestLoadSnapshotChunk.fromJSON(object.loadSnapshotChunk); - } - else { - message.loadSnapshotChunk = undefined; - } - if (object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null) { - message.applySnapshotChunk = RequestApplySnapshotChunk.fromJSON(object.applySnapshotChunk); - } - else { - message.applySnapshotChunk = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.echo !== undefined && - (obj.echo = message.echo ? RequestEcho.toJSON(message.echo) : undefined); - message.flush !== undefined && - (obj.flush = message.flush - ? RequestFlush.toJSON(message.flush) - : undefined); - message.info !== undefined && - (obj.info = message.info ? RequestInfo.toJSON(message.info) : undefined); - message.setOption !== undefined && - (obj.setOption = message.setOption - ? RequestSetOption.toJSON(message.setOption) - : undefined); - message.initChain !== undefined && - (obj.initChain = message.initChain - ? RequestInitChain.toJSON(message.initChain) - : undefined); - message.query !== undefined && - (obj.query = message.query - ? RequestQuery.toJSON(message.query) - : undefined); - message.beginBlock !== undefined && - (obj.beginBlock = message.beginBlock - ? RequestBeginBlock.toJSON(message.beginBlock) - : undefined); - message.checkTx !== undefined && - (obj.checkTx = message.checkTx - ? RequestCheckTx.toJSON(message.checkTx) - : undefined); - message.deliverTx !== undefined && - (obj.deliverTx = message.deliverTx - ? RequestDeliverTx.toJSON(message.deliverTx) - : undefined); - message.endBlock !== undefined && - (obj.endBlock = message.endBlock - ? RequestEndBlock.toJSON(message.endBlock) - : undefined); - message.commit !== undefined && - (obj.commit = message.commit - ? RequestCommit.toJSON(message.commit) - : undefined); - message.listSnapshots !== undefined && - (obj.listSnapshots = message.listSnapshots - ? RequestListSnapshots.toJSON(message.listSnapshots) - : undefined); - message.offerSnapshot !== undefined && - (obj.offerSnapshot = message.offerSnapshot - ? RequestOfferSnapshot.toJSON(message.offerSnapshot) - : undefined); - message.loadSnapshotChunk !== undefined && - (obj.loadSnapshotChunk = message.loadSnapshotChunk - ? RequestLoadSnapshotChunk.toJSON(message.loadSnapshotChunk) - : undefined); - message.applySnapshotChunk !== undefined && - (obj.applySnapshotChunk = message.applySnapshotChunk - ? RequestApplySnapshotChunk.toJSON(message.applySnapshotChunk) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequest }; - if (object.echo !== undefined && object.echo !== null) { - message.echo = RequestEcho.fromPartial(object.echo); - } - else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = RequestFlush.fromPartial(object.flush); - } - else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = RequestInfo.fromPartial(object.info); - } - else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = RequestSetOption.fromPartial(object.setOption); - } - else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = RequestInitChain.fromPartial(object.initChain); - } - else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = RequestQuery.fromPartial(object.query); - } - else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = RequestBeginBlock.fromPartial(object.beginBlock); - } - else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = RequestCheckTx.fromPartial(object.checkTx); - } - else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = RequestDeliverTx.fromPartial(object.deliverTx); - } - else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = RequestEndBlock.fromPartial(object.endBlock); - } - else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = RequestCommit.fromPartial(object.commit); - } - else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = RequestListSnapshots.fromPartial(object.listSnapshots); - } - else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = RequestOfferSnapshot.fromPartial(object.offerSnapshot); - } - else { - message.offerSnapshot = undefined; - } - if (object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null) { - message.loadSnapshotChunk = RequestLoadSnapshotChunk.fromPartial(object.loadSnapshotChunk); - } - else { - message.loadSnapshotChunk = undefined; - } - if (object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null) { - message.applySnapshotChunk = RequestApplySnapshotChunk.fromPartial(object.applySnapshotChunk); - } - else { - message.applySnapshotChunk = undefined; - } - return message; - }, -}; -const baseRequestEcho = { message: "" }; -export const RequestEcho = { - encode(message, writer = Writer.create()) { - if (message.message !== "") { - writer.uint32(10).string(message.message); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestEcho }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestEcho }; - if (object.message !== undefined && object.message !== null) { - message.message = String(object.message); - } - else { - message.message = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.message !== undefined && (obj.message = message.message); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestEcho }; - if (object.message !== undefined && object.message !== null) { - message.message = object.message; - } - else { - message.message = ""; - } - return message; - }, -}; -const baseRequestFlush = {}; -export const RequestFlush = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestFlush }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseRequestFlush }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseRequestFlush }; - return message; - }, -}; -const baseRequestInfo = { version: "", blockVersion: 0, p2pVersion: 0 }; -export const RequestInfo = { - encode(message, writer = Writer.create()) { - if (message.version !== "") { - writer.uint32(10).string(message.version); - } - if (message.blockVersion !== 0) { - writer.uint32(16).uint64(message.blockVersion); - } - if (message.p2pVersion !== 0) { - writer.uint32(24).uint64(message.p2pVersion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; - case 2: - message.blockVersion = longToNumber(reader.uint64()); - break; - case 3: - message.p2pVersion = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestInfo }; - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } - else { - message.version = ""; - } - if (object.blockVersion !== undefined && object.blockVersion !== null) { - message.blockVersion = Number(object.blockVersion); - } - else { - message.blockVersion = 0; - } - if (object.p2pVersion !== undefined && object.p2pVersion !== null) { - message.p2pVersion = Number(object.p2pVersion); - } - else { - message.p2pVersion = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.version !== undefined && (obj.version = message.version); - message.blockVersion !== undefined && - (obj.blockVersion = message.blockVersion); - message.p2pVersion !== undefined && (obj.p2pVersion = message.p2pVersion); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestInfo }; - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } - else { - message.version = ""; - } - if (object.blockVersion !== undefined && object.blockVersion !== null) { - message.blockVersion = object.blockVersion; - } - else { - message.blockVersion = 0; - } - if (object.p2pVersion !== undefined && object.p2pVersion !== null) { - message.p2pVersion = object.p2pVersion; - } - else { - message.p2pVersion = 0; - } - return message; - }, -}; -const baseRequestSetOption = { key: "", value: "" }; -export const RequestSetOption = { - encode(message, writer = Writer.create()) { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestSetOption }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestSetOption }; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } - else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = String(object.value); - } - else { - message.value = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestSetOption }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = ""; - } - return message; - }, -}; -const baseRequestInitChain = { chainId: "", initialHeight: 0 }; -export const RequestInitChain = { - encode(message, writer = Writer.create()) { - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(10).fork()).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(18).string(message.chainId); - } - if (message.consensusParams !== undefined) { - ConsensusParams.encode(message.consensusParams, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.validators) { - ValidatorUpdate.encode(v, writer.uint32(34).fork()).ldelim(); - } - if (message.appStateBytes.length !== 0) { - writer.uint32(42).bytes(message.appStateBytes); - } - if (message.initialHeight !== 0) { - writer.uint32(48).int64(message.initialHeight); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestInitChain }; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.consensusParams = ConsensusParams.decode(reader, reader.uint32()); - break; - case 4: - message.validators.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 5: - message.appStateBytes = reader.bytes(); - break; - case 6: - message.initialHeight = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestInitChain }; - message.validators = []; - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } - else { - message.time = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = String(object.chainId); - } - else { - message.chainId = ""; - } - if (object.consensusParams !== undefined && - object.consensusParams !== null) { - message.consensusParams = ConsensusParams.fromJSON(object.consensusParams); - } - else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromJSON(e)); - } - } - if (object.appStateBytes !== undefined && object.appStateBytes !== null) { - message.appStateBytes = bytesFromBase64(object.appStateBytes); - } - if (object.initialHeight !== undefined && object.initialHeight !== null) { - message.initialHeight = Number(object.initialHeight); - } - else { - message.initialHeight = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.chainId !== undefined && (obj.chainId = message.chainId); - message.consensusParams !== undefined && - (obj.consensusParams = message.consensusParams - ? ConsensusParams.toJSON(message.consensusParams) - : undefined); - if (message.validators) { - obj.validators = message.validators.map((e) => e ? ValidatorUpdate.toJSON(e) : undefined); - } - else { - obj.validators = []; - } - message.appStateBytes !== undefined && - (obj.appStateBytes = base64FromBytes(message.appStateBytes !== undefined - ? message.appStateBytes - : new Uint8Array())); - message.initialHeight !== undefined && - (obj.initialHeight = message.initialHeight); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestInitChain }; - message.validators = []; - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } - else { - message.time = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = object.chainId; - } - else { - message.chainId = ""; - } - if (object.consensusParams !== undefined && - object.consensusParams !== null) { - message.consensusParams = ConsensusParams.fromPartial(object.consensusParams); - } - else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromPartial(e)); - } - } - if (object.appStateBytes !== undefined && object.appStateBytes !== null) { - message.appStateBytes = object.appStateBytes; - } - else { - message.appStateBytes = new Uint8Array(); - } - if (object.initialHeight !== undefined && object.initialHeight !== null) { - message.initialHeight = object.initialHeight; - } - else { - message.initialHeight = 0; - } - return message; - }, -}; -const baseRequestQuery = { path: "", height: 0, prove: false }; -export const RequestQuery = { - encode(message, writer = Writer.create()) { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.prove === true) { - writer.uint32(32).bool(message.prove); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestQuery }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.height = longToNumber(reader.int64()); - break; - case 4: - message.prove = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestQuery }; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.prove !== undefined && object.prove !== null) { - message.prove = Boolean(object.prove); - } - else { - message.prove = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.path !== undefined && (obj.path = message.path); - message.height !== undefined && (obj.height = message.height); - message.prove !== undefined && (obj.prove = message.prove); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestQuery }; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.prove !== undefined && object.prove !== null) { - message.prove = object.prove; - } - else { - message.prove = false; - } - return message; - }, -}; -const baseRequestBeginBlock = {}; -export const RequestBeginBlock = { - encode(message, writer = Writer.create()) { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(18).fork()).ldelim(); - } - if (message.lastCommitInfo !== undefined) { - LastCommitInfo.encode(message.lastCommitInfo, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.byzantineValidators) { - Evidence.encode(v, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestBeginBlock }; - message.byzantineValidators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.header = Header.decode(reader, reader.uint32()); - break; - case 3: - message.lastCommitInfo = LastCommitInfo.decode(reader, reader.uint32()); - break; - case 4: - message.byzantineValidators.push(Evidence.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestBeginBlock }; - message.byzantineValidators = []; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } - else { - message.header = undefined; - } - if (object.lastCommitInfo !== undefined && object.lastCommitInfo !== null) { - message.lastCommitInfo = LastCommitInfo.fromJSON(object.lastCommitInfo); - } - else { - message.lastCommitInfo = undefined; - } - if (object.byzantineValidators !== undefined && - object.byzantineValidators !== null) { - for (const e of object.byzantineValidators) { - message.byzantineValidators.push(Evidence.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.lastCommitInfo !== undefined && - (obj.lastCommitInfo = message.lastCommitInfo - ? LastCommitInfo.toJSON(message.lastCommitInfo) - : undefined); - if (message.byzantineValidators) { - obj.byzantineValidators = message.byzantineValidators.map((e) => e ? Evidence.toJSON(e) : undefined); - } - else { - obj.byzantineValidators = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestBeginBlock }; - message.byzantineValidators = []; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = new Uint8Array(); - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } - else { - message.header = undefined; - } - if (object.lastCommitInfo !== undefined && object.lastCommitInfo !== null) { - message.lastCommitInfo = LastCommitInfo.fromPartial(object.lastCommitInfo); - } - else { - message.lastCommitInfo = undefined; - } - if (object.byzantineValidators !== undefined && - object.byzantineValidators !== null) { - for (const e of object.byzantineValidators) { - message.byzantineValidators.push(Evidence.fromPartial(e)); - } - } - return message; - }, -}; -const baseRequestCheckTx = { type: 0 }; -export const RequestCheckTx = { - encode(message, writer = Writer.create()) { - if (message.tx.length !== 0) { - writer.uint32(10).bytes(message.tx); - } - if (message.type !== 0) { - writer.uint32(16).int32(message.type); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestCheckTx }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = reader.bytes(); - break; - case 2: - message.type = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestCheckTx }; - if (object.tx !== undefined && object.tx !== null) { - message.tx = bytesFromBase64(object.tx); - } - if (object.type !== undefined && object.type !== null) { - message.type = checkTxTypeFromJSON(object.type); - } - else { - message.type = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.tx !== undefined && - (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array())); - message.type !== undefined && (obj.type = checkTxTypeToJSON(message.type)); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestCheckTx }; - if (object.tx !== undefined && object.tx !== null) { - message.tx = object.tx; - } - else { - message.tx = new Uint8Array(); - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 0; - } - return message; - }, -}; -const baseRequestDeliverTx = {}; -export const RequestDeliverTx = { - encode(message, writer = Writer.create()) { - if (message.tx.length !== 0) { - writer.uint32(10).bytes(message.tx); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestDeliverTx }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestDeliverTx }; - if (object.tx !== undefined && object.tx !== null) { - message.tx = bytesFromBase64(object.tx); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.tx !== undefined && - (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestDeliverTx }; - if (object.tx !== undefined && object.tx !== null) { - message.tx = object.tx; - } - else { - message.tx = new Uint8Array(); - } - return message; - }, -}; -const baseRequestEndBlock = { height: 0 }; -export const RequestEndBlock = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestEndBlock }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestEndBlock }; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestEndBlock }; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - return message; - }, -}; -const baseRequestCommit = {}; -export const RequestCommit = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestCommit }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseRequestCommit }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseRequestCommit }; - return message; - }, -}; -const baseRequestListSnapshots = {}; -export const RequestListSnapshots = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestListSnapshots }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseRequestListSnapshots }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseRequestListSnapshots }; - return message; - }, -}; -const baseRequestOfferSnapshot = {}; -export const RequestOfferSnapshot = { - encode(message, writer = Writer.create()) { - if (message.snapshot !== undefined) { - Snapshot.encode(message.snapshot, writer.uint32(10).fork()).ldelim(); - } - if (message.appHash.length !== 0) { - writer.uint32(18).bytes(message.appHash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestOfferSnapshot }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshot = Snapshot.decode(reader, reader.uint32()); - break; - case 2: - message.appHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRequestOfferSnapshot }; - if (object.snapshot !== undefined && object.snapshot !== null) { - message.snapshot = Snapshot.fromJSON(object.snapshot); - } - else { - message.snapshot = undefined; - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = bytesFromBase64(object.appHash); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.snapshot !== undefined && - (obj.snapshot = message.snapshot - ? Snapshot.toJSON(message.snapshot) - : undefined); - message.appHash !== undefined && - (obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseRequestOfferSnapshot }; - if (object.snapshot !== undefined && object.snapshot !== null) { - message.snapshot = Snapshot.fromPartial(object.snapshot); - } - else { - message.snapshot = undefined; - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = object.appHash; - } - else { - message.appHash = new Uint8Array(); - } - return message; - }, -}; -const baseRequestLoadSnapshotChunk = { height: 0, format: 0, chunk: 0 }; -export const RequestLoadSnapshotChunk = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).uint64(message.height); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - if (message.chunk !== 0) { - writer.uint32(24).uint32(message.chunk); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseRequestLoadSnapshotChunk, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.uint64()); - break; - case 2: - message.format = reader.uint32(); - break; - case 3: - message.chunk = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseRequestLoadSnapshotChunk, - }; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = Number(object.format); - } - else { - message.format = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = Number(object.chunk); - } - else { - message.chunk = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - message.format !== undefined && (obj.format = message.format); - message.chunk !== undefined && (obj.chunk = message.chunk); - return obj; - }, - fromPartial(object) { - const message = { - ...baseRequestLoadSnapshotChunk, - }; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = object.format; - } - else { - message.format = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = object.chunk; - } - else { - message.chunk = 0; - } - return message; - }, -}; -const baseRequestApplySnapshotChunk = { index: 0, sender: "" }; -export const RequestApplySnapshotChunk = { - encode(message, writer = Writer.create()) { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.chunk.length !== 0) { - writer.uint32(18).bytes(message.chunk); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseRequestApplySnapshotChunk, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.chunk = reader.bytes(); - break; - case 3: - message.sender = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseRequestApplySnapshotChunk, - }; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = bytesFromBase64(object.chunk); - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.index !== undefined && (obj.index = message.index); - message.chunk !== undefined && - (obj.chunk = base64FromBytes(message.chunk !== undefined ? message.chunk : new Uint8Array())); - message.sender !== undefined && (obj.sender = message.sender); - return obj; - }, - fromPartial(object) { - const message = { - ...baseRequestApplySnapshotChunk, - }; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = object.chunk; - } - else { - message.chunk = new Uint8Array(); - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - return message; - }, -}; -const baseResponse = {}; -export const Response = { - encode(message, writer = Writer.create()) { - if (message.exception !== undefined) { - ResponseException.encode(message.exception, writer.uint32(10).fork()).ldelim(); - } - if (message.echo !== undefined) { - ResponseEcho.encode(message.echo, writer.uint32(18).fork()).ldelim(); - } - if (message.flush !== undefined) { - ResponseFlush.encode(message.flush, writer.uint32(26).fork()).ldelim(); - } - if (message.info !== undefined) { - ResponseInfo.encode(message.info, writer.uint32(34).fork()).ldelim(); - } - if (message.setOption !== undefined) { - ResponseSetOption.encode(message.setOption, writer.uint32(42).fork()).ldelim(); - } - if (message.initChain !== undefined) { - ResponseInitChain.encode(message.initChain, writer.uint32(50).fork()).ldelim(); - } - if (message.query !== undefined) { - ResponseQuery.encode(message.query, writer.uint32(58).fork()).ldelim(); - } - if (message.beginBlock !== undefined) { - ResponseBeginBlock.encode(message.beginBlock, writer.uint32(66).fork()).ldelim(); - } - if (message.checkTx !== undefined) { - ResponseCheckTx.encode(message.checkTx, writer.uint32(74).fork()).ldelim(); - } - if (message.deliverTx !== undefined) { - ResponseDeliverTx.encode(message.deliverTx, writer.uint32(82).fork()).ldelim(); - } - if (message.endBlock !== undefined) { - ResponseEndBlock.encode(message.endBlock, writer.uint32(90).fork()).ldelim(); - } - if (message.commit !== undefined) { - ResponseCommit.encode(message.commit, writer.uint32(98).fork()).ldelim(); - } - if (message.listSnapshots !== undefined) { - ResponseListSnapshots.encode(message.listSnapshots, writer.uint32(106).fork()).ldelim(); - } - if (message.offerSnapshot !== undefined) { - ResponseOfferSnapshot.encode(message.offerSnapshot, writer.uint32(114).fork()).ldelim(); - } - if (message.loadSnapshotChunk !== undefined) { - ResponseLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(122).fork()).ldelim(); - } - if (message.applySnapshotChunk !== undefined) { - ResponseApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(130).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exception = ResponseException.decode(reader, reader.uint32()); - break; - case 2: - message.echo = ResponseEcho.decode(reader, reader.uint32()); - break; - case 3: - message.flush = ResponseFlush.decode(reader, reader.uint32()); - break; - case 4: - message.info = ResponseInfo.decode(reader, reader.uint32()); - break; - case 5: - message.setOption = ResponseSetOption.decode(reader, reader.uint32()); - break; - case 6: - message.initChain = ResponseInitChain.decode(reader, reader.uint32()); - break; - case 7: - message.query = ResponseQuery.decode(reader, reader.uint32()); - break; - case 8: - message.beginBlock = ResponseBeginBlock.decode(reader, reader.uint32()); - break; - case 9: - message.checkTx = ResponseCheckTx.decode(reader, reader.uint32()); - break; - case 10: - message.deliverTx = ResponseDeliverTx.decode(reader, reader.uint32()); - break; - case 11: - message.endBlock = ResponseEndBlock.decode(reader, reader.uint32()); - break; - case 12: - message.commit = ResponseCommit.decode(reader, reader.uint32()); - break; - case 13: - message.listSnapshots = ResponseListSnapshots.decode(reader, reader.uint32()); - break; - case 14: - message.offerSnapshot = ResponseOfferSnapshot.decode(reader, reader.uint32()); - break; - case 15: - message.loadSnapshotChunk = ResponseLoadSnapshotChunk.decode(reader, reader.uint32()); - break; - case 16: - message.applySnapshotChunk = ResponseApplySnapshotChunk.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponse }; - if (object.exception !== undefined && object.exception !== null) { - message.exception = ResponseException.fromJSON(object.exception); - } - else { - message.exception = undefined; - } - if (object.echo !== undefined && object.echo !== null) { - message.echo = ResponseEcho.fromJSON(object.echo); - } - else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = ResponseFlush.fromJSON(object.flush); - } - else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = ResponseInfo.fromJSON(object.info); - } - else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = ResponseSetOption.fromJSON(object.setOption); - } - else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = ResponseInitChain.fromJSON(object.initChain); - } - else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = ResponseQuery.fromJSON(object.query); - } - else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = ResponseBeginBlock.fromJSON(object.beginBlock); - } - else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = ResponseCheckTx.fromJSON(object.checkTx); - } - else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = ResponseDeliverTx.fromJSON(object.deliverTx); - } - else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = ResponseEndBlock.fromJSON(object.endBlock); - } - else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = ResponseCommit.fromJSON(object.commit); - } - else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = ResponseListSnapshots.fromJSON(object.listSnapshots); - } - else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = ResponseOfferSnapshot.fromJSON(object.offerSnapshot); - } - else { - message.offerSnapshot = undefined; - } - if (object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null) { - message.loadSnapshotChunk = ResponseLoadSnapshotChunk.fromJSON(object.loadSnapshotChunk); - } - else { - message.loadSnapshotChunk = undefined; - } - if (object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null) { - message.applySnapshotChunk = ResponseApplySnapshotChunk.fromJSON(object.applySnapshotChunk); - } - else { - message.applySnapshotChunk = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.exception !== undefined && - (obj.exception = message.exception - ? ResponseException.toJSON(message.exception) - : undefined); - message.echo !== undefined && - (obj.echo = message.echo ? ResponseEcho.toJSON(message.echo) : undefined); - message.flush !== undefined && - (obj.flush = message.flush - ? ResponseFlush.toJSON(message.flush) - : undefined); - message.info !== undefined && - (obj.info = message.info ? ResponseInfo.toJSON(message.info) : undefined); - message.setOption !== undefined && - (obj.setOption = message.setOption - ? ResponseSetOption.toJSON(message.setOption) - : undefined); - message.initChain !== undefined && - (obj.initChain = message.initChain - ? ResponseInitChain.toJSON(message.initChain) - : undefined); - message.query !== undefined && - (obj.query = message.query - ? ResponseQuery.toJSON(message.query) - : undefined); - message.beginBlock !== undefined && - (obj.beginBlock = message.beginBlock - ? ResponseBeginBlock.toJSON(message.beginBlock) - : undefined); - message.checkTx !== undefined && - (obj.checkTx = message.checkTx - ? ResponseCheckTx.toJSON(message.checkTx) - : undefined); - message.deliverTx !== undefined && - (obj.deliverTx = message.deliverTx - ? ResponseDeliverTx.toJSON(message.deliverTx) - : undefined); - message.endBlock !== undefined && - (obj.endBlock = message.endBlock - ? ResponseEndBlock.toJSON(message.endBlock) - : undefined); - message.commit !== undefined && - (obj.commit = message.commit - ? ResponseCommit.toJSON(message.commit) - : undefined); - message.listSnapshots !== undefined && - (obj.listSnapshots = message.listSnapshots - ? ResponseListSnapshots.toJSON(message.listSnapshots) - : undefined); - message.offerSnapshot !== undefined && - (obj.offerSnapshot = message.offerSnapshot - ? ResponseOfferSnapshot.toJSON(message.offerSnapshot) - : undefined); - message.loadSnapshotChunk !== undefined && - (obj.loadSnapshotChunk = message.loadSnapshotChunk - ? ResponseLoadSnapshotChunk.toJSON(message.loadSnapshotChunk) - : undefined); - message.applySnapshotChunk !== undefined && - (obj.applySnapshotChunk = message.applySnapshotChunk - ? ResponseApplySnapshotChunk.toJSON(message.applySnapshotChunk) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponse }; - if (object.exception !== undefined && object.exception !== null) { - message.exception = ResponseException.fromPartial(object.exception); - } - else { - message.exception = undefined; - } - if (object.echo !== undefined && object.echo !== null) { - message.echo = ResponseEcho.fromPartial(object.echo); - } - else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = ResponseFlush.fromPartial(object.flush); - } - else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = ResponseInfo.fromPartial(object.info); - } - else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = ResponseSetOption.fromPartial(object.setOption); - } - else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = ResponseInitChain.fromPartial(object.initChain); - } - else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = ResponseQuery.fromPartial(object.query); - } - else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = ResponseBeginBlock.fromPartial(object.beginBlock); - } - else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = ResponseCheckTx.fromPartial(object.checkTx); - } - else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = ResponseDeliverTx.fromPartial(object.deliverTx); - } - else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = ResponseEndBlock.fromPartial(object.endBlock); - } - else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = ResponseCommit.fromPartial(object.commit); - } - else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = ResponseListSnapshots.fromPartial(object.listSnapshots); - } - else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = ResponseOfferSnapshot.fromPartial(object.offerSnapshot); - } - else { - message.offerSnapshot = undefined; - } - if (object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null) { - message.loadSnapshotChunk = ResponseLoadSnapshotChunk.fromPartial(object.loadSnapshotChunk); - } - else { - message.loadSnapshotChunk = undefined; - } - if (object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null) { - message.applySnapshotChunk = ResponseApplySnapshotChunk.fromPartial(object.applySnapshotChunk); - } - else { - message.applySnapshotChunk = undefined; - } - return message; - }, -}; -const baseResponseException = { error: "" }; -export const ResponseException = { - encode(message, writer = Writer.create()) { - if (message.error !== "") { - writer.uint32(10).string(message.error); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseException }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseException }; - if (object.error !== undefined && object.error !== null) { - message.error = String(object.error); - } - else { - message.error = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.error !== undefined && (obj.error = message.error); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseException }; - if (object.error !== undefined && object.error !== null) { - message.error = object.error; - } - else { - message.error = ""; - } - return message; - }, -}; -const baseResponseEcho = { message: "" }; -export const ResponseEcho = { - encode(message, writer = Writer.create()) { - if (message.message !== "") { - writer.uint32(10).string(message.message); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseEcho }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseEcho }; - if (object.message !== undefined && object.message !== null) { - message.message = String(object.message); - } - else { - message.message = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.message !== undefined && (obj.message = message.message); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseEcho }; - if (object.message !== undefined && object.message !== null) { - message.message = object.message; - } - else { - message.message = ""; - } - return message; - }, -}; -const baseResponseFlush = {}; -export const ResponseFlush = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseFlush }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseResponseFlush }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseResponseFlush }; - return message; - }, -}; -const baseResponseInfo = { - data: "", - version: "", - appVersion: 0, - lastBlockHeight: 0, -}; -export const ResponseInfo = { - encode(message, writer = Writer.create()) { - if (message.data !== "") { - writer.uint32(10).string(message.data); - } - if (message.version !== "") { - writer.uint32(18).string(message.version); - } - if (message.appVersion !== 0) { - writer.uint32(24).uint64(message.appVersion); - } - if (message.lastBlockHeight !== 0) { - writer.uint32(32).int64(message.lastBlockHeight); - } - if (message.lastBlockAppHash.length !== 0) { - writer.uint32(42).bytes(message.lastBlockAppHash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.string(); - break; - case 2: - message.version = reader.string(); - break; - case 3: - message.appVersion = longToNumber(reader.uint64()); - break; - case 4: - message.lastBlockHeight = longToNumber(reader.int64()); - break; - case 5: - message.lastBlockAppHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseInfo }; - if (object.data !== undefined && object.data !== null) { - message.data = String(object.data); - } - else { - message.data = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } - else { - message.version = ""; - } - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = Number(object.appVersion); - } - else { - message.appVersion = 0; - } - if (object.lastBlockHeight !== undefined && - object.lastBlockHeight !== null) { - message.lastBlockHeight = Number(object.lastBlockHeight); - } - else { - message.lastBlockHeight = 0; - } - if (object.lastBlockAppHash !== undefined && - object.lastBlockAppHash !== null) { - message.lastBlockAppHash = bytesFromBase64(object.lastBlockAppHash); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && (obj.data = message.data); - message.version !== undefined && (obj.version = message.version); - message.appVersion !== undefined && (obj.appVersion = message.appVersion); - message.lastBlockHeight !== undefined && - (obj.lastBlockHeight = message.lastBlockHeight); - message.lastBlockAppHash !== undefined && - (obj.lastBlockAppHash = base64FromBytes(message.lastBlockAppHash !== undefined - ? message.lastBlockAppHash - : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseInfo }; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } - else { - message.version = ""; - } - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = object.appVersion; - } - else { - message.appVersion = 0; - } - if (object.lastBlockHeight !== undefined && - object.lastBlockHeight !== null) { - message.lastBlockHeight = object.lastBlockHeight; - } - else { - message.lastBlockHeight = 0; - } - if (object.lastBlockAppHash !== undefined && - object.lastBlockAppHash !== null) { - message.lastBlockAppHash = object.lastBlockAppHash; - } - else { - message.lastBlockAppHash = new Uint8Array(); - } - return message; - }, -}; -const baseResponseSetOption = { code: 0, log: "", info: "" }; -export const ResponseSetOption = { - encode(message, writer = Writer.create()) { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseSetOption }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseSetOption }; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } - else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } - else { - message.info = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.code !== undefined && (obj.code = message.code); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseSetOption }; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } - else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } - else { - message.info = ""; - } - return message; - }, -}; -const baseResponseInitChain = {}; -export const ResponseInitChain = { - encode(message, writer = Writer.create()) { - if (message.consensusParams !== undefined) { - ConsensusParams.encode(message.consensusParams, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.validators) { - ValidatorUpdate.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.appHash.length !== 0) { - writer.uint32(26).bytes(message.appHash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseInitChain }; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusParams = ConsensusParams.decode(reader, reader.uint32()); - break; - case 2: - message.validators.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 3: - message.appHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseInitChain }; - message.validators = []; - if (object.consensusParams !== undefined && - object.consensusParams !== null) { - message.consensusParams = ConsensusParams.fromJSON(object.consensusParams); - } - else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromJSON(e)); - } - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = bytesFromBase64(object.appHash); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.consensusParams !== undefined && - (obj.consensusParams = message.consensusParams - ? ConsensusParams.toJSON(message.consensusParams) - : undefined); - if (message.validators) { - obj.validators = message.validators.map((e) => e ? ValidatorUpdate.toJSON(e) : undefined); - } - else { - obj.validators = []; - } - message.appHash !== undefined && - (obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseInitChain }; - message.validators = []; - if (object.consensusParams !== undefined && - object.consensusParams !== null) { - message.consensusParams = ConsensusParams.fromPartial(object.consensusParams); - } - else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromPartial(e)); - } - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = object.appHash; - } - else { - message.appHash = new Uint8Array(); - } - return message; - }, -}; -const baseResponseQuery = { - code: 0, - log: "", - info: "", - index: 0, - height: 0, - codespace: "", -}; -export const ResponseQuery = { - encode(message, writer = Writer.create()) { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.index !== 0) { - writer.uint32(40).int64(message.index); - } - if (message.key.length !== 0) { - writer.uint32(50).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(58).bytes(message.value); - } - if (message.proofOps !== undefined) { - ProofOps.encode(message.proofOps, writer.uint32(66).fork()).ldelim(); - } - if (message.height !== 0) { - writer.uint32(72).int64(message.height); - } - if (message.codespace !== "") { - writer.uint32(82).string(message.codespace); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseQuery }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.index = longToNumber(reader.int64()); - break; - case 6: - message.key = reader.bytes(); - break; - case 7: - message.value = reader.bytes(); - break; - case 8: - message.proofOps = ProofOps.decode(reader, reader.uint32()); - break; - case 9: - message.height = longToNumber(reader.int64()); - break; - case 10: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseQuery }; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } - else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } - else { - message.info = ""; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.proofOps !== undefined && object.proofOps !== null) { - message.proofOps = ProofOps.fromJSON(object.proofOps); - } - else { - message.proofOps = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } - else { - message.codespace = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.code !== undefined && (obj.code = message.code); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.index !== undefined && (obj.index = message.index); - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - message.proofOps !== undefined && - (obj.proofOps = message.proofOps - ? ProofOps.toJSON(message.proofOps) - : undefined); - message.height !== undefined && (obj.height = message.height); - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseQuery }; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } - else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } - else { - message.info = ""; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - if (object.proofOps !== undefined && object.proofOps !== null) { - message.proofOps = ProofOps.fromPartial(object.proofOps); - } - else { - message.proofOps = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } - else { - message.codespace = ""; - } - return message; - }, -}; -const baseResponseBeginBlock = {}; -export const ResponseBeginBlock = { - encode(message, writer = Writer.create()) { - for (const v of message.events) { - Event.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseBeginBlock }; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseBeginBlock }; - message.events = []; - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } - else { - obj.events = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseBeginBlock }; - message.events = []; - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; -const baseResponseCheckTx = { - code: 0, - log: "", - info: "", - gasWanted: 0, - gasUsed: 0, - codespace: "", -}; -export const ResponseCheckTx = { - encode(message, writer = Writer.create()) { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.gasWanted !== 0) { - writer.uint32(40).int64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(48).int64(message.gasUsed); - } - for (const v of message.events) { - Event.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.codespace !== "") { - writer.uint32(66).string(message.codespace); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseCheckTx }; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gasWanted = longToNumber(reader.int64()); - break; - case 6: - message.gasUsed = longToNumber(reader.int64()); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseCheckTx }; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } - else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } - else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } - else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } - else { - message.codespace = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.code !== undefined && (obj.code = message.code); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } - else { - obj.events = []; - } - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseCheckTx }; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } - else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } - else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } - else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } - else { - message.codespace = ""; - } - return message; - }, -}; -const baseResponseDeliverTx = { - code: 0, - log: "", - info: "", - gasWanted: 0, - gasUsed: 0, - codespace: "", -}; -export const ResponseDeliverTx = { - encode(message, writer = Writer.create()) { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.gasWanted !== 0) { - writer.uint32(40).int64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(48).int64(message.gasUsed); - } - for (const v of message.events) { - Event.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.codespace !== "") { - writer.uint32(66).string(message.codespace); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseDeliverTx }; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gasWanted = longToNumber(reader.int64()); - break; - case 6: - message.gasUsed = longToNumber(reader.int64()); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseDeliverTx }; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } - else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } - else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } - else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } - else { - message.codespace = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.code !== undefined && (obj.code = message.code); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } - else { - obj.events = []; - } - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseDeliverTx }; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } - else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } - else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } - else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } - else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } - else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } - else { - message.codespace = ""; - } - return message; - }, -}; -const baseResponseEndBlock = {}; -export const ResponseEndBlock = { - encode(message, writer = Writer.create()) { - for (const v of message.validatorUpdates) { - ValidatorUpdate.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusParamUpdates !== undefined) { - ConsensusParams.encode(message.consensusParamUpdates, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.events) { - Event.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseEndBlock }; - message.validatorUpdates = []; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorUpdates.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 2: - message.consensusParamUpdates = ConsensusParams.decode(reader, reader.uint32()); - break; - case 3: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseEndBlock }; - message.validatorUpdates = []; - message.events = []; - if (object.validatorUpdates !== undefined && - object.validatorUpdates !== null) { - for (const e of object.validatorUpdates) { - message.validatorUpdates.push(ValidatorUpdate.fromJSON(e)); - } - } - if (object.consensusParamUpdates !== undefined && - object.consensusParamUpdates !== null) { - message.consensusParamUpdates = ConsensusParams.fromJSON(object.consensusParamUpdates); - } - else { - message.consensusParamUpdates = undefined; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.validatorUpdates) { - obj.validatorUpdates = message.validatorUpdates.map((e) => e ? ValidatorUpdate.toJSON(e) : undefined); - } - else { - obj.validatorUpdates = []; - } - message.consensusParamUpdates !== undefined && - (obj.consensusParamUpdates = message.consensusParamUpdates - ? ConsensusParams.toJSON(message.consensusParamUpdates) - : undefined); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } - else { - obj.events = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseEndBlock }; - message.validatorUpdates = []; - message.events = []; - if (object.validatorUpdates !== undefined && - object.validatorUpdates !== null) { - for (const e of object.validatorUpdates) { - message.validatorUpdates.push(ValidatorUpdate.fromPartial(e)); - } - } - if (object.consensusParamUpdates !== undefined && - object.consensusParamUpdates !== null) { - message.consensusParamUpdates = ConsensusParams.fromPartial(object.consensusParamUpdates); - } - else { - message.consensusParamUpdates = undefined; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; -const baseResponseCommit = { retainHeight: 0 }; -export const ResponseCommit = { - encode(message, writer = Writer.create()) { - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.retainHeight !== 0) { - writer.uint32(24).int64(message.retainHeight); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseCommit }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.data = reader.bytes(); - break; - case 3: - message.retainHeight = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseCommit }; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.retainHeight !== undefined && object.retainHeight !== null) { - message.retainHeight = Number(object.retainHeight); - } - else { - message.retainHeight = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.retainHeight !== undefined && - (obj.retainHeight = message.retainHeight); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseCommit }; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - if (object.retainHeight !== undefined && object.retainHeight !== null) { - message.retainHeight = object.retainHeight; - } - else { - message.retainHeight = 0; - } - return message; - }, -}; -const baseResponseListSnapshots = {}; -export const ResponseListSnapshots = { - encode(message, writer = Writer.create()) { - for (const v of message.snapshots) { - Snapshot.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseListSnapshots }; - message.snapshots = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshots.push(Snapshot.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseListSnapshots }; - message.snapshots = []; - if (object.snapshots !== undefined && object.snapshots !== null) { - for (const e of object.snapshots) { - message.snapshots.push(Snapshot.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.snapshots) { - obj.snapshots = message.snapshots.map((e) => e ? Snapshot.toJSON(e) : undefined); - } - else { - obj.snapshots = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseListSnapshots }; - message.snapshots = []; - if (object.snapshots !== undefined && object.snapshots !== null) { - for (const e of object.snapshots) { - message.snapshots.push(Snapshot.fromPartial(e)); - } - } - return message; - }, -}; -const baseResponseOfferSnapshot = { result: 0 }; -export const ResponseOfferSnapshot = { - encode(message, writer = Writer.create()) { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseOfferSnapshot }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseResponseOfferSnapshot }; - if (object.result !== undefined && object.result !== null) { - message.result = responseOfferSnapshot_ResultFromJSON(object.result); - } - else { - message.result = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.result !== undefined && - (obj.result = responseOfferSnapshot_ResultToJSON(message.result)); - return obj; - }, - fromPartial(object) { - const message = { ...baseResponseOfferSnapshot }; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } - else { - message.result = 0; - } - return message; - }, -}; -const baseResponseLoadSnapshotChunk = {}; -export const ResponseLoadSnapshotChunk = { - encode(message, writer = Writer.create()) { - if (message.chunk.length !== 0) { - writer.uint32(10).bytes(message.chunk); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseResponseLoadSnapshotChunk, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.chunk = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseResponseLoadSnapshotChunk, - }; - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = bytesFromBase64(object.chunk); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.chunk !== undefined && - (obj.chunk = base64FromBytes(message.chunk !== undefined ? message.chunk : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { - ...baseResponseLoadSnapshotChunk, - }; - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = object.chunk; - } - else { - message.chunk = new Uint8Array(); - } - return message; - }, -}; -const baseResponseApplySnapshotChunk = { - result: 0, - refetchChunks: 0, - rejectSenders: "", -}; -export const ResponseApplySnapshotChunk = { - encode(message, writer = Writer.create()) { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - writer.uint32(18).fork(); - for (const v of message.refetchChunks) { - writer.uint32(v); - } - writer.ldelim(); - for (const v of message.rejectSenders) { - writer.uint32(26).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseResponseApplySnapshotChunk, - }; - message.refetchChunks = []; - message.rejectSenders = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.refetchChunks.push(reader.uint32()); - } - } - else { - message.refetchChunks.push(reader.uint32()); - } - break; - case 3: - message.rejectSenders.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseResponseApplySnapshotChunk, - }; - message.refetchChunks = []; - message.rejectSenders = []; - if (object.result !== undefined && object.result !== null) { - message.result = responseApplySnapshotChunk_ResultFromJSON(object.result); - } - else { - message.result = 0; - } - if (object.refetchChunks !== undefined && object.refetchChunks !== null) { - for (const e of object.refetchChunks) { - message.refetchChunks.push(Number(e)); - } - } - if (object.rejectSenders !== undefined && object.rejectSenders !== null) { - for (const e of object.rejectSenders) { - message.rejectSenders.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.result !== undefined && - (obj.result = responseApplySnapshotChunk_ResultToJSON(message.result)); - if (message.refetchChunks) { - obj.refetchChunks = message.refetchChunks.map((e) => e); - } - else { - obj.refetchChunks = []; - } - if (message.rejectSenders) { - obj.rejectSenders = message.rejectSenders.map((e) => e); - } - else { - obj.rejectSenders = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseResponseApplySnapshotChunk, - }; - message.refetchChunks = []; - message.rejectSenders = []; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } - else { - message.result = 0; - } - if (object.refetchChunks !== undefined && object.refetchChunks !== null) { - for (const e of object.refetchChunks) { - message.refetchChunks.push(e); - } - } - if (object.rejectSenders !== undefined && object.rejectSenders !== null) { - for (const e of object.rejectSenders) { - message.rejectSenders.push(e); - } - } - return message; - }, -}; -const baseConsensusParams = {}; -export const ConsensusParams = { - encode(message, writer = Writer.create()) { - if (message.block !== undefined) { - BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceParams.encode(message.evidence, writer.uint32(18).fork()).ldelim(); - } - if (message.validator !== undefined) { - ValidatorParams.encode(message.validator, writer.uint32(26).fork()).ldelim(); - } - if (message.version !== undefined) { - VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensusParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = VersionParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseConsensusParams }; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromJSON(object.block); - } - else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromJSON(object.evidence); - } - else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromJSON(object.validator); - } - else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromJSON(object.version); - } - else { - message.version = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.block !== undefined && - (obj.block = message.block - ? BlockParams.toJSON(message.block) - : undefined); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? EvidenceParams.toJSON(message.evidence) - : undefined); - message.validator !== undefined && - (obj.validator = message.validator - ? ValidatorParams.toJSON(message.validator) - : undefined); - message.version !== undefined && - (obj.version = message.version - ? VersionParams.toJSON(message.version) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseConsensusParams }; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromPartial(object.block); - } - else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromPartial(object.evidence); - } - else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromPartial(object.validator); - } - else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromPartial(object.version); - } - else { - message.version = undefined; - } - return message; - }, -}; -const baseBlockParams = { maxBytes: 0, maxGas: 0 }; -export const BlockParams = { - encode(message, writer = Writer.create()) { - if (message.maxBytes !== 0) { - writer.uint32(8).int64(message.maxBytes); - } - if (message.maxGas !== 0) { - writer.uint32(16).int64(message.maxGas); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxBytes = longToNumber(reader.int64()); - break; - case 2: - message.maxGas = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBlockParams }; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = Number(object.maxBytes); - } - else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = Number(object.maxGas); - } - else { - message.maxGas = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.maxBytes !== undefined && (obj.maxBytes = message.maxBytes); - message.maxGas !== undefined && (obj.maxGas = message.maxGas); - return obj; - }, - fromPartial(object) { - const message = { ...baseBlockParams }; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = object.maxBytes; - } - else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = object.maxGas; - } - else { - message.maxGas = 0; - } - return message; - }, -}; -const baseLastCommitInfo = { round: 0 }; -export const LastCommitInfo = { - encode(message, writer = Writer.create()) { - if (message.round !== 0) { - writer.uint32(8).int32(message.round); - } - for (const v of message.votes) { - VoteInfo.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLastCommitInfo }; - message.votes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.round = reader.int32(); - break; - case 2: - message.votes.push(VoteInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseLastCommitInfo }; - message.votes = []; - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } - else { - message.round = 0; - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(VoteInfo.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.round !== undefined && (obj.round = message.round); - if (message.votes) { - obj.votes = message.votes.map((e) => e ? VoteInfo.toJSON(e) : undefined); - } - else { - obj.votes = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseLastCommitInfo }; - message.votes = []; - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } - else { - message.round = 0; - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(VoteInfo.fromPartial(e)); - } - } - return message; - }, -}; -const baseEvent = { type: "" }; -export const Event = { - encode(message, writer = Writer.create()) { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - for (const v of message.attributes) { - EventAttribute.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvent }; - message.attributes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.attributes.push(EventAttribute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEvent }; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } - else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(EventAttribute.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && (obj.type = message.type); - if (message.attributes) { - obj.attributes = message.attributes.map((e) => e ? EventAttribute.toJSON(e) : undefined); - } - else { - obj.attributes = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEvent }; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(EventAttribute.fromPartial(e)); - } - } - return message; - }, -}; -const baseEventAttribute = { index: false }; -export const EventAttribute = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (message.index === true) { - writer.uint32(24).bool(message.index); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEventAttribute }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.index = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEventAttribute }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.index !== undefined && object.index !== null) { - message.index = Boolean(object.index); - } - else { - message.index = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - message.index !== undefined && (obj.index = message.index); - return obj; - }, - fromPartial(object) { - const message = { ...baseEventAttribute }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = false; - } - return message; - }, -}; -const baseTxResult = { height: 0, index: 0 }; -export const TxResult = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.index !== 0) { - writer.uint32(16).uint32(message.index); - } - if (message.tx.length !== 0) { - writer.uint32(26).bytes(message.tx); - } - if (message.result !== undefined) { - ResponseDeliverTx.encode(message.result, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxResult }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64()); - break; - case 2: - message.index = reader.uint32(); - break; - case 3: - message.tx = reader.bytes(); - break; - case 4: - message.result = ResponseDeliverTx.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTxResult }; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = bytesFromBase64(object.tx); - } - if (object.result !== undefined && object.result !== null) { - message.result = ResponseDeliverTx.fromJSON(object.result); - } - else { - message.result = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - message.index !== undefined && (obj.index = message.index); - message.tx !== undefined && - (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array())); - message.result !== undefined && - (obj.result = message.result - ? ResponseDeliverTx.toJSON(message.result) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseTxResult }; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = object.tx; - } - else { - message.tx = new Uint8Array(); - } - if (object.result !== undefined && object.result !== null) { - message.result = ResponseDeliverTx.fromPartial(object.result); - } - else { - message.result = undefined; - } - return message; - }, -}; -const baseValidator = { power: 0 }; -export const Validator = { - encode(message, writer = Writer.create()) { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.power !== 0) { - writer.uint32(24).int64(message.power); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 3: - message.power = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidator }; - if (object.address !== undefined && object.address !== null) { - message.address = bytesFromBase64(object.address); - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } - else { - message.power = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && - (obj.address = base64FromBytes(message.address !== undefined ? message.address : new Uint8Array())); - message.power !== undefined && (obj.power = message.power); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidator }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = new Uint8Array(); - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } - else { - message.power = 0; - } - return message; - }, -}; -const baseValidatorUpdate = { power: 0 }; -export const ValidatorUpdate = { - encode(message, writer = Writer.create()) { - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.power !== 0) { - writer.uint32(16).int64(message.power); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorUpdate }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.power = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorUpdate }; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } - else { - message.power = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.power !== undefined && (obj.power = message.power); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorUpdate }; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } - else { - message.power = 0; - } - return message; - }, -}; -const baseVoteInfo = { signedLastBlock: false }; -export const VoteInfo = { - encode(message, writer = Writer.create()) { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - if (message.signedLastBlock === true) { - writer.uint32(16).bool(message.signedLastBlock); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVoteInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 2: - message.signedLastBlock = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseVoteInfo }; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } - else { - message.validator = undefined; - } - if (object.signedLastBlock !== undefined && - object.signedLastBlock !== null) { - message.signedLastBlock = Boolean(object.signedLastBlock); - } - else { - message.signedLastBlock = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - message.signedLastBlock !== undefined && - (obj.signedLastBlock = message.signedLastBlock); - return obj; - }, - fromPartial(object) { - const message = { ...baseVoteInfo }; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } - else { - message.validator = undefined; - } - if (object.signedLastBlock !== undefined && - object.signedLastBlock !== null) { - message.signedLastBlock = object.signedLastBlock; - } - else { - message.signedLastBlock = false; - } - return message; - }, -}; -const baseEvidence = { type: 0, height: 0, totalVotingPower: 0 }; -export const Evidence = { - encode(message, writer = Writer.create()) { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(34).fork()).ldelim(); - } - if (message.totalVotingPower !== 0) { - writer.uint32(40).int64(message.totalVotingPower); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvidence }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.height = longToNumber(reader.int64()); - break; - case 4: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.totalVotingPower = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEvidence }; - if (object.type !== undefined && object.type !== null) { - message.type = evidenceTypeFromJSON(object.type); - } - else { - message.type = 0; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } - else { - message.validator = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } - else { - message.time = undefined; - } - if (object.totalVotingPower !== undefined && - object.totalVotingPower !== null) { - message.totalVotingPower = Number(object.totalVotingPower); - } - else { - message.totalVotingPower = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && (obj.type = evidenceTypeToJSON(message.type)); - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.totalVotingPower !== undefined && - (obj.totalVotingPower = message.totalVotingPower); - return obj; - }, - fromPartial(object) { - const message = { ...baseEvidence }; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 0; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } - else { - message.validator = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } - else { - message.time = undefined; - } - if (object.totalVotingPower !== undefined && - object.totalVotingPower !== null) { - message.totalVotingPower = object.totalVotingPower; - } - else { - message.totalVotingPower = 0; - } - return message; - }, -}; -const baseSnapshot = { height: 0, format: 0, chunks: 0 }; -export const Snapshot = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).uint64(message.height); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - if (message.chunks !== 0) { - writer.uint32(24).uint32(message.chunks); - } - if (message.hash.length !== 0) { - writer.uint32(34).bytes(message.hash); - } - if (message.metadata.length !== 0) { - writer.uint32(42).bytes(message.metadata); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSnapshot }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.uint64()); - break; - case 2: - message.format = reader.uint32(); - break; - case 3: - message.chunks = reader.uint32(); - break; - case 4: - message.hash = reader.bytes(); - break; - case 5: - message.metadata = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSnapshot }; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = Number(object.format); - } - else { - message.format = 0; - } - if (object.chunks !== undefined && object.chunks !== null) { - message.chunks = Number(object.chunks); - } - else { - message.chunks = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = bytesFromBase64(object.metadata); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - message.format !== undefined && (obj.format = message.format); - message.chunks !== undefined && (obj.chunks = message.chunks); - message.hash !== undefined && - (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - message.metadata !== undefined && - (obj.metadata = base64FromBytes(message.metadata !== undefined ? message.metadata : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseSnapshot }; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = object.format; - } - else { - message.format = 0; - } - if (object.chunks !== undefined && object.chunks !== null) { - message.chunks = object.chunks; - } - else { - message.chunks = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = new Uint8Array(); - } - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = object.metadata; - } - else { - message.metadata = new Uint8Array(); - } - return message; - }, -}; -export class ABCIApplicationClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Echo(request) { - const data = RequestEcho.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "Echo", data); - return promise.then((data) => ResponseEcho.decode(new Reader(data))); - } - Flush(request) { - const data = RequestFlush.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "Flush", data); - return promise.then((data) => ResponseFlush.decode(new Reader(data))); - } - Info(request) { - const data = RequestInfo.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "Info", data); - return promise.then((data) => ResponseInfo.decode(new Reader(data))); - } - SetOption(request) { - const data = RequestSetOption.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "SetOption", data); - return promise.then((data) => ResponseSetOption.decode(new Reader(data))); - } - DeliverTx(request) { - const data = RequestDeliverTx.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "DeliverTx", data); - return promise.then((data) => ResponseDeliverTx.decode(new Reader(data))); - } - CheckTx(request) { - const data = RequestCheckTx.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "CheckTx", data); - return promise.then((data) => ResponseCheckTx.decode(new Reader(data))); - } - Query(request) { - const data = RequestQuery.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "Query", data); - return promise.then((data) => ResponseQuery.decode(new Reader(data))); - } - Commit(request) { - const data = RequestCommit.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "Commit", data); - return promise.then((data) => ResponseCommit.decode(new Reader(data))); - } - InitChain(request) { - const data = RequestInitChain.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "InitChain", data); - return promise.then((data) => ResponseInitChain.decode(new Reader(data))); - } - BeginBlock(request) { - const data = RequestBeginBlock.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "BeginBlock", data); - return promise.then((data) => ResponseBeginBlock.decode(new Reader(data))); - } - EndBlock(request) { - const data = RequestEndBlock.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "EndBlock", data); - return promise.then((data) => ResponseEndBlock.decode(new Reader(data))); - } - ListSnapshots(request) { - const data = RequestListSnapshots.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "ListSnapshots", data); - return promise.then((data) => ResponseListSnapshots.decode(new Reader(data))); - } - OfferSnapshot(request) { - const data = RequestOfferSnapshot.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "OfferSnapshot", data); - return promise.then((data) => ResponseOfferSnapshot.decode(new Reader(data))); - } - LoadSnapshotChunk(request) { - const data = RequestLoadSnapshotChunk.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "LoadSnapshotChunk", data); - return promise.then((data) => ResponseLoadSnapshotChunk.decode(new Reader(data))); - } - ApplySnapshotChunk(request) { - const data = RequestApplySnapshotChunk.encode(request).finish(); - const promise = this.rpc.request("tendermint.abci.ABCIApplication", "ApplySnapshotChunk", data); - return promise.then((data) => ResponseApplySnapshotChunk.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/abci/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/abci/types.ts deleted file mode 100644 index ccb5148f5c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/abci/types.ts +++ /dev/null @@ -1,5624 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { Header } from "../../tendermint/types/types"; -import { ProofOps } from "../../tendermint/crypto/proof"; -import { - EvidenceParams, - ValidatorParams, - VersionParams, -} from "../../tendermint/types/params"; -import { PublicKey } from "../../tendermint/crypto/keys"; - -export const protobufPackage = "tendermint.abci"; - -export enum CheckTxType { - NEW = 0, - RECHECK = 1, - UNRECOGNIZED = -1, -} - -export function checkTxTypeFromJSON(object: any): CheckTxType { - switch (object) { - case 0: - case "NEW": - return CheckTxType.NEW; - case 1: - case "RECHECK": - return CheckTxType.RECHECK; - case -1: - case "UNRECOGNIZED": - default: - return CheckTxType.UNRECOGNIZED; - } -} - -export function checkTxTypeToJSON(object: CheckTxType): string { - switch (object) { - case CheckTxType.NEW: - return "NEW"; - case CheckTxType.RECHECK: - return "RECHECK"; - default: - return "UNKNOWN"; - } -} - -export enum EvidenceType { - UNKNOWN = 0, - DUPLICATE_VOTE = 1, - LIGHT_CLIENT_ATTACK = 2, - UNRECOGNIZED = -1, -} - -export function evidenceTypeFromJSON(object: any): EvidenceType { - switch (object) { - case 0: - case "UNKNOWN": - return EvidenceType.UNKNOWN; - case 1: - case "DUPLICATE_VOTE": - return EvidenceType.DUPLICATE_VOTE; - case 2: - case "LIGHT_CLIENT_ATTACK": - return EvidenceType.LIGHT_CLIENT_ATTACK; - case -1: - case "UNRECOGNIZED": - default: - return EvidenceType.UNRECOGNIZED; - } -} - -export function evidenceTypeToJSON(object: EvidenceType): string { - switch (object) { - case EvidenceType.UNKNOWN: - return "UNKNOWN"; - case EvidenceType.DUPLICATE_VOTE: - return "DUPLICATE_VOTE"; - case EvidenceType.LIGHT_CLIENT_ATTACK: - return "LIGHT_CLIENT_ATTACK"; - default: - return "UNKNOWN"; - } -} - -export interface Request { - echo: RequestEcho | undefined; - flush: RequestFlush | undefined; - info: RequestInfo | undefined; - setOption: RequestSetOption | undefined; - initChain: RequestInitChain | undefined; - query: RequestQuery | undefined; - beginBlock: RequestBeginBlock | undefined; - checkTx: RequestCheckTx | undefined; - deliverTx: RequestDeliverTx | undefined; - endBlock: RequestEndBlock | undefined; - commit: RequestCommit | undefined; - listSnapshots: RequestListSnapshots | undefined; - offerSnapshot: RequestOfferSnapshot | undefined; - loadSnapshotChunk: RequestLoadSnapshotChunk | undefined; - applySnapshotChunk: RequestApplySnapshotChunk | undefined; -} - -export interface RequestEcho { - message: string; -} - -export interface RequestFlush {} - -export interface RequestInfo { - version: string; - blockVersion: number; - p2pVersion: number; -} - -/** nondeterministic */ -export interface RequestSetOption { - key: string; - value: string; -} - -export interface RequestInitChain { - time: Date | undefined; - chainId: string; - consensusParams: ConsensusParams | undefined; - validators: ValidatorUpdate[]; - appStateBytes: Uint8Array; - initialHeight: number; -} - -export interface RequestQuery { - data: Uint8Array; - path: string; - height: number; - prove: boolean; -} - -export interface RequestBeginBlock { - hash: Uint8Array; - header: Header | undefined; - lastCommitInfo: LastCommitInfo | undefined; - byzantineValidators: Evidence[]; -} - -export interface RequestCheckTx { - tx: Uint8Array; - type: CheckTxType; -} - -export interface RequestDeliverTx { - tx: Uint8Array; -} - -export interface RequestEndBlock { - height: number; -} - -export interface RequestCommit {} - -/** lists available snapshots */ -export interface RequestListSnapshots {} - -/** offers a snapshot to the application */ -export interface RequestOfferSnapshot { - /** snapshot offered by peers */ - snapshot: Snapshot | undefined; - /** light client-verified app hash for snapshot height */ - appHash: Uint8Array; -} - -/** loads a snapshot chunk */ -export interface RequestLoadSnapshotChunk { - height: number; - format: number; - chunk: number; -} - -/** Applies a snapshot chunk */ -export interface RequestApplySnapshotChunk { - index: number; - chunk: Uint8Array; - sender: string; -} - -export interface Response { - exception: ResponseException | undefined; - echo: ResponseEcho | undefined; - flush: ResponseFlush | undefined; - info: ResponseInfo | undefined; - setOption: ResponseSetOption | undefined; - initChain: ResponseInitChain | undefined; - query: ResponseQuery | undefined; - beginBlock: ResponseBeginBlock | undefined; - checkTx: ResponseCheckTx | undefined; - deliverTx: ResponseDeliverTx | undefined; - endBlock: ResponseEndBlock | undefined; - commit: ResponseCommit | undefined; - listSnapshots: ResponseListSnapshots | undefined; - offerSnapshot: ResponseOfferSnapshot | undefined; - loadSnapshotChunk: ResponseLoadSnapshotChunk | undefined; - applySnapshotChunk: ResponseApplySnapshotChunk | undefined; -} - -/** nondeterministic */ -export interface ResponseException { - error: string; -} - -export interface ResponseEcho { - message: string; -} - -export interface ResponseFlush {} - -export interface ResponseInfo { - data: string; - version: string; - appVersion: number; - lastBlockHeight: number; - lastBlockAppHash: Uint8Array; -} - -/** nondeterministic */ -export interface ResponseSetOption { - code: number; - /** bytes data = 2; */ - log: string; - info: string; -} - -export interface ResponseInitChain { - consensusParams: ConsensusParams | undefined; - validators: ValidatorUpdate[]; - appHash: Uint8Array; -} - -export interface ResponseQuery { - code: number; - /** bytes data = 2; // use "value" instead. */ - log: string; - /** nondeterministic */ - info: string; - index: number; - key: Uint8Array; - value: Uint8Array; - proofOps: ProofOps | undefined; - height: number; - codespace: string; -} - -export interface ResponseBeginBlock { - events: Event[]; -} - -export interface ResponseCheckTx { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gasWanted: number; - gasUsed: number; - events: Event[]; - codespace: string; -} - -export interface ResponseDeliverTx { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gasWanted: number; - gasUsed: number; - events: Event[]; - codespace: string; -} - -export interface ResponseEndBlock { - validatorUpdates: ValidatorUpdate[]; - consensusParamUpdates: ConsensusParams | undefined; - events: Event[]; -} - -export interface ResponseCommit { - /** reserve 1 */ - data: Uint8Array; - retainHeight: number; -} - -export interface ResponseListSnapshots { - snapshots: Snapshot[]; -} - -export interface ResponseOfferSnapshot { - result: ResponseOfferSnapshot_Result; -} - -export enum ResponseOfferSnapshot_Result { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - UNKNOWN = 0, - /** ACCEPT - Snapshot accepted, apply chunks */ - ACCEPT = 1, - /** ABORT - Abort all snapshot restoration */ - ABORT = 2, - /** REJECT - Reject this specific snapshot, try others */ - REJECT = 3, - /** REJECT_FORMAT - Reject all snapshots of this format, try others */ - REJECT_FORMAT = 4, - /** REJECT_SENDER - Reject all snapshots from the sender(s), try others */ - REJECT_SENDER = 5, - UNRECOGNIZED = -1, -} - -export function responseOfferSnapshot_ResultFromJSON( - object: any -): ResponseOfferSnapshot_Result { - switch (object) { - case 0: - case "UNKNOWN": - return ResponseOfferSnapshot_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseOfferSnapshot_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseOfferSnapshot_Result.ABORT; - case 3: - case "REJECT": - return ResponseOfferSnapshot_Result.REJECT; - case 4: - case "REJECT_FORMAT": - return ResponseOfferSnapshot_Result.REJECT_FORMAT; - case 5: - case "REJECT_SENDER": - return ResponseOfferSnapshot_Result.REJECT_SENDER; - case -1: - case "UNRECOGNIZED": - default: - return ResponseOfferSnapshot_Result.UNRECOGNIZED; - } -} - -export function responseOfferSnapshot_ResultToJSON( - object: ResponseOfferSnapshot_Result -): string { - switch (object) { - case ResponseOfferSnapshot_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseOfferSnapshot_Result.ACCEPT: - return "ACCEPT"; - case ResponseOfferSnapshot_Result.ABORT: - return "ABORT"; - case ResponseOfferSnapshot_Result.REJECT: - return "REJECT"; - case ResponseOfferSnapshot_Result.REJECT_FORMAT: - return "REJECT_FORMAT"; - case ResponseOfferSnapshot_Result.REJECT_SENDER: - return "REJECT_SENDER"; - default: - return "UNKNOWN"; - } -} - -export interface ResponseLoadSnapshotChunk { - chunk: Uint8Array; -} - -export interface ResponseApplySnapshotChunk { - result: ResponseApplySnapshotChunk_Result; - /** Chunks to refetch and reapply */ - refetchChunks: number[]; - /** Chunk senders to reject and ban */ - rejectSenders: string[]; -} - -export enum ResponseApplySnapshotChunk_Result { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - UNKNOWN = 0, - /** ACCEPT - Chunk successfully accepted */ - ACCEPT = 1, - /** ABORT - Abort all snapshot restoration */ - ABORT = 2, - /** RETRY - Retry chunk (combine with refetch and reject) */ - RETRY = 3, - /** RETRY_SNAPSHOT - Retry snapshot (combine with refetch and reject) */ - RETRY_SNAPSHOT = 4, - /** REJECT_SNAPSHOT - Reject this snapshot, try others */ - REJECT_SNAPSHOT = 5, - UNRECOGNIZED = -1, -} - -export function responseApplySnapshotChunk_ResultFromJSON( - object: any -): ResponseApplySnapshotChunk_Result { - switch (object) { - case 0: - case "UNKNOWN": - return ResponseApplySnapshotChunk_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseApplySnapshotChunk_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseApplySnapshotChunk_Result.ABORT; - case 3: - case "RETRY": - return ResponseApplySnapshotChunk_Result.RETRY; - case 4: - case "RETRY_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT; - case 5: - case "REJECT_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT; - case -1: - case "UNRECOGNIZED": - default: - return ResponseApplySnapshotChunk_Result.UNRECOGNIZED; - } -} - -export function responseApplySnapshotChunk_ResultToJSON( - object: ResponseApplySnapshotChunk_Result -): string { - switch (object) { - case ResponseApplySnapshotChunk_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseApplySnapshotChunk_Result.ACCEPT: - return "ACCEPT"; - case ResponseApplySnapshotChunk_Result.ABORT: - return "ABORT"; - case ResponseApplySnapshotChunk_Result.RETRY: - return "RETRY"; - case ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT: - return "RETRY_SNAPSHOT"; - case ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT: - return "REJECT_SNAPSHOT"; - default: - return "UNKNOWN"; - } -} - -/** - * ConsensusParams contains all consensus-relevant parameters - * that can be adjusted by the abci app - */ -export interface ConsensusParams { - block: BlockParams | undefined; - evidence: EvidenceParams | undefined; - validator: ValidatorParams | undefined; - version: VersionParams | undefined; -} - -/** BlockParams contains limits on the block size. */ -export interface BlockParams { - /** Note: must be greater than 0 */ - maxBytes: number; - /** Note: must be greater or equal to -1 */ - maxGas: number; -} - -export interface LastCommitInfo { - round: number; - votes: VoteInfo[]; -} - -/** - * Event allows application developers to attach additional information to - * ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. - * Later, transactions may be queried using these events. - */ -export interface Event { - type: string; - attributes: EventAttribute[]; -} - -/** EventAttribute is a single key-value pair, associated with an event. */ -export interface EventAttribute { - key: Uint8Array; - value: Uint8Array; - /** nondeterministic */ - index: boolean; -} - -/** - * TxResult contains results of executing the transaction. - * - * One usage is indexing transaction results. - */ -export interface TxResult { - height: number; - index: number; - tx: Uint8Array; - result: ResponseDeliverTx | undefined; -} - -/** Validator */ -export interface Validator { - /** The first 20 bytes of SHA256(public key) */ - address: Uint8Array; - /** PubKey pub_key = 2 [(gogoproto.nullable)=false]; */ - power: number; -} - -/** ValidatorUpdate */ -export interface ValidatorUpdate { - pubKey: PublicKey | undefined; - power: number; -} - -/** VoteInfo */ -export interface VoteInfo { - validator: Validator | undefined; - signedLastBlock: boolean; -} - -export interface Evidence { - type: EvidenceType; - /** The offending validator */ - validator: Validator | undefined; - /** The height when the offense occurred */ - height: number; - /** The corresponding time where the offense occurred */ - time: Date | undefined; - /** - * Total voting power of the validator set in case the ABCI application does - * not store historical validators. - * https://github.com/tendermint/tendermint/issues/4581 - */ - totalVotingPower: number; -} - -export interface Snapshot { - /** The height at which the snapshot was taken */ - height: number; - /** The application-specific snapshot format */ - format: number; - /** Number of chunks in the snapshot */ - chunks: number; - /** Arbitrary snapshot hash, equal only if identical */ - hash: Uint8Array; - /** Arbitrary application metadata */ - metadata: Uint8Array; -} - -const baseRequest: object = {}; - -export const Request = { - encode(message: Request, writer: Writer = Writer.create()): Writer { - if (message.echo !== undefined) { - RequestEcho.encode(message.echo, writer.uint32(10).fork()).ldelim(); - } - if (message.flush !== undefined) { - RequestFlush.encode(message.flush, writer.uint32(18).fork()).ldelim(); - } - if (message.info !== undefined) { - RequestInfo.encode(message.info, writer.uint32(26).fork()).ldelim(); - } - if (message.setOption !== undefined) { - RequestSetOption.encode( - message.setOption, - writer.uint32(34).fork() - ).ldelim(); - } - if (message.initChain !== undefined) { - RequestInitChain.encode( - message.initChain, - writer.uint32(42).fork() - ).ldelim(); - } - if (message.query !== undefined) { - RequestQuery.encode(message.query, writer.uint32(50).fork()).ldelim(); - } - if (message.beginBlock !== undefined) { - RequestBeginBlock.encode( - message.beginBlock, - writer.uint32(58).fork() - ).ldelim(); - } - if (message.checkTx !== undefined) { - RequestCheckTx.encode(message.checkTx, writer.uint32(66).fork()).ldelim(); - } - if (message.deliverTx !== undefined) { - RequestDeliverTx.encode( - message.deliverTx, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.endBlock !== undefined) { - RequestEndBlock.encode( - message.endBlock, - writer.uint32(82).fork() - ).ldelim(); - } - if (message.commit !== undefined) { - RequestCommit.encode(message.commit, writer.uint32(90).fork()).ldelim(); - } - if (message.listSnapshots !== undefined) { - RequestListSnapshots.encode( - message.listSnapshots, - writer.uint32(98).fork() - ).ldelim(); - } - if (message.offerSnapshot !== undefined) { - RequestOfferSnapshot.encode( - message.offerSnapshot, - writer.uint32(106).fork() - ).ldelim(); - } - if (message.loadSnapshotChunk !== undefined) { - RequestLoadSnapshotChunk.encode( - message.loadSnapshotChunk, - writer.uint32(114).fork() - ).ldelim(); - } - if (message.applySnapshotChunk !== undefined) { - RequestApplySnapshotChunk.encode( - message.applySnapshotChunk, - writer.uint32(122).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Request { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequest } as Request; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.echo = RequestEcho.decode(reader, reader.uint32()); - break; - case 2: - message.flush = RequestFlush.decode(reader, reader.uint32()); - break; - case 3: - message.info = RequestInfo.decode(reader, reader.uint32()); - break; - case 4: - message.setOption = RequestSetOption.decode(reader, reader.uint32()); - break; - case 5: - message.initChain = RequestInitChain.decode(reader, reader.uint32()); - break; - case 6: - message.query = RequestQuery.decode(reader, reader.uint32()); - break; - case 7: - message.beginBlock = RequestBeginBlock.decode( - reader, - reader.uint32() - ); - break; - case 8: - message.checkTx = RequestCheckTx.decode(reader, reader.uint32()); - break; - case 9: - message.deliverTx = RequestDeliverTx.decode(reader, reader.uint32()); - break; - case 10: - message.endBlock = RequestEndBlock.decode(reader, reader.uint32()); - break; - case 11: - message.commit = RequestCommit.decode(reader, reader.uint32()); - break; - case 12: - message.listSnapshots = RequestListSnapshots.decode( - reader, - reader.uint32() - ); - break; - case 13: - message.offerSnapshot = RequestOfferSnapshot.decode( - reader, - reader.uint32() - ); - break; - case 14: - message.loadSnapshotChunk = RequestLoadSnapshotChunk.decode( - reader, - reader.uint32() - ); - break; - case 15: - message.applySnapshotChunk = RequestApplySnapshotChunk.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Request { - const message = { ...baseRequest } as Request; - if (object.echo !== undefined && object.echo !== null) { - message.echo = RequestEcho.fromJSON(object.echo); - } else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = RequestFlush.fromJSON(object.flush); - } else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = RequestInfo.fromJSON(object.info); - } else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = RequestSetOption.fromJSON(object.setOption); - } else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = RequestInitChain.fromJSON(object.initChain); - } else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = RequestQuery.fromJSON(object.query); - } else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = RequestBeginBlock.fromJSON(object.beginBlock); - } else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = RequestCheckTx.fromJSON(object.checkTx); - } else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = RequestDeliverTx.fromJSON(object.deliverTx); - } else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = RequestEndBlock.fromJSON(object.endBlock); - } else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = RequestCommit.fromJSON(object.commit); - } else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = RequestListSnapshots.fromJSON( - object.listSnapshots - ); - } else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = RequestOfferSnapshot.fromJSON( - object.offerSnapshot - ); - } else { - message.offerSnapshot = undefined; - } - if ( - object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null - ) { - message.loadSnapshotChunk = RequestLoadSnapshotChunk.fromJSON( - object.loadSnapshotChunk - ); - } else { - message.loadSnapshotChunk = undefined; - } - if ( - object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null - ) { - message.applySnapshotChunk = RequestApplySnapshotChunk.fromJSON( - object.applySnapshotChunk - ); - } else { - message.applySnapshotChunk = undefined; - } - return message; - }, - - toJSON(message: Request): unknown { - const obj: any = {}; - message.echo !== undefined && - (obj.echo = message.echo ? RequestEcho.toJSON(message.echo) : undefined); - message.flush !== undefined && - (obj.flush = message.flush - ? RequestFlush.toJSON(message.flush) - : undefined); - message.info !== undefined && - (obj.info = message.info ? RequestInfo.toJSON(message.info) : undefined); - message.setOption !== undefined && - (obj.setOption = message.setOption - ? RequestSetOption.toJSON(message.setOption) - : undefined); - message.initChain !== undefined && - (obj.initChain = message.initChain - ? RequestInitChain.toJSON(message.initChain) - : undefined); - message.query !== undefined && - (obj.query = message.query - ? RequestQuery.toJSON(message.query) - : undefined); - message.beginBlock !== undefined && - (obj.beginBlock = message.beginBlock - ? RequestBeginBlock.toJSON(message.beginBlock) - : undefined); - message.checkTx !== undefined && - (obj.checkTx = message.checkTx - ? RequestCheckTx.toJSON(message.checkTx) - : undefined); - message.deliverTx !== undefined && - (obj.deliverTx = message.deliverTx - ? RequestDeliverTx.toJSON(message.deliverTx) - : undefined); - message.endBlock !== undefined && - (obj.endBlock = message.endBlock - ? RequestEndBlock.toJSON(message.endBlock) - : undefined); - message.commit !== undefined && - (obj.commit = message.commit - ? RequestCommit.toJSON(message.commit) - : undefined); - message.listSnapshots !== undefined && - (obj.listSnapshots = message.listSnapshots - ? RequestListSnapshots.toJSON(message.listSnapshots) - : undefined); - message.offerSnapshot !== undefined && - (obj.offerSnapshot = message.offerSnapshot - ? RequestOfferSnapshot.toJSON(message.offerSnapshot) - : undefined); - message.loadSnapshotChunk !== undefined && - (obj.loadSnapshotChunk = message.loadSnapshotChunk - ? RequestLoadSnapshotChunk.toJSON(message.loadSnapshotChunk) - : undefined); - message.applySnapshotChunk !== undefined && - (obj.applySnapshotChunk = message.applySnapshotChunk - ? RequestApplySnapshotChunk.toJSON(message.applySnapshotChunk) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Request { - const message = { ...baseRequest } as Request; - if (object.echo !== undefined && object.echo !== null) { - message.echo = RequestEcho.fromPartial(object.echo); - } else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = RequestFlush.fromPartial(object.flush); - } else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = RequestInfo.fromPartial(object.info); - } else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = RequestSetOption.fromPartial(object.setOption); - } else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = RequestInitChain.fromPartial(object.initChain); - } else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = RequestQuery.fromPartial(object.query); - } else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = RequestBeginBlock.fromPartial(object.beginBlock); - } else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = RequestCheckTx.fromPartial(object.checkTx); - } else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = RequestDeliverTx.fromPartial(object.deliverTx); - } else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = RequestEndBlock.fromPartial(object.endBlock); - } else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = RequestCommit.fromPartial(object.commit); - } else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = RequestListSnapshots.fromPartial( - object.listSnapshots - ); - } else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = RequestOfferSnapshot.fromPartial( - object.offerSnapshot - ); - } else { - message.offerSnapshot = undefined; - } - if ( - object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null - ) { - message.loadSnapshotChunk = RequestLoadSnapshotChunk.fromPartial( - object.loadSnapshotChunk - ); - } else { - message.loadSnapshotChunk = undefined; - } - if ( - object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null - ) { - message.applySnapshotChunk = RequestApplySnapshotChunk.fromPartial( - object.applySnapshotChunk - ); - } else { - message.applySnapshotChunk = undefined; - } - return message; - }, -}; - -const baseRequestEcho: object = { message: "" }; - -export const RequestEcho = { - encode(message: RequestEcho, writer: Writer = Writer.create()): Writer { - if (message.message !== "") { - writer.uint32(10).string(message.message); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestEcho { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestEcho } as RequestEcho; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestEcho { - const message = { ...baseRequestEcho } as RequestEcho; - if (object.message !== undefined && object.message !== null) { - message.message = String(object.message); - } else { - message.message = ""; - } - return message; - }, - - toJSON(message: RequestEcho): unknown { - const obj: any = {}; - message.message !== undefined && (obj.message = message.message); - return obj; - }, - - fromPartial(object: DeepPartial): RequestEcho { - const message = { ...baseRequestEcho } as RequestEcho; - if (object.message !== undefined && object.message !== null) { - message.message = object.message; - } else { - message.message = ""; - } - return message; - }, -}; - -const baseRequestFlush: object = {}; - -export const RequestFlush = { - encode(_: RequestFlush, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestFlush { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestFlush } as RequestFlush; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): RequestFlush { - const message = { ...baseRequestFlush } as RequestFlush; - return message; - }, - - toJSON(_: RequestFlush): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): RequestFlush { - const message = { ...baseRequestFlush } as RequestFlush; - return message; - }, -}; - -const baseRequestInfo: object = { version: "", blockVersion: 0, p2pVersion: 0 }; - -export const RequestInfo = { - encode(message: RequestInfo, writer: Writer = Writer.create()): Writer { - if (message.version !== "") { - writer.uint32(10).string(message.version); - } - if (message.blockVersion !== 0) { - writer.uint32(16).uint64(message.blockVersion); - } - if (message.p2pVersion !== 0) { - writer.uint32(24).uint64(message.p2pVersion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestInfo } as RequestInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; - case 2: - message.blockVersion = longToNumber(reader.uint64() as Long); - break; - case 3: - message.p2pVersion = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestInfo { - const message = { ...baseRequestInfo } as RequestInfo; - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } else { - message.version = ""; - } - if (object.blockVersion !== undefined && object.blockVersion !== null) { - message.blockVersion = Number(object.blockVersion); - } else { - message.blockVersion = 0; - } - if (object.p2pVersion !== undefined && object.p2pVersion !== null) { - message.p2pVersion = Number(object.p2pVersion); - } else { - message.p2pVersion = 0; - } - return message; - }, - - toJSON(message: RequestInfo): unknown { - const obj: any = {}; - message.version !== undefined && (obj.version = message.version); - message.blockVersion !== undefined && - (obj.blockVersion = message.blockVersion); - message.p2pVersion !== undefined && (obj.p2pVersion = message.p2pVersion); - return obj; - }, - - fromPartial(object: DeepPartial): RequestInfo { - const message = { ...baseRequestInfo } as RequestInfo; - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } else { - message.version = ""; - } - if (object.blockVersion !== undefined && object.blockVersion !== null) { - message.blockVersion = object.blockVersion; - } else { - message.blockVersion = 0; - } - if (object.p2pVersion !== undefined && object.p2pVersion !== null) { - message.p2pVersion = object.p2pVersion; - } else { - message.p2pVersion = 0; - } - return message; - }, -}; - -const baseRequestSetOption: object = { key: "", value: "" }; - -export const RequestSetOption = { - encode(message: RequestSetOption, writer: Writer = Writer.create()): Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestSetOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestSetOption } as RequestSetOption; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestSetOption { - const message = { ...baseRequestSetOption } as RequestSetOption; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = String(object.value); - } else { - message.value = ""; - } - return message; - }, - - toJSON(message: RequestSetOption): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - - fromPartial(object: DeepPartial): RequestSetOption { - const message = { ...baseRequestSetOption } as RequestSetOption; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = ""; - } - return message; - }, -}; - -const baseRequestInitChain: object = { chainId: "", initialHeight: 0 }; - -export const RequestInitChain = { - encode(message: RequestInitChain, writer: Writer = Writer.create()): Writer { - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(10).fork() - ).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(18).string(message.chainId); - } - if (message.consensusParams !== undefined) { - ConsensusParams.encode( - message.consensusParams, - writer.uint32(26).fork() - ).ldelim(); - } - for (const v of message.validators) { - ValidatorUpdate.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.appStateBytes.length !== 0) { - writer.uint32(42).bytes(message.appStateBytes); - } - if (message.initialHeight !== 0) { - writer.uint32(48).int64(message.initialHeight); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestInitChain { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestInitChain } as RequestInitChain; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.consensusParams = ConsensusParams.decode( - reader, - reader.uint32() - ); - break; - case 4: - message.validators.push( - ValidatorUpdate.decode(reader, reader.uint32()) - ); - break; - case 5: - message.appStateBytes = reader.bytes(); - break; - case 6: - message.initialHeight = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestInitChain { - const message = { ...baseRequestInitChain } as RequestInitChain; - message.validators = []; - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = String(object.chainId); - } else { - message.chainId = ""; - } - if ( - object.consensusParams !== undefined && - object.consensusParams !== null - ) { - message.consensusParams = ConsensusParams.fromJSON( - object.consensusParams - ); - } else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromJSON(e)); - } - } - if (object.appStateBytes !== undefined && object.appStateBytes !== null) { - message.appStateBytes = bytesFromBase64(object.appStateBytes); - } - if (object.initialHeight !== undefined && object.initialHeight !== null) { - message.initialHeight = Number(object.initialHeight); - } else { - message.initialHeight = 0; - } - return message; - }, - - toJSON(message: RequestInitChain): unknown { - const obj: any = {}; - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.chainId !== undefined && (obj.chainId = message.chainId); - message.consensusParams !== undefined && - (obj.consensusParams = message.consensusParams - ? ConsensusParams.toJSON(message.consensusParams) - : undefined); - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? ValidatorUpdate.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.appStateBytes !== undefined && - (obj.appStateBytes = base64FromBytes( - message.appStateBytes !== undefined - ? message.appStateBytes - : new Uint8Array() - )); - message.initialHeight !== undefined && - (obj.initialHeight = message.initialHeight); - return obj; - }, - - fromPartial(object: DeepPartial): RequestInitChain { - const message = { ...baseRequestInitChain } as RequestInitChain; - message.validators = []; - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = object.chainId; - } else { - message.chainId = ""; - } - if ( - object.consensusParams !== undefined && - object.consensusParams !== null - ) { - message.consensusParams = ConsensusParams.fromPartial( - object.consensusParams - ); - } else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromPartial(e)); - } - } - if (object.appStateBytes !== undefined && object.appStateBytes !== null) { - message.appStateBytes = object.appStateBytes; - } else { - message.appStateBytes = new Uint8Array(); - } - if (object.initialHeight !== undefined && object.initialHeight !== null) { - message.initialHeight = object.initialHeight; - } else { - message.initialHeight = 0; - } - return message; - }, -}; - -const baseRequestQuery: object = { path: "", height: 0, prove: false }; - -export const RequestQuery = { - encode(message: RequestQuery, writer: Writer = Writer.create()): Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.prove === true) { - writer.uint32(32).bool(message.prove); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestQuery { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestQuery } as RequestQuery; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.prove = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestQuery { - const message = { ...baseRequestQuery } as RequestQuery; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.prove !== undefined && object.prove !== null) { - message.prove = Boolean(object.prove); - } else { - message.prove = false; - } - return message; - }, - - toJSON(message: RequestQuery): unknown { - const obj: any = {}; - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.path !== undefined && (obj.path = message.path); - message.height !== undefined && (obj.height = message.height); - message.prove !== undefined && (obj.prove = message.prove); - return obj; - }, - - fromPartial(object: DeepPartial): RequestQuery { - const message = { ...baseRequestQuery } as RequestQuery; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.prove !== undefined && object.prove !== null) { - message.prove = object.prove; - } else { - message.prove = false; - } - return message; - }, -}; - -const baseRequestBeginBlock: object = {}; - -export const RequestBeginBlock = { - encode(message: RequestBeginBlock, writer: Writer = Writer.create()): Writer { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(18).fork()).ldelim(); - } - if (message.lastCommitInfo !== undefined) { - LastCommitInfo.encode( - message.lastCommitInfo, - writer.uint32(26).fork() - ).ldelim(); - } - for (const v of message.byzantineValidators) { - Evidence.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestBeginBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestBeginBlock } as RequestBeginBlock; - message.byzantineValidators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.header = Header.decode(reader, reader.uint32()); - break; - case 3: - message.lastCommitInfo = LastCommitInfo.decode( - reader, - reader.uint32() - ); - break; - case 4: - message.byzantineValidators.push( - Evidence.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestBeginBlock { - const message = { ...baseRequestBeginBlock } as RequestBeginBlock; - message.byzantineValidators = []; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.lastCommitInfo !== undefined && object.lastCommitInfo !== null) { - message.lastCommitInfo = LastCommitInfo.fromJSON(object.lastCommitInfo); - } else { - message.lastCommitInfo = undefined; - } - if ( - object.byzantineValidators !== undefined && - object.byzantineValidators !== null - ) { - for (const e of object.byzantineValidators) { - message.byzantineValidators.push(Evidence.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: RequestBeginBlock): unknown { - const obj: any = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.lastCommitInfo !== undefined && - (obj.lastCommitInfo = message.lastCommitInfo - ? LastCommitInfo.toJSON(message.lastCommitInfo) - : undefined); - if (message.byzantineValidators) { - obj.byzantineValidators = message.byzantineValidators.map((e) => - e ? Evidence.toJSON(e) : undefined - ); - } else { - obj.byzantineValidators = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): RequestBeginBlock { - const message = { ...baseRequestBeginBlock } as RequestBeginBlock; - message.byzantineValidators = []; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.lastCommitInfo !== undefined && object.lastCommitInfo !== null) { - message.lastCommitInfo = LastCommitInfo.fromPartial( - object.lastCommitInfo - ); - } else { - message.lastCommitInfo = undefined; - } - if ( - object.byzantineValidators !== undefined && - object.byzantineValidators !== null - ) { - for (const e of object.byzantineValidators) { - message.byzantineValidators.push(Evidence.fromPartial(e)); - } - } - return message; - }, -}; - -const baseRequestCheckTx: object = { type: 0 }; - -export const RequestCheckTx = { - encode(message: RequestCheckTx, writer: Writer = Writer.create()): Writer { - if (message.tx.length !== 0) { - writer.uint32(10).bytes(message.tx); - } - if (message.type !== 0) { - writer.uint32(16).int32(message.type); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestCheckTx { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestCheckTx } as RequestCheckTx; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = reader.bytes(); - break; - case 2: - message.type = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestCheckTx { - const message = { ...baseRequestCheckTx } as RequestCheckTx; - if (object.tx !== undefined && object.tx !== null) { - message.tx = bytesFromBase64(object.tx); - } - if (object.type !== undefined && object.type !== null) { - message.type = checkTxTypeFromJSON(object.type); - } else { - message.type = 0; - } - return message; - }, - - toJSON(message: RequestCheckTx): unknown { - const obj: any = {}; - message.tx !== undefined && - (obj.tx = base64FromBytes( - message.tx !== undefined ? message.tx : new Uint8Array() - )); - message.type !== undefined && (obj.type = checkTxTypeToJSON(message.type)); - return obj; - }, - - fromPartial(object: DeepPartial): RequestCheckTx { - const message = { ...baseRequestCheckTx } as RequestCheckTx; - if (object.tx !== undefined && object.tx !== null) { - message.tx = object.tx; - } else { - message.tx = new Uint8Array(); - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - return message; - }, -}; - -const baseRequestDeliverTx: object = {}; - -export const RequestDeliverTx = { - encode(message: RequestDeliverTx, writer: Writer = Writer.create()): Writer { - if (message.tx.length !== 0) { - writer.uint32(10).bytes(message.tx); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestDeliverTx { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestDeliverTx } as RequestDeliverTx; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestDeliverTx { - const message = { ...baseRequestDeliverTx } as RequestDeliverTx; - if (object.tx !== undefined && object.tx !== null) { - message.tx = bytesFromBase64(object.tx); - } - return message; - }, - - toJSON(message: RequestDeliverTx): unknown { - const obj: any = {}; - message.tx !== undefined && - (obj.tx = base64FromBytes( - message.tx !== undefined ? message.tx : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): RequestDeliverTx { - const message = { ...baseRequestDeliverTx } as RequestDeliverTx; - if (object.tx !== undefined && object.tx !== null) { - message.tx = object.tx; - } else { - message.tx = new Uint8Array(); - } - return message; - }, -}; - -const baseRequestEndBlock: object = { height: 0 }; - -export const RequestEndBlock = { - encode(message: RequestEndBlock, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestEndBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestEndBlock } as RequestEndBlock; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestEndBlock { - const message = { ...baseRequestEndBlock } as RequestEndBlock; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - return message; - }, - - toJSON(message: RequestEndBlock): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - return obj; - }, - - fromPartial(object: DeepPartial): RequestEndBlock { - const message = { ...baseRequestEndBlock } as RequestEndBlock; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - return message; - }, -}; - -const baseRequestCommit: object = {}; - -export const RequestCommit = { - encode(_: RequestCommit, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestCommit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestCommit } as RequestCommit; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): RequestCommit { - const message = { ...baseRequestCommit } as RequestCommit; - return message; - }, - - toJSON(_: RequestCommit): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): RequestCommit { - const message = { ...baseRequestCommit } as RequestCommit; - return message; - }, -}; - -const baseRequestListSnapshots: object = {}; - -export const RequestListSnapshots = { - encode(_: RequestListSnapshots, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestListSnapshots { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestListSnapshots } as RequestListSnapshots; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): RequestListSnapshots { - const message = { ...baseRequestListSnapshots } as RequestListSnapshots; - return message; - }, - - toJSON(_: RequestListSnapshots): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): RequestListSnapshots { - const message = { ...baseRequestListSnapshots } as RequestListSnapshots; - return message; - }, -}; - -const baseRequestOfferSnapshot: object = {}; - -export const RequestOfferSnapshot = { - encode( - message: RequestOfferSnapshot, - writer: Writer = Writer.create() - ): Writer { - if (message.snapshot !== undefined) { - Snapshot.encode(message.snapshot, writer.uint32(10).fork()).ldelim(); - } - if (message.appHash.length !== 0) { - writer.uint32(18).bytes(message.appHash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestOfferSnapshot { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestOfferSnapshot } as RequestOfferSnapshot; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshot = Snapshot.decode(reader, reader.uint32()); - break; - case 2: - message.appHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestOfferSnapshot { - const message = { ...baseRequestOfferSnapshot } as RequestOfferSnapshot; - if (object.snapshot !== undefined && object.snapshot !== null) { - message.snapshot = Snapshot.fromJSON(object.snapshot); - } else { - message.snapshot = undefined; - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = bytesFromBase64(object.appHash); - } - return message; - }, - - toJSON(message: RequestOfferSnapshot): unknown { - const obj: any = {}; - message.snapshot !== undefined && - (obj.snapshot = message.snapshot - ? Snapshot.toJSON(message.snapshot) - : undefined); - message.appHash !== undefined && - (obj.appHash = base64FromBytes( - message.appHash !== undefined ? message.appHash : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): RequestOfferSnapshot { - const message = { ...baseRequestOfferSnapshot } as RequestOfferSnapshot; - if (object.snapshot !== undefined && object.snapshot !== null) { - message.snapshot = Snapshot.fromPartial(object.snapshot); - } else { - message.snapshot = undefined; - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = object.appHash; - } else { - message.appHash = new Uint8Array(); - } - return message; - }, -}; - -const baseRequestLoadSnapshotChunk: object = { height: 0, format: 0, chunk: 0 }; - -export const RequestLoadSnapshotChunk = { - encode( - message: RequestLoadSnapshotChunk, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== 0) { - writer.uint32(8).uint64(message.height); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - if (message.chunk !== 0) { - writer.uint32(24).uint32(message.chunk); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): RequestLoadSnapshotChunk { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseRequestLoadSnapshotChunk, - } as RequestLoadSnapshotChunk; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.uint64() as Long); - break; - case 2: - message.format = reader.uint32(); - break; - case 3: - message.chunk = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestLoadSnapshotChunk { - const message = { - ...baseRequestLoadSnapshotChunk, - } as RequestLoadSnapshotChunk; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = Number(object.format); - } else { - message.format = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = Number(object.chunk); - } else { - message.chunk = 0; - } - return message; - }, - - toJSON(message: RequestLoadSnapshotChunk): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.format !== undefined && (obj.format = message.format); - message.chunk !== undefined && (obj.chunk = message.chunk); - return obj; - }, - - fromPartial( - object: DeepPartial - ): RequestLoadSnapshotChunk { - const message = { - ...baseRequestLoadSnapshotChunk, - } as RequestLoadSnapshotChunk; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = object.format; - } else { - message.format = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = object.chunk; - } else { - message.chunk = 0; - } - return message; - }, -}; - -const baseRequestApplySnapshotChunk: object = { index: 0, sender: "" }; - -export const RequestApplySnapshotChunk = { - encode( - message: RequestApplySnapshotChunk, - writer: Writer = Writer.create() - ): Writer { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.chunk.length !== 0) { - writer.uint32(18).bytes(message.chunk); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): RequestApplySnapshotChunk { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseRequestApplySnapshotChunk, - } as RequestApplySnapshotChunk; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.chunk = reader.bytes(); - break; - case 3: - message.sender = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestApplySnapshotChunk { - const message = { - ...baseRequestApplySnapshotChunk, - } as RequestApplySnapshotChunk; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = bytesFromBase64(object.chunk); - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - return message; - }, - - toJSON(message: RequestApplySnapshotChunk): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = message.index); - message.chunk !== undefined && - (obj.chunk = base64FromBytes( - message.chunk !== undefined ? message.chunk : new Uint8Array() - )); - message.sender !== undefined && (obj.sender = message.sender); - return obj; - }, - - fromPartial( - object: DeepPartial - ): RequestApplySnapshotChunk { - const message = { - ...baseRequestApplySnapshotChunk, - } as RequestApplySnapshotChunk; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = object.chunk; - } else { - message.chunk = new Uint8Array(); - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - return message; - }, -}; - -const baseResponse: object = {}; - -export const Response = { - encode(message: Response, writer: Writer = Writer.create()): Writer { - if (message.exception !== undefined) { - ResponseException.encode( - message.exception, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.echo !== undefined) { - ResponseEcho.encode(message.echo, writer.uint32(18).fork()).ldelim(); - } - if (message.flush !== undefined) { - ResponseFlush.encode(message.flush, writer.uint32(26).fork()).ldelim(); - } - if (message.info !== undefined) { - ResponseInfo.encode(message.info, writer.uint32(34).fork()).ldelim(); - } - if (message.setOption !== undefined) { - ResponseSetOption.encode( - message.setOption, - writer.uint32(42).fork() - ).ldelim(); - } - if (message.initChain !== undefined) { - ResponseInitChain.encode( - message.initChain, - writer.uint32(50).fork() - ).ldelim(); - } - if (message.query !== undefined) { - ResponseQuery.encode(message.query, writer.uint32(58).fork()).ldelim(); - } - if (message.beginBlock !== undefined) { - ResponseBeginBlock.encode( - message.beginBlock, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.checkTx !== undefined) { - ResponseCheckTx.encode( - message.checkTx, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.deliverTx !== undefined) { - ResponseDeliverTx.encode( - message.deliverTx, - writer.uint32(82).fork() - ).ldelim(); - } - if (message.endBlock !== undefined) { - ResponseEndBlock.encode( - message.endBlock, - writer.uint32(90).fork() - ).ldelim(); - } - if (message.commit !== undefined) { - ResponseCommit.encode(message.commit, writer.uint32(98).fork()).ldelim(); - } - if (message.listSnapshots !== undefined) { - ResponseListSnapshots.encode( - message.listSnapshots, - writer.uint32(106).fork() - ).ldelim(); - } - if (message.offerSnapshot !== undefined) { - ResponseOfferSnapshot.encode( - message.offerSnapshot, - writer.uint32(114).fork() - ).ldelim(); - } - if (message.loadSnapshotChunk !== undefined) { - ResponseLoadSnapshotChunk.encode( - message.loadSnapshotChunk, - writer.uint32(122).fork() - ).ldelim(); - } - if (message.applySnapshotChunk !== undefined) { - ResponseApplySnapshotChunk.encode( - message.applySnapshotChunk, - writer.uint32(130).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Response { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponse } as Response; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exception = ResponseException.decode(reader, reader.uint32()); - break; - case 2: - message.echo = ResponseEcho.decode(reader, reader.uint32()); - break; - case 3: - message.flush = ResponseFlush.decode(reader, reader.uint32()); - break; - case 4: - message.info = ResponseInfo.decode(reader, reader.uint32()); - break; - case 5: - message.setOption = ResponseSetOption.decode(reader, reader.uint32()); - break; - case 6: - message.initChain = ResponseInitChain.decode(reader, reader.uint32()); - break; - case 7: - message.query = ResponseQuery.decode(reader, reader.uint32()); - break; - case 8: - message.beginBlock = ResponseBeginBlock.decode( - reader, - reader.uint32() - ); - break; - case 9: - message.checkTx = ResponseCheckTx.decode(reader, reader.uint32()); - break; - case 10: - message.deliverTx = ResponseDeliverTx.decode(reader, reader.uint32()); - break; - case 11: - message.endBlock = ResponseEndBlock.decode(reader, reader.uint32()); - break; - case 12: - message.commit = ResponseCommit.decode(reader, reader.uint32()); - break; - case 13: - message.listSnapshots = ResponseListSnapshots.decode( - reader, - reader.uint32() - ); - break; - case 14: - message.offerSnapshot = ResponseOfferSnapshot.decode( - reader, - reader.uint32() - ); - break; - case 15: - message.loadSnapshotChunk = ResponseLoadSnapshotChunk.decode( - reader, - reader.uint32() - ); - break; - case 16: - message.applySnapshotChunk = ResponseApplySnapshotChunk.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Response { - const message = { ...baseResponse } as Response; - if (object.exception !== undefined && object.exception !== null) { - message.exception = ResponseException.fromJSON(object.exception); - } else { - message.exception = undefined; - } - if (object.echo !== undefined && object.echo !== null) { - message.echo = ResponseEcho.fromJSON(object.echo); - } else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = ResponseFlush.fromJSON(object.flush); - } else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = ResponseInfo.fromJSON(object.info); - } else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = ResponseSetOption.fromJSON(object.setOption); - } else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = ResponseInitChain.fromJSON(object.initChain); - } else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = ResponseQuery.fromJSON(object.query); - } else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = ResponseBeginBlock.fromJSON(object.beginBlock); - } else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = ResponseCheckTx.fromJSON(object.checkTx); - } else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = ResponseDeliverTx.fromJSON(object.deliverTx); - } else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = ResponseEndBlock.fromJSON(object.endBlock); - } else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = ResponseCommit.fromJSON(object.commit); - } else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = ResponseListSnapshots.fromJSON( - object.listSnapshots - ); - } else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = ResponseOfferSnapshot.fromJSON( - object.offerSnapshot - ); - } else { - message.offerSnapshot = undefined; - } - if ( - object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null - ) { - message.loadSnapshotChunk = ResponseLoadSnapshotChunk.fromJSON( - object.loadSnapshotChunk - ); - } else { - message.loadSnapshotChunk = undefined; - } - if ( - object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null - ) { - message.applySnapshotChunk = ResponseApplySnapshotChunk.fromJSON( - object.applySnapshotChunk - ); - } else { - message.applySnapshotChunk = undefined; - } - return message; - }, - - toJSON(message: Response): unknown { - const obj: any = {}; - message.exception !== undefined && - (obj.exception = message.exception - ? ResponseException.toJSON(message.exception) - : undefined); - message.echo !== undefined && - (obj.echo = message.echo ? ResponseEcho.toJSON(message.echo) : undefined); - message.flush !== undefined && - (obj.flush = message.flush - ? ResponseFlush.toJSON(message.flush) - : undefined); - message.info !== undefined && - (obj.info = message.info ? ResponseInfo.toJSON(message.info) : undefined); - message.setOption !== undefined && - (obj.setOption = message.setOption - ? ResponseSetOption.toJSON(message.setOption) - : undefined); - message.initChain !== undefined && - (obj.initChain = message.initChain - ? ResponseInitChain.toJSON(message.initChain) - : undefined); - message.query !== undefined && - (obj.query = message.query - ? ResponseQuery.toJSON(message.query) - : undefined); - message.beginBlock !== undefined && - (obj.beginBlock = message.beginBlock - ? ResponseBeginBlock.toJSON(message.beginBlock) - : undefined); - message.checkTx !== undefined && - (obj.checkTx = message.checkTx - ? ResponseCheckTx.toJSON(message.checkTx) - : undefined); - message.deliverTx !== undefined && - (obj.deliverTx = message.deliverTx - ? ResponseDeliverTx.toJSON(message.deliverTx) - : undefined); - message.endBlock !== undefined && - (obj.endBlock = message.endBlock - ? ResponseEndBlock.toJSON(message.endBlock) - : undefined); - message.commit !== undefined && - (obj.commit = message.commit - ? ResponseCommit.toJSON(message.commit) - : undefined); - message.listSnapshots !== undefined && - (obj.listSnapshots = message.listSnapshots - ? ResponseListSnapshots.toJSON(message.listSnapshots) - : undefined); - message.offerSnapshot !== undefined && - (obj.offerSnapshot = message.offerSnapshot - ? ResponseOfferSnapshot.toJSON(message.offerSnapshot) - : undefined); - message.loadSnapshotChunk !== undefined && - (obj.loadSnapshotChunk = message.loadSnapshotChunk - ? ResponseLoadSnapshotChunk.toJSON(message.loadSnapshotChunk) - : undefined); - message.applySnapshotChunk !== undefined && - (obj.applySnapshotChunk = message.applySnapshotChunk - ? ResponseApplySnapshotChunk.toJSON(message.applySnapshotChunk) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Response { - const message = { ...baseResponse } as Response; - if (object.exception !== undefined && object.exception !== null) { - message.exception = ResponseException.fromPartial(object.exception); - } else { - message.exception = undefined; - } - if (object.echo !== undefined && object.echo !== null) { - message.echo = ResponseEcho.fromPartial(object.echo); - } else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = ResponseFlush.fromPartial(object.flush); - } else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = ResponseInfo.fromPartial(object.info); - } else { - message.info = undefined; - } - if (object.setOption !== undefined && object.setOption !== null) { - message.setOption = ResponseSetOption.fromPartial(object.setOption); - } else { - message.setOption = undefined; - } - if (object.initChain !== undefined && object.initChain !== null) { - message.initChain = ResponseInitChain.fromPartial(object.initChain); - } else { - message.initChain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = ResponseQuery.fromPartial(object.query); - } else { - message.query = undefined; - } - if (object.beginBlock !== undefined && object.beginBlock !== null) { - message.beginBlock = ResponseBeginBlock.fromPartial(object.beginBlock); - } else { - message.beginBlock = undefined; - } - if (object.checkTx !== undefined && object.checkTx !== null) { - message.checkTx = ResponseCheckTx.fromPartial(object.checkTx); - } else { - message.checkTx = undefined; - } - if (object.deliverTx !== undefined && object.deliverTx !== null) { - message.deliverTx = ResponseDeliverTx.fromPartial(object.deliverTx); - } else { - message.deliverTx = undefined; - } - if (object.endBlock !== undefined && object.endBlock !== null) { - message.endBlock = ResponseEndBlock.fromPartial(object.endBlock); - } else { - message.endBlock = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = ResponseCommit.fromPartial(object.commit); - } else { - message.commit = undefined; - } - if (object.listSnapshots !== undefined && object.listSnapshots !== null) { - message.listSnapshots = ResponseListSnapshots.fromPartial( - object.listSnapshots - ); - } else { - message.listSnapshots = undefined; - } - if (object.offerSnapshot !== undefined && object.offerSnapshot !== null) { - message.offerSnapshot = ResponseOfferSnapshot.fromPartial( - object.offerSnapshot - ); - } else { - message.offerSnapshot = undefined; - } - if ( - object.loadSnapshotChunk !== undefined && - object.loadSnapshotChunk !== null - ) { - message.loadSnapshotChunk = ResponseLoadSnapshotChunk.fromPartial( - object.loadSnapshotChunk - ); - } else { - message.loadSnapshotChunk = undefined; - } - if ( - object.applySnapshotChunk !== undefined && - object.applySnapshotChunk !== null - ) { - message.applySnapshotChunk = ResponseApplySnapshotChunk.fromPartial( - object.applySnapshotChunk - ); - } else { - message.applySnapshotChunk = undefined; - } - return message; - }, -}; - -const baseResponseException: object = { error: "" }; - -export const ResponseException = { - encode(message: ResponseException, writer: Writer = Writer.create()): Writer { - if (message.error !== "") { - writer.uint32(10).string(message.error); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseException { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseException } as ResponseException; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseException { - const message = { ...baseResponseException } as ResponseException; - if (object.error !== undefined && object.error !== null) { - message.error = String(object.error); - } else { - message.error = ""; - } - return message; - }, - - toJSON(message: ResponseException): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = message.error); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseException { - const message = { ...baseResponseException } as ResponseException; - if (object.error !== undefined && object.error !== null) { - message.error = object.error; - } else { - message.error = ""; - } - return message; - }, -}; - -const baseResponseEcho: object = { message: "" }; - -export const ResponseEcho = { - encode(message: ResponseEcho, writer: Writer = Writer.create()): Writer { - if (message.message !== "") { - writer.uint32(10).string(message.message); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseEcho { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseEcho } as ResponseEcho; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseEcho { - const message = { ...baseResponseEcho } as ResponseEcho; - if (object.message !== undefined && object.message !== null) { - message.message = String(object.message); - } else { - message.message = ""; - } - return message; - }, - - toJSON(message: ResponseEcho): unknown { - const obj: any = {}; - message.message !== undefined && (obj.message = message.message); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseEcho { - const message = { ...baseResponseEcho } as ResponseEcho; - if (object.message !== undefined && object.message !== null) { - message.message = object.message; - } else { - message.message = ""; - } - return message; - }, -}; - -const baseResponseFlush: object = {}; - -export const ResponseFlush = { - encode(_: ResponseFlush, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseFlush { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseFlush } as ResponseFlush; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): ResponseFlush { - const message = { ...baseResponseFlush } as ResponseFlush; - return message; - }, - - toJSON(_: ResponseFlush): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): ResponseFlush { - const message = { ...baseResponseFlush } as ResponseFlush; - return message; - }, -}; - -const baseResponseInfo: object = { - data: "", - version: "", - appVersion: 0, - lastBlockHeight: 0, -}; - -export const ResponseInfo = { - encode(message: ResponseInfo, writer: Writer = Writer.create()): Writer { - if (message.data !== "") { - writer.uint32(10).string(message.data); - } - if (message.version !== "") { - writer.uint32(18).string(message.version); - } - if (message.appVersion !== 0) { - writer.uint32(24).uint64(message.appVersion); - } - if (message.lastBlockHeight !== 0) { - writer.uint32(32).int64(message.lastBlockHeight); - } - if (message.lastBlockAppHash.length !== 0) { - writer.uint32(42).bytes(message.lastBlockAppHash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseInfo } as ResponseInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.string(); - break; - case 2: - message.version = reader.string(); - break; - case 3: - message.appVersion = longToNumber(reader.uint64() as Long); - break; - case 4: - message.lastBlockHeight = longToNumber(reader.int64() as Long); - break; - case 5: - message.lastBlockAppHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseInfo { - const message = { ...baseResponseInfo } as ResponseInfo; - if (object.data !== undefined && object.data !== null) { - message.data = String(object.data); - } else { - message.data = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } else { - message.version = ""; - } - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = Number(object.appVersion); - } else { - message.appVersion = 0; - } - if ( - object.lastBlockHeight !== undefined && - object.lastBlockHeight !== null - ) { - message.lastBlockHeight = Number(object.lastBlockHeight); - } else { - message.lastBlockHeight = 0; - } - if ( - object.lastBlockAppHash !== undefined && - object.lastBlockAppHash !== null - ) { - message.lastBlockAppHash = bytesFromBase64(object.lastBlockAppHash); - } - return message; - }, - - toJSON(message: ResponseInfo): unknown { - const obj: any = {}; - message.data !== undefined && (obj.data = message.data); - message.version !== undefined && (obj.version = message.version); - message.appVersion !== undefined && (obj.appVersion = message.appVersion); - message.lastBlockHeight !== undefined && - (obj.lastBlockHeight = message.lastBlockHeight); - message.lastBlockAppHash !== undefined && - (obj.lastBlockAppHash = base64FromBytes( - message.lastBlockAppHash !== undefined - ? message.lastBlockAppHash - : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseInfo { - const message = { ...baseResponseInfo } as ResponseInfo; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } else { - message.version = ""; - } - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = object.appVersion; - } else { - message.appVersion = 0; - } - if ( - object.lastBlockHeight !== undefined && - object.lastBlockHeight !== null - ) { - message.lastBlockHeight = object.lastBlockHeight; - } else { - message.lastBlockHeight = 0; - } - if ( - object.lastBlockAppHash !== undefined && - object.lastBlockAppHash !== null - ) { - message.lastBlockAppHash = object.lastBlockAppHash; - } else { - message.lastBlockAppHash = new Uint8Array(); - } - return message; - }, -}; - -const baseResponseSetOption: object = { code: 0, log: "", info: "" }; - -export const ResponseSetOption = { - encode(message: ResponseSetOption, writer: Writer = Writer.create()): Writer { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseSetOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseSetOption } as ResponseSetOption; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseSetOption { - const message = { ...baseResponseSetOption } as ResponseSetOption; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - return message; - }, - - toJSON(message: ResponseSetOption): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = message.code); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseSetOption { - const message = { ...baseResponseSetOption } as ResponseSetOption; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - return message; - }, -}; - -const baseResponseInitChain: object = {}; - -export const ResponseInitChain = { - encode(message: ResponseInitChain, writer: Writer = Writer.create()): Writer { - if (message.consensusParams !== undefined) { - ConsensusParams.encode( - message.consensusParams, - writer.uint32(10).fork() - ).ldelim(); - } - for (const v of message.validators) { - ValidatorUpdate.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.appHash.length !== 0) { - writer.uint32(26).bytes(message.appHash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseInitChain { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseInitChain } as ResponseInitChain; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusParams = ConsensusParams.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.validators.push( - ValidatorUpdate.decode(reader, reader.uint32()) - ); - break; - case 3: - message.appHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseInitChain { - const message = { ...baseResponseInitChain } as ResponseInitChain; - message.validators = []; - if ( - object.consensusParams !== undefined && - object.consensusParams !== null - ) { - message.consensusParams = ConsensusParams.fromJSON( - object.consensusParams - ); - } else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromJSON(e)); - } - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = bytesFromBase64(object.appHash); - } - return message; - }, - - toJSON(message: ResponseInitChain): unknown { - const obj: any = {}; - message.consensusParams !== undefined && - (obj.consensusParams = message.consensusParams - ? ConsensusParams.toJSON(message.consensusParams) - : undefined); - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? ValidatorUpdate.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.appHash !== undefined && - (obj.appHash = base64FromBytes( - message.appHash !== undefined ? message.appHash : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseInitChain { - const message = { ...baseResponseInitChain } as ResponseInitChain; - message.validators = []; - if ( - object.consensusParams !== undefined && - object.consensusParams !== null - ) { - message.consensusParams = ConsensusParams.fromPartial( - object.consensusParams - ); - } else { - message.consensusParams = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromPartial(e)); - } - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = object.appHash; - } else { - message.appHash = new Uint8Array(); - } - return message; - }, -}; - -const baseResponseQuery: object = { - code: 0, - log: "", - info: "", - index: 0, - height: 0, - codespace: "", -}; - -export const ResponseQuery = { - encode(message: ResponseQuery, writer: Writer = Writer.create()): Writer { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.index !== 0) { - writer.uint32(40).int64(message.index); - } - if (message.key.length !== 0) { - writer.uint32(50).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(58).bytes(message.value); - } - if (message.proofOps !== undefined) { - ProofOps.encode(message.proofOps, writer.uint32(66).fork()).ldelim(); - } - if (message.height !== 0) { - writer.uint32(72).int64(message.height); - } - if (message.codespace !== "") { - writer.uint32(82).string(message.codespace); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseQuery { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseQuery } as ResponseQuery; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.index = longToNumber(reader.int64() as Long); - break; - case 6: - message.key = reader.bytes(); - break; - case 7: - message.value = reader.bytes(); - break; - case 8: - message.proofOps = ProofOps.decode(reader, reader.uint32()); - break; - case 9: - message.height = longToNumber(reader.int64() as Long); - break; - case 10: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseQuery { - const message = { ...baseResponseQuery } as ResponseQuery; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.proofOps !== undefined && object.proofOps !== null) { - message.proofOps = ProofOps.fromJSON(object.proofOps); - } else { - message.proofOps = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } else { - message.codespace = ""; - } - return message; - }, - - toJSON(message: ResponseQuery): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = message.code); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.index !== undefined && (obj.index = message.index); - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - message.proofOps !== undefined && - (obj.proofOps = message.proofOps - ? ProofOps.toJSON(message.proofOps) - : undefined); - message.height !== undefined && (obj.height = message.height); - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseQuery { - const message = { ...baseResponseQuery } as ResponseQuery; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - if (object.proofOps !== undefined && object.proofOps !== null) { - message.proofOps = ProofOps.fromPartial(object.proofOps); - } else { - message.proofOps = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } else { - message.codespace = ""; - } - return message; - }, -}; - -const baseResponseBeginBlock: object = {}; - -export const ResponseBeginBlock = { - encode( - message: ResponseBeginBlock, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.events) { - Event.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseBeginBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseBeginBlock } as ResponseBeginBlock; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseBeginBlock { - const message = { ...baseResponseBeginBlock } as ResponseBeginBlock; - message.events = []; - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ResponseBeginBlock): unknown { - const obj: any = {}; - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ResponseBeginBlock { - const message = { ...baseResponseBeginBlock } as ResponseBeginBlock; - message.events = []; - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; - -const baseResponseCheckTx: object = { - code: 0, - log: "", - info: "", - gasWanted: 0, - gasUsed: 0, - codespace: "", -}; - -export const ResponseCheckTx = { - encode(message: ResponseCheckTx, writer: Writer = Writer.create()): Writer { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.gasWanted !== 0) { - writer.uint32(40).int64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(48).int64(message.gasUsed); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.codespace !== "") { - writer.uint32(66).string(message.codespace); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseCheckTx { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseCheckTx } as ResponseCheckTx; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gasWanted = longToNumber(reader.int64() as Long); - break; - case 6: - message.gasUsed = longToNumber(reader.int64() as Long); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseCheckTx { - const message = { ...baseResponseCheckTx } as ResponseCheckTx; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } else { - message.codespace = ""; - } - return message; - }, - - toJSON(message: ResponseCheckTx): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = message.code); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseCheckTx { - const message = { ...baseResponseCheckTx } as ResponseCheckTx; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } else { - message.codespace = ""; - } - return message; - }, -}; - -const baseResponseDeliverTx: object = { - code: 0, - log: "", - info: "", - gasWanted: 0, - gasUsed: 0, - codespace: "", -}; - -export const ResponseDeliverTx = { - encode(message: ResponseDeliverTx, writer: Writer = Writer.create()): Writer { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.gasWanted !== 0) { - writer.uint32(40).int64(message.gasWanted); - } - if (message.gasUsed !== 0) { - writer.uint32(48).int64(message.gasUsed); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.codespace !== "") { - writer.uint32(66).string(message.codespace); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseDeliverTx { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseDeliverTx } as ResponseDeliverTx; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gasWanted = longToNumber(reader.int64() as Long); - break; - case 6: - message.gasUsed = longToNumber(reader.int64() as Long); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseDeliverTx { - const message = { ...baseResponseDeliverTx } as ResponseDeliverTx; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = Number(object.gasWanted); - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = Number(object.gasUsed); - } else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } else { - message.codespace = ""; - } - return message; - }, - - toJSON(message: ResponseDeliverTx): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = message.code); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.gasWanted !== undefined && (obj.gasWanted = message.gasWanted); - message.gasUsed !== undefined && (obj.gasUsed = message.gasUsed); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseDeliverTx { - const message = { ...baseResponseDeliverTx } as ResponseDeliverTx; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - if (object.gasWanted !== undefined && object.gasWanted !== null) { - message.gasWanted = object.gasWanted; - } else { - message.gasWanted = 0; - } - if (object.gasUsed !== undefined && object.gasUsed !== null) { - message.gasUsed = object.gasUsed; - } else { - message.gasUsed = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } else { - message.codespace = ""; - } - return message; - }, -}; - -const baseResponseEndBlock: object = {}; - -export const ResponseEndBlock = { - encode(message: ResponseEndBlock, writer: Writer = Writer.create()): Writer { - for (const v of message.validatorUpdates) { - ValidatorUpdate.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusParamUpdates !== undefined) { - ConsensusParams.encode( - message.consensusParamUpdates, - writer.uint32(18).fork() - ).ldelim(); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseEndBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseEndBlock } as ResponseEndBlock; - message.validatorUpdates = []; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorUpdates.push( - ValidatorUpdate.decode(reader, reader.uint32()) - ); - break; - case 2: - message.consensusParamUpdates = ConsensusParams.decode( - reader, - reader.uint32() - ); - break; - case 3: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseEndBlock { - const message = { ...baseResponseEndBlock } as ResponseEndBlock; - message.validatorUpdates = []; - message.events = []; - if ( - object.validatorUpdates !== undefined && - object.validatorUpdates !== null - ) { - for (const e of object.validatorUpdates) { - message.validatorUpdates.push(ValidatorUpdate.fromJSON(e)); - } - } - if ( - object.consensusParamUpdates !== undefined && - object.consensusParamUpdates !== null - ) { - message.consensusParamUpdates = ConsensusParams.fromJSON( - object.consensusParamUpdates - ); - } else { - message.consensusParamUpdates = undefined; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ResponseEndBlock): unknown { - const obj: any = {}; - if (message.validatorUpdates) { - obj.validatorUpdates = message.validatorUpdates.map((e) => - e ? ValidatorUpdate.toJSON(e) : undefined - ); - } else { - obj.validatorUpdates = []; - } - message.consensusParamUpdates !== undefined && - (obj.consensusParamUpdates = message.consensusParamUpdates - ? ConsensusParams.toJSON(message.consensusParamUpdates) - : undefined); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ResponseEndBlock { - const message = { ...baseResponseEndBlock } as ResponseEndBlock; - message.validatorUpdates = []; - message.events = []; - if ( - object.validatorUpdates !== undefined && - object.validatorUpdates !== null - ) { - for (const e of object.validatorUpdates) { - message.validatorUpdates.push(ValidatorUpdate.fromPartial(e)); - } - } - if ( - object.consensusParamUpdates !== undefined && - object.consensusParamUpdates !== null - ) { - message.consensusParamUpdates = ConsensusParams.fromPartial( - object.consensusParamUpdates - ); - } else { - message.consensusParamUpdates = undefined; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; - -const baseResponseCommit: object = { retainHeight: 0 }; - -export const ResponseCommit = { - encode(message: ResponseCommit, writer: Writer = Writer.create()): Writer { - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.retainHeight !== 0) { - writer.uint32(24).int64(message.retainHeight); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseCommit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseCommit } as ResponseCommit; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.data = reader.bytes(); - break; - case 3: - message.retainHeight = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseCommit { - const message = { ...baseResponseCommit } as ResponseCommit; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.retainHeight !== undefined && object.retainHeight !== null) { - message.retainHeight = Number(object.retainHeight); - } else { - message.retainHeight = 0; - } - return message; - }, - - toJSON(message: ResponseCommit): unknown { - const obj: any = {}; - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.retainHeight !== undefined && - (obj.retainHeight = message.retainHeight); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseCommit { - const message = { ...baseResponseCommit } as ResponseCommit; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.retainHeight !== undefined && object.retainHeight !== null) { - message.retainHeight = object.retainHeight; - } else { - message.retainHeight = 0; - } - return message; - }, -}; - -const baseResponseListSnapshots: object = {}; - -export const ResponseListSnapshots = { - encode( - message: ResponseListSnapshots, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.snapshots) { - Snapshot.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseListSnapshots { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseListSnapshots } as ResponseListSnapshots; - message.snapshots = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshots.push(Snapshot.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseListSnapshots { - const message = { ...baseResponseListSnapshots } as ResponseListSnapshots; - message.snapshots = []; - if (object.snapshots !== undefined && object.snapshots !== null) { - for (const e of object.snapshots) { - message.snapshots.push(Snapshot.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ResponseListSnapshots): unknown { - const obj: any = {}; - if (message.snapshots) { - obj.snapshots = message.snapshots.map((e) => - e ? Snapshot.toJSON(e) : undefined - ); - } else { - obj.snapshots = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ResponseListSnapshots { - const message = { ...baseResponseListSnapshots } as ResponseListSnapshots; - message.snapshots = []; - if (object.snapshots !== undefined && object.snapshots !== null) { - for (const e of object.snapshots) { - message.snapshots.push(Snapshot.fromPartial(e)); - } - } - return message; - }, -}; - -const baseResponseOfferSnapshot: object = { result: 0 }; - -export const ResponseOfferSnapshot = { - encode( - message: ResponseOfferSnapshot, - writer: Writer = Writer.create() - ): Writer { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseOfferSnapshot { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseOfferSnapshot } as ResponseOfferSnapshot; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseOfferSnapshot { - const message = { ...baseResponseOfferSnapshot } as ResponseOfferSnapshot; - if (object.result !== undefined && object.result !== null) { - message.result = responseOfferSnapshot_ResultFromJSON(object.result); - } else { - message.result = 0; - } - return message; - }, - - toJSON(message: ResponseOfferSnapshot): unknown { - const obj: any = {}; - message.result !== undefined && - (obj.result = responseOfferSnapshot_ResultToJSON(message.result)); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ResponseOfferSnapshot { - const message = { ...baseResponseOfferSnapshot } as ResponseOfferSnapshot; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } else { - message.result = 0; - } - return message; - }, -}; - -const baseResponseLoadSnapshotChunk: object = {}; - -export const ResponseLoadSnapshotChunk = { - encode( - message: ResponseLoadSnapshotChunk, - writer: Writer = Writer.create() - ): Writer { - if (message.chunk.length !== 0) { - writer.uint32(10).bytes(message.chunk); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ResponseLoadSnapshotChunk { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseResponseLoadSnapshotChunk, - } as ResponseLoadSnapshotChunk; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.chunk = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseLoadSnapshotChunk { - const message = { - ...baseResponseLoadSnapshotChunk, - } as ResponseLoadSnapshotChunk; - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = bytesFromBase64(object.chunk); - } - return message; - }, - - toJSON(message: ResponseLoadSnapshotChunk): unknown { - const obj: any = {}; - message.chunk !== undefined && - (obj.chunk = base64FromBytes( - message.chunk !== undefined ? message.chunk : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ResponseLoadSnapshotChunk { - const message = { - ...baseResponseLoadSnapshotChunk, - } as ResponseLoadSnapshotChunk; - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = object.chunk; - } else { - message.chunk = new Uint8Array(); - } - return message; - }, -}; - -const baseResponseApplySnapshotChunk: object = { - result: 0, - refetchChunks: 0, - rejectSenders: "", -}; - -export const ResponseApplySnapshotChunk = { - encode( - message: ResponseApplySnapshotChunk, - writer: Writer = Writer.create() - ): Writer { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - writer.uint32(18).fork(); - for (const v of message.refetchChunks) { - writer.uint32(v); - } - writer.ldelim(); - for (const v of message.rejectSenders) { - writer.uint32(26).string(v!); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ResponseApplySnapshotChunk { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseResponseApplySnapshotChunk, - } as ResponseApplySnapshotChunk; - message.refetchChunks = []; - message.rejectSenders = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32() as any; - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.refetchChunks.push(reader.uint32()); - } - } else { - message.refetchChunks.push(reader.uint32()); - } - break; - case 3: - message.rejectSenders.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseApplySnapshotChunk { - const message = { - ...baseResponseApplySnapshotChunk, - } as ResponseApplySnapshotChunk; - message.refetchChunks = []; - message.rejectSenders = []; - if (object.result !== undefined && object.result !== null) { - message.result = responseApplySnapshotChunk_ResultFromJSON(object.result); - } else { - message.result = 0; - } - if (object.refetchChunks !== undefined && object.refetchChunks !== null) { - for (const e of object.refetchChunks) { - message.refetchChunks.push(Number(e)); - } - } - if (object.rejectSenders !== undefined && object.rejectSenders !== null) { - for (const e of object.rejectSenders) { - message.rejectSenders.push(String(e)); - } - } - return message; - }, - - toJSON(message: ResponseApplySnapshotChunk): unknown { - const obj: any = {}; - message.result !== undefined && - (obj.result = responseApplySnapshotChunk_ResultToJSON(message.result)); - if (message.refetchChunks) { - obj.refetchChunks = message.refetchChunks.map((e) => e); - } else { - obj.refetchChunks = []; - } - if (message.rejectSenders) { - obj.rejectSenders = message.rejectSenders.map((e) => e); - } else { - obj.rejectSenders = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ResponseApplySnapshotChunk { - const message = { - ...baseResponseApplySnapshotChunk, - } as ResponseApplySnapshotChunk; - message.refetchChunks = []; - message.rejectSenders = []; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } else { - message.result = 0; - } - if (object.refetchChunks !== undefined && object.refetchChunks !== null) { - for (const e of object.refetchChunks) { - message.refetchChunks.push(e); - } - } - if (object.rejectSenders !== undefined && object.rejectSenders !== null) { - for (const e of object.rejectSenders) { - message.rejectSenders.push(e); - } - } - return message; - }, -}; - -const baseConsensusParams: object = {}; - -export const ConsensusParams = { - encode(message: ConsensusParams, writer: Writer = Writer.create()): Writer { - if (message.block !== undefined) { - BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceParams.encode( - message.evidence, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.validator !== undefined) { - ValidatorParams.encode( - message.validator, - writer.uint32(26).fork() - ).ldelim(); - } - if (message.version !== undefined) { - VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ConsensusParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensusParams } as ConsensusParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = VersionParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsensusParams { - const message = { ...baseConsensusParams } as ConsensusParams; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromJSON(object.block); - } else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromJSON(object.evidence); - } else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromJSON(object.validator); - } else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromJSON(object.version); - } else { - message.version = undefined; - } - return message; - }, - - toJSON(message: ConsensusParams): unknown { - const obj: any = {}; - message.block !== undefined && - (obj.block = message.block - ? BlockParams.toJSON(message.block) - : undefined); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? EvidenceParams.toJSON(message.evidence) - : undefined); - message.validator !== undefined && - (obj.validator = message.validator - ? ValidatorParams.toJSON(message.validator) - : undefined); - message.version !== undefined && - (obj.version = message.version - ? VersionParams.toJSON(message.version) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ConsensusParams { - const message = { ...baseConsensusParams } as ConsensusParams; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromPartial(object.block); - } else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromPartial(object.evidence); - } else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromPartial(object.validator); - } else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromPartial(object.version); - } else { - message.version = undefined; - } - return message; - }, -}; - -const baseBlockParams: object = { maxBytes: 0, maxGas: 0 }; - -export const BlockParams = { - encode(message: BlockParams, writer: Writer = Writer.create()): Writer { - if (message.maxBytes !== 0) { - writer.uint32(8).int64(message.maxBytes); - } - if (message.maxGas !== 0) { - writer.uint32(16).int64(message.maxGas); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockParams } as BlockParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxBytes = longToNumber(reader.int64() as Long); - break; - case 2: - message.maxGas = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockParams { - const message = { ...baseBlockParams } as BlockParams; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = Number(object.maxBytes); - } else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = Number(object.maxGas); - } else { - message.maxGas = 0; - } - return message; - }, - - toJSON(message: BlockParams): unknown { - const obj: any = {}; - message.maxBytes !== undefined && (obj.maxBytes = message.maxBytes); - message.maxGas !== undefined && (obj.maxGas = message.maxGas); - return obj; - }, - - fromPartial(object: DeepPartial): BlockParams { - const message = { ...baseBlockParams } as BlockParams; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = object.maxBytes; - } else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = object.maxGas; - } else { - message.maxGas = 0; - } - return message; - }, -}; - -const baseLastCommitInfo: object = { round: 0 }; - -export const LastCommitInfo = { - encode(message: LastCommitInfo, writer: Writer = Writer.create()): Writer { - if (message.round !== 0) { - writer.uint32(8).int32(message.round); - } - for (const v of message.votes) { - VoteInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): LastCommitInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLastCommitInfo } as LastCommitInfo; - message.votes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.round = reader.int32(); - break; - case 2: - message.votes.push(VoteInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LastCommitInfo { - const message = { ...baseLastCommitInfo } as LastCommitInfo; - message.votes = []; - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(VoteInfo.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: LastCommitInfo): unknown { - const obj: any = {}; - message.round !== undefined && (obj.round = message.round); - if (message.votes) { - obj.votes = message.votes.map((e) => - e ? VoteInfo.toJSON(e) : undefined - ); - } else { - obj.votes = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): LastCommitInfo { - const message = { ...baseLastCommitInfo } as LastCommitInfo; - message.votes = []; - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(VoteInfo.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEvent: object = { type: "" }; - -export const Event = { - encode(message: Event, writer: Writer = Writer.create()): Writer { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - for (const v of message.attributes) { - EventAttribute.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Event { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvent } as Event; - message.attributes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.attributes.push( - EventAttribute.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Event { - const message = { ...baseEvent } as Event; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(EventAttribute.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Event): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? EventAttribute.toJSON(e) : undefined - ); - } else { - obj.attributes = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Event { - const message = { ...baseEvent } as Event; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(EventAttribute.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEventAttribute: object = { index: false }; - -export const EventAttribute = { - encode(message: EventAttribute, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (message.index === true) { - writer.uint32(24).bool(message.index); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EventAttribute { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEventAttribute } as EventAttribute; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.index = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EventAttribute { - const message = { ...baseEventAttribute } as EventAttribute; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.index !== undefined && object.index !== null) { - message.index = Boolean(object.index); - } else { - message.index = false; - } - return message; - }, - - toJSON(message: EventAttribute): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - message.index !== undefined && (obj.index = message.index); - return obj; - }, - - fromPartial(object: DeepPartial): EventAttribute { - const message = { ...baseEventAttribute } as EventAttribute; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = false; - } - return message; - }, -}; - -const baseTxResult: object = { height: 0, index: 0 }; - -export const TxResult = { - encode(message: TxResult, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.index !== 0) { - writer.uint32(16).uint32(message.index); - } - if (message.tx.length !== 0) { - writer.uint32(26).bytes(message.tx); - } - if (message.result !== undefined) { - ResponseDeliverTx.encode( - message.result, - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxResult { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxResult } as TxResult; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.index = reader.uint32(); - break; - case 3: - message.tx = reader.bytes(); - break; - case 4: - message.result = ResponseDeliverTx.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxResult { - const message = { ...baseTxResult } as TxResult; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = bytesFromBase64(object.tx); - } - if (object.result !== undefined && object.result !== null) { - message.result = ResponseDeliverTx.fromJSON(object.result); - } else { - message.result = undefined; - } - return message; - }, - - toJSON(message: TxResult): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.index !== undefined && (obj.index = message.index); - message.tx !== undefined && - (obj.tx = base64FromBytes( - message.tx !== undefined ? message.tx : new Uint8Array() - )); - message.result !== undefined && - (obj.result = message.result - ? ResponseDeliverTx.toJSON(message.result) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): TxResult { - const message = { ...baseTxResult } as TxResult; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = object.tx; - } else { - message.tx = new Uint8Array(); - } - if (object.result !== undefined && object.result !== null) { - message.result = ResponseDeliverTx.fromPartial(object.result); - } else { - message.result = undefined; - } - return message; - }, -}; - -const baseValidator: object = { power: 0 }; - -export const Validator = { - encode(message: Validator, writer: Writer = Writer.create()): Writer { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.power !== 0) { - writer.uint32(24).int64(message.power); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Validator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator } as Validator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 3: - message.power = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = bytesFromBase64(object.address); - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } else { - message.power = 0; - } - return message; - }, - - toJSON(message: Validator): unknown { - const obj: any = {}; - message.address !== undefined && - (obj.address = base64FromBytes( - message.address !== undefined ? message.address : new Uint8Array() - )); - message.power !== undefined && (obj.power = message.power); - return obj; - }, - - fromPartial(object: DeepPartial): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = new Uint8Array(); - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } else { - message.power = 0; - } - return message; - }, -}; - -const baseValidatorUpdate: object = { power: 0 }; - -export const ValidatorUpdate = { - encode(message: ValidatorUpdate, writer: Writer = Writer.create()): Writer { - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.power !== 0) { - writer.uint32(16).int64(message.power); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorUpdate { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorUpdate } as ValidatorUpdate; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.power = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorUpdate { - const message = { ...baseValidatorUpdate } as ValidatorUpdate; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } else { - message.power = 0; - } - return message; - }, - - toJSON(message: ValidatorUpdate): unknown { - const obj: any = {}; - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.power !== undefined && (obj.power = message.power); - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorUpdate { - const message = { ...baseValidatorUpdate } as ValidatorUpdate; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } else { - message.power = 0; - } - return message; - }, -}; - -const baseVoteInfo: object = { signedLastBlock: false }; - -export const VoteInfo = { - encode(message: VoteInfo, writer: Writer = Writer.create()): Writer { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - if (message.signedLastBlock === true) { - writer.uint32(16).bool(message.signedLastBlock); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): VoteInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVoteInfo } as VoteInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 2: - message.signedLastBlock = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): VoteInfo { - const message = { ...baseVoteInfo } as VoteInfo; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } else { - message.validator = undefined; - } - if ( - object.signedLastBlock !== undefined && - object.signedLastBlock !== null - ) { - message.signedLastBlock = Boolean(object.signedLastBlock); - } else { - message.signedLastBlock = false; - } - return message; - }, - - toJSON(message: VoteInfo): unknown { - const obj: any = {}; - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - message.signedLastBlock !== undefined && - (obj.signedLastBlock = message.signedLastBlock); - return obj; - }, - - fromPartial(object: DeepPartial): VoteInfo { - const message = { ...baseVoteInfo } as VoteInfo; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } else { - message.validator = undefined; - } - if ( - object.signedLastBlock !== undefined && - object.signedLastBlock !== null - ) { - message.signedLastBlock = object.signedLastBlock; - } else { - message.signedLastBlock = false; - } - return message; - }, -}; - -const baseEvidence: object = { type: 0, height: 0, totalVotingPower: 0 }; - -export const Evidence = { - encode(message: Evidence, writer: Writer = Writer.create()): Writer { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(34).fork() - ).ldelim(); - } - if (message.totalVotingPower !== 0) { - writer.uint32(40).int64(message.totalVotingPower); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Evidence { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvidence } as Evidence; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32() as any; - break; - case 2: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 5: - message.totalVotingPower = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Evidence { - const message = { ...baseEvidence } as Evidence; - if (object.type !== undefined && object.type !== null) { - message.type = evidenceTypeFromJSON(object.type); - } else { - message.type = 0; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } else { - message.validator = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if ( - object.totalVotingPower !== undefined && - object.totalVotingPower !== null - ) { - message.totalVotingPower = Number(object.totalVotingPower); - } else { - message.totalVotingPower = 0; - } - return message; - }, - - toJSON(message: Evidence): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = evidenceTypeToJSON(message.type)); - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.totalVotingPower !== undefined && - (obj.totalVotingPower = message.totalVotingPower); - return obj; - }, - - fromPartial(object: DeepPartial): Evidence { - const message = { ...baseEvidence } as Evidence; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } else { - message.validator = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if ( - object.totalVotingPower !== undefined && - object.totalVotingPower !== null - ) { - message.totalVotingPower = object.totalVotingPower; - } else { - message.totalVotingPower = 0; - } - return message; - }, -}; - -const baseSnapshot: object = { height: 0, format: 0, chunks: 0 }; - -export const Snapshot = { - encode(message: Snapshot, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).uint64(message.height); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - if (message.chunks !== 0) { - writer.uint32(24).uint32(message.chunks); - } - if (message.hash.length !== 0) { - writer.uint32(34).bytes(message.hash); - } - if (message.metadata.length !== 0) { - writer.uint32(42).bytes(message.metadata); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Snapshot { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSnapshot } as Snapshot; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.uint64() as Long); - break; - case 2: - message.format = reader.uint32(); - break; - case 3: - message.chunks = reader.uint32(); - break; - case 4: - message.hash = reader.bytes(); - break; - case 5: - message.metadata = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Snapshot { - const message = { ...baseSnapshot } as Snapshot; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = Number(object.format); - } else { - message.format = 0; - } - if (object.chunks !== undefined && object.chunks !== null) { - message.chunks = Number(object.chunks); - } else { - message.chunks = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = bytesFromBase64(object.metadata); - } - return message; - }, - - toJSON(message: Snapshot): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.format !== undefined && (obj.format = message.format); - message.chunks !== undefined && (obj.chunks = message.chunks); - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - message.metadata !== undefined && - (obj.metadata = base64FromBytes( - message.metadata !== undefined ? message.metadata : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Snapshot { - const message = { ...baseSnapshot } as Snapshot; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = object.format; - } else { - message.format = 0; - } - if (object.chunks !== undefined && object.chunks !== null) { - message.chunks = object.chunks; - } else { - message.chunks = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = object.metadata; - } else { - message.metadata = new Uint8Array(); - } - return message; - }, -}; - -export interface ABCIApplication { - Echo(request: RequestEcho): Promise; - Flush(request: RequestFlush): Promise; - Info(request: RequestInfo): Promise; - SetOption(request: RequestSetOption): Promise; - DeliverTx(request: RequestDeliverTx): Promise; - CheckTx(request: RequestCheckTx): Promise; - Query(request: RequestQuery): Promise; - Commit(request: RequestCommit): Promise; - InitChain(request: RequestInitChain): Promise; - BeginBlock(request: RequestBeginBlock): Promise; - EndBlock(request: RequestEndBlock): Promise; - ListSnapshots(request: RequestListSnapshots): Promise; - OfferSnapshot(request: RequestOfferSnapshot): Promise; - LoadSnapshotChunk( - request: RequestLoadSnapshotChunk - ): Promise; - ApplySnapshotChunk( - request: RequestApplySnapshotChunk - ): Promise; -} - -export class ABCIApplicationClientImpl implements ABCIApplication { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Echo(request: RequestEcho): Promise { - const data = RequestEcho.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "Echo", - data - ); - return promise.then((data) => ResponseEcho.decode(new Reader(data))); - } - - Flush(request: RequestFlush): Promise { - const data = RequestFlush.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "Flush", - data - ); - return promise.then((data) => ResponseFlush.decode(new Reader(data))); - } - - Info(request: RequestInfo): Promise { - const data = RequestInfo.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "Info", - data - ); - return promise.then((data) => ResponseInfo.decode(new Reader(data))); - } - - SetOption(request: RequestSetOption): Promise { - const data = RequestSetOption.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "SetOption", - data - ); - return promise.then((data) => ResponseSetOption.decode(new Reader(data))); - } - - DeliverTx(request: RequestDeliverTx): Promise { - const data = RequestDeliverTx.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "DeliverTx", - data - ); - return promise.then((data) => ResponseDeliverTx.decode(new Reader(data))); - } - - CheckTx(request: RequestCheckTx): Promise { - const data = RequestCheckTx.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "CheckTx", - data - ); - return promise.then((data) => ResponseCheckTx.decode(new Reader(data))); - } - - Query(request: RequestQuery): Promise { - const data = RequestQuery.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "Query", - data - ); - return promise.then((data) => ResponseQuery.decode(new Reader(data))); - } - - Commit(request: RequestCommit): Promise { - const data = RequestCommit.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "Commit", - data - ); - return promise.then((data) => ResponseCommit.decode(new Reader(data))); - } - - InitChain(request: RequestInitChain): Promise { - const data = RequestInitChain.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "InitChain", - data - ); - return promise.then((data) => ResponseInitChain.decode(new Reader(data))); - } - - BeginBlock(request: RequestBeginBlock): Promise { - const data = RequestBeginBlock.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "BeginBlock", - data - ); - return promise.then((data) => ResponseBeginBlock.decode(new Reader(data))); - } - - EndBlock(request: RequestEndBlock): Promise { - const data = RequestEndBlock.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "EndBlock", - data - ); - return promise.then((data) => ResponseEndBlock.decode(new Reader(data))); - } - - ListSnapshots(request: RequestListSnapshots): Promise { - const data = RequestListSnapshots.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "ListSnapshots", - data - ); - return promise.then((data) => - ResponseListSnapshots.decode(new Reader(data)) - ); - } - - OfferSnapshot(request: RequestOfferSnapshot): Promise { - const data = RequestOfferSnapshot.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "OfferSnapshot", - data - ); - return promise.then((data) => - ResponseOfferSnapshot.decode(new Reader(data)) - ); - } - - LoadSnapshotChunk( - request: RequestLoadSnapshotChunk - ): Promise { - const data = RequestLoadSnapshotChunk.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "LoadSnapshotChunk", - data - ); - return promise.then((data) => - ResponseLoadSnapshotChunk.decode(new Reader(data)) - ); - } - - ApplySnapshotChunk( - request: RequestApplySnapshotChunk - ): Promise { - const data = RequestApplySnapshotChunk.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "ApplySnapshotChunk", - data - ); - return promise.then((data) => - ResponseApplySnapshotChunk.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/keys.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/keys.d.ts deleted file mode 100644 index 8fa5bdcbe4..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/keys.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "tendermint.crypto"; -/** PublicKey defines the keys available for use with Tendermint Validators */ -export interface PublicKey { - ed25519: Uint8Array | undefined; - secp256k1: Uint8Array | undefined; -} -export declare const PublicKey: { - encode(message: PublicKey, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PublicKey; - fromJSON(object: any): PublicKey; - toJSON(message: PublicKey): unknown; - fromPartial(object: DeepPartial): PublicKey; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/keys.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/keys.js deleted file mode 100644 index bbd03cb8ad..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/keys.js +++ /dev/null @@ -1,105 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "tendermint.crypto"; -const basePublicKey = {}; -export const PublicKey = { - encode(message, writer = Writer.create()) { - if (message.ed25519 !== undefined) { - writer.uint32(10).bytes(message.ed25519); - } - if (message.secp256k1 !== undefined) { - writer.uint32(18).bytes(message.secp256k1); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePublicKey }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ed25519 = reader.bytes(); - break; - case 2: - message.secp256k1 = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePublicKey }; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = bytesFromBase64(object.ed25519); - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = bytesFromBase64(object.secp256k1); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ed25519 !== undefined && - (obj.ed25519 = - message.ed25519 !== undefined - ? base64FromBytes(message.ed25519) - : undefined); - message.secp256k1 !== undefined && - (obj.secp256k1 = - message.secp256k1 !== undefined - ? base64FromBytes(message.secp256k1) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...basePublicKey }; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = object.ed25519; - } - else { - message.ed25519 = undefined; - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = object.secp256k1; - } - else { - message.secp256k1 = undefined; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/keys.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/keys.ts deleted file mode 100644 index 450db2a15d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/keys.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.crypto"; - -/** PublicKey defines the keys available for use with Tendermint Validators */ -export interface PublicKey { - ed25519: Uint8Array | undefined; - secp256k1: Uint8Array | undefined; -} - -const basePublicKey: object = {}; - -export const PublicKey = { - encode(message: PublicKey, writer: Writer = Writer.create()): Writer { - if (message.ed25519 !== undefined) { - writer.uint32(10).bytes(message.ed25519); - } - if (message.secp256k1 !== undefined) { - writer.uint32(18).bytes(message.secp256k1); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PublicKey { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePublicKey } as PublicKey; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ed25519 = reader.bytes(); - break; - case 2: - message.secp256k1 = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PublicKey { - const message = { ...basePublicKey } as PublicKey; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = bytesFromBase64(object.ed25519); - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = bytesFromBase64(object.secp256k1); - } - return message; - }, - - toJSON(message: PublicKey): unknown { - const obj: any = {}; - message.ed25519 !== undefined && - (obj.ed25519 = - message.ed25519 !== undefined - ? base64FromBytes(message.ed25519) - : undefined); - message.secp256k1 !== undefined && - (obj.secp256k1 = - message.secp256k1 !== undefined - ? base64FromBytes(message.secp256k1) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): PublicKey { - const message = { ...basePublicKey } as PublicKey; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = object.ed25519; - } else { - message.ed25519 = undefined; - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = object.secp256k1; - } else { - message.secp256k1 = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/proof.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/proof.d.ts deleted file mode 100644 index fd48f83e7d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/proof.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "tendermint.crypto"; -export interface Proof { - total: number; - index: number; - leafHash: Uint8Array; - aunts: Uint8Array[]; -} -export interface ValueOp { - /** Encoded in ProofOp.Key. */ - key: Uint8Array; - /** To encode in ProofOp.Data */ - proof: Proof | undefined; -} -export interface DominoOp { - key: string; - input: string; - output: string; -} -/** - * ProofOp defines an operation used for calculating Merkle root - * The data could be arbitrary format, providing nessecary data - * for example neighbouring node hash - */ -export interface ProofOp { - type: string; - key: Uint8Array; - data: Uint8Array; -} -/** ProofOps is Merkle proof defined by the list of ProofOps */ -export interface ProofOps { - ops: ProofOp[]; -} -export declare const Proof: { - encode(message: Proof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Proof; - fromJSON(object: any): Proof; - toJSON(message: Proof): unknown; - fromPartial(object: DeepPartial): Proof; -}; -export declare const ValueOp: { - encode(message: ValueOp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValueOp; - fromJSON(object: any): ValueOp; - toJSON(message: ValueOp): unknown; - fromPartial(object: DeepPartial): ValueOp; -}; -export declare const DominoOp: { - encode(message: DominoOp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DominoOp; - fromJSON(object: any): DominoOp; - toJSON(message: DominoOp): unknown; - fromPartial(object: DeepPartial): DominoOp; -}; -export declare const ProofOp: { - encode(message: ProofOp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ProofOp; - fromJSON(object: any): ProofOp; - toJSON(message: ProofOp): unknown; - fromPartial(object: DeepPartial): ProofOp; -}; -export declare const ProofOps: { - encode(message: ProofOps, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ProofOps; - fromJSON(object: any): ProofOps; - toJSON(message: ProofOps): unknown; - fromPartial(object: DeepPartial): ProofOps; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/proof.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/proof.js deleted file mode 100644 index 240e074337..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/proof.js +++ /dev/null @@ -1,456 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "tendermint.crypto"; -const baseProof = { total: 0, index: 0 }; -export const Proof = { - encode(message, writer = Writer.create()) { - if (message.total !== 0) { - writer.uint32(8).int64(message.total); - } - if (message.index !== 0) { - writer.uint32(16).int64(message.index); - } - if (message.leafHash.length !== 0) { - writer.uint32(26).bytes(message.leafHash); - } - for (const v of message.aunts) { - writer.uint32(34).bytes(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProof }; - message.aunts = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = longToNumber(reader.int64()); - break; - case 2: - message.index = longToNumber(reader.int64()); - break; - case 3: - message.leafHash = reader.bytes(); - break; - case 4: - message.aunts.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProof }; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.leafHash !== undefined && object.leafHash !== null) { - message.leafHash = bytesFromBase64(object.leafHash); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(bytesFromBase64(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.total !== undefined && (obj.total = message.total); - message.index !== undefined && (obj.index = message.index); - message.leafHash !== undefined && - (obj.leafHash = base64FromBytes(message.leafHash !== undefined ? message.leafHash : new Uint8Array())); - if (message.aunts) { - obj.aunts = message.aunts.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } - else { - obj.aunts = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseProof }; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.leafHash !== undefined && object.leafHash !== null) { - message.leafHash = object.leafHash; - } - else { - message.leafHash = new Uint8Array(); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(e); - } - } - return message; - }, -}; -const baseValueOp = {}; -export const ValueOp = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValueOp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValueOp }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseValueOp }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, -}; -const baseDominoOp = { key: "", input: "", output: "" }; -export const DominoOp = { - encode(message, writer = Writer.create()) { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.input !== "") { - writer.uint32(18).string(message.input); - } - if (message.output !== "") { - writer.uint32(26).string(message.output); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDominoOp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.input = reader.string(); - break; - case 3: - message.output = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDominoOp }; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } - else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = String(object.input); - } - else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = String(object.output); - } - else { - message.output = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && (obj.key = message.key); - message.input !== undefined && (obj.input = message.input); - message.output !== undefined && (obj.output = message.output); - return obj; - }, - fromPartial(object) { - const message = { ...baseDominoOp }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = object.input; - } - else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = object.output; - } - else { - message.output = ""; - } - return message; - }, -}; -const baseProofOp = { type: "" }; -export const ProofOp = { - encode(message, writer = Writer.create()) { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - if (message.key.length !== 0) { - writer.uint32(18).bytes(message.key); - } - if (message.data.length !== 0) { - writer.uint32(26).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.key = reader.bytes(); - break; - case 3: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProofOp }; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } - else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && (obj.type = message.type); - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseProofOp }; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseProofOps = {}; -export const ProofOps = { - encode(message, writer = Writer.create()) { - for (const v of message.ops) { - ProofOp.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOps }; - message.ops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ops.push(ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProofOps }; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.ops) { - obj.ops = message.ops.map((e) => (e ? ProofOp.toJSON(e) : undefined)); - } - else { - obj.ops = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseProofOps }; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromPartial(e)); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/proof.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/proof.ts deleted file mode 100644 index dae5160034..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/proof.ts +++ /dev/null @@ -1,529 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.crypto"; - -export interface Proof { - total: number; - index: number; - leafHash: Uint8Array; - aunts: Uint8Array[]; -} - -export interface ValueOp { - /** Encoded in ProofOp.Key. */ - key: Uint8Array; - /** To encode in ProofOp.Data */ - proof: Proof | undefined; -} - -export interface DominoOp { - key: string; - input: string; - output: string; -} - -/** - * ProofOp defines an operation used for calculating Merkle root - * The data could be arbitrary format, providing nessecary data - * for example neighbouring node hash - */ -export interface ProofOp { - type: string; - key: Uint8Array; - data: Uint8Array; -} - -/** ProofOps is Merkle proof defined by the list of ProofOps */ -export interface ProofOps { - ops: ProofOp[]; -} - -const baseProof: object = { total: 0, index: 0 }; - -export const Proof = { - encode(message: Proof, writer: Writer = Writer.create()): Writer { - if (message.total !== 0) { - writer.uint32(8).int64(message.total); - } - if (message.index !== 0) { - writer.uint32(16).int64(message.index); - } - if (message.leafHash.length !== 0) { - writer.uint32(26).bytes(message.leafHash); - } - for (const v of message.aunts) { - writer.uint32(34).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Proof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProof } as Proof; - message.aunts = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = longToNumber(reader.int64() as Long); - break; - case 2: - message.index = longToNumber(reader.int64() as Long); - break; - case 3: - message.leafHash = reader.bytes(); - break; - case 4: - message.aunts.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Proof { - const message = { ...baseProof } as Proof; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.leafHash !== undefined && object.leafHash !== null) { - message.leafHash = bytesFromBase64(object.leafHash); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: Proof): unknown { - const obj: any = {}; - message.total !== undefined && (obj.total = message.total); - message.index !== undefined && (obj.index = message.index); - message.leafHash !== undefined && - (obj.leafHash = base64FromBytes( - message.leafHash !== undefined ? message.leafHash : new Uint8Array() - )); - if (message.aunts) { - obj.aunts = message.aunts.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.aunts = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Proof { - const message = { ...baseProof } as Proof; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.leafHash !== undefined && object.leafHash !== null) { - message.leafHash = object.leafHash; - } else { - message.leafHash = new Uint8Array(); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(e); - } - } - return message; - }, -}; - -const baseValueOp: object = {}; - -export const ValueOp = { - encode(message: ValueOp, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValueOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValueOp } as ValueOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValueOp { - const message = { ...baseValueOp } as ValueOp; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: ValueOp): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ValueOp { - const message = { ...baseValueOp } as ValueOp; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -const baseDominoOp: object = { key: "", input: "", output: "" }; - -export const DominoOp = { - encode(message: DominoOp, writer: Writer = Writer.create()): Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.input !== "") { - writer.uint32(18).string(message.input); - } - if (message.output !== "") { - writer.uint32(26).string(message.output); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DominoOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDominoOp } as DominoOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.input = reader.string(); - break; - case 3: - message.output = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DominoOp { - const message = { ...baseDominoOp } as DominoOp; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = String(object.input); - } else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = String(object.output); - } else { - message.output = ""; - } - return message; - }, - - toJSON(message: DominoOp): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.input !== undefined && (obj.input = message.input); - message.output !== undefined && (obj.output = message.output); - return obj; - }, - - fromPartial(object: DeepPartial): DominoOp { - const message = { ...baseDominoOp } as DominoOp; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = object.input; - } else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = object.output; - } else { - message.output = ""; - } - return message; - }, -}; - -const baseProofOp: object = { type: "" }; - -export const ProofOp = { - encode(message: ProofOp, writer: Writer = Writer.create()): Writer { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - if (message.key.length !== 0) { - writer.uint32(18).bytes(message.key); - } - if (message.data.length !== 0) { - writer.uint32(26).bytes(message.data); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ProofOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOp } as ProofOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.key = reader.bytes(); - break; - case 3: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ProofOp { - const message = { ...baseProofOp } as ProofOp; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: ProofOp): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): ProofOp { - const message = { ...baseProofOp } as ProofOp; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseProofOps: object = {}; - -export const ProofOps = { - encode(message: ProofOps, writer: Writer = Writer.create()): Writer { - for (const v of message.ops) { - ProofOp.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ProofOps { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ops.push(ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ProofOps { - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ProofOps): unknown { - const obj: any = {}; - if (message.ops) { - obj.ops = message.ops.map((e) => (e ? ProofOp.toJSON(e) : undefined)); - } else { - obj.ops = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ProofOps { - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/params.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/params.d.ts deleted file mode 100644 index f500a7fd11..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/params.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Duration } from "../../google/protobuf/duration"; -export declare const protobufPackage = "tendermint.types"; -/** - * ConsensusParams contains consensus critical parameters that determine the - * validity of blocks. - */ -export interface ConsensusParams { - block: BlockParams | undefined; - evidence: EvidenceParams | undefined; - validator: ValidatorParams | undefined; - version: VersionParams | undefined; -} -/** BlockParams contains limits on the block size. */ -export interface BlockParams { - /** - * Max block size, in bytes. - * Note: must be greater than 0 - */ - maxBytes: number; - /** - * Max gas per block. - * Note: must be greater or equal to -1 - */ - maxGas: number; - /** - * Minimum time increment between consecutive blocks (in milliseconds) If the - * block header timestamp is ahead of the system clock, decrease this value. - * - * Not exposed to the application. - */ - timeIotaMs: number; -} -/** EvidenceParams determine how we handle evidence of malfeasance. */ -export interface EvidenceParams { - /** - * Max age of evidence, in blocks. - * - * The basic formula for calculating this is: MaxAgeDuration / {average block - * time}. - */ - maxAgeNumBlocks: number; - /** - * Max age of evidence, in time. - * - * It should correspond with an app's "unbonding period" or other similar - * mechanism for handling [Nothing-At-Stake - * attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - */ - maxAgeDuration: Duration | undefined; - /** - * This sets the maximum size of total evidence in bytes that can be committed in a single block. - * and should fall comfortably under the max block bytes. - * Default is 1048576 or 1MB - */ - maxBytes: number; -} -/** - * ValidatorParams restrict the public key types validators can use. - * NOTE: uses ABCI pubkey naming, not Amino names. - */ -export interface ValidatorParams { - pubKeyTypes: string[]; -} -/** VersionParams contains the ABCI application version. */ -export interface VersionParams { - appVersion: number; -} -/** - * HashedParams is a subset of ConsensusParams. - * - * It is hashed into the Header.ConsensusHash. - */ -export interface HashedParams { - blockMaxBytes: number; - blockMaxGas: number; -} -export declare const ConsensusParams: { - encode(message: ConsensusParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ConsensusParams; - fromJSON(object: any): ConsensusParams; - toJSON(message: ConsensusParams): unknown; - fromPartial(object: DeepPartial): ConsensusParams; -}; -export declare const BlockParams: { - encode(message: BlockParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BlockParams; - fromJSON(object: any): BlockParams; - toJSON(message: BlockParams): unknown; - fromPartial(object: DeepPartial): BlockParams; -}; -export declare const EvidenceParams: { - encode(message: EvidenceParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EvidenceParams; - fromJSON(object: any): EvidenceParams; - toJSON(message: EvidenceParams): unknown; - fromPartial(object: DeepPartial): EvidenceParams; -}; -export declare const ValidatorParams: { - encode(message: ValidatorParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorParams; - fromJSON(object: any): ValidatorParams; - toJSON(message: ValidatorParams): unknown; - fromPartial(object: DeepPartial): ValidatorParams; -}; -export declare const VersionParams: { - encode(message: VersionParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): VersionParams; - fromJSON(object: any): VersionParams; - toJSON(message: VersionParams): unknown; - fromPartial(object: DeepPartial): VersionParams; -}; -export declare const HashedParams: { - encode(message: HashedParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HashedParams; - fromJSON(object: any): HashedParams; - toJSON(message: HashedParams): unknown; - fromPartial(object: DeepPartial): HashedParams; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/params.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/params.js deleted file mode 100644 index 5ebc3d65ea..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/params.js +++ /dev/null @@ -1,510 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Duration } from "../../google/protobuf/duration"; -export const protobufPackage = "tendermint.types"; -const baseConsensusParams = {}; -export const ConsensusParams = { - encode(message, writer = Writer.create()) { - if (message.block !== undefined) { - BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceParams.encode(message.evidence, writer.uint32(18).fork()).ldelim(); - } - if (message.validator !== undefined) { - ValidatorParams.encode(message.validator, writer.uint32(26).fork()).ldelim(); - } - if (message.version !== undefined) { - VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensusParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = VersionParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseConsensusParams }; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromJSON(object.block); - } - else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromJSON(object.evidence); - } - else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromJSON(object.validator); - } - else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromJSON(object.version); - } - else { - message.version = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.block !== undefined && - (obj.block = message.block - ? BlockParams.toJSON(message.block) - : undefined); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? EvidenceParams.toJSON(message.evidence) - : undefined); - message.validator !== undefined && - (obj.validator = message.validator - ? ValidatorParams.toJSON(message.validator) - : undefined); - message.version !== undefined && - (obj.version = message.version - ? VersionParams.toJSON(message.version) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseConsensusParams }; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromPartial(object.block); - } - else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromPartial(object.evidence); - } - else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromPartial(object.validator); - } - else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromPartial(object.version); - } - else { - message.version = undefined; - } - return message; - }, -}; -const baseBlockParams = { maxBytes: 0, maxGas: 0, timeIotaMs: 0 }; -export const BlockParams = { - encode(message, writer = Writer.create()) { - if (message.maxBytes !== 0) { - writer.uint32(8).int64(message.maxBytes); - } - if (message.maxGas !== 0) { - writer.uint32(16).int64(message.maxGas); - } - if (message.timeIotaMs !== 0) { - writer.uint32(24).int64(message.timeIotaMs); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxBytes = longToNumber(reader.int64()); - break; - case 2: - message.maxGas = longToNumber(reader.int64()); - break; - case 3: - message.timeIotaMs = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBlockParams }; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = Number(object.maxBytes); - } - else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = Number(object.maxGas); - } - else { - message.maxGas = 0; - } - if (object.timeIotaMs !== undefined && object.timeIotaMs !== null) { - message.timeIotaMs = Number(object.timeIotaMs); - } - else { - message.timeIotaMs = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.maxBytes !== undefined && (obj.maxBytes = message.maxBytes); - message.maxGas !== undefined && (obj.maxGas = message.maxGas); - message.timeIotaMs !== undefined && (obj.timeIotaMs = message.timeIotaMs); - return obj; - }, - fromPartial(object) { - const message = { ...baseBlockParams }; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = object.maxBytes; - } - else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = object.maxGas; - } - else { - message.maxGas = 0; - } - if (object.timeIotaMs !== undefined && object.timeIotaMs !== null) { - message.timeIotaMs = object.timeIotaMs; - } - else { - message.timeIotaMs = 0; - } - return message; - }, -}; -const baseEvidenceParams = { maxAgeNumBlocks: 0, maxBytes: 0 }; -export const EvidenceParams = { - encode(message, writer = Writer.create()) { - if (message.maxAgeNumBlocks !== 0) { - writer.uint32(8).int64(message.maxAgeNumBlocks); - } - if (message.maxAgeDuration !== undefined) { - Duration.encode(message.maxAgeDuration, writer.uint32(18).fork()).ldelim(); - } - if (message.maxBytes !== 0) { - writer.uint32(24).int64(message.maxBytes); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvidenceParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxAgeNumBlocks = longToNumber(reader.int64()); - break; - case 2: - message.maxAgeDuration = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.maxBytes = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEvidenceParams }; - if (object.maxAgeNumBlocks !== undefined && - object.maxAgeNumBlocks !== null) { - message.maxAgeNumBlocks = Number(object.maxAgeNumBlocks); - } - else { - message.maxAgeNumBlocks = 0; - } - if (object.maxAgeDuration !== undefined && object.maxAgeDuration !== null) { - message.maxAgeDuration = Duration.fromJSON(object.maxAgeDuration); - } - else { - message.maxAgeDuration = undefined; - } - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = Number(object.maxBytes); - } - else { - message.maxBytes = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.maxAgeNumBlocks !== undefined && - (obj.maxAgeNumBlocks = message.maxAgeNumBlocks); - message.maxAgeDuration !== undefined && - (obj.maxAgeDuration = message.maxAgeDuration - ? Duration.toJSON(message.maxAgeDuration) - : undefined); - message.maxBytes !== undefined && (obj.maxBytes = message.maxBytes); - return obj; - }, - fromPartial(object) { - const message = { ...baseEvidenceParams }; - if (object.maxAgeNumBlocks !== undefined && - object.maxAgeNumBlocks !== null) { - message.maxAgeNumBlocks = object.maxAgeNumBlocks; - } - else { - message.maxAgeNumBlocks = 0; - } - if (object.maxAgeDuration !== undefined && object.maxAgeDuration !== null) { - message.maxAgeDuration = Duration.fromPartial(object.maxAgeDuration); - } - else { - message.maxAgeDuration = undefined; - } - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = object.maxBytes; - } - else { - message.maxBytes = 0; - } - return message; - }, -}; -const baseValidatorParams = { pubKeyTypes: "" }; -export const ValidatorParams = { - encode(message, writer = Writer.create()) { - for (const v of message.pubKeyTypes) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorParams }; - message.pubKeyTypes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKeyTypes.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorParams }; - message.pubKeyTypes = []; - if (object.pubKeyTypes !== undefined && object.pubKeyTypes !== null) { - for (const e of object.pubKeyTypes) { - message.pubKeyTypes.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.pubKeyTypes) { - obj.pubKeyTypes = message.pubKeyTypes.map((e) => e); - } - else { - obj.pubKeyTypes = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorParams }; - message.pubKeyTypes = []; - if (object.pubKeyTypes !== undefined && object.pubKeyTypes !== null) { - for (const e of object.pubKeyTypes) { - message.pubKeyTypes.push(e); - } - } - return message; - }, -}; -const baseVersionParams = { appVersion: 0 }; -export const VersionParams = { - encode(message, writer = Writer.create()) { - if (message.appVersion !== 0) { - writer.uint32(8).uint64(message.appVersion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVersionParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.appVersion = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseVersionParams }; - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = Number(object.appVersion); - } - else { - message.appVersion = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.appVersion !== undefined && (obj.appVersion = message.appVersion); - return obj; - }, - fromPartial(object) { - const message = { ...baseVersionParams }; - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = object.appVersion; - } - else { - message.appVersion = 0; - } - return message; - }, -}; -const baseHashedParams = { blockMaxBytes: 0, blockMaxGas: 0 }; -export const HashedParams = { - encode(message, writer = Writer.create()) { - if (message.blockMaxBytes !== 0) { - writer.uint32(8).int64(message.blockMaxBytes); - } - if (message.blockMaxGas !== 0) { - writer.uint32(16).int64(message.blockMaxGas); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHashedParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockMaxBytes = longToNumber(reader.int64()); - break; - case 2: - message.blockMaxGas = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHashedParams }; - if (object.blockMaxBytes !== undefined && object.blockMaxBytes !== null) { - message.blockMaxBytes = Number(object.blockMaxBytes); - } - else { - message.blockMaxBytes = 0; - } - if (object.blockMaxGas !== undefined && object.blockMaxGas !== null) { - message.blockMaxGas = Number(object.blockMaxGas); - } - else { - message.blockMaxGas = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.blockMaxBytes !== undefined && - (obj.blockMaxBytes = message.blockMaxBytes); - message.blockMaxGas !== undefined && - (obj.blockMaxGas = message.blockMaxGas); - return obj; - }, - fromPartial(object) { - const message = { ...baseHashedParams }; - if (object.blockMaxBytes !== undefined && object.blockMaxBytes !== null) { - message.blockMaxBytes = object.blockMaxBytes; - } - else { - message.blockMaxBytes = 0; - } - if (object.blockMaxGas !== undefined && object.blockMaxGas !== null) { - message.blockMaxGas = object.blockMaxGas; - } - else { - message.blockMaxGas = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/params.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/params.ts deleted file mode 100644 index eaa1846350..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/params.ts +++ /dev/null @@ -1,625 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Duration } from "../../google/protobuf/duration"; - -export const protobufPackage = "tendermint.types"; - -/** - * ConsensusParams contains consensus critical parameters that determine the - * validity of blocks. - */ -export interface ConsensusParams { - block: BlockParams | undefined; - evidence: EvidenceParams | undefined; - validator: ValidatorParams | undefined; - version: VersionParams | undefined; -} - -/** BlockParams contains limits on the block size. */ -export interface BlockParams { - /** - * Max block size, in bytes. - * Note: must be greater than 0 - */ - maxBytes: number; - /** - * Max gas per block. - * Note: must be greater or equal to -1 - */ - maxGas: number; - /** - * Minimum time increment between consecutive blocks (in milliseconds) If the - * block header timestamp is ahead of the system clock, decrease this value. - * - * Not exposed to the application. - */ - timeIotaMs: number; -} - -/** EvidenceParams determine how we handle evidence of malfeasance. */ -export interface EvidenceParams { - /** - * Max age of evidence, in blocks. - * - * The basic formula for calculating this is: MaxAgeDuration / {average block - * time}. - */ - maxAgeNumBlocks: number; - /** - * Max age of evidence, in time. - * - * It should correspond with an app's "unbonding period" or other similar - * mechanism for handling [Nothing-At-Stake - * attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - */ - maxAgeDuration: Duration | undefined; - /** - * This sets the maximum size of total evidence in bytes that can be committed in a single block. - * and should fall comfortably under the max block bytes. - * Default is 1048576 or 1MB - */ - maxBytes: number; -} - -/** - * ValidatorParams restrict the public key types validators can use. - * NOTE: uses ABCI pubkey naming, not Amino names. - */ -export interface ValidatorParams { - pubKeyTypes: string[]; -} - -/** VersionParams contains the ABCI application version. */ -export interface VersionParams { - appVersion: number; -} - -/** - * HashedParams is a subset of ConsensusParams. - * - * It is hashed into the Header.ConsensusHash. - */ -export interface HashedParams { - blockMaxBytes: number; - blockMaxGas: number; -} - -const baseConsensusParams: object = {}; - -export const ConsensusParams = { - encode(message: ConsensusParams, writer: Writer = Writer.create()): Writer { - if (message.block !== undefined) { - BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceParams.encode( - message.evidence, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.validator !== undefined) { - ValidatorParams.encode( - message.validator, - writer.uint32(26).fork() - ).ldelim(); - } - if (message.version !== undefined) { - VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ConsensusParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensusParams } as ConsensusParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = VersionParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsensusParams { - const message = { ...baseConsensusParams } as ConsensusParams; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromJSON(object.block); - } else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromJSON(object.evidence); - } else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromJSON(object.validator); - } else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromJSON(object.version); - } else { - message.version = undefined; - } - return message; - }, - - toJSON(message: ConsensusParams): unknown { - const obj: any = {}; - message.block !== undefined && - (obj.block = message.block - ? BlockParams.toJSON(message.block) - : undefined); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? EvidenceParams.toJSON(message.evidence) - : undefined); - message.validator !== undefined && - (obj.validator = message.validator - ? ValidatorParams.toJSON(message.validator) - : undefined); - message.version !== undefined && - (obj.version = message.version - ? VersionParams.toJSON(message.version) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ConsensusParams { - const message = { ...baseConsensusParams } as ConsensusParams; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromPartial(object.block); - } else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromPartial(object.evidence); - } else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromPartial(object.validator); - } else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromPartial(object.version); - } else { - message.version = undefined; - } - return message; - }, -}; - -const baseBlockParams: object = { maxBytes: 0, maxGas: 0, timeIotaMs: 0 }; - -export const BlockParams = { - encode(message: BlockParams, writer: Writer = Writer.create()): Writer { - if (message.maxBytes !== 0) { - writer.uint32(8).int64(message.maxBytes); - } - if (message.maxGas !== 0) { - writer.uint32(16).int64(message.maxGas); - } - if (message.timeIotaMs !== 0) { - writer.uint32(24).int64(message.timeIotaMs); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockParams } as BlockParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxBytes = longToNumber(reader.int64() as Long); - break; - case 2: - message.maxGas = longToNumber(reader.int64() as Long); - break; - case 3: - message.timeIotaMs = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockParams { - const message = { ...baseBlockParams } as BlockParams; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = Number(object.maxBytes); - } else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = Number(object.maxGas); - } else { - message.maxGas = 0; - } - if (object.timeIotaMs !== undefined && object.timeIotaMs !== null) { - message.timeIotaMs = Number(object.timeIotaMs); - } else { - message.timeIotaMs = 0; - } - return message; - }, - - toJSON(message: BlockParams): unknown { - const obj: any = {}; - message.maxBytes !== undefined && (obj.maxBytes = message.maxBytes); - message.maxGas !== undefined && (obj.maxGas = message.maxGas); - message.timeIotaMs !== undefined && (obj.timeIotaMs = message.timeIotaMs); - return obj; - }, - - fromPartial(object: DeepPartial): BlockParams { - const message = { ...baseBlockParams } as BlockParams; - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = object.maxBytes; - } else { - message.maxBytes = 0; - } - if (object.maxGas !== undefined && object.maxGas !== null) { - message.maxGas = object.maxGas; - } else { - message.maxGas = 0; - } - if (object.timeIotaMs !== undefined && object.timeIotaMs !== null) { - message.timeIotaMs = object.timeIotaMs; - } else { - message.timeIotaMs = 0; - } - return message; - }, -}; - -const baseEvidenceParams: object = { maxAgeNumBlocks: 0, maxBytes: 0 }; - -export const EvidenceParams = { - encode(message: EvidenceParams, writer: Writer = Writer.create()): Writer { - if (message.maxAgeNumBlocks !== 0) { - writer.uint32(8).int64(message.maxAgeNumBlocks); - } - if (message.maxAgeDuration !== undefined) { - Duration.encode( - message.maxAgeDuration, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.maxBytes !== 0) { - writer.uint32(24).int64(message.maxBytes); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EvidenceParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvidenceParams } as EvidenceParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxAgeNumBlocks = longToNumber(reader.int64() as Long); - break; - case 2: - message.maxAgeDuration = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.maxBytes = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EvidenceParams { - const message = { ...baseEvidenceParams } as EvidenceParams; - if ( - object.maxAgeNumBlocks !== undefined && - object.maxAgeNumBlocks !== null - ) { - message.maxAgeNumBlocks = Number(object.maxAgeNumBlocks); - } else { - message.maxAgeNumBlocks = 0; - } - if (object.maxAgeDuration !== undefined && object.maxAgeDuration !== null) { - message.maxAgeDuration = Duration.fromJSON(object.maxAgeDuration); - } else { - message.maxAgeDuration = undefined; - } - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = Number(object.maxBytes); - } else { - message.maxBytes = 0; - } - return message; - }, - - toJSON(message: EvidenceParams): unknown { - const obj: any = {}; - message.maxAgeNumBlocks !== undefined && - (obj.maxAgeNumBlocks = message.maxAgeNumBlocks); - message.maxAgeDuration !== undefined && - (obj.maxAgeDuration = message.maxAgeDuration - ? Duration.toJSON(message.maxAgeDuration) - : undefined); - message.maxBytes !== undefined && (obj.maxBytes = message.maxBytes); - return obj; - }, - - fromPartial(object: DeepPartial): EvidenceParams { - const message = { ...baseEvidenceParams } as EvidenceParams; - if ( - object.maxAgeNumBlocks !== undefined && - object.maxAgeNumBlocks !== null - ) { - message.maxAgeNumBlocks = object.maxAgeNumBlocks; - } else { - message.maxAgeNumBlocks = 0; - } - if (object.maxAgeDuration !== undefined && object.maxAgeDuration !== null) { - message.maxAgeDuration = Duration.fromPartial(object.maxAgeDuration); - } else { - message.maxAgeDuration = undefined; - } - if (object.maxBytes !== undefined && object.maxBytes !== null) { - message.maxBytes = object.maxBytes; - } else { - message.maxBytes = 0; - } - return message; - }, -}; - -const baseValidatorParams: object = { pubKeyTypes: "" }; - -export const ValidatorParams = { - encode(message: ValidatorParams, writer: Writer = Writer.create()): Writer { - for (const v of message.pubKeyTypes) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorParams } as ValidatorParams; - message.pubKeyTypes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKeyTypes.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorParams { - const message = { ...baseValidatorParams } as ValidatorParams; - message.pubKeyTypes = []; - if (object.pubKeyTypes !== undefined && object.pubKeyTypes !== null) { - for (const e of object.pubKeyTypes) { - message.pubKeyTypes.push(String(e)); - } - } - return message; - }, - - toJSON(message: ValidatorParams): unknown { - const obj: any = {}; - if (message.pubKeyTypes) { - obj.pubKeyTypes = message.pubKeyTypes.map((e) => e); - } else { - obj.pubKeyTypes = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorParams { - const message = { ...baseValidatorParams } as ValidatorParams; - message.pubKeyTypes = []; - if (object.pubKeyTypes !== undefined && object.pubKeyTypes !== null) { - for (const e of object.pubKeyTypes) { - message.pubKeyTypes.push(e); - } - } - return message; - }, -}; - -const baseVersionParams: object = { appVersion: 0 }; - -export const VersionParams = { - encode(message: VersionParams, writer: Writer = Writer.create()): Writer { - if (message.appVersion !== 0) { - writer.uint32(8).uint64(message.appVersion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): VersionParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVersionParams } as VersionParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.appVersion = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): VersionParams { - const message = { ...baseVersionParams } as VersionParams; - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = Number(object.appVersion); - } else { - message.appVersion = 0; - } - return message; - }, - - toJSON(message: VersionParams): unknown { - const obj: any = {}; - message.appVersion !== undefined && (obj.appVersion = message.appVersion); - return obj; - }, - - fromPartial(object: DeepPartial): VersionParams { - const message = { ...baseVersionParams } as VersionParams; - if (object.appVersion !== undefined && object.appVersion !== null) { - message.appVersion = object.appVersion; - } else { - message.appVersion = 0; - } - return message; - }, -}; - -const baseHashedParams: object = { blockMaxBytes: 0, blockMaxGas: 0 }; - -export const HashedParams = { - encode(message: HashedParams, writer: Writer = Writer.create()): Writer { - if (message.blockMaxBytes !== 0) { - writer.uint32(8).int64(message.blockMaxBytes); - } - if (message.blockMaxGas !== 0) { - writer.uint32(16).int64(message.blockMaxGas); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HashedParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHashedParams } as HashedParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockMaxBytes = longToNumber(reader.int64() as Long); - break; - case 2: - message.blockMaxGas = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HashedParams { - const message = { ...baseHashedParams } as HashedParams; - if (object.blockMaxBytes !== undefined && object.blockMaxBytes !== null) { - message.blockMaxBytes = Number(object.blockMaxBytes); - } else { - message.blockMaxBytes = 0; - } - if (object.blockMaxGas !== undefined && object.blockMaxGas !== null) { - message.blockMaxGas = Number(object.blockMaxGas); - } else { - message.blockMaxGas = 0; - } - return message; - }, - - toJSON(message: HashedParams): unknown { - const obj: any = {}; - message.blockMaxBytes !== undefined && - (obj.blockMaxBytes = message.blockMaxBytes); - message.blockMaxGas !== undefined && - (obj.blockMaxGas = message.blockMaxGas); - return obj; - }, - - fromPartial(object: DeepPartial): HashedParams { - const message = { ...baseHashedParams } as HashedParams; - if (object.blockMaxBytes !== undefined && object.blockMaxBytes !== null) { - message.blockMaxBytes = object.blockMaxBytes; - } else { - message.blockMaxBytes = 0; - } - if (object.blockMaxGas !== undefined && object.blockMaxGas !== null) { - message.blockMaxGas = object.blockMaxGas; - } else { - message.blockMaxGas = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/types.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/types.d.ts deleted file mode 100644 index 52af8f2768..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/types.d.ts +++ /dev/null @@ -1,233 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Proof } from "../../tendermint/crypto/proof"; -import { Consensus } from "../../tendermint/version/types"; -import { ValidatorSet } from "../../tendermint/types/validator"; -export declare const protobufPackage = "tendermint.types"; -/** BlockIdFlag indicates which BlcokID the signature is for */ -export declare enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0, - BLOCK_ID_FLAG_ABSENT = 1, - BLOCK_ID_FLAG_COMMIT = 2, - BLOCK_ID_FLAG_NIL = 3, - UNRECOGNIZED = -1 -} -export declare function blockIDFlagFromJSON(object: any): BlockIDFlag; -export declare function blockIDFlagToJSON(object: BlockIDFlag): string; -/** SignedMsgType is a type of signed message in the consensus. */ -export declare enum SignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = 0, - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SIGNED_MSG_TYPE_PREVOTE = 1, - SIGNED_MSG_TYPE_PRECOMMIT = 2, - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SIGNED_MSG_TYPE_PROPOSAL = 32, - UNRECOGNIZED = -1 -} -export declare function signedMsgTypeFromJSON(object: any): SignedMsgType; -export declare function signedMsgTypeToJSON(object: SignedMsgType): string; -/** PartsetHeader */ -export interface PartSetHeader { - total: number; - hash: Uint8Array; -} -export interface Part { - index: number; - bytes: Uint8Array; - proof: Proof | undefined; -} -/** BlockID */ -export interface BlockID { - hash: Uint8Array; - partSetHeader: PartSetHeader | undefined; -} -/** Header defines the structure of a Tendermint block header. */ -export interface Header { - /** basic block info */ - version: Consensus | undefined; - chainId: string; - height: number; - time: Date | undefined; - /** prev block info */ - lastBlockId: BlockID | undefined; - /** hashes of block data */ - lastCommitHash: Uint8Array; - /** transactions */ - dataHash: Uint8Array; - /** hashes from the app output from the prev block */ - validatorsHash: Uint8Array; - /** validators for the next block */ - nextValidatorsHash: Uint8Array; - /** consensus params for current block */ - consensusHash: Uint8Array; - /** state after txs from the previous block */ - appHash: Uint8Array; - /** root hash of all results from the txs from the previous block */ - lastResultsHash: Uint8Array; - /** consensus info */ - evidenceHash: Uint8Array; - /** original proposer of the block */ - proposerAddress: Uint8Array; -} -/** Data contains the set of transactions included in the block */ -export interface Data { - /** - * 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. - */ - txs: Uint8Array[]; -} -/** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ -export interface Vote { - type: SignedMsgType; - height: number; - round: number; - /** zero if vote is nil. */ - blockId: BlockID | undefined; - timestamp: Date | undefined; - validatorAddress: Uint8Array; - validatorIndex: number; - signature: Uint8Array; -} -/** Commit contains the evidence that a block was committed by a set of validators. */ -export interface Commit { - height: number; - round: number; - blockId: BlockID | undefined; - signatures: CommitSig[]; -} -/** CommitSig is a part of the Vote included in a Commit. */ -export interface CommitSig { - blockIdFlag: BlockIDFlag; - validatorAddress: Uint8Array; - timestamp: Date | undefined; - signature: Uint8Array; -} -export interface Proposal { - type: SignedMsgType; - height: number; - round: number; - polRound: number; - blockId: BlockID | undefined; - timestamp: Date | undefined; - signature: Uint8Array; -} -export interface SignedHeader { - header: Header | undefined; - commit: Commit | undefined; -} -export interface LightBlock { - signedHeader: SignedHeader | undefined; - validatorSet: ValidatorSet | undefined; -} -export interface BlockMeta { - blockId: BlockID | undefined; - blockSize: number; - header: Header | undefined; - numTxs: number; -} -/** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ -export interface TxProof { - rootHash: Uint8Array; - data: Uint8Array; - proof: Proof | undefined; -} -export declare const PartSetHeader: { - encode(message: PartSetHeader, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PartSetHeader; - fromJSON(object: any): PartSetHeader; - toJSON(message: PartSetHeader): unknown; - fromPartial(object: DeepPartial): PartSetHeader; -}; -export declare const Part: { - encode(message: Part, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Part; - fromJSON(object: any): Part; - toJSON(message: Part): unknown; - fromPartial(object: DeepPartial): Part; -}; -export declare const BlockID: { - encode(message: BlockID, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BlockID; - fromJSON(object: any): BlockID; - toJSON(message: BlockID): unknown; - fromPartial(object: DeepPartial): BlockID; -}; -export declare const Header: { - encode(message: Header, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Header; - fromJSON(object: any): Header; - toJSON(message: Header): unknown; - fromPartial(object: DeepPartial
): Header; -}; -export declare const Data: { - encode(message: Data, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Data; - fromJSON(object: any): Data; - toJSON(message: Data): unknown; - fromPartial(object: DeepPartial): Data; -}; -export declare const Vote: { - encode(message: Vote, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Vote; - fromJSON(object: any): Vote; - toJSON(message: Vote): unknown; - fromPartial(object: DeepPartial): Vote; -}; -export declare const Commit: { - encode(message: Commit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Commit; - fromJSON(object: any): Commit; - toJSON(message: Commit): unknown; - fromPartial(object: DeepPartial): Commit; -}; -export declare const CommitSig: { - encode(message: CommitSig, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CommitSig; - fromJSON(object: any): CommitSig; - toJSON(message: CommitSig): unknown; - fromPartial(object: DeepPartial): CommitSig; -}; -export declare const Proposal: { - encode(message: Proposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Proposal; - fromJSON(object: any): Proposal; - toJSON(message: Proposal): unknown; - fromPartial(object: DeepPartial): Proposal; -}; -export declare const SignedHeader: { - encode(message: SignedHeader, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SignedHeader; - fromJSON(object: any): SignedHeader; - toJSON(message: SignedHeader): unknown; - fromPartial(object: DeepPartial): SignedHeader; -}; -export declare const LightBlock: { - encode(message: LightBlock, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): LightBlock; - fromJSON(object: any): LightBlock; - toJSON(message: LightBlock): unknown; - fromPartial(object: DeepPartial): LightBlock; -}; -export declare const BlockMeta: { - encode(message: BlockMeta, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BlockMeta; - fromJSON(object: any): BlockMeta; - toJSON(message: BlockMeta): unknown; - fromPartial(object: DeepPartial): BlockMeta; -}; -export declare const TxProof: { - encode(message: TxProof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TxProof; - fromJSON(object: any): TxProof; - toJSON(message: TxProof): unknown; - fromPartial(object: DeepPartial): TxProof; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/types.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/types.js deleted file mode 100644 index 2eb6d87850..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/types.js +++ /dev/null @@ -1,1689 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Proof } from "../../tendermint/crypto/proof"; -import { Consensus } from "../../tendermint/version/types"; -import { ValidatorSet } from "../../tendermint/types/validator"; -export const protobufPackage = "tendermint.types"; -/** BlockIdFlag indicates which BlcokID the signature is for */ -export var BlockIDFlag; -(function (BlockIDFlag) { - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_UNKNOWN"] = 0] = "BLOCK_ID_FLAG_UNKNOWN"; - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_ABSENT"] = 1] = "BLOCK_ID_FLAG_ABSENT"; - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_COMMIT"] = 2] = "BLOCK_ID_FLAG_COMMIT"; - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_NIL"] = 3] = "BLOCK_ID_FLAG_NIL"; - BlockIDFlag[BlockIDFlag["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(BlockIDFlag || (BlockIDFlag = {})); -export function blockIDFlagFromJSON(object) { - switch (object) { - case 0: - case "BLOCK_ID_FLAG_UNKNOWN": - return BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN; - case 1: - case "BLOCK_ID_FLAG_ABSENT": - return BlockIDFlag.BLOCK_ID_FLAG_ABSENT; - case 2: - case "BLOCK_ID_FLAG_COMMIT": - return BlockIDFlag.BLOCK_ID_FLAG_COMMIT; - case 3: - case "BLOCK_ID_FLAG_NIL": - return BlockIDFlag.BLOCK_ID_FLAG_NIL; - case -1: - case "UNRECOGNIZED": - default: - return BlockIDFlag.UNRECOGNIZED; - } -} -export function blockIDFlagToJSON(object) { - switch (object) { - case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN: - return "BLOCK_ID_FLAG_UNKNOWN"; - case BlockIDFlag.BLOCK_ID_FLAG_ABSENT: - return "BLOCK_ID_FLAG_ABSENT"; - case BlockIDFlag.BLOCK_ID_FLAG_COMMIT: - return "BLOCK_ID_FLAG_COMMIT"; - case BlockIDFlag.BLOCK_ID_FLAG_NIL: - return "BLOCK_ID_FLAG_NIL"; - default: - return "UNKNOWN"; - } -} -/** SignedMsgType is a type of signed message in the consensus. */ -export var SignedMsgType; -(function (SignedMsgType) { - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_UNKNOWN"] = 0] = "SIGNED_MSG_TYPE_UNKNOWN"; - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_PREVOTE"] = 1] = "SIGNED_MSG_TYPE_PREVOTE"; - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_PRECOMMIT"] = 2] = "SIGNED_MSG_TYPE_PRECOMMIT"; - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_PROPOSAL"] = 32] = "SIGNED_MSG_TYPE_PROPOSAL"; - SignedMsgType[SignedMsgType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(SignedMsgType || (SignedMsgType = {})); -export function signedMsgTypeFromJSON(object) { - switch (object) { - case 0: - case "SIGNED_MSG_TYPE_UNKNOWN": - return SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN; - case 1: - case "SIGNED_MSG_TYPE_PREVOTE": - return SignedMsgType.SIGNED_MSG_TYPE_PREVOTE; - case 2: - case "SIGNED_MSG_TYPE_PRECOMMIT": - return SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT; - case 32: - case "SIGNED_MSG_TYPE_PROPOSAL": - return SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL; - case -1: - case "UNRECOGNIZED": - default: - return SignedMsgType.UNRECOGNIZED; - } -} -export function signedMsgTypeToJSON(object) { - switch (object) { - case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN: - return "SIGNED_MSG_TYPE_UNKNOWN"; - case SignedMsgType.SIGNED_MSG_TYPE_PREVOTE: - return "SIGNED_MSG_TYPE_PREVOTE"; - case SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT: - return "SIGNED_MSG_TYPE_PRECOMMIT"; - case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL: - return "SIGNED_MSG_TYPE_PROPOSAL"; - default: - return "UNKNOWN"; - } -} -const basePartSetHeader = { total: 0 }; -export const PartSetHeader = { - encode(message, writer = Writer.create()) { - if (message.total !== 0) { - writer.uint32(8).uint32(message.total); - } - if (message.hash.length !== 0) { - writer.uint32(18).bytes(message.hash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePartSetHeader }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.uint32(); - break; - case 2: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePartSetHeader }; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.total !== undefined && (obj.total = message.total); - message.hash !== undefined && - (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...basePartSetHeader }; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = new Uint8Array(); - } - return message; - }, -}; -const basePart = { index: 0 }; -export const Part = { - encode(message, writer = Writer.create()) { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.bytes.length !== 0) { - writer.uint32(18).bytes(message.bytes); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePart }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePart }; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = bytesFromBase64(object.bytes); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.index !== undefined && (obj.index = message.index); - message.bytes !== undefined && - (obj.bytes = base64FromBytes(message.bytes !== undefined ? message.bytes : new Uint8Array())); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...basePart }; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = object.bytes; - } - else { - message.bytes = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, -}; -const baseBlockID = {}; -export const BlockID = { - encode(message, writer = Writer.create()) { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.partSetHeader !== undefined) { - PartSetHeader.encode(message.partSetHeader, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockID }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.partSetHeader = PartSetHeader.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBlockID }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.partSetHeader !== undefined && object.partSetHeader !== null) { - message.partSetHeader = PartSetHeader.fromJSON(object.partSetHeader); - } - else { - message.partSetHeader = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - message.partSetHeader !== undefined && - (obj.partSetHeader = message.partSetHeader - ? PartSetHeader.toJSON(message.partSetHeader) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseBlockID }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = new Uint8Array(); - } - if (object.partSetHeader !== undefined && object.partSetHeader !== null) { - message.partSetHeader = PartSetHeader.fromPartial(object.partSetHeader); - } - else { - message.partSetHeader = undefined; - } - return message; - }, -}; -const baseHeader = { chainId: "", height: 0 }; -export const Header = { - encode(message, writer = Writer.create()) { - if (message.version !== undefined) { - Consensus.encode(message.version, writer.uint32(10).fork()).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(18).string(message.chainId); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(34).fork()).ldelim(); - } - if (message.lastBlockId !== undefined) { - BlockID.encode(message.lastBlockId, writer.uint32(42).fork()).ldelim(); - } - if (message.lastCommitHash.length !== 0) { - writer.uint32(50).bytes(message.lastCommitHash); - } - if (message.dataHash.length !== 0) { - writer.uint32(58).bytes(message.dataHash); - } - if (message.validatorsHash.length !== 0) { - writer.uint32(66).bytes(message.validatorsHash); - } - if (message.nextValidatorsHash.length !== 0) { - writer.uint32(74).bytes(message.nextValidatorsHash); - } - if (message.consensusHash.length !== 0) { - writer.uint32(82).bytes(message.consensusHash); - } - if (message.appHash.length !== 0) { - writer.uint32(90).bytes(message.appHash); - } - if (message.lastResultsHash.length !== 0) { - writer.uint32(98).bytes(message.lastResultsHash); - } - if (message.evidenceHash.length !== 0) { - writer.uint32(106).bytes(message.evidenceHash); - } - if (message.proposerAddress.length !== 0) { - writer.uint32(114).bytes(message.proposerAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeader }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.height = longToNumber(reader.int64()); - break; - case 4: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.lastBlockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.lastCommitHash = reader.bytes(); - break; - case 7: - message.dataHash = reader.bytes(); - break; - case 8: - message.validatorsHash = reader.bytes(); - break; - case 9: - message.nextValidatorsHash = reader.bytes(); - break; - case 10: - message.consensusHash = reader.bytes(); - break; - case 11: - message.appHash = reader.bytes(); - break; - case 12: - message.lastResultsHash = reader.bytes(); - break; - case 13: - message.evidenceHash = reader.bytes(); - break; - case 14: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHeader }; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromJSON(object.version); - } - else { - message.version = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = String(object.chainId); - } - else { - message.chainId = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } - else { - message.time = undefined; - } - if (object.lastBlockId !== undefined && object.lastBlockId !== null) { - message.lastBlockId = BlockID.fromJSON(object.lastBlockId); - } - else { - message.lastBlockId = undefined; - } - if (object.lastCommitHash !== undefined && object.lastCommitHash !== null) { - message.lastCommitHash = bytesFromBase64(object.lastCommitHash); - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = bytesFromBase64(object.dataHash); - } - if (object.validatorsHash !== undefined && object.validatorsHash !== null) { - message.validatorsHash = bytesFromBase64(object.validatorsHash); - } - if (object.nextValidatorsHash !== undefined && - object.nextValidatorsHash !== null) { - message.nextValidatorsHash = bytesFromBase64(object.nextValidatorsHash); - } - if (object.consensusHash !== undefined && object.consensusHash !== null) { - message.consensusHash = bytesFromBase64(object.consensusHash); - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = bytesFromBase64(object.appHash); - } - if (object.lastResultsHash !== undefined && - object.lastResultsHash !== null) { - message.lastResultsHash = bytesFromBase64(object.lastResultsHash); - } - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = bytesFromBase64(object.evidenceHash); - } - if (object.proposerAddress !== undefined && - object.proposerAddress !== null) { - message.proposerAddress = bytesFromBase64(object.proposerAddress); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.version !== undefined && - (obj.version = message.version - ? Consensus.toJSON(message.version) - : undefined); - message.chainId !== undefined && (obj.chainId = message.chainId); - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.lastBlockId !== undefined && - (obj.lastBlockId = message.lastBlockId - ? BlockID.toJSON(message.lastBlockId) - : undefined); - message.lastCommitHash !== undefined && - (obj.lastCommitHash = base64FromBytes(message.lastCommitHash !== undefined - ? message.lastCommitHash - : new Uint8Array())); - message.dataHash !== undefined && - (obj.dataHash = base64FromBytes(message.dataHash !== undefined ? message.dataHash : new Uint8Array())); - message.validatorsHash !== undefined && - (obj.validatorsHash = base64FromBytes(message.validatorsHash !== undefined - ? message.validatorsHash - : new Uint8Array())); - message.nextValidatorsHash !== undefined && - (obj.nextValidatorsHash = base64FromBytes(message.nextValidatorsHash !== undefined - ? message.nextValidatorsHash - : new Uint8Array())); - message.consensusHash !== undefined && - (obj.consensusHash = base64FromBytes(message.consensusHash !== undefined - ? message.consensusHash - : new Uint8Array())); - message.appHash !== undefined && - (obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array())); - message.lastResultsHash !== undefined && - (obj.lastResultsHash = base64FromBytes(message.lastResultsHash !== undefined - ? message.lastResultsHash - : new Uint8Array())); - message.evidenceHash !== undefined && - (obj.evidenceHash = base64FromBytes(message.evidenceHash !== undefined - ? message.evidenceHash - : new Uint8Array())); - message.proposerAddress !== undefined && - (obj.proposerAddress = base64FromBytes(message.proposerAddress !== undefined - ? message.proposerAddress - : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseHeader }; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromPartial(object.version); - } - else { - message.version = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = object.chainId; - } - else { - message.chainId = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } - else { - message.time = undefined; - } - if (object.lastBlockId !== undefined && object.lastBlockId !== null) { - message.lastBlockId = BlockID.fromPartial(object.lastBlockId); - } - else { - message.lastBlockId = undefined; - } - if (object.lastCommitHash !== undefined && object.lastCommitHash !== null) { - message.lastCommitHash = object.lastCommitHash; - } - else { - message.lastCommitHash = new Uint8Array(); - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = object.dataHash; - } - else { - message.dataHash = new Uint8Array(); - } - if (object.validatorsHash !== undefined && object.validatorsHash !== null) { - message.validatorsHash = object.validatorsHash; - } - else { - message.validatorsHash = new Uint8Array(); - } - if (object.nextValidatorsHash !== undefined && - object.nextValidatorsHash !== null) { - message.nextValidatorsHash = object.nextValidatorsHash; - } - else { - message.nextValidatorsHash = new Uint8Array(); - } - if (object.consensusHash !== undefined && object.consensusHash !== null) { - message.consensusHash = object.consensusHash; - } - else { - message.consensusHash = new Uint8Array(); - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = object.appHash; - } - else { - message.appHash = new Uint8Array(); - } - if (object.lastResultsHash !== undefined && - object.lastResultsHash !== null) { - message.lastResultsHash = object.lastResultsHash; - } - else { - message.lastResultsHash = new Uint8Array(); - } - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = object.evidenceHash; - } - else { - message.evidenceHash = new Uint8Array(); - } - if (object.proposerAddress !== undefined && - object.proposerAddress !== null) { - message.proposerAddress = object.proposerAddress; - } - else { - message.proposerAddress = new Uint8Array(); - } - return message; - }, -}; -const baseData = {}; -export const Data = { - encode(message, writer = Writer.create()) { - for (const v of message.txs) { - writer.uint32(10).bytes(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseData }; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseData }; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(bytesFromBase64(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.txs) { - obj.txs = message.txs.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } - else { - obj.txs = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseData }; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(e); - } - } - return message; - }, -}; -const baseVote = { type: 0, height: 0, round: 0, validatorIndex: 0 }; -export const Vote = { - encode(message, writer = Writer.create()) { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(34).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim(); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(50).bytes(message.validatorAddress); - } - if (message.validatorIndex !== 0) { - writer.uint32(56).int32(message.validatorIndex); - } - if (message.signature.length !== 0) { - writer.uint32(66).bytes(message.signature); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVote }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.height = longToNumber(reader.int64()); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.validatorAddress = reader.bytes(); - break; - case 7: - message.validatorIndex = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseVote }; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } - else { - message.timestamp = undefined; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = bytesFromBase64(object.validatorAddress); - } - if (object.validatorIndex !== undefined && object.validatorIndex !== null) { - message.validatorIndex = Number(object.validatorIndex); - } - else { - message.validatorIndex = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.validatorAddress !== undefined && - (obj.validatorAddress = base64FromBytes(message.validatorAddress !== undefined - ? message.validatorAddress - : new Uint8Array())); - message.validatorIndex !== undefined && - (obj.validatorIndex = message.validatorIndex); - message.signature !== undefined && - (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseVote }; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } - else { - message.timestamp = undefined; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = new Uint8Array(); - } - if (object.validatorIndex !== undefined && object.validatorIndex !== null) { - message.validatorIndex = object.validatorIndex; - } - else { - message.validatorIndex = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } - else { - message.signature = new Uint8Array(); - } - return message; - }, -}; -const baseCommit = { height: 0, round: 0 }; -export const Commit = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(16).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.signatures) { - CommitSig.encode(v, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommit }; - message.signatures = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64()); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 4: - message.signatures.push(CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCommit }; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map((e) => e ? CommitSig.toJSON(e) : undefined); - } - else { - obj.signatures = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseCommit }; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromPartial(e)); - } - } - return message; - }, -}; -const baseCommitSig = { blockIdFlag: 0 }; -export const CommitSig = { - encode(message, writer = Writer.create()) { - if (message.blockIdFlag !== 0) { - writer.uint32(8).int32(message.blockIdFlag); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(18).bytes(message.validatorAddress); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(26).fork()).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(34).bytes(message.signature); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommitSig }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockIdFlag = reader.int32(); - break; - case 2: - message.validatorAddress = reader.bytes(); - break; - case 3: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCommitSig }; - if (object.blockIdFlag !== undefined && object.blockIdFlag !== null) { - message.blockIdFlag = blockIDFlagFromJSON(object.blockIdFlag); - } - else { - message.blockIdFlag = 0; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = bytesFromBase64(object.validatorAddress); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.blockIdFlag !== undefined && - (obj.blockIdFlag = blockIDFlagToJSON(message.blockIdFlag)); - message.validatorAddress !== undefined && - (obj.validatorAddress = base64FromBytes(message.validatorAddress !== undefined - ? message.validatorAddress - : new Uint8Array())); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseCommitSig }; - if (object.blockIdFlag !== undefined && object.blockIdFlag !== null) { - message.blockIdFlag = object.blockIdFlag; - } - else { - message.blockIdFlag = 0; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = new Uint8Array(); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } - else { - message.signature = new Uint8Array(); - } - return message; - }, -}; -const baseProposal = { type: 0, height: 0, round: 0, polRound: 0 }; -export const Proposal = { - encode(message, writer = Writer.create()) { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.polRound !== 0) { - writer.uint32(32).int32(message.polRound); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(42).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(50).fork()).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(58).bytes(message.signature); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.height = longToNumber(reader.int64()); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.polRound = reader.int32(); - break; - case 5: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProposal }; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } - else { - message.round = 0; - } - if (object.polRound !== undefined && object.polRound !== null) { - message.polRound = Number(object.polRound); - } - else { - message.polRound = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.polRound !== undefined && (obj.polRound = message.polRound); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseProposal }; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } - else { - message.round = 0; - } - if (object.polRound !== undefined && object.polRound !== null) { - message.polRound = object.polRound; - } - else { - message.polRound = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } - else { - message.signature = new Uint8Array(); - } - return message; - }, -}; -const baseSignedHeader = {}; -export const SignedHeader = { - encode(message, writer = Writer.create()) { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.commit !== undefined) { - Commit.encode(message.commit, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSignedHeader }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSignedHeader }; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } - else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromJSON(object.commit); - } - else { - message.commit = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.commit !== undefined && - (obj.commit = message.commit ? Commit.toJSON(message.commit) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseSignedHeader }; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } - else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromPartial(object.commit); - } - else { - message.commit = undefined; - } - return message; - }, -}; -const baseLightBlock = {}; -export const LightBlock = { - encode(message, writer = Writer.create()) { - if (message.signedHeader !== undefined) { - SignedHeader.encode(message.signedHeader, writer.uint32(10).fork()).ldelim(); - } - if (message.validatorSet !== undefined) { - ValidatorSet.encode(message.validatorSet, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLightBlock }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signedHeader = SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validatorSet = ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseLightBlock }; - if (object.signedHeader !== undefined && object.signedHeader !== null) { - message.signedHeader = SignedHeader.fromJSON(object.signedHeader); - } - else { - message.signedHeader = undefined; - } - if (object.validatorSet !== undefined && object.validatorSet !== null) { - message.validatorSet = ValidatorSet.fromJSON(object.validatorSet); - } - else { - message.validatorSet = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.signedHeader !== undefined && - (obj.signedHeader = message.signedHeader - ? SignedHeader.toJSON(message.signedHeader) - : undefined); - message.validatorSet !== undefined && - (obj.validatorSet = message.validatorSet - ? ValidatorSet.toJSON(message.validatorSet) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseLightBlock }; - if (object.signedHeader !== undefined && object.signedHeader !== null) { - message.signedHeader = SignedHeader.fromPartial(object.signedHeader); - } - else { - message.signedHeader = undefined; - } - if (object.validatorSet !== undefined && object.validatorSet !== null) { - message.validatorSet = ValidatorSet.fromPartial(object.validatorSet); - } - else { - message.validatorSet = undefined; - } - return message; - }, -}; -const baseBlockMeta = { blockSize: 0, numTxs: 0 }; -export const BlockMeta = { - encode(message, writer = Writer.create()) { - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(10).fork()).ldelim(); - } - if (message.blockSize !== 0) { - writer.uint32(16).int64(message.blockSize); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(26).fork()).ldelim(); - } - if (message.numTxs !== 0) { - writer.uint32(32).int64(message.numTxs); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockMeta }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.blockSize = longToNumber(reader.int64()); - break; - case 3: - message.header = Header.decode(reader, reader.uint32()); - break; - case 4: - message.numTxs = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBlockMeta }; - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.blockSize !== undefined && object.blockSize !== null) { - message.blockSize = Number(object.blockSize); - } - else { - message.blockSize = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } - else { - message.header = undefined; - } - if (object.numTxs !== undefined && object.numTxs !== null) { - message.numTxs = Number(object.numTxs); - } - else { - message.numTxs = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.blockSize !== undefined && (obj.blockSize = message.blockSize); - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.numTxs !== undefined && (obj.numTxs = message.numTxs); - return obj; - }, - fromPartial(object) { - const message = { ...baseBlockMeta }; - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.blockSize !== undefined && object.blockSize !== null) { - message.blockSize = object.blockSize; - } - else { - message.blockSize = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } - else { - message.header = undefined; - } - if (object.numTxs !== undefined && object.numTxs !== null) { - message.numTxs = object.numTxs; - } - else { - message.numTxs = 0; - } - return message; - }, -}; -const baseTxProof = {}; -export const TxProof = { - encode(message, writer = Writer.create()) { - if (message.rootHash.length !== 0) { - writer.uint32(10).bytes(message.rootHash); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxProof }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rootHash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTxProof }; - if (object.rootHash !== undefined && object.rootHash !== null) { - message.rootHash = bytesFromBase64(object.rootHash); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.rootHash !== undefined && - (obj.rootHash = base64FromBytes(message.rootHash !== undefined ? message.rootHash : new Uint8Array())); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseTxProof }; - if (object.rootHash !== undefined && object.rootHash !== null) { - message.rootHash = object.rootHash; - } - else { - message.rootHash = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/types.ts deleted file mode 100644 index a4bef0bd10..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/types.ts +++ /dev/null @@ -1,1912 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Proof } from "../../tendermint/crypto/proof"; -import { Consensus } from "../../tendermint/version/types"; -import { ValidatorSet } from "../../tendermint/types/validator"; - -export const protobufPackage = "tendermint.types"; - -/** BlockIdFlag indicates which BlcokID the signature is for */ -export enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0, - BLOCK_ID_FLAG_ABSENT = 1, - BLOCK_ID_FLAG_COMMIT = 2, - BLOCK_ID_FLAG_NIL = 3, - UNRECOGNIZED = -1, -} - -export function blockIDFlagFromJSON(object: any): BlockIDFlag { - switch (object) { - case 0: - case "BLOCK_ID_FLAG_UNKNOWN": - return BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN; - case 1: - case "BLOCK_ID_FLAG_ABSENT": - return BlockIDFlag.BLOCK_ID_FLAG_ABSENT; - case 2: - case "BLOCK_ID_FLAG_COMMIT": - return BlockIDFlag.BLOCK_ID_FLAG_COMMIT; - case 3: - case "BLOCK_ID_FLAG_NIL": - return BlockIDFlag.BLOCK_ID_FLAG_NIL; - case -1: - case "UNRECOGNIZED": - default: - return BlockIDFlag.UNRECOGNIZED; - } -} - -export function blockIDFlagToJSON(object: BlockIDFlag): string { - switch (object) { - case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN: - return "BLOCK_ID_FLAG_UNKNOWN"; - case BlockIDFlag.BLOCK_ID_FLAG_ABSENT: - return "BLOCK_ID_FLAG_ABSENT"; - case BlockIDFlag.BLOCK_ID_FLAG_COMMIT: - return "BLOCK_ID_FLAG_COMMIT"; - case BlockIDFlag.BLOCK_ID_FLAG_NIL: - return "BLOCK_ID_FLAG_NIL"; - default: - return "UNKNOWN"; - } -} - -/** SignedMsgType is a type of signed message in the consensus. */ -export enum SignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = 0, - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SIGNED_MSG_TYPE_PREVOTE = 1, - SIGNED_MSG_TYPE_PRECOMMIT = 2, - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SIGNED_MSG_TYPE_PROPOSAL = 32, - UNRECOGNIZED = -1, -} - -export function signedMsgTypeFromJSON(object: any): SignedMsgType { - switch (object) { - case 0: - case "SIGNED_MSG_TYPE_UNKNOWN": - return SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN; - case 1: - case "SIGNED_MSG_TYPE_PREVOTE": - return SignedMsgType.SIGNED_MSG_TYPE_PREVOTE; - case 2: - case "SIGNED_MSG_TYPE_PRECOMMIT": - return SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT; - case 32: - case "SIGNED_MSG_TYPE_PROPOSAL": - return SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL; - case -1: - case "UNRECOGNIZED": - default: - return SignedMsgType.UNRECOGNIZED; - } -} - -export function signedMsgTypeToJSON(object: SignedMsgType): string { - switch (object) { - case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN: - return "SIGNED_MSG_TYPE_UNKNOWN"; - case SignedMsgType.SIGNED_MSG_TYPE_PREVOTE: - return "SIGNED_MSG_TYPE_PREVOTE"; - case SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT: - return "SIGNED_MSG_TYPE_PRECOMMIT"; - case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL: - return "SIGNED_MSG_TYPE_PROPOSAL"; - default: - return "UNKNOWN"; - } -} - -/** PartsetHeader */ -export interface PartSetHeader { - total: number; - hash: Uint8Array; -} - -export interface Part { - index: number; - bytes: Uint8Array; - proof: Proof | undefined; -} - -/** BlockID */ -export interface BlockID { - hash: Uint8Array; - partSetHeader: PartSetHeader | undefined; -} - -/** Header defines the structure of a Tendermint block header. */ -export interface Header { - /** basic block info */ - version: Consensus | undefined; - chainId: string; - height: number; - time: Date | undefined; - /** prev block info */ - lastBlockId: BlockID | undefined; - /** hashes of block data */ - lastCommitHash: Uint8Array; - /** transactions */ - dataHash: Uint8Array; - /** hashes from the app output from the prev block */ - validatorsHash: Uint8Array; - /** validators for the next block */ - nextValidatorsHash: Uint8Array; - /** consensus params for current block */ - consensusHash: Uint8Array; - /** state after txs from the previous block */ - appHash: Uint8Array; - /** root hash of all results from the txs from the previous block */ - lastResultsHash: Uint8Array; - /** consensus info */ - evidenceHash: Uint8Array; - /** original proposer of the block */ - proposerAddress: Uint8Array; -} - -/** Data contains the set of transactions included in the block */ -export interface Data { - /** - * 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. - */ - txs: Uint8Array[]; -} - -/** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ -export interface Vote { - type: SignedMsgType; - height: number; - round: number; - /** zero if vote is nil. */ - blockId: BlockID | undefined; - timestamp: Date | undefined; - validatorAddress: Uint8Array; - validatorIndex: number; - signature: Uint8Array; -} - -/** Commit contains the evidence that a block was committed by a set of validators. */ -export interface Commit { - height: number; - round: number; - blockId: BlockID | undefined; - signatures: CommitSig[]; -} - -/** CommitSig is a part of the Vote included in a Commit. */ -export interface CommitSig { - blockIdFlag: BlockIDFlag; - validatorAddress: Uint8Array; - timestamp: Date | undefined; - signature: Uint8Array; -} - -export interface Proposal { - type: SignedMsgType; - height: number; - round: number; - polRound: number; - blockId: BlockID | undefined; - timestamp: Date | undefined; - signature: Uint8Array; -} - -export interface SignedHeader { - header: Header | undefined; - commit: Commit | undefined; -} - -export interface LightBlock { - signedHeader: SignedHeader | undefined; - validatorSet: ValidatorSet | undefined; -} - -export interface BlockMeta { - blockId: BlockID | undefined; - blockSize: number; - header: Header | undefined; - numTxs: number; -} - -/** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ -export interface TxProof { - rootHash: Uint8Array; - data: Uint8Array; - proof: Proof | undefined; -} - -const basePartSetHeader: object = { total: 0 }; - -export const PartSetHeader = { - encode(message: PartSetHeader, writer: Writer = Writer.create()): Writer { - if (message.total !== 0) { - writer.uint32(8).uint32(message.total); - } - if (message.hash.length !== 0) { - writer.uint32(18).bytes(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PartSetHeader { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePartSetHeader } as PartSetHeader; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.uint32(); - break; - case 2: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PartSetHeader { - const message = { ...basePartSetHeader } as PartSetHeader; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - - toJSON(message: PartSetHeader): unknown { - const obj: any = {}; - message.total !== undefined && (obj.total = message.total); - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): PartSetHeader { - const message = { ...basePartSetHeader } as PartSetHeader; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - return message; - }, -}; - -const basePart: object = { index: 0 }; - -export const Part = { - encode(message: Part, writer: Writer = Writer.create()): Writer { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.bytes.length !== 0) { - writer.uint32(18).bytes(message.bytes); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Part { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePart } as Part; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Part { - const message = { ...basePart } as Part; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = bytesFromBase64(object.bytes); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: Part): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = message.index); - message.bytes !== undefined && - (obj.bytes = base64FromBytes( - message.bytes !== undefined ? message.bytes : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Part { - const message = { ...basePart } as Part; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = object.bytes; - } else { - message.bytes = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -const baseBlockID: object = {}; - -export const BlockID = { - encode(message: BlockID, writer: Writer = Writer.create()): Writer { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.partSetHeader !== undefined) { - PartSetHeader.encode( - message.partSetHeader, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockID { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockID } as BlockID; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.partSetHeader = PartSetHeader.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockID { - const message = { ...baseBlockID } as BlockID; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.partSetHeader !== undefined && object.partSetHeader !== null) { - message.partSetHeader = PartSetHeader.fromJSON(object.partSetHeader); - } else { - message.partSetHeader = undefined; - } - return message; - }, - - toJSON(message: BlockID): unknown { - const obj: any = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - message.partSetHeader !== undefined && - (obj.partSetHeader = message.partSetHeader - ? PartSetHeader.toJSON(message.partSetHeader) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): BlockID { - const message = { ...baseBlockID } as BlockID; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - if (object.partSetHeader !== undefined && object.partSetHeader !== null) { - message.partSetHeader = PartSetHeader.fromPartial(object.partSetHeader); - } else { - message.partSetHeader = undefined; - } - return message; - }, -}; - -const baseHeader: object = { chainId: "", height: 0 }; - -export const Header = { - encode(message: Header, writer: Writer = Writer.create()): Writer { - if (message.version !== undefined) { - Consensus.encode(message.version, writer.uint32(10).fork()).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(18).string(message.chainId); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(34).fork() - ).ldelim(); - } - if (message.lastBlockId !== undefined) { - BlockID.encode(message.lastBlockId, writer.uint32(42).fork()).ldelim(); - } - if (message.lastCommitHash.length !== 0) { - writer.uint32(50).bytes(message.lastCommitHash); - } - if (message.dataHash.length !== 0) { - writer.uint32(58).bytes(message.dataHash); - } - if (message.validatorsHash.length !== 0) { - writer.uint32(66).bytes(message.validatorsHash); - } - if (message.nextValidatorsHash.length !== 0) { - writer.uint32(74).bytes(message.nextValidatorsHash); - } - if (message.consensusHash.length !== 0) { - writer.uint32(82).bytes(message.consensusHash); - } - if (message.appHash.length !== 0) { - writer.uint32(90).bytes(message.appHash); - } - if (message.lastResultsHash.length !== 0) { - writer.uint32(98).bytes(message.lastResultsHash); - } - if (message.evidenceHash.length !== 0) { - writer.uint32(106).bytes(message.evidenceHash); - } - if (message.proposerAddress.length !== 0) { - writer.uint32(114).bytes(message.proposerAddress); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Header { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeader } as Header; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 5: - message.lastBlockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.lastCommitHash = reader.bytes(); - break; - case 7: - message.dataHash = reader.bytes(); - break; - case 8: - message.validatorsHash = reader.bytes(); - break; - case 9: - message.nextValidatorsHash = reader.bytes(); - break; - case 10: - message.consensusHash = reader.bytes(); - break; - case 11: - message.appHash = reader.bytes(); - break; - case 12: - message.lastResultsHash = reader.bytes(); - break; - case 13: - message.evidenceHash = reader.bytes(); - break; - case 14: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Header { - const message = { ...baseHeader } as Header; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromJSON(object.version); - } else { - message.version = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = String(object.chainId); - } else { - message.chainId = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.lastBlockId !== undefined && object.lastBlockId !== null) { - message.lastBlockId = BlockID.fromJSON(object.lastBlockId); - } else { - message.lastBlockId = undefined; - } - if (object.lastCommitHash !== undefined && object.lastCommitHash !== null) { - message.lastCommitHash = bytesFromBase64(object.lastCommitHash); - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = bytesFromBase64(object.dataHash); - } - if (object.validatorsHash !== undefined && object.validatorsHash !== null) { - message.validatorsHash = bytesFromBase64(object.validatorsHash); - } - if ( - object.nextValidatorsHash !== undefined && - object.nextValidatorsHash !== null - ) { - message.nextValidatorsHash = bytesFromBase64(object.nextValidatorsHash); - } - if (object.consensusHash !== undefined && object.consensusHash !== null) { - message.consensusHash = bytesFromBase64(object.consensusHash); - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = bytesFromBase64(object.appHash); - } - if ( - object.lastResultsHash !== undefined && - object.lastResultsHash !== null - ) { - message.lastResultsHash = bytesFromBase64(object.lastResultsHash); - } - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = bytesFromBase64(object.evidenceHash); - } - if ( - object.proposerAddress !== undefined && - object.proposerAddress !== null - ) { - message.proposerAddress = bytesFromBase64(object.proposerAddress); - } - return message; - }, - - toJSON(message: Header): unknown { - const obj: any = {}; - message.version !== undefined && - (obj.version = message.version - ? Consensus.toJSON(message.version) - : undefined); - message.chainId !== undefined && (obj.chainId = message.chainId); - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.lastBlockId !== undefined && - (obj.lastBlockId = message.lastBlockId - ? BlockID.toJSON(message.lastBlockId) - : undefined); - message.lastCommitHash !== undefined && - (obj.lastCommitHash = base64FromBytes( - message.lastCommitHash !== undefined - ? message.lastCommitHash - : new Uint8Array() - )); - message.dataHash !== undefined && - (obj.dataHash = base64FromBytes( - message.dataHash !== undefined ? message.dataHash : new Uint8Array() - )); - message.validatorsHash !== undefined && - (obj.validatorsHash = base64FromBytes( - message.validatorsHash !== undefined - ? message.validatorsHash - : new Uint8Array() - )); - message.nextValidatorsHash !== undefined && - (obj.nextValidatorsHash = base64FromBytes( - message.nextValidatorsHash !== undefined - ? message.nextValidatorsHash - : new Uint8Array() - )); - message.consensusHash !== undefined && - (obj.consensusHash = base64FromBytes( - message.consensusHash !== undefined - ? message.consensusHash - : new Uint8Array() - )); - message.appHash !== undefined && - (obj.appHash = base64FromBytes( - message.appHash !== undefined ? message.appHash : new Uint8Array() - )); - message.lastResultsHash !== undefined && - (obj.lastResultsHash = base64FromBytes( - message.lastResultsHash !== undefined - ? message.lastResultsHash - : new Uint8Array() - )); - message.evidenceHash !== undefined && - (obj.evidenceHash = base64FromBytes( - message.evidenceHash !== undefined - ? message.evidenceHash - : new Uint8Array() - )); - message.proposerAddress !== undefined && - (obj.proposerAddress = base64FromBytes( - message.proposerAddress !== undefined - ? message.proposerAddress - : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial
): Header { - const message = { ...baseHeader } as Header; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromPartial(object.version); - } else { - message.version = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = object.chainId; - } else { - message.chainId = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.lastBlockId !== undefined && object.lastBlockId !== null) { - message.lastBlockId = BlockID.fromPartial(object.lastBlockId); - } else { - message.lastBlockId = undefined; - } - if (object.lastCommitHash !== undefined && object.lastCommitHash !== null) { - message.lastCommitHash = object.lastCommitHash; - } else { - message.lastCommitHash = new Uint8Array(); - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = object.dataHash; - } else { - message.dataHash = new Uint8Array(); - } - if (object.validatorsHash !== undefined && object.validatorsHash !== null) { - message.validatorsHash = object.validatorsHash; - } else { - message.validatorsHash = new Uint8Array(); - } - if ( - object.nextValidatorsHash !== undefined && - object.nextValidatorsHash !== null - ) { - message.nextValidatorsHash = object.nextValidatorsHash; - } else { - message.nextValidatorsHash = new Uint8Array(); - } - if (object.consensusHash !== undefined && object.consensusHash !== null) { - message.consensusHash = object.consensusHash; - } else { - message.consensusHash = new Uint8Array(); - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = object.appHash; - } else { - message.appHash = new Uint8Array(); - } - if ( - object.lastResultsHash !== undefined && - object.lastResultsHash !== null - ) { - message.lastResultsHash = object.lastResultsHash; - } else { - message.lastResultsHash = new Uint8Array(); - } - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = object.evidenceHash; - } else { - message.evidenceHash = new Uint8Array(); - } - if ( - object.proposerAddress !== undefined && - object.proposerAddress !== null - ) { - message.proposerAddress = object.proposerAddress; - } else { - message.proposerAddress = new Uint8Array(); - } - return message; - }, -}; - -const baseData: object = {}; - -export const Data = { - encode(message: Data, writer: Writer = Writer.create()): Writer { - for (const v of message.txs) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Data { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseData } as Data; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Data { - const message = { ...baseData } as Data; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: Data): unknown { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.txs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Data { - const message = { ...baseData } as Data; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(e); - } - } - return message; - }, -}; - -const baseVote: object = { type: 0, height: 0, round: 0, validatorIndex: 0 }; - -export const Vote = { - encode(message: Vote, writer: Writer = Writer.create()): Writer { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(34).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(42).fork() - ).ldelim(); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(50).bytes(message.validatorAddress); - } - if (message.validatorIndex !== 0) { - writer.uint32(56).int32(message.validatorIndex); - } - if (message.signature.length !== 0) { - writer.uint32(66).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Vote { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVote } as Vote; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32() as any; - break; - case 2: - message.height = longToNumber(reader.int64() as Long); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 6: - message.validatorAddress = reader.bytes(); - break; - case 7: - message.validatorIndex = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Vote { - const message = { ...baseVote } as Vote; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = bytesFromBase64(object.validatorAddress); - } - if (object.validatorIndex !== undefined && object.validatorIndex !== null) { - message.validatorIndex = Number(object.validatorIndex); - } else { - message.validatorIndex = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: Vote): unknown { - const obj: any = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.validatorAddress !== undefined && - (obj.validatorAddress = base64FromBytes( - message.validatorAddress !== undefined - ? message.validatorAddress - : new Uint8Array() - )); - message.validatorIndex !== undefined && - (obj.validatorIndex = message.validatorIndex); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Vote { - const message = { ...baseVote } as Vote; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = new Uint8Array(); - } - if (object.validatorIndex !== undefined && object.validatorIndex !== null) { - message.validatorIndex = object.validatorIndex; - } else { - message.validatorIndex = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseCommit: object = { height: 0, round: 0 }; - -export const Commit = { - encode(message: Commit, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(16).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.signatures) { - CommitSig.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Commit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommit } as Commit; - message.signatures = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 4: - message.signatures.push(CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Commit { - const message = { ...baseCommit } as Commit; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } else { - message.blockId = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Commit): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map((e) => - e ? CommitSig.toJSON(e) : undefined - ); - } else { - obj.signatures = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Commit { - const message = { ...baseCommit } as Commit; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } else { - message.blockId = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCommitSig: object = { blockIdFlag: 0 }; - -export const CommitSig = { - encode(message: CommitSig, writer: Writer = Writer.create()): Writer { - if (message.blockIdFlag !== 0) { - writer.uint32(8).int32(message.blockIdFlag); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(18).bytes(message.validatorAddress); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(26).fork() - ).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(34).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CommitSig { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommitSig } as CommitSig; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockIdFlag = reader.int32() as any; - break; - case 2: - message.validatorAddress = reader.bytes(); - break; - case 3: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CommitSig { - const message = { ...baseCommitSig } as CommitSig; - if (object.blockIdFlag !== undefined && object.blockIdFlag !== null) { - message.blockIdFlag = blockIDFlagFromJSON(object.blockIdFlag); - } else { - message.blockIdFlag = 0; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = bytesFromBase64(object.validatorAddress); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: CommitSig): unknown { - const obj: any = {}; - message.blockIdFlag !== undefined && - (obj.blockIdFlag = blockIDFlagToJSON(message.blockIdFlag)); - message.validatorAddress !== undefined && - (obj.validatorAddress = base64FromBytes( - message.validatorAddress !== undefined - ? message.validatorAddress - : new Uint8Array() - )); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): CommitSig { - const message = { ...baseCommitSig } as CommitSig; - if (object.blockIdFlag !== undefined && object.blockIdFlag !== null) { - message.blockIdFlag = object.blockIdFlag; - } else { - message.blockIdFlag = 0; - } - if ( - object.validatorAddress !== undefined && - object.validatorAddress !== null - ) { - message.validatorAddress = object.validatorAddress; - } else { - message.validatorAddress = new Uint8Array(); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseProposal: object = { type: 0, height: 0, round: 0, polRound: 0 }; - -export const Proposal = { - encode(message: Proposal, writer: Writer = Writer.create()): Writer { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.polRound !== 0) { - writer.uint32(32).int32(message.polRound); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(42).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(50).fork() - ).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(58).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Proposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProposal } as Proposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32() as any; - break; - case 2: - message.height = longToNumber(reader.int64() as Long); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.polRound = reader.int32(); - break; - case 5: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Proposal { - const message = { ...baseProposal } as Proposal; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.polRound !== undefined && object.polRound !== null) { - message.polRound = Number(object.polRound); - } else { - message.polRound = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: Proposal): unknown { - const obj: any = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.polRound !== undefined && (obj.polRound = message.polRound); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Proposal { - const message = { ...baseProposal } as Proposal; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.polRound !== undefined && object.polRound !== null) { - message.polRound = object.polRound; - } else { - message.polRound = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseSignedHeader: object = {}; - -export const SignedHeader = { - encode(message: SignedHeader, writer: Writer = Writer.create()): Writer { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.commit !== undefined) { - Commit.encode(message.commit, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SignedHeader { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSignedHeader } as SignedHeader; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SignedHeader { - const message = { ...baseSignedHeader } as SignedHeader; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromJSON(object.commit); - } else { - message.commit = undefined; - } - return message; - }, - - toJSON(message: SignedHeader): unknown { - const obj: any = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.commit !== undefined && - (obj.commit = message.commit ? Commit.toJSON(message.commit) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): SignedHeader { - const message = { ...baseSignedHeader } as SignedHeader; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromPartial(object.commit); - } else { - message.commit = undefined; - } - return message; - }, -}; - -const baseLightBlock: object = {}; - -export const LightBlock = { - encode(message: LightBlock, writer: Writer = Writer.create()): Writer { - if (message.signedHeader !== undefined) { - SignedHeader.encode( - message.signedHeader, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.validatorSet !== undefined) { - ValidatorSet.encode( - message.validatorSet, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): LightBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLightBlock } as LightBlock; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signedHeader = SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validatorSet = ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LightBlock { - const message = { ...baseLightBlock } as LightBlock; - if (object.signedHeader !== undefined && object.signedHeader !== null) { - message.signedHeader = SignedHeader.fromJSON(object.signedHeader); - } else { - message.signedHeader = undefined; - } - if (object.validatorSet !== undefined && object.validatorSet !== null) { - message.validatorSet = ValidatorSet.fromJSON(object.validatorSet); - } else { - message.validatorSet = undefined; - } - return message; - }, - - toJSON(message: LightBlock): unknown { - const obj: any = {}; - message.signedHeader !== undefined && - (obj.signedHeader = message.signedHeader - ? SignedHeader.toJSON(message.signedHeader) - : undefined); - message.validatorSet !== undefined && - (obj.validatorSet = message.validatorSet - ? ValidatorSet.toJSON(message.validatorSet) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): LightBlock { - const message = { ...baseLightBlock } as LightBlock; - if (object.signedHeader !== undefined && object.signedHeader !== null) { - message.signedHeader = SignedHeader.fromPartial(object.signedHeader); - } else { - message.signedHeader = undefined; - } - if (object.validatorSet !== undefined && object.validatorSet !== null) { - message.validatorSet = ValidatorSet.fromPartial(object.validatorSet); - } else { - message.validatorSet = undefined; - } - return message; - }, -}; - -const baseBlockMeta: object = { blockSize: 0, numTxs: 0 }; - -export const BlockMeta = { - encode(message: BlockMeta, writer: Writer = Writer.create()): Writer { - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(10).fork()).ldelim(); - } - if (message.blockSize !== 0) { - writer.uint32(16).int64(message.blockSize); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(26).fork()).ldelim(); - } - if (message.numTxs !== 0) { - writer.uint32(32).int64(message.numTxs); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockMeta { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockMeta } as BlockMeta; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.blockSize = longToNumber(reader.int64() as Long); - break; - case 3: - message.header = Header.decode(reader, reader.uint32()); - break; - case 4: - message.numTxs = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockMeta { - const message = { ...baseBlockMeta } as BlockMeta; - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } else { - message.blockId = undefined; - } - if (object.blockSize !== undefined && object.blockSize !== null) { - message.blockSize = Number(object.blockSize); - } else { - message.blockSize = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.numTxs !== undefined && object.numTxs !== null) { - message.numTxs = Number(object.numTxs); - } else { - message.numTxs = 0; - } - return message; - }, - - toJSON(message: BlockMeta): unknown { - const obj: any = {}; - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.blockSize !== undefined && (obj.blockSize = message.blockSize); - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.numTxs !== undefined && (obj.numTxs = message.numTxs); - return obj; - }, - - fromPartial(object: DeepPartial): BlockMeta { - const message = { ...baseBlockMeta } as BlockMeta; - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } else { - message.blockId = undefined; - } - if (object.blockSize !== undefined && object.blockSize !== null) { - message.blockSize = object.blockSize; - } else { - message.blockSize = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.numTxs !== undefined && object.numTxs !== null) { - message.numTxs = object.numTxs; - } else { - message.numTxs = 0; - } - return message; - }, -}; - -const baseTxProof: object = {}; - -export const TxProof = { - encode(message: TxProof, writer: Writer = Writer.create()): Writer { - if (message.rootHash.length !== 0) { - writer.uint32(10).bytes(message.rootHash); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxProof } as TxProof; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rootHash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxProof { - const message = { ...baseTxProof } as TxProof; - if (object.rootHash !== undefined && object.rootHash !== null) { - message.rootHash = bytesFromBase64(object.rootHash); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: TxProof): unknown { - const obj: any = {}; - message.rootHash !== undefined && - (obj.rootHash = base64FromBytes( - message.rootHash !== undefined ? message.rootHash : new Uint8Array() - )); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): TxProof { - const message = { ...baseTxProof } as TxProof; - if (object.rootHash !== undefined && object.rootHash !== null) { - message.rootHash = object.rootHash; - } else { - message.rootHash = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/validator.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/validator.d.ts deleted file mode 100644 index 0654161ff2..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/validator.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { PublicKey } from "../../tendermint/crypto/keys"; -export declare const protobufPackage = "tendermint.types"; -export interface ValidatorSet { - validators: Validator[]; - proposer: Validator | undefined; - totalVotingPower: number; -} -export interface Validator { - address: Uint8Array; - pubKey: PublicKey | undefined; - votingPower: number; - proposerPriority: number; -} -export interface SimpleValidator { - pubKey: PublicKey | undefined; - votingPower: number; -} -export declare const ValidatorSet: { - encode(message: ValidatorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorSet; - fromJSON(object: any): ValidatorSet; - toJSON(message: ValidatorSet): unknown; - fromPartial(object: DeepPartial): ValidatorSet; -}; -export declare const Validator: { - encode(message: Validator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Validator; - fromJSON(object: any): Validator; - toJSON(message: Validator): unknown; - fromPartial(object: DeepPartial): Validator; -}; -export declare const SimpleValidator: { - encode(message: SimpleValidator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SimpleValidator; - fromJSON(object: any): SimpleValidator; - toJSON(message: SimpleValidator): unknown; - fromPartial(object: DeepPartial): SimpleValidator; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/validator.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/validator.js deleted file mode 100644 index 1bd1e4f815..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/validator.js +++ /dev/null @@ -1,333 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { PublicKey } from "../../tendermint/crypto/keys"; -export const protobufPackage = "tendermint.types"; -const baseValidatorSet = { totalVotingPower: 0 }; -export const ValidatorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.validators) { - Validator.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.proposer !== undefined) { - Validator.encode(message.proposer, writer.uint32(18).fork()).ldelim(); - } - if (message.totalVotingPower !== 0) { - writer.uint32(24).int64(message.totalVotingPower); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSet }; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.totalVotingPower = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorSet }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromJSON(object.proposer); - } - else { - message.proposer = undefined; - } - if (object.totalVotingPower !== undefined && - object.totalVotingPower !== null) { - message.totalVotingPower = Number(object.totalVotingPower); - } - else { - message.totalVotingPower = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => e ? Validator.toJSON(e) : undefined); - } - else { - obj.validators = []; - } - message.proposer !== undefined && - (obj.proposer = message.proposer - ? Validator.toJSON(message.proposer) - : undefined); - message.totalVotingPower !== undefined && - (obj.totalVotingPower = message.totalVotingPower); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorSet }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromPartial(object.proposer); - } - else { - message.proposer = undefined; - } - if (object.totalVotingPower !== undefined && - object.totalVotingPower !== null) { - message.totalVotingPower = object.totalVotingPower; - } - else { - message.totalVotingPower = 0; - } - return message; - }, -}; -const baseValidator = { votingPower: 0, proposerPriority: 0 }; -export const Validator = { - encode(message, writer = Writer.create()) { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.votingPower !== 0) { - writer.uint32(24).int64(message.votingPower); - } - if (message.proposerPriority !== 0) { - writer.uint32(32).int64(message.proposerPriority); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.votingPower = longToNumber(reader.int64()); - break; - case 4: - message.proposerPriority = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidator }; - if (object.address !== undefined && object.address !== null) { - message.address = bytesFromBase64(object.address); - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = Number(object.votingPower); - } - else { - message.votingPower = 0; - } - if (object.proposerPriority !== undefined && - object.proposerPriority !== null) { - message.proposerPriority = Number(object.proposerPriority); - } - else { - message.proposerPriority = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && - (obj.address = base64FromBytes(message.address !== undefined ? message.address : new Uint8Array())); - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.votingPower !== undefined && - (obj.votingPower = message.votingPower); - message.proposerPriority !== undefined && - (obj.proposerPriority = message.proposerPriority); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidator }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = new Uint8Array(); - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = object.votingPower; - } - else { - message.votingPower = 0; - } - if (object.proposerPriority !== undefined && - object.proposerPriority !== null) { - message.proposerPriority = object.proposerPriority; - } - else { - message.proposerPriority = 0; - } - return message; - }, -}; -const baseSimpleValidator = { votingPower: 0 }; -export const SimpleValidator = { - encode(message, writer = Writer.create()) { - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.votingPower !== 0) { - writer.uint32(16).int64(message.votingPower); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimpleValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.votingPower = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSimpleValidator }; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = Number(object.votingPower); - } - else { - message.votingPower = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.votingPower !== undefined && - (obj.votingPower = message.votingPower); - return obj; - }, - fromPartial(object) { - const message = { ...baseSimpleValidator }; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = object.votingPower; - } - else { - message.votingPower = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/validator.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/validator.ts deleted file mode 100644 index c504403254..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/types/validator.ts +++ /dev/null @@ -1,382 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { PublicKey } from "../../tendermint/crypto/keys"; - -export const protobufPackage = "tendermint.types"; - -export interface ValidatorSet { - validators: Validator[]; - proposer: Validator | undefined; - totalVotingPower: number; -} - -export interface Validator { - address: Uint8Array; - pubKey: PublicKey | undefined; - votingPower: number; - proposerPriority: number; -} - -export interface SimpleValidator { - pubKey: PublicKey | undefined; - votingPower: number; -} - -const baseValidatorSet: object = { totalVotingPower: 0 }; - -export const ValidatorSet = { - encode(message: ValidatorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.proposer !== undefined) { - Validator.encode(message.proposer, writer.uint32(18).fork()).ldelim(); - } - if (message.totalVotingPower !== 0) { - writer.uint32(24).int64(message.totalVotingPower); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.totalVotingPower = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorSet { - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromJSON(object.proposer); - } else { - message.proposer = undefined; - } - if ( - object.totalVotingPower !== undefined && - object.totalVotingPower !== null - ) { - message.totalVotingPower = Number(object.totalVotingPower); - } else { - message.totalVotingPower = 0; - } - return message; - }, - - toJSON(message: ValidatorSet): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.proposer !== undefined && - (obj.proposer = message.proposer - ? Validator.toJSON(message.proposer) - : undefined); - message.totalVotingPower !== undefined && - (obj.totalVotingPower = message.totalVotingPower); - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorSet { - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromPartial(object.proposer); - } else { - message.proposer = undefined; - } - if ( - object.totalVotingPower !== undefined && - object.totalVotingPower !== null - ) { - message.totalVotingPower = object.totalVotingPower; - } else { - message.totalVotingPower = 0; - } - return message; - }, -}; - -const baseValidator: object = { votingPower: 0, proposerPriority: 0 }; - -export const Validator = { - encode(message: Validator, writer: Writer = Writer.create()): Writer { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.votingPower !== 0) { - writer.uint32(24).int64(message.votingPower); - } - if (message.proposerPriority !== 0) { - writer.uint32(32).int64(message.proposerPriority); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Validator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator } as Validator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.votingPower = longToNumber(reader.int64() as Long); - break; - case 4: - message.proposerPriority = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = bytesFromBase64(object.address); - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = Number(object.votingPower); - } else { - message.votingPower = 0; - } - if ( - object.proposerPriority !== undefined && - object.proposerPriority !== null - ) { - message.proposerPriority = Number(object.proposerPriority); - } else { - message.proposerPriority = 0; - } - return message; - }, - - toJSON(message: Validator): unknown { - const obj: any = {}; - message.address !== undefined && - (obj.address = base64FromBytes( - message.address !== undefined ? message.address : new Uint8Array() - )); - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.votingPower !== undefined && - (obj.votingPower = message.votingPower); - message.proposerPriority !== undefined && - (obj.proposerPriority = message.proposerPriority); - return obj; - }, - - fromPartial(object: DeepPartial): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = new Uint8Array(); - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = object.votingPower; - } else { - message.votingPower = 0; - } - if ( - object.proposerPriority !== undefined && - object.proposerPriority !== null - ) { - message.proposerPriority = object.proposerPriority; - } else { - message.proposerPriority = 0; - } - return message; - }, -}; - -const baseSimpleValidator: object = { votingPower: 0 }; - -export const SimpleValidator = { - encode(message: SimpleValidator, writer: Writer = Writer.create()): Writer { - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.votingPower !== 0) { - writer.uint32(16).int64(message.votingPower); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SimpleValidator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimpleValidator } as SimpleValidator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.votingPower = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SimpleValidator { - const message = { ...baseSimpleValidator } as SimpleValidator; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = Number(object.votingPower); - } else { - message.votingPower = 0; - } - return message; - }, - - toJSON(message: SimpleValidator): unknown { - const obj: any = {}; - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.votingPower !== undefined && - (obj.votingPower = message.votingPower); - return obj; - }, - - fromPartial(object: DeepPartial): SimpleValidator { - const message = { ...baseSimpleValidator } as SimpleValidator; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = object.votingPower; - } else { - message.votingPower = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/version/types.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/version/types.d.ts deleted file mode 100644 index 3158f17931..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/version/types.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "tendermint.version"; -/** - * App includes the protocol and software version for the application. - * This information is included in ResponseInfo. The App.Protocol can be - * updated in ResponseEndBlock. - */ -export interface App { - protocol: number; - software: string; -} -/** - * 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. - */ -export interface Consensus { - block: number; - app: number; -} -export declare const App: { - encode(message: App, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): App; - fromJSON(object: any): App; - toJSON(message: App): unknown; - fromPartial(object: DeepPartial): App; -}; -export declare const Consensus: { - encode(message: Consensus, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Consensus; - fromJSON(object: any): Consensus; - toJSON(message: Consensus): unknown; - fromPartial(object: DeepPartial): Consensus; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/version/types.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/version/types.js deleted file mode 100644 index 39e0693d19..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/version/types.js +++ /dev/null @@ -1,165 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "tendermint.version"; -const baseApp = { protocol: 0, software: "" }; -export const App = { - encode(message, writer = Writer.create()) { - if (message.protocol !== 0) { - writer.uint32(8).uint64(message.protocol); - } - if (message.software !== "") { - writer.uint32(18).string(message.software); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseApp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocol = longToNumber(reader.uint64()); - break; - case 2: - message.software = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseApp }; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = Number(object.protocol); - } - else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = String(object.software); - } - else { - message.software = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.protocol !== undefined && (obj.protocol = message.protocol); - message.software !== undefined && (obj.software = message.software); - return obj; - }, - fromPartial(object) { - const message = { ...baseApp }; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = object.protocol; - } - else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = object.software; - } - else { - message.software = ""; - } - return message; - }, -}; -const baseConsensus = { block: 0, app: 0 }; -export const Consensus = { - encode(message, writer = Writer.create()) { - if (message.block !== 0) { - writer.uint32(8).uint64(message.block); - } - if (message.app !== 0) { - writer.uint32(16).uint64(message.app); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensus }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = longToNumber(reader.uint64()); - break; - case 2: - message.app = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseConsensus }; - if (object.block !== undefined && object.block !== null) { - message.block = Number(object.block); - } - else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = Number(object.app); - } - else { - message.app = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.block !== undefined && (obj.block = message.block); - message.app !== undefined && (obj.app = message.app); - return obj; - }, - fromPartial(object) { - const message = { ...baseConsensus }; - if (object.block !== undefined && object.block !== null) { - message.block = object.block; - } - else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = object.app; - } - else { - message.app = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/version/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/version/types.ts deleted file mode 100644 index 4bc6ad8232..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/version/types.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.version"; - -/** - * App includes the protocol and software version for the application. - * This information is included in ResponseInfo. The App.Protocol can be - * updated in ResponseEndBlock. - */ -export interface App { - protocol: number; - software: string; -} - -/** - * 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. - */ -export interface Consensus { - block: number; - app: number; -} - -const baseApp: object = { protocol: 0, software: "" }; - -export const App = { - encode(message: App, writer: Writer = Writer.create()): Writer { - if (message.protocol !== 0) { - writer.uint32(8).uint64(message.protocol); - } - if (message.software !== "") { - writer.uint32(18).string(message.software); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): App { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseApp } as App; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocol = longToNumber(reader.uint64() as Long); - break; - case 2: - message.software = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): App { - const message = { ...baseApp } as App; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = Number(object.protocol); - } else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = String(object.software); - } else { - message.software = ""; - } - return message; - }, - - toJSON(message: App): unknown { - const obj: any = {}; - message.protocol !== undefined && (obj.protocol = message.protocol); - message.software !== undefined && (obj.software = message.software); - return obj; - }, - - fromPartial(object: DeepPartial): App { - const message = { ...baseApp } as App; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = object.protocol; - } else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = object.software; - } else { - message.software = ""; - } - return message; - }, -}; - -const baseConsensus: object = { block: 0, app: 0 }; - -export const Consensus = { - encode(message: Consensus, writer: Writer = Writer.create()): Writer { - if (message.block !== 0) { - writer.uint32(8).uint64(message.block); - } - if (message.app !== 0) { - writer.uint32(16).uint64(message.app); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Consensus { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensus } as Consensus; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = longToNumber(reader.uint64() as Long); - break; - case 2: - message.app = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Consensus { - const message = { ...baseConsensus } as Consensus; - if (object.block !== undefined && object.block !== null) { - message.block = Number(object.block); - } else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = Number(object.app); - } else { - message.app = 0; - } - return message; - }, - - toJSON(message: Consensus): unknown { - const obj: any = {}; - message.block !== undefined && (obj.block = message.block); - message.app !== undefined && (obj.app = message.app); - return obj; - }, - - fromPartial(object: DeepPartial): Consensus { - const message = { ...baseConsensus } as Consensus; - if (object.block !== undefined && object.block !== null) { - message.block = object.block; - } else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = object.app; - } else { - message.app = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/package.json b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/package.json deleted file mode 100755 index f3a2f6a5e1..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmos-authz-v1beta1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmos.authz.v1beta1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/cosmos-sdk/x/authz", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.d.ts deleted file mode 100644 index 917f7b3db2..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { SendAuthorization } from "./module/types/cosmos/bank/v1beta1/authz"; -import { Params } from "./module/types/cosmos/bank/v1beta1/bank"; -import { SendEnabled } from "./module/types/cosmos/bank/v1beta1/bank"; -import { Input } from "./module/types/cosmos/bank/v1beta1/bank"; -import { Output } from "./module/types/cosmos/bank/v1beta1/bank"; -import { Supply } from "./module/types/cosmos/bank/v1beta1/bank"; -import { DenomUnit } from "./module/types/cosmos/bank/v1beta1/bank"; -import { Metadata } from "./module/types/cosmos/bank/v1beta1/bank"; -import { Balance } from "./module/types/cosmos/bank/v1beta1/genesis"; -export { SendAuthorization, Params, SendEnabled, Input, Output, Supply, DenomUnit, Metadata, Balance }; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.js deleted file mode 100644 index 057b7f130a..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.js +++ /dev/null @@ -1,368 +0,0 @@ -import { txClient, queryClient, MissingWalletError, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { SendAuthorization } from "./module/types/cosmos/bank/v1beta1/authz"; -import { Params } from "./module/types/cosmos/bank/v1beta1/bank"; -import { SendEnabled } from "./module/types/cosmos/bank/v1beta1/bank"; -import { Input } from "./module/types/cosmos/bank/v1beta1/bank"; -import { Output } from "./module/types/cosmos/bank/v1beta1/bank"; -import { Supply } from "./module/types/cosmos/bank/v1beta1/bank"; -import { DenomUnit } from "./module/types/cosmos/bank/v1beta1/bank"; -import { Metadata } from "./module/types/cosmos/bank/v1beta1/bank"; -import { Balance } from "./module/types/cosmos/bank/v1beta1/genesis"; -export { SendAuthorization, Params, SendEnabled, Input, Output, Supply, DenomUnit, Metadata, Balance }; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Balance: {}, - AllBalances: {}, - SpendableBalances: {}, - TotalSupply: {}, - SupplyOf: {}, - Params: {}, - DenomMetadata: {}, - DenomsMetadata: {}, - _Structure: { - SendAuthorization: getStructure(SendAuthorization.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - SendEnabled: getStructure(SendEnabled.fromPartial({})), - Input: getStructure(Input.fromPartial({})), - Output: getStructure(Output.fromPartial({})), - Supply: getStructure(Supply.fromPartial({})), - DenomUnit: getStructure(DenomUnit.fromPartial({})), - Metadata: getStructure(Metadata.fromPartial({})), - Balance: getStructure(Balance.fromPartial({})), - }, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getBalance: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Balance[JSON.stringify(params)] ?? {}; - }, - getAllBalances: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.AllBalances[JSON.stringify(params)] ?? {}; - }, - getSpendableBalances: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.SpendableBalances[JSON.stringify(params)] ?? {}; - }, - getTotalSupply: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.TotalSupply[JSON.stringify(params)] ?? {}; - }, - getSupplyOf: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.SupplyOf[JSON.stringify(params)] ?? {}; - }, - getParams: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Params[JSON.stringify(params)] ?? {}; - }, - getDenomMetadata: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DenomMetadata[JSON.stringify(params)] ?? {}; - }, - getDenomsMetadata: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DenomsMetadata[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.bank.v1beta1 initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - async QueryBalance({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryBalance(key.address, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryBalance(key.address, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Balance', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryBalance', payload: { options: { all }, params: { ...key }, query } }); - return getters['getBalance']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryBalance', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryAllBalances({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryAllBalances(key.address, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryAllBalances(key.address, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'AllBalances', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryAllBalances', payload: { options: { all }, params: { ...key }, query } }); - return getters['getAllBalances']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryAllBalances', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QuerySpendableBalances({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.querySpendableBalances(key.address, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.querySpendableBalances(key.address, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'SpendableBalances', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QuerySpendableBalances', payload: { options: { all }, params: { ...key }, query } }); - return getters['getSpendableBalances']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QuerySpendableBalances', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryTotalSupply({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryTotalSupply(query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryTotalSupply({ ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'TotalSupply', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryTotalSupply', payload: { options: { all }, params: { ...key }, query } }); - return getters['getTotalSupply']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryTotalSupply', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QuerySupplyOf({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.querySupplyOf(key.denom)).data; - commit('QUERY', { query: 'SupplyOf', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QuerySupplyOf', payload: { options: { all }, params: { ...key }, query } }); - return getters['getSupplyOf']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QuerySupplyOf', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryParams()).data; - commit('QUERY', { query: 'Params', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDenomMetadata({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDenomMetadata(key.denom)).data; - commit('QUERY', { query: 'DenomMetadata', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDenomMetadata', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDenomMetadata']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDenomMetadata', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDenomsMetadata({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDenomsMetadata(query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryDenomsMetadata({ ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'DenomsMetadata', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDenomsMetadata', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDenomsMetadata']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDenomsMetadata', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async sendMsgMultiSend({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgMultiSend(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgMultiSend:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgMultiSend:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgSend({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgSend(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgSend:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSend:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async MsgMultiSend({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgMultiSend(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgMultiSend:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgMultiSend:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgSend({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgSend(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgSend:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSend:Create', 'Could not create message: ' + e.message); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.ts deleted file mode 100755 index ddce76a5c1..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.ts +++ /dev/null @@ -1,436 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { SendAuthorization } from "./module/types/cosmos/bank/v1beta1/authz" -import { Params } from "./module/types/cosmos/bank/v1beta1/bank" -import { SendEnabled } from "./module/types/cosmos/bank/v1beta1/bank" -import { Input } from "./module/types/cosmos/bank/v1beta1/bank" -import { Output } from "./module/types/cosmos/bank/v1beta1/bank" -import { Supply } from "./module/types/cosmos/bank/v1beta1/bank" -import { DenomUnit } from "./module/types/cosmos/bank/v1beta1/bank" -import { Metadata } from "./module/types/cosmos/bank/v1beta1/bank" -import { Balance } from "./module/types/cosmos/bank/v1beta1/genesis" - - -export { SendAuthorization, Params, SendEnabled, Input, Output, Supply, DenomUnit, Metadata, Balance }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Balance: {}, - AllBalances: {}, - SpendableBalances: {}, - TotalSupply: {}, - SupplyOf: {}, - Params: {}, - DenomMetadata: {}, - DenomsMetadata: {}, - - _Structure: { - SendAuthorization: getStructure(SendAuthorization.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - SendEnabled: getStructure(SendEnabled.fromPartial({})), - Input: getStructure(Input.fromPartial({})), - Output: getStructure(Output.fromPartial({})), - Supply: getStructure(Supply.fromPartial({})), - DenomUnit: getStructure(DenomUnit.fromPartial({})), - Metadata: getStructure(Metadata.fromPartial({})), - Balance: getStructure(Balance.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getBalance: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Balance[JSON.stringify(params)] ?? {} - }, - getAllBalances: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.AllBalances[JSON.stringify(params)] ?? {} - }, - getSpendableBalances: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.SpendableBalances[JSON.stringify(params)] ?? {} - }, - getTotalSupply: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.TotalSupply[JSON.stringify(params)] ?? {} - }, - getSupplyOf: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.SupplyOf[JSON.stringify(params)] ?? {} - }, - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - getDenomMetadata: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DenomMetadata[JSON.stringify(params)] ?? {} - }, - getDenomsMetadata: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DenomsMetadata[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.bank.v1beta1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryBalance({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryBalance( key.address, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryBalance( key.address, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Balance', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryBalance', payload: { options: { all }, params: {...key},query }}) - return getters['getBalance']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryBalance API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryAllBalances({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryAllBalances( key.address, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryAllBalances( key.address, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'AllBalances', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAllBalances', payload: { options: { all }, params: {...key},query }}) - return getters['getAllBalances']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryAllBalances API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QuerySpendableBalances({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.querySpendableBalances( key.address, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.querySpendableBalances( key.address, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'SpendableBalances', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QuerySpendableBalances', payload: { options: { all }, params: {...key},query }}) - return getters['getSpendableBalances']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QuerySpendableBalances API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryTotalSupply({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryTotalSupply(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryTotalSupply({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'TotalSupply', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryTotalSupply', payload: { options: { all }, params: {...key},query }}) - return getters['getTotalSupply']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryTotalSupply API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QuerySupplyOf({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.querySupplyOf( key.denom)).data - - - commit('QUERY', { query: 'SupplyOf', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QuerySupplyOf', payload: { options: { all }, params: {...key},query }}) - return getters['getSupplyOf']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QuerySupplyOf API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams()).data - - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDenomMetadata({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDenomMetadata( key.denom)).data - - - commit('QUERY', { query: 'DenomMetadata', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDenomMetadata', payload: { options: { all }, params: {...key},query }}) - return getters['getDenomMetadata']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDenomMetadata API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDenomsMetadata({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDenomsMetadata(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryDenomsMetadata({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'DenomsMetadata', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDenomsMetadata', payload: { options: { all }, params: {...key},query }}) - return getters['getDenomsMetadata']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDenomsMetadata API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - async sendMsgSend({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSend(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgSend:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgSend:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgMultiSend({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgMultiSend(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgMultiSend:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgMultiSend:Send Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgSend({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSend(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgSend:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgSend:Create Could not create message: ' + e.message) - } - } - }, - async MsgMultiSend({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgMultiSend(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgMultiSend:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgMultiSend:Create Could not create message: ' + e.message) - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.d.ts deleted file mode 100644 index 7619607ce1..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx"; -import { MsgSend } from "./types/cosmos/bank/v1beta1/tx"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; - msgMultiSend: (data: MsgMultiSend) => EncodeObject; - msgSend: (data: MsgSend) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.js deleted file mode 100644 index 361d356c86..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.js +++ /dev/null @@ -1,37 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx"; -import { MsgSend } from "./types/cosmos/bank/v1beta1/tx"; -const types = [ - ["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend], - ["/cosmos.bank.v1beta1.MsgSend", MsgSend], -]; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - msgMultiSend: (data) => ({ typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: MsgMultiSend.fromPartial(data) }), - msgSend: (data) => ({ typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: MsgSend.fromPartial(data) }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.ts deleted file mode 100755 index 5aadf90fc3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.ts +++ /dev/null @@ -1,63 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgSend } from "./types/cosmos/bank/v1beta1/tx"; -import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx"; - - -const types = [ - ["/cosmos.bank.v1beta1.MsgSend", MsgSend], - ["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgSend: (data: MsgSend): EncodeObject => ({ typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: MsgSend.fromPartial( data ) }), - msgMultiSend: (data: MsgMultiSend): EncodeObject => ({ typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: MsgMultiSend.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.d.ts deleted file mode 100644 index fc38cdee62..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,381 +0,0 @@ -export interface ProtobufAny { - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} -/** -* DenomUnit represents a struct that describes a given -denomination unit of the basic token. -*/ -export interface V1Beta1DenomUnit { - /** denom represents the string name of the given denom unit (e.g uatom). */ - denom?: string; - /** - * 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). - * @format int64 - */ - exponent?: number; - aliases?: string[]; -} -/** - * Input models transaction input. - */ -export interface V1Beta1Input { - address?: string; - coins?: V1Beta1Coin[]; -} -/** -* Metadata represents a struct that describes -a basic token. -*/ -export interface V1Beta1Metadata { - description?: string; - denomUnits?: V1Beta1DenomUnit[]; - /** base represents the base denom (should be the DenomUnit with exponent = 0). */ - base?: string; - /** - * display indicates the suggested denom that should be - * displayed in clients. - */ - display?: string; - /** Since: cosmos-sdk 0.43 */ - name?: string; - /** - * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - * be the same as the display. - * - * Since: cosmos-sdk 0.43 - */ - symbol?: string; -} -/** - * MsgMultiSendResponse defines the Msg/MultiSend response type. - */ -export declare type V1Beta1MsgMultiSendResponse = object; -/** - * MsgSendResponse defines the Msg/Send response type. - */ -export declare type V1Beta1MsgSendResponse = object; -/** - * Output models transaction outputs. - */ -export interface V1Beta1Output { - address?: string; - coins?: V1Beta1Coin[]; -} -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - /** - * 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. - * @format uint64 - */ - offset?: string; - /** - * 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. - * @format uint64 - */ - limit?: string; - /** - * 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. - */ - countTotal?: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse?: boolean; -} -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -/** - * Params defines the parameters for the bank module. - */ -export interface V1Beta1Params { - sendEnabled?: V1Beta1SendEnabled[]; - defaultSendEnabled?: boolean; -} -/** -* QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -method. -*/ -export interface V1Beta1QueryAllBalancesResponse { - /** balances is the balances of all the coins. */ - balances?: V1Beta1Coin[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * QueryBalanceResponse is the response type for the Query/Balance RPC method. - */ -export interface V1Beta1QueryBalanceResponse { - /** balance is the balance of the coin. */ - balance?: V1Beta1Coin; -} -/** -* QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC -method. -*/ -export interface V1Beta1QueryDenomMetadataResponse { - /** metadata describes and provides all the client information for the requested token. */ - metadata?: V1Beta1Metadata; -} -/** -* QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC -method. -*/ -export interface V1Beta1QueryDenomsMetadataResponse { - /** metadata provides the client information for all the registered tokens. */ - metadatas?: V1Beta1Metadata[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * QueryParamsResponse defines the response type for querying x/bank parameters. - */ -export interface V1Beta1QueryParamsResponse { - /** Params defines the parameters for the bank module. */ - params?: V1Beta1Params; -} -/** -* QuerySpendableBalancesResponse defines the gRPC response structure for querying -an account's spendable balances. -*/ -export interface V1Beta1QuerySpendableBalancesResponse { - /** balances is the spendable balances of all the coins. */ - balances?: V1Beta1Coin[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. - */ -export interface V1Beta1QuerySupplyOfResponse { - /** amount is the supply of the coin. */ - amount?: V1Beta1Coin; -} -export interface V1Beta1QueryTotalSupplyResponse { - supply?: V1Beta1Coin[]; - /** - * pagination defines the pagination in the response. - * - * Since: cosmos-sdk 0.43 - */ - pagination?: V1Beta1PageResponse; -} -/** -* SendEnabled maps coin denom to a send_enabled status (whether a denom is -sendable). -*/ -export interface V1Beta1SendEnabled { - denom?: string; - enabled?: boolean; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/bank/v1beta1/authz.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryAllBalances - * @summary AllBalances queries the balance of all coins for a single account. - * @request GET:/cosmos/bank/v1beta1/balances/{address} - */ - queryAllBalances: (address: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryBalance - * @summary Balance queries the balance of a single coin for a single account. - * @request GET:/cosmos/bank/v1beta1/balances/{address}/by_denom - */ - queryBalance: (address: string, query?: { - denom?: string; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDenomsMetadata - * @summary DenomsMetadata queries the client metadata for all registered coin denominations. - * @request GET:/cosmos/bank/v1beta1/denoms_metadata - */ - queryDenomsMetadata: (query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDenomMetadata - * @summary DenomsMetadata queries the client metadata of a given coin denomination. - * @request GET:/cosmos/bank/v1beta1/denoms_metadata/{denom} - */ - queryDenomMetadata: (denom: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries the parameters of x/bank module. - * @request GET:/cosmos/bank/v1beta1/params - */ - queryParams: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QuerySpendableBalances - * @summary SpendableBalances queries the spenable balance of all coins for a single - account. - * @request GET:/cosmos/bank/v1beta1/spendable_balances/{address} - */ - querySpendableBalances: (address: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryTotalSupply - * @summary TotalSupply queries the total supply of all coins. - * @request GET:/cosmos/bank/v1beta1/supply - */ - queryTotalSupply: (query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QuerySupplyOf - * @summary SupplyOf queries the supply of a single coin. - * @request GET:/cosmos/bank/v1beta1/supply/{denom} - */ - querySupplyOf: (denom: string, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.js deleted file mode 100644 index 96076e6ecd..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.js +++ /dev/null @@ -1,258 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/bank/v1beta1/authz.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryAllBalances - * @summary AllBalances queries the balance of all coins for a single account. - * @request GET:/cosmos/bank/v1beta1/balances/{address} - */ - this.queryAllBalances = (address, query, params = {}) => this.request({ - path: `/cosmos/bank/v1beta1/balances/${address}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryBalance - * @summary Balance queries the balance of a single coin for a single account. - * @request GET:/cosmos/bank/v1beta1/balances/{address}/by_denom - */ - this.queryBalance = (address, query, params = {}) => this.request({ - path: `/cosmos/bank/v1beta1/balances/${address}/by_denom`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDenomsMetadata - * @summary DenomsMetadata queries the client metadata for all registered coin denominations. - * @request GET:/cosmos/bank/v1beta1/denoms_metadata - */ - this.queryDenomsMetadata = (query, params = {}) => this.request({ - path: `/cosmos/bank/v1beta1/denoms_metadata`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDenomMetadata - * @summary DenomsMetadata queries the client metadata of a given coin denomination. - * @request GET:/cosmos/bank/v1beta1/denoms_metadata/{denom} - */ - this.queryDenomMetadata = (denom, params = {}) => this.request({ - path: `/cosmos/bank/v1beta1/denoms_metadata/${denom}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries the parameters of x/bank module. - * @request GET:/cosmos/bank/v1beta1/params - */ - this.queryParams = (params = {}) => this.request({ - path: `/cosmos/bank/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QuerySpendableBalances - * @summary SpendableBalances queries the spenable balance of all coins for a single - account. - * @request GET:/cosmos/bank/v1beta1/spendable_balances/{address} - */ - this.querySpendableBalances = (address, query, params = {}) => this.request({ - path: `/cosmos/bank/v1beta1/spendable_balances/${address}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryTotalSupply - * @summary TotalSupply queries the total supply of all coins. - * @request GET:/cosmos/bank/v1beta1/supply - */ - this.queryTotalSupply = (query, params = {}) => this.request({ - path: `/cosmos/bank/v1beta1/supply`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QuerySupplyOf - * @summary SupplyOf queries the supply of a single coin. - * @request GET:/cosmos/bank/v1beta1/supply/{denom} - */ - this.querySupplyOf = (denom, params = {}) => this.request({ - path: `/cosmos/bank/v1beta1/supply/${denom}`, - method: "GET", - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.ts deleted file mode 100644 index eda976aba4..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/rest.ts +++ /dev/null @@ -1,636 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface ProtobufAny { - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** -* DenomUnit represents a struct that describes a given -denomination unit of the basic token. -*/ -export interface V1Beta1DenomUnit { - /** denom represents the string name of the given denom unit (e.g uatom). */ - denom?: string; - - /** - * 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). - * @format int64 - */ - exponent?: number; - aliases?: string[]; -} - -/** - * Input models transaction input. - */ -export interface V1Beta1Input { - address?: string; - coins?: V1Beta1Coin[]; -} - -/** -* Metadata represents a struct that describes -a basic token. -*/ -export interface V1Beta1Metadata { - description?: string; - denom_units?: V1Beta1DenomUnit[]; - - /** base represents the base denom (should be the DenomUnit with exponent = 0). */ - base?: string; - - /** - * display indicates the suggested denom that should be - * displayed in clients. - */ - display?: string; - - /** Since: cosmos-sdk 0.43 */ - name?: string; - - /** - * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - * be the same as the display. - * - * Since: cosmos-sdk 0.43 - */ - symbol?: string; -} - -/** - * MsgMultiSendResponse defines the Msg/MultiSend response type. - */ -export type V1Beta1MsgMultiSendResponse = object; - -/** - * MsgSendResponse defines the Msg/Send response type. - */ -export type V1Beta1MsgSendResponse = object; - -/** - * Output models transaction outputs. - */ -export interface V1Beta1Output { - address?: string; - coins?: V1Beta1Coin[]; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - 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; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -/** - * Params defines the parameters for the bank module. - */ -export interface V1Beta1Params { - send_enabled?: V1Beta1SendEnabled[]; - default_send_enabled?: boolean; -} - -/** -* QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -method. -*/ -export interface V1Beta1QueryAllBalancesResponse { - /** balances is the balances of all the coins. */ - balances?: V1Beta1Coin[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryBalanceResponse is the response type for the Query/Balance RPC method. - */ -export interface V1Beta1QueryBalanceResponse { - /** balance is the balance of the coin. */ - balance?: V1Beta1Coin; -} - -/** -* QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC -method. -*/ -export interface V1Beta1QueryDenomMetadataResponse { - /** metadata describes and provides all the client information for the requested token. */ - metadata?: V1Beta1Metadata; -} - -/** -* QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC -method. -*/ -export interface V1Beta1QueryDenomsMetadataResponse { - /** metadata provides the client information for all the registered tokens. */ - metadatas?: V1Beta1Metadata[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryParamsResponse defines the response type for querying x/bank parameters. - */ -export interface V1Beta1QueryParamsResponse { - /** Params defines the parameters for the bank module. */ - params?: V1Beta1Params; -} - -/** -* QuerySpendableBalancesResponse defines the gRPC response structure for querying -an account's spendable balances. -*/ -export interface V1Beta1QuerySpendableBalancesResponse { - /** balances is the spendable balances of all the coins. */ - balances?: V1Beta1Coin[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. - */ -export interface V1Beta1QuerySupplyOfResponse { - /** amount is the supply of the coin. */ - amount?: V1Beta1Coin; -} - -export interface V1Beta1QueryTotalSupplyResponse { - supply?: V1Beta1Coin[]; - - /** - * pagination defines the pagination in the response. - * - * Since: cosmos-sdk 0.43 - */ - pagination?: V1Beta1PageResponse; -} - -/** -* SendEnabled maps coin denom to a send_enabled status (whether a denom is -sendable). -*/ -export interface V1Beta1SendEnabled { - denom?: string; - enabled?: boolean; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/bank/v1beta1/authz.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryAllBalances - * @summary AllBalances queries the balance of all coins for a single account. - * @request GET:/cosmos/bank/v1beta1/balances/{address} - */ - queryAllBalances = ( - address: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/bank/v1beta1/balances/${address}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryBalance - * @summary Balance queries the balance of a single coin for a single account. - * @request GET:/cosmos/bank/v1beta1/balances/{address}/by_denom - */ - queryBalance = (address: string, query?: { denom?: string }, params: RequestParams = {}) => - this.request({ - path: `/cosmos/bank/v1beta1/balances/${address}/by_denom`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDenomsMetadata - * @summary DenomsMetadata queries the client metadata for all registered coin denominations. - * @request GET:/cosmos/bank/v1beta1/denoms_metadata - */ - queryDenomsMetadata = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/bank/v1beta1/denoms_metadata`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDenomMetadata - * @summary DenomsMetadata queries the client metadata of a given coin denomination. - * @request GET:/cosmos/bank/v1beta1/denoms_metadata/{denom} - */ - queryDenomMetadata = (denom: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/bank/v1beta1/denoms_metadata/${denom}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries the parameters of x/bank module. - * @request GET:/cosmos/bank/v1beta1/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/bank/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QuerySpendableBalances - * @summary SpendableBalances queries the spenable balance of all coins for a single -account. - * @request GET:/cosmos/bank/v1beta1/spendable_balances/{address} - */ - querySpendableBalances = ( - address: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/bank/v1beta1/spendable_balances/${address}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryTotalSupply - * @summary TotalSupply queries the total supply of all coins. - * @request GET:/cosmos/bank/v1beta1/supply - */ - queryTotalSupply = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/bank/v1beta1/supply`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QuerySupplyOf - * @summary SupplyOf queries the supply of a single coin. - * @request GET:/cosmos/bank/v1beta1/supply/{denom} - */ - querySupplyOf = (denom: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/bank/v1beta1/supply/${denom}`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/authz.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/authz.d.ts deleted file mode 100644 index ab443a2648..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/authz.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.bank.v1beta1"; -/** - * SendAuthorization allows the grantee to spend up to spend_limit coins from - * the granter's account. - * - * Since: cosmos-sdk 0.43 - */ -export interface SendAuthorization { - spendLimit: Coin[]; -} -export declare const SendAuthorization: { - encode(message: SendAuthorization, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SendAuthorization; - fromJSON(object: any): SendAuthorization; - toJSON(message: SendAuthorization): unknown; - fromPartial(object: DeepPartial): SendAuthorization; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/authz.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/authz.js deleted file mode 100644 index 145fe65053..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/authz.js +++ /dev/null @@ -1,61 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.bank.v1beta1"; -const baseSendAuthorization = {}; -export const SendAuthorization = { - encode(message, writer = Writer.create()) { - for (const v of message.spendLimit) { - Coin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSendAuthorization }; - message.spendLimit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.spendLimit.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSendAuthorization }; - message.spendLimit = []; - if (object.spendLimit !== undefined && object.spendLimit !== null) { - for (const e of object.spendLimit) { - message.spendLimit.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.spendLimit) { - obj.spendLimit = message.spendLimit.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.spendLimit = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSendAuthorization }; - message.spendLimit = []; - if (object.spendLimit !== undefined && object.spendLimit !== null) { - for (const e of object.spendLimit) { - message.spendLimit.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/authz.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/authz.ts deleted file mode 100644 index e174b5ac30..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/authz.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.bank.v1beta1"; - -/** - * SendAuthorization allows the grantee to spend up to spend_limit coins from - * the granter's account. - * - * Since: cosmos-sdk 0.43 - */ -export interface SendAuthorization { - spend_limit: Coin[]; -} - -const baseSendAuthorization: object = {}; - -export const SendAuthorization = { - encode(message: SendAuthorization, writer: Writer = Writer.create()): Writer { - for (const v of message.spend_limit) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SendAuthorization { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSendAuthorization } as SendAuthorization; - message.spend_limit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.spend_limit.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SendAuthorization { - const message = { ...baseSendAuthorization } as SendAuthorization; - message.spend_limit = []; - if (object.spend_limit !== undefined && object.spend_limit !== null) { - for (const e of object.spend_limit) { - message.spend_limit.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SendAuthorization): unknown { - const obj: any = {}; - if (message.spend_limit) { - obj.spend_limit = message.spend_limit.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.spend_limit = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SendAuthorization { - const message = { ...baseSendAuthorization } as SendAuthorization; - message.spend_limit = []; - if (object.spend_limit !== undefined && object.spend_limit !== null) { - for (const e of object.spend_limit) { - message.spend_limit.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.d.ts deleted file mode 100644 index 10903df2f9..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.d.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.bank.v1beta1"; -/** Params defines the parameters for the bank module. */ -export interface Params { - sendEnabled: SendEnabled[]; - defaultSendEnabled: boolean; -} -/** - * SendEnabled maps coin denom to a send_enabled status (whether a denom is - * sendable). - */ -export interface SendEnabled { - denom: string; - enabled: boolean; -} -/** Input models transaction input. */ -export interface Input { - address: string; - coins: Coin[]; -} -/** Output models transaction outputs. */ -export interface Output { - address: string; - coins: Coin[]; -} -/** - * Supply represents a struct that passively keeps track of the total supply - * amounts in the network. - * This message is deprecated now that supply is indexed by denom. - * - * @deprecated - */ -export interface Supply { - total: Coin[]; -} -/** - * DenomUnit represents a struct that describes a given - * denomination unit of the basic token. - */ -export interface DenomUnit { - /** denom represents the string name of the given denom unit (e.g uatom). */ - denom: string; - /** - * 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). - */ - exponent: number; - /** aliases is a list of string aliases for the given denom */ - aliases: string[]; -} -/** - * Metadata represents a struct that describes - * a basic token. - */ -export interface Metadata { - description: string; - /** denom_units represents the list of DenomUnit's for a given coin */ - denomUnits: DenomUnit[]; - /** base represents the base denom (should be the DenomUnit with exponent = 0). */ - base: string; - /** - * display indicates the suggested denom that should be - * displayed in clients. - */ - display: string; - /** - * name defines the name of the token (eg: Cosmos Atom) - * - * Since: cosmos-sdk 0.43 - */ - name: string; - /** - * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - * be the same as the display. - * - * Since: cosmos-sdk 0.43 - */ - symbol: string; -} -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -export declare const SendEnabled: { - encode(message: SendEnabled, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SendEnabled; - fromJSON(object: any): SendEnabled; - toJSON(message: SendEnabled): unknown; - fromPartial(object: DeepPartial): SendEnabled; -}; -export declare const Input: { - encode(message: Input, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Input; - fromJSON(object: any): Input; - toJSON(message: Input): unknown; - fromPartial(object: DeepPartial): Input; -}; -export declare const Output: { - encode(message: Output, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Output; - fromJSON(object: any): Output; - toJSON(message: Output): unknown; - fromPartial(object: DeepPartial): Output; -}; -export declare const Supply: { - encode(message: Supply, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Supply; - fromJSON(object: any): Supply; - toJSON(message: Supply): unknown; - fromPartial(object: DeepPartial): Supply; -}; -export declare const DenomUnit: { - encode(message: DenomUnit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DenomUnit; - fromJSON(object: any): DenomUnit; - toJSON(message: DenomUnit): unknown; - fromPartial(object: DeepPartial): DenomUnit; -}; -export declare const Metadata: { - encode(message: Metadata, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Metadata; - fromJSON(object: any): Metadata; - toJSON(message: Metadata): unknown; - fromPartial(object: DeepPartial): Metadata; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.js deleted file mode 100644 index 4cf7c7e5f8..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.js +++ /dev/null @@ -1,616 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.bank.v1beta1"; -const baseParams = { defaultSendEnabled: false }; -export const Params = { - encode(message, writer = Writer.create()) { - for (const v of message.sendEnabled) { - SendEnabled.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.defaultSendEnabled === true) { - writer.uint32(16).bool(message.defaultSendEnabled); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - message.sendEnabled = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sendEnabled.push(SendEnabled.decode(reader, reader.uint32())); - break; - case 2: - message.defaultSendEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - message.sendEnabled = []; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - for (const e of object.sendEnabled) { - message.sendEnabled.push(SendEnabled.fromJSON(e)); - } - } - if (object.defaultSendEnabled !== undefined && - object.defaultSendEnabled !== null) { - message.defaultSendEnabled = Boolean(object.defaultSendEnabled); - } - else { - message.defaultSendEnabled = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.sendEnabled) { - obj.sendEnabled = message.sendEnabled.map((e) => e ? SendEnabled.toJSON(e) : undefined); - } - else { - obj.sendEnabled = []; - } - message.defaultSendEnabled !== undefined && - (obj.defaultSendEnabled = message.defaultSendEnabled); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - message.sendEnabled = []; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - for (const e of object.sendEnabled) { - message.sendEnabled.push(SendEnabled.fromPartial(e)); - } - } - if (object.defaultSendEnabled !== undefined && - object.defaultSendEnabled !== null) { - message.defaultSendEnabled = object.defaultSendEnabled; - } - else { - message.defaultSendEnabled = false; - } - return message; - }, -}; -const baseSendEnabled = { denom: "", enabled: false }; -export const SendEnabled = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.enabled === true) { - writer.uint32(16).bool(message.enabled); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSendEnabled }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSendEnabled }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.enabled !== undefined && object.enabled !== null) { - message.enabled = Boolean(object.enabled); - } - else { - message.enabled = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.enabled !== undefined && (obj.enabled = message.enabled); - return obj; - }, - fromPartial(object) { - const message = { ...baseSendEnabled }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.enabled !== undefined && object.enabled !== null) { - message.enabled = object.enabled; - } - else { - message.enabled = false; - } - return message; - }, -}; -const baseInput = { address: "" }; -export const Input = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseInput }; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseInput }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.coins = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseInput }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseOutput = { address: "" }; -export const Output = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOutput }; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOutput }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.coins = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOutput }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseSupply = {}; -export const Supply = { - encode(message, writer = Writer.create()) { - for (const v of message.total) { - Coin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSupply }; - message.total = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSupply }; - message.total = []; - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.total) { - obj.total = message.total.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.total = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSupply }; - message.total = []; - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseDenomUnit = { denom: "", exponent: 0, aliases: "" }; -export const DenomUnit = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.exponent !== 0) { - writer.uint32(16).uint32(message.exponent); - } - for (const v of message.aliases) { - writer.uint32(26).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDenomUnit }; - message.aliases = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.exponent = reader.uint32(); - break; - case 3: - message.aliases.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDenomUnit }; - message.aliases = []; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.exponent !== undefined && object.exponent !== null) { - message.exponent = Number(object.exponent); - } - else { - message.exponent = 0; - } - if (object.aliases !== undefined && object.aliases !== null) { - for (const e of object.aliases) { - message.aliases.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.exponent !== undefined && (obj.exponent = message.exponent); - if (message.aliases) { - obj.aliases = message.aliases.map((e) => e); - } - else { - obj.aliases = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDenomUnit }; - message.aliases = []; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.exponent !== undefined && object.exponent !== null) { - message.exponent = object.exponent; - } - else { - message.exponent = 0; - } - if (object.aliases !== undefined && object.aliases !== null) { - for (const e of object.aliases) { - message.aliases.push(e); - } - } - return message; - }, -}; -const baseMetadata = { - description: "", - base: "", - display: "", - name: "", - symbol: "", -}; -export const Metadata = { - encode(message, writer = Writer.create()) { - if (message.description !== "") { - writer.uint32(10).string(message.description); - } - for (const v of message.denomUnits) { - DenomUnit.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.base !== "") { - writer.uint32(26).string(message.base); - } - if (message.display !== "") { - writer.uint32(34).string(message.display); - } - if (message.name !== "") { - writer.uint32(42).string(message.name); - } - if (message.symbol !== "") { - writer.uint32(50).string(message.symbol); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMetadata }; - message.denomUnits = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = reader.string(); - break; - case 2: - message.denomUnits.push(DenomUnit.decode(reader, reader.uint32())); - break; - case 3: - message.base = reader.string(); - break; - case 4: - message.display = reader.string(); - break; - case 5: - message.name = reader.string(); - break; - case 6: - message.symbol = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMetadata }; - message.denomUnits = []; - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.denomUnits !== undefined && object.denomUnits !== null) { - for (const e of object.denomUnits) { - message.denomUnits.push(DenomUnit.fromJSON(e)); - } - } - if (object.base !== undefined && object.base !== null) { - message.base = String(object.base); - } - else { - message.base = ""; - } - if (object.display !== undefined && object.display !== null) { - message.display = String(object.display); - } - else { - message.display = ""; - } - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.symbol !== undefined && object.symbol !== null) { - message.symbol = String(object.symbol); - } - else { - message.symbol = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.description !== undefined && - (obj.description = message.description); - if (message.denomUnits) { - obj.denomUnits = message.denomUnits.map((e) => e ? DenomUnit.toJSON(e) : undefined); - } - else { - obj.denomUnits = []; - } - message.base !== undefined && (obj.base = message.base); - message.display !== undefined && (obj.display = message.display); - message.name !== undefined && (obj.name = message.name); - message.symbol !== undefined && (obj.symbol = message.symbol); - return obj; - }, - fromPartial(object) { - const message = { ...baseMetadata }; - message.denomUnits = []; - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.denomUnits !== undefined && object.denomUnits !== null) { - for (const e of object.denomUnits) { - message.denomUnits.push(DenomUnit.fromPartial(e)); - } - } - if (object.base !== undefined && object.base !== null) { - message.base = object.base; - } - else { - message.base = ""; - } - if (object.display !== undefined && object.display !== null) { - message.display = object.display; - } - else { - message.display = ""; - } - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.symbol !== undefined && object.symbol !== null) { - message.symbol = object.symbol; - } - else { - message.symbol = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.ts deleted file mode 100644 index 8733932450..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/bank.ts +++ /dev/null @@ -1,737 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.bank.v1beta1"; - -/** Params defines the parameters for the bank module. */ -export interface Params { - send_enabled: SendEnabled[]; - default_send_enabled: boolean; -} - -/** - * SendEnabled maps coin denom to a send_enabled status (whether a denom is - * sendable). - */ -export interface SendEnabled { - denom: string; - enabled: boolean; -} - -/** Input models transaction input. */ -export interface Input { - address: string; - coins: Coin[]; -} - -/** Output models transaction outputs. */ -export interface Output { - address: string; - coins: Coin[]; -} - -/** - * Supply represents a struct that passively keeps track of the total supply - * amounts in the network. - * This message is deprecated now that supply is indexed by denom. - * - * @deprecated - */ -export interface Supply { - total: Coin[]; -} - -/** - * DenomUnit represents a struct that describes a given - * denomination unit of the basic token. - */ -export interface DenomUnit { - /** denom represents the string name of the given denom unit (e.g uatom). */ - denom: string; - /** - * 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). - */ - exponent: number; - /** aliases is a list of string aliases for the given denom */ - aliases: string[]; -} - -/** - * Metadata represents a struct that describes - * a basic token. - */ -export interface Metadata { - description: string; - /** denom_units represents the list of DenomUnit's for a given coin */ - denom_units: DenomUnit[]; - /** base represents the base denom (should be the DenomUnit with exponent = 0). */ - base: string; - /** - * display indicates the suggested denom that should be - * displayed in clients. - */ - display: string; - /** - * name defines the name of the token (eg: Cosmos Atom) - * - * Since: cosmos-sdk 0.43 - */ - name: string; - /** - * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - * be the same as the display. - * - * Since: cosmos-sdk 0.43 - */ - symbol: string; -} - -const baseParams: object = { default_send_enabled: false }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - for (const v of message.send_enabled) { - SendEnabled.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.default_send_enabled === true) { - writer.uint32(16).bool(message.default_send_enabled); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - message.send_enabled = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.send_enabled.push( - SendEnabled.decode(reader, reader.uint32()) - ); - break; - case 2: - message.default_send_enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - message.send_enabled = []; - if (object.send_enabled !== undefined && object.send_enabled !== null) { - for (const e of object.send_enabled) { - message.send_enabled.push(SendEnabled.fromJSON(e)); - } - } - if ( - object.default_send_enabled !== undefined && - object.default_send_enabled !== null - ) { - message.default_send_enabled = Boolean(object.default_send_enabled); - } else { - message.default_send_enabled = false; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.send_enabled) { - obj.send_enabled = message.send_enabled.map((e) => - e ? SendEnabled.toJSON(e) : undefined - ); - } else { - obj.send_enabled = []; - } - message.default_send_enabled !== undefined && - (obj.default_send_enabled = message.default_send_enabled); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - message.send_enabled = []; - if (object.send_enabled !== undefined && object.send_enabled !== null) { - for (const e of object.send_enabled) { - message.send_enabled.push(SendEnabled.fromPartial(e)); - } - } - if ( - object.default_send_enabled !== undefined && - object.default_send_enabled !== null - ) { - message.default_send_enabled = object.default_send_enabled; - } else { - message.default_send_enabled = false; - } - return message; - }, -}; - -const baseSendEnabled: object = { denom: "", enabled: false }; - -export const SendEnabled = { - encode(message: SendEnabled, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.enabled === true) { - writer.uint32(16).bool(message.enabled); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SendEnabled { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSendEnabled } as SendEnabled; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SendEnabled { - const message = { ...baseSendEnabled } as SendEnabled; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.enabled !== undefined && object.enabled !== null) { - message.enabled = Boolean(object.enabled); - } else { - message.enabled = false; - } - return message; - }, - - toJSON(message: SendEnabled): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.enabled !== undefined && (obj.enabled = message.enabled); - return obj; - }, - - fromPartial(object: DeepPartial): SendEnabled { - const message = { ...baseSendEnabled } as SendEnabled; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.enabled !== undefined && object.enabled !== null) { - message.enabled = object.enabled; - } else { - message.enabled = false; - } - return message; - }, -}; - -const baseInput: object = { address: "" }; - -export const Input = { - encode(message: Input, writer: Writer = Writer.create()): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Input { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseInput } as Input; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Input { - const message = { ...baseInput } as Input; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Input): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.coins = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Input { - const message = { ...baseInput } as Input; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOutput: object = { address: "" }; - -export const Output = { - encode(message: Output, writer: Writer = Writer.create()): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Output { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOutput } as Output; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Output { - const message = { ...baseOutput } as Output; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Output): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.coins = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Output { - const message = { ...baseOutput } as Output; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSupply: object = {}; - -export const Supply = { - encode(message: Supply, writer: Writer = Writer.create()): Writer { - for (const v of message.total) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Supply { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSupply } as Supply; - message.total = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Supply { - const message = { ...baseSupply } as Supply; - message.total = []; - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Supply): unknown { - const obj: any = {}; - if (message.total) { - obj.total = message.total.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.total = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Supply { - const message = { ...baseSupply } as Supply; - message.total = []; - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseDenomUnit: object = { denom: "", exponent: 0, aliases: "" }; - -export const DenomUnit = { - encode(message: DenomUnit, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.exponent !== 0) { - writer.uint32(16).uint32(message.exponent); - } - for (const v of message.aliases) { - writer.uint32(26).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DenomUnit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDenomUnit } as DenomUnit; - message.aliases = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.exponent = reader.uint32(); - break; - case 3: - message.aliases.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DenomUnit { - const message = { ...baseDenomUnit } as DenomUnit; - message.aliases = []; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.exponent !== undefined && object.exponent !== null) { - message.exponent = Number(object.exponent); - } else { - message.exponent = 0; - } - if (object.aliases !== undefined && object.aliases !== null) { - for (const e of object.aliases) { - message.aliases.push(String(e)); - } - } - return message; - }, - - toJSON(message: DenomUnit): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.exponent !== undefined && (obj.exponent = message.exponent); - if (message.aliases) { - obj.aliases = message.aliases.map((e) => e); - } else { - obj.aliases = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DenomUnit { - const message = { ...baseDenomUnit } as DenomUnit; - message.aliases = []; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.exponent !== undefined && object.exponent !== null) { - message.exponent = object.exponent; - } else { - message.exponent = 0; - } - if (object.aliases !== undefined && object.aliases !== null) { - for (const e of object.aliases) { - message.aliases.push(e); - } - } - return message; - }, -}; - -const baseMetadata: object = { - description: "", - base: "", - display: "", - name: "", - symbol: "", -}; - -export const Metadata = { - encode(message: Metadata, writer: Writer = Writer.create()): Writer { - if (message.description !== "") { - writer.uint32(10).string(message.description); - } - for (const v of message.denom_units) { - DenomUnit.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.base !== "") { - writer.uint32(26).string(message.base); - } - if (message.display !== "") { - writer.uint32(34).string(message.display); - } - if (message.name !== "") { - writer.uint32(42).string(message.name); - } - if (message.symbol !== "") { - writer.uint32(50).string(message.symbol); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Metadata { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMetadata } as Metadata; - message.denom_units = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = reader.string(); - break; - case 2: - message.denom_units.push(DenomUnit.decode(reader, reader.uint32())); - break; - case 3: - message.base = reader.string(); - break; - case 4: - message.display = reader.string(); - break; - case 5: - message.name = reader.string(); - break; - case 6: - message.symbol = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Metadata { - const message = { ...baseMetadata } as Metadata; - message.denom_units = []; - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.denom_units !== undefined && object.denom_units !== null) { - for (const e of object.denom_units) { - message.denom_units.push(DenomUnit.fromJSON(e)); - } - } - if (object.base !== undefined && object.base !== null) { - message.base = String(object.base); - } else { - message.base = ""; - } - if (object.display !== undefined && object.display !== null) { - message.display = String(object.display); - } else { - message.display = ""; - } - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.symbol !== undefined && object.symbol !== null) { - message.symbol = String(object.symbol); - } else { - message.symbol = ""; - } - return message; - }, - - toJSON(message: Metadata): unknown { - const obj: any = {}; - message.description !== undefined && - (obj.description = message.description); - if (message.denom_units) { - obj.denom_units = message.denom_units.map((e) => - e ? DenomUnit.toJSON(e) : undefined - ); - } else { - obj.denom_units = []; - } - message.base !== undefined && (obj.base = message.base); - message.display !== undefined && (obj.display = message.display); - message.name !== undefined && (obj.name = message.name); - message.symbol !== undefined && (obj.symbol = message.symbol); - return obj; - }, - - fromPartial(object: DeepPartial): Metadata { - const message = { ...baseMetadata } as Metadata; - message.denom_units = []; - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.denom_units !== undefined && object.denom_units !== null) { - for (const e of object.denom_units) { - message.denom_units.push(DenomUnit.fromPartial(e)); - } - } - if (object.base !== undefined && object.base !== null) { - message.base = object.base; - } else { - message.base = ""; - } - if (object.display !== undefined && object.display !== null) { - message.display = object.display; - } else { - message.display = ""; - } - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.symbol !== undefined && object.symbol !== null) { - message.symbol = object.symbol; - } else { - message.symbol = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.d.ts deleted file mode 100644 index c86db6d9d3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Params, Metadata } from "../../../cosmos/bank/v1beta1/bank"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.bank.v1beta1"; -/** GenesisState defines the bank module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of the module. */ - params: Params | undefined; - /** balances is an array containing the balances of all the accounts. */ - balances: Balance[]; - /** - * supply represents the total supply. If it is left empty, then supply will be calculated based on the provided - * balances. Otherwise, it will be used to validate that the sum of the balances equals this amount. - */ - supply: Coin[]; - /** denom_metadata defines the metadata of the differents coins. */ - denomMetadata: Metadata[]; -} -/** - * Balance defines an account address and balance pair used in the bank module's - * genesis state. - */ -export interface Balance { - /** address is the address of the balance holder. */ - address: string; - /** coins defines the different coins this balance holds. */ - coins: Coin[]; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -export declare const Balance: { - encode(message: Balance, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Balance; - fromJSON(object: any): Balance; - toJSON(message: Balance): unknown; - fromPartial(object: DeepPartial): Balance; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.js deleted file mode 100644 index 6637c90f80..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.js +++ /dev/null @@ -1,208 +0,0 @@ -/* eslint-disable */ -import { Params, Metadata } from "../../../cosmos/bank/v1beta1/bank"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.bank.v1beta1"; -const baseGenesisState = {}; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.balances) { - Balance.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.supply) { - Coin.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.denomMetadata) { - Metadata.encode(v, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.balances = []; - message.supply = []; - message.denomMetadata = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.balances.push(Balance.decode(reader, reader.uint32())); - break; - case 3: - message.supply.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.denomMetadata.push(Metadata.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.balances = []; - message.supply = []; - message.denomMetadata = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Balance.fromJSON(e)); - } - } - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromJSON(e)); - } - } - if (object.denomMetadata !== undefined && object.denomMetadata !== null) { - for (const e of object.denomMetadata) { - message.denomMetadata.push(Metadata.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.balances) { - obj.balances = message.balances.map((e) => e ? Balance.toJSON(e) : undefined); - } - else { - obj.balances = []; - } - if (message.supply) { - obj.supply = message.supply.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.supply = []; - } - if (message.denomMetadata) { - obj.denomMetadata = message.denomMetadata.map((e) => e ? Metadata.toJSON(e) : undefined); - } - else { - obj.denomMetadata = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.balances = []; - message.supply = []; - message.denomMetadata = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Balance.fromPartial(e)); - } - } - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromPartial(e)); - } - } - if (object.denomMetadata !== undefined && object.denomMetadata !== null) { - for (const e of object.denomMetadata) { - message.denomMetadata.push(Metadata.fromPartial(e)); - } - } - return message; - }, -}; -const baseBalance = { address: "" }; -export const Balance = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBalance }; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBalance }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.coins = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseBalance }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.ts deleted file mode 100644 index ec37934900..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/genesis.ts +++ /dev/null @@ -1,254 +0,0 @@ -/* eslint-disable */ -import { Params, Metadata } from "../../../cosmos/bank/v1beta1/bank"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.bank.v1beta1"; - -/** GenesisState defines the bank module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of the module. */ - params: Params | undefined; - /** balances is an array containing the balances of all the accounts. */ - balances: Balance[]; - /** - * supply represents the total supply. If it is left empty, then supply will be calculated based on the provided - * balances. Otherwise, it will be used to validate that the sum of the balances equals this amount. - */ - supply: Coin[]; - /** denom_metadata defines the metadata of the differents coins. */ - denom_metadata: Metadata[]; -} - -/** - * Balance defines an account address and balance pair used in the bank module's - * genesis state. - */ -export interface Balance { - /** address is the address of the balance holder. */ - address: string; - /** coins defines the different coins this balance holds. */ - coins: Coin[]; -} - -const baseGenesisState: object = {}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.balances) { - Balance.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.supply) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.denom_metadata) { - Metadata.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.balances = []; - message.supply = []; - message.denom_metadata = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.balances.push(Balance.decode(reader, reader.uint32())); - break; - case 3: - message.supply.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.denom_metadata.push(Metadata.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.balances = []; - message.supply = []; - message.denom_metadata = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Balance.fromJSON(e)); - } - } - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromJSON(e)); - } - } - if (object.denom_metadata !== undefined && object.denom_metadata !== null) { - for (const e of object.denom_metadata) { - message.denom_metadata.push(Metadata.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.balances) { - obj.balances = message.balances.map((e) => - e ? Balance.toJSON(e) : undefined - ); - } else { - obj.balances = []; - } - if (message.supply) { - obj.supply = message.supply.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.supply = []; - } - if (message.denom_metadata) { - obj.denom_metadata = message.denom_metadata.map((e) => - e ? Metadata.toJSON(e) : undefined - ); - } else { - obj.denom_metadata = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.balances = []; - message.supply = []; - message.denom_metadata = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Balance.fromPartial(e)); - } - } - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromPartial(e)); - } - } - if (object.denom_metadata !== undefined && object.denom_metadata !== null) { - for (const e of object.denom_metadata) { - message.denom_metadata.push(Metadata.fromPartial(e)); - } - } - return message; - }, -}; - -const baseBalance: object = { address: "" }; - -export const Balance = { - encode(message: Balance, writer: Writer = Writer.create()): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Balance { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBalance } as Balance; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Balance { - const message = { ...baseBalance } as Balance; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Balance): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.coins = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Balance { - const message = { ...baseBalance } as Balance; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.d.ts deleted file mode 100644 index 2f484f9294..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.d.ts +++ /dev/null @@ -1,279 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -import { Params, Metadata } from "../../../cosmos/bank/v1beta1/bank"; -export declare const protobufPackage = "cosmos.bank.v1beta1"; -/** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ -export interface QueryBalanceRequest { - /** address is the address to query balances for. */ - address: string; - /** denom is the coin denom to query balances for. */ - denom: string; -} -/** QueryBalanceResponse is the response type for the Query/Balance RPC method. */ -export interface QueryBalanceResponse { - /** balance is the balance of the coin. */ - balance: Coin | undefined; -} -/** QueryBalanceRequest is the request type for the Query/AllBalances RPC method. */ -export interface QueryAllBalancesRequest { - /** address is the address to query balances for. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryAllBalancesResponse is the response type for the Query/AllBalances RPC - * method. - */ -export interface QueryAllBalancesResponse { - /** balances is the balances of all the coins. */ - balances: Coin[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QuerySpendableBalancesRequest defines the gRPC request structure for querying - * an account's spendable balances. - */ -export interface QuerySpendableBalancesRequest { - /** address is the address to query spendable balances for. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QuerySpendableBalancesResponse defines the gRPC response structure for querying - * an account's spendable balances. - */ -export interface QuerySpendableBalancesResponse { - /** balances is the spendable balances of all the coins. */ - balances: Coin[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC - * method. - */ -export interface QueryTotalSupplyRequest { - /** - * pagination defines an optional pagination for the request. - * - * Since: cosmos-sdk 0.43 - */ - pagination: PageRequest | undefined; -} -/** - * QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC - * method - */ -export interface QueryTotalSupplyResponse { - /** supply is the supply of the coins */ - supply: Coin[]; - /** - * pagination defines the pagination in the response. - * - * Since: cosmos-sdk 0.43 - */ - pagination: PageResponse | undefined; -} -/** QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. */ -export interface QuerySupplyOfRequest { - /** denom is the coin denom to query balances for. */ - denom: string; -} -/** QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. */ -export interface QuerySupplyOfResponse { - /** amount is the supply of the coin. */ - amount: Coin | undefined; -} -/** QueryParamsRequest defines the request type for querying x/bank parameters. */ -export interface QueryParamsRequest { -} -/** QueryParamsResponse defines the response type for querying x/bank parameters. */ -export interface QueryParamsResponse { - params: Params | undefined; -} -/** QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. */ -export interface QueryDenomsMetadataRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC - * method. - */ -export interface QueryDenomsMetadataResponse { - /** metadata provides the client information for all the registered tokens. */ - metadatas: Metadata[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. */ -export interface QueryDenomMetadataRequest { - /** denom is the coin denom to query the metadata for. */ - denom: string; -} -/** - * QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC - * method. - */ -export interface QueryDenomMetadataResponse { - /** metadata describes and provides all the client information for the requested token. */ - metadata: Metadata | undefined; -} -export declare const QueryBalanceRequest: { - encode(message: QueryBalanceRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryBalanceRequest; - fromJSON(object: any): QueryBalanceRequest; - toJSON(message: QueryBalanceRequest): unknown; - fromPartial(object: DeepPartial): QueryBalanceRequest; -}; -export declare const QueryBalanceResponse: { - encode(message: QueryBalanceResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryBalanceResponse; - fromJSON(object: any): QueryBalanceResponse; - toJSON(message: QueryBalanceResponse): unknown; - fromPartial(object: DeepPartial): QueryBalanceResponse; -}; -export declare const QueryAllBalancesRequest: { - encode(message: QueryAllBalancesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllBalancesRequest; - fromJSON(object: any): QueryAllBalancesRequest; - toJSON(message: QueryAllBalancesRequest): unknown; - fromPartial(object: DeepPartial): QueryAllBalancesRequest; -}; -export declare const QueryAllBalancesResponse: { - encode(message: QueryAllBalancesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllBalancesResponse; - fromJSON(object: any): QueryAllBalancesResponse; - toJSON(message: QueryAllBalancesResponse): unknown; - fromPartial(object: DeepPartial): QueryAllBalancesResponse; -}; -export declare const QuerySpendableBalancesRequest: { - encode(message: QuerySpendableBalancesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySpendableBalancesRequest; - fromJSON(object: any): QuerySpendableBalancesRequest; - toJSON(message: QuerySpendableBalancesRequest): unknown; - fromPartial(object: DeepPartial): QuerySpendableBalancesRequest; -}; -export declare const QuerySpendableBalancesResponse: { - encode(message: QuerySpendableBalancesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySpendableBalancesResponse; - fromJSON(object: any): QuerySpendableBalancesResponse; - toJSON(message: QuerySpendableBalancesResponse): unknown; - fromPartial(object: DeepPartial): QuerySpendableBalancesResponse; -}; -export declare const QueryTotalSupplyRequest: { - encode(message: QueryTotalSupplyRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryTotalSupplyRequest; - fromJSON(object: any): QueryTotalSupplyRequest; - toJSON(message: QueryTotalSupplyRequest): unknown; - fromPartial(object: DeepPartial): QueryTotalSupplyRequest; -}; -export declare const QueryTotalSupplyResponse: { - encode(message: QueryTotalSupplyResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryTotalSupplyResponse; - fromJSON(object: any): QueryTotalSupplyResponse; - toJSON(message: QueryTotalSupplyResponse): unknown; - fromPartial(object: DeepPartial): QueryTotalSupplyResponse; -}; -export declare const QuerySupplyOfRequest: { - encode(message: QuerySupplyOfRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySupplyOfRequest; - fromJSON(object: any): QuerySupplyOfRequest; - toJSON(message: QuerySupplyOfRequest): unknown; - fromPartial(object: DeepPartial): QuerySupplyOfRequest; -}; -export declare const QuerySupplyOfResponse: { - encode(message: QuerySupplyOfResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySupplyOfResponse; - fromJSON(object: any): QuerySupplyOfResponse; - toJSON(message: QuerySupplyOfResponse): unknown; - fromPartial(object: DeepPartial): QuerySupplyOfResponse; -}; -export declare const QueryParamsRequest: { - encode(_: QueryParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest; - fromJSON(_: any): QueryParamsRequest; - toJSON(_: QueryParamsRequest): unknown; - fromPartial(_: DeepPartial): QueryParamsRequest; -}; -export declare const QueryParamsResponse: { - encode(message: QueryParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse; - fromJSON(object: any): QueryParamsResponse; - toJSON(message: QueryParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryParamsResponse; -}; -export declare const QueryDenomsMetadataRequest: { - encode(message: QueryDenomsMetadataRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomsMetadataRequest; - fromJSON(object: any): QueryDenomsMetadataRequest; - toJSON(message: QueryDenomsMetadataRequest): unknown; - fromPartial(object: DeepPartial): QueryDenomsMetadataRequest; -}; -export declare const QueryDenomsMetadataResponse: { - encode(message: QueryDenomsMetadataResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomsMetadataResponse; - fromJSON(object: any): QueryDenomsMetadataResponse; - toJSON(message: QueryDenomsMetadataResponse): unknown; - fromPartial(object: DeepPartial): QueryDenomsMetadataResponse; -}; -export declare const QueryDenomMetadataRequest: { - encode(message: QueryDenomMetadataRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomMetadataRequest; - fromJSON(object: any): QueryDenomMetadataRequest; - toJSON(message: QueryDenomMetadataRequest): unknown; - fromPartial(object: DeepPartial): QueryDenomMetadataRequest; -}; -export declare const QueryDenomMetadataResponse: { - encode(message: QueryDenomMetadataResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomMetadataResponse; - fromJSON(object: any): QueryDenomMetadataResponse; - toJSON(message: QueryDenomMetadataResponse): unknown; - fromPartial(object: DeepPartial): QueryDenomMetadataResponse; -}; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Balance queries the balance of a single coin for a single account. */ - Balance(request: QueryBalanceRequest): Promise; - /** AllBalances queries the balance of all coins for a single account. */ - AllBalances(request: QueryAllBalancesRequest): Promise; - /** - * SpendableBalances queries the spenable balance of all coins for a single - * account. - */ - SpendableBalances(request: QuerySpendableBalancesRequest): Promise; - /** TotalSupply queries the total supply of all coins. */ - TotalSupply(request: QueryTotalSupplyRequest): Promise; - /** SupplyOf queries the supply of a single coin. */ - SupplyOf(request: QuerySupplyOfRequest): Promise; - /** Params queries the parameters of x/bank module. */ - Params(request: QueryParamsRequest): Promise; - /** DenomsMetadata queries the client metadata of a given coin denomination. */ - DenomMetadata(request: QueryDenomMetadataRequest): Promise; - /** DenomsMetadata queries the client metadata for all registered coin denominations. */ - DenomsMetadata(request: QueryDenomsMetadataRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Balance(request: QueryBalanceRequest): Promise; - AllBalances(request: QueryAllBalancesRequest): Promise; - SpendableBalances(request: QuerySpendableBalancesRequest): Promise; - TotalSupply(request: QueryTotalSupplyRequest): Promise; - SupplyOf(request: QuerySupplyOfRequest): Promise; - Params(request: QueryParamsRequest): Promise; - DenomMetadata(request: QueryDenomMetadataRequest): Promise; - DenomsMetadata(request: QueryDenomsMetadataRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.js deleted file mode 100644 index 862005deac..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.js +++ /dev/null @@ -1,1097 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { PageRequest, PageResponse, } from "../../../cosmos/base/query/v1beta1/pagination"; -import { Params, Metadata } from "../../../cosmos/bank/v1beta1/bank"; -export const protobufPackage = "cosmos.bank.v1beta1"; -const baseQueryBalanceRequest = { address: "", denom: "" }; -export const QueryBalanceRequest = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.denom !== "") { - writer.uint32(18).string(message.denom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryBalanceRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryBalanceRequest }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryBalanceRequest }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - return message; - }, -}; -const baseQueryBalanceResponse = {}; -export const QueryBalanceResponse = { - encode(message, writer = Writer.create()) { - if (message.balance !== undefined) { - Coin.encode(message.balance, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryBalanceResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.balance = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryBalanceResponse }; - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromJSON(object.balance); - } - else { - message.balance = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.balance !== undefined && - (obj.balance = message.balance - ? Coin.toJSON(message.balance) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryBalanceResponse }; - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromPartial(object.balance); - } - else { - message.balance = undefined; - } - return message; - }, -}; -const baseQueryAllBalancesRequest = { address: "" }; -export const QueryAllBalancesRequest = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllBalancesRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAllBalancesRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAllBalancesRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryAllBalancesResponse = {}; -export const QueryAllBalancesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.balances) { - Coin.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllBalancesResponse, - }; - message.balances = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.balances.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAllBalancesResponse, - }; - message.balances = []; - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Coin.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.balances) { - obj.balances = message.balances.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.balances = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAllBalancesResponse, - }; - message.balances = []; - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Coin.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQuerySpendableBalancesRequest = { address: "" }; -export const QuerySpendableBalancesRequest = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySpendableBalancesRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQuerySpendableBalancesRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQuerySpendableBalancesRequest, - }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQuerySpendableBalancesResponse = {}; -export const QuerySpendableBalancesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.balances) { - Coin.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySpendableBalancesResponse, - }; - message.balances = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.balances.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQuerySpendableBalancesResponse, - }; - message.balances = []; - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Coin.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.balances) { - obj.balances = message.balances.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.balances = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQuerySpendableBalancesResponse, - }; - message.balances = []; - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Coin.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryTotalSupplyRequest = {}; -export const QueryTotalSupplyRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTotalSupplyRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryTotalSupplyRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryTotalSupplyRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryTotalSupplyResponse = {}; -export const QueryTotalSupplyResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.supply) { - Coin.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTotalSupplyResponse, - }; - message.supply = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.supply.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryTotalSupplyResponse, - }; - message.supply = []; - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.supply) { - obj.supply = message.supply.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.supply = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryTotalSupplyResponse, - }; - message.supply = []; - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQuerySupplyOfRequest = { denom: "" }; -export const QuerySupplyOfRequest = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQuerySupplyOfRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQuerySupplyOfRequest }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object) { - const message = { ...baseQuerySupplyOfRequest }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - return message; - }, -}; -const baseQuerySupplyOfResponse = {}; -export const QuerySupplyOfResponse = { - encode(message, writer = Writer.create()) { - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQuerySupplyOfResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQuerySupplyOfResponse }; - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQuerySupplyOfResponse }; - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, -}; -const baseQueryParamsRequest = {}; -export const QueryParamsRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, -}; -const baseQueryParamsResponse = {}; -export const QueryParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; -const baseQueryDenomsMetadataRequest = {}; -export const QueryDenomsMetadataRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomsMetadataRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomsMetadataRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomsMetadataRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDenomsMetadataResponse = {}; -export const QueryDenomsMetadataResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.metadatas) { - Metadata.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomsMetadataResponse, - }; - message.metadatas = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadatas.push(Metadata.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomsMetadataResponse, - }; - message.metadatas = []; - if (object.metadatas !== undefined && object.metadatas !== null) { - for (const e of object.metadatas) { - message.metadatas.push(Metadata.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.metadatas) { - obj.metadatas = message.metadatas.map((e) => e ? Metadata.toJSON(e) : undefined); - } - else { - obj.metadatas = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomsMetadataResponse, - }; - message.metadatas = []; - if (object.metadatas !== undefined && object.metadatas !== null) { - for (const e of object.metadatas) { - message.metadatas.push(Metadata.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDenomMetadataRequest = { denom: "" }; -export const QueryDenomMetadataRequest = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomMetadataRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomMetadataRequest, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomMetadataRequest, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - return message; - }, -}; -const baseQueryDenomMetadataResponse = {}; -export const QueryDenomMetadataResponse = { - encode(message, writer = Writer.create()) { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomMetadataResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadata = Metadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomMetadataResponse, - }; - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = Metadata.fromJSON(object.metadata); - } - else { - message.metadata = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.metadata !== undefined && - (obj.metadata = message.metadata - ? Metadata.toJSON(message.metadata) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomMetadataResponse, - }; - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = Metadata.fromPartial(object.metadata); - } - else { - message.metadata = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Balance(request) { - const data = QueryBalanceRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "Balance", data); - return promise.then((data) => QueryBalanceResponse.decode(new Reader(data))); - } - AllBalances(request) { - const data = QueryAllBalancesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "AllBalances", data); - return promise.then((data) => QueryAllBalancesResponse.decode(new Reader(data))); - } - SpendableBalances(request) { - const data = QuerySpendableBalancesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "SpendableBalances", data); - return promise.then((data) => QuerySpendableBalancesResponse.decode(new Reader(data))); - } - TotalSupply(request) { - const data = QueryTotalSupplyRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "TotalSupply", data); - return promise.then((data) => QueryTotalSupplyResponse.decode(new Reader(data))); - } - SupplyOf(request) { - const data = QuerySupplyOfRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "SupplyOf", data); - return promise.then((data) => QuerySupplyOfResponse.decode(new Reader(data))); - } - Params(request) { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - DenomMetadata(request) { - const data = QueryDenomMetadataRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "DenomMetadata", data); - return promise.then((data) => QueryDenomMetadataResponse.decode(new Reader(data))); - } - DenomsMetadata(request) { - const data = QueryDenomsMetadataRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "DenomsMetadata", data); - return promise.then((data) => QueryDenomsMetadataResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.ts deleted file mode 100644 index 611dbe7abe..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/query.ts +++ /dev/null @@ -1,1518 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; -import { Params, Metadata } from "../../../cosmos/bank/v1beta1/bank"; - -export const protobufPackage = "cosmos.bank.v1beta1"; - -/** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ -export interface QueryBalanceRequest { - /** address is the address to query balances for. */ - address: string; - /** denom is the coin denom to query balances for. */ - denom: string; -} - -/** QueryBalanceResponse is the response type for the Query/Balance RPC method. */ -export interface QueryBalanceResponse { - /** balance is the balance of the coin. */ - balance: Coin | undefined; -} - -/** QueryBalanceRequest is the request type for the Query/AllBalances RPC method. */ -export interface QueryAllBalancesRequest { - /** address is the address to query balances for. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryAllBalancesResponse is the response type for the Query/AllBalances RPC - * method. - */ -export interface QueryAllBalancesResponse { - /** balances is the balances of all the coins. */ - balances: Coin[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QuerySpendableBalancesRequest defines the gRPC request structure for querying - * an account's spendable balances. - */ -export interface QuerySpendableBalancesRequest { - /** address is the address to query spendable balances for. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QuerySpendableBalancesResponse defines the gRPC response structure for querying - * an account's spendable balances. - */ -export interface QuerySpendableBalancesResponse { - /** balances is the spendable balances of all the coins. */ - balances: Coin[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC - * method. - */ -export interface QueryTotalSupplyRequest { - /** - * pagination defines an optional pagination for the request. - * - * Since: cosmos-sdk 0.43 - */ - pagination: PageRequest | undefined; -} - -/** - * QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC - * method - */ -export interface QueryTotalSupplyResponse { - /** supply is the supply of the coins */ - supply: Coin[]; - /** - * pagination defines the pagination in the response. - * - * Since: cosmos-sdk 0.43 - */ - pagination: PageResponse | undefined; -} - -/** QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. */ -export interface QuerySupplyOfRequest { - /** denom is the coin denom to query balances for. */ - denom: string; -} - -/** QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. */ -export interface QuerySupplyOfResponse { - /** amount is the supply of the coin. */ - amount: Coin | undefined; -} - -/** QueryParamsRequest defines the request type for querying x/bank parameters. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse defines the response type for querying x/bank parameters. */ -export interface QueryParamsResponse { - params: Params | undefined; -} - -/** QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. */ -export interface QueryDenomsMetadataRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC - * method. - */ -export interface QueryDenomsMetadataResponse { - /** metadata provides the client information for all the registered tokens. */ - metadatas: Metadata[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. */ -export interface QueryDenomMetadataRequest { - /** denom is the coin denom to query the metadata for. */ - denom: string; -} - -/** - * QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC - * method. - */ -export interface QueryDenomMetadataResponse { - /** metadata describes and provides all the client information for the requested token. */ - metadata: Metadata | undefined; -} - -const baseQueryBalanceRequest: object = { address: "", denom: "" }; - -export const QueryBalanceRequest = { - encode( - message: QueryBalanceRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.denom !== "") { - writer.uint32(18).string(message.denom); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryBalanceRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryBalanceRequest } as QueryBalanceRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryBalanceRequest { - const message = { ...baseQueryBalanceRequest } as QueryBalanceRequest; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - return message; - }, - - toJSON(message: QueryBalanceRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - - fromPartial(object: DeepPartial): QueryBalanceRequest { - const message = { ...baseQueryBalanceRequest } as QueryBalanceRequest; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - return message; - }, -}; - -const baseQueryBalanceResponse: object = {}; - -export const QueryBalanceResponse = { - encode( - message: QueryBalanceResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.balance !== undefined) { - Coin.encode(message.balance, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryBalanceResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryBalanceResponse } as QueryBalanceResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.balance = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryBalanceResponse { - const message = { ...baseQueryBalanceResponse } as QueryBalanceResponse; - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromJSON(object.balance); - } else { - message.balance = undefined; - } - return message; - }, - - toJSON(message: QueryBalanceResponse): unknown { - const obj: any = {}; - message.balance !== undefined && - (obj.balance = message.balance - ? Coin.toJSON(message.balance) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryBalanceResponse { - const message = { ...baseQueryBalanceResponse } as QueryBalanceResponse; - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromPartial(object.balance); - } else { - message.balance = undefined; - } - return message; - }, -}; - -const baseQueryAllBalancesRequest: object = { address: "" }; - -export const QueryAllBalancesRequest = { - encode( - message: QueryAllBalancesRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryAllBalancesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllBalancesRequest, - } as QueryAllBalancesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllBalancesRequest { - const message = { - ...baseQueryAllBalancesRequest, - } as QueryAllBalancesRequest; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllBalancesRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllBalancesRequest { - const message = { - ...baseQueryAllBalancesRequest, - } as QueryAllBalancesRequest; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryAllBalancesResponse: object = {}; - -export const QueryAllBalancesResponse = { - encode( - message: QueryAllBalancesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.balances) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAllBalancesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllBalancesResponse, - } as QueryAllBalancesResponse; - message.balances = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.balances.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllBalancesResponse { - const message = { - ...baseQueryAllBalancesResponse, - } as QueryAllBalancesResponse; - message.balances = []; - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Coin.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllBalancesResponse): unknown { - const obj: any = {}; - if (message.balances) { - obj.balances = message.balances.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.balances = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllBalancesResponse { - const message = { - ...baseQueryAllBalancesResponse, - } as QueryAllBalancesResponse; - message.balances = []; - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Coin.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQuerySpendableBalancesRequest: object = { address: "" }; - -export const QuerySpendableBalancesRequest = { - encode( - message: QuerySpendableBalancesRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QuerySpendableBalancesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySpendableBalancesRequest, - } as QuerySpendableBalancesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySpendableBalancesRequest { - const message = { - ...baseQuerySpendableBalancesRequest, - } as QuerySpendableBalancesRequest; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QuerySpendableBalancesRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QuerySpendableBalancesRequest { - const message = { - ...baseQuerySpendableBalancesRequest, - } as QuerySpendableBalancesRequest; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQuerySpendableBalancesResponse: object = {}; - -export const QuerySpendableBalancesResponse = { - encode( - message: QuerySpendableBalancesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.balances) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QuerySpendableBalancesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySpendableBalancesResponse, - } as QuerySpendableBalancesResponse; - message.balances = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.balances.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySpendableBalancesResponse { - const message = { - ...baseQuerySpendableBalancesResponse, - } as QuerySpendableBalancesResponse; - message.balances = []; - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Coin.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QuerySpendableBalancesResponse): unknown { - const obj: any = {}; - if (message.balances) { - obj.balances = message.balances.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.balances = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QuerySpendableBalancesResponse { - const message = { - ...baseQuerySpendableBalancesResponse, - } as QuerySpendableBalancesResponse; - message.balances = []; - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Coin.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryTotalSupplyRequest: object = {}; - -export const QueryTotalSupplyRequest = { - encode( - message: QueryTotalSupplyRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryTotalSupplyRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTotalSupplyRequest, - } as QueryTotalSupplyRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryTotalSupplyRequest { - const message = { - ...baseQueryTotalSupplyRequest, - } as QueryTotalSupplyRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryTotalSupplyRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryTotalSupplyRequest { - const message = { - ...baseQueryTotalSupplyRequest, - } as QueryTotalSupplyRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryTotalSupplyResponse: object = {}; - -export const QueryTotalSupplyResponse = { - encode( - message: QueryTotalSupplyResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.supply) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryTotalSupplyResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTotalSupplyResponse, - } as QueryTotalSupplyResponse; - message.supply = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.supply.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryTotalSupplyResponse { - const message = { - ...baseQueryTotalSupplyResponse, - } as QueryTotalSupplyResponse; - message.supply = []; - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryTotalSupplyResponse): unknown { - const obj: any = {}; - if (message.supply) { - obj.supply = message.supply.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.supply = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryTotalSupplyResponse { - const message = { - ...baseQueryTotalSupplyResponse, - } as QueryTotalSupplyResponse; - message.supply = []; - if (object.supply !== undefined && object.supply !== null) { - for (const e of object.supply) { - message.supply.push(Coin.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQuerySupplyOfRequest: object = { denom: "" }; - -export const QuerySupplyOfRequest = { - encode( - message: QuerySupplyOfRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QuerySupplyOfRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQuerySupplyOfRequest } as QuerySupplyOfRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySupplyOfRequest { - const message = { ...baseQuerySupplyOfRequest } as QuerySupplyOfRequest; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - return message; - }, - - toJSON(message: QuerySupplyOfRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - - fromPartial(object: DeepPartial): QuerySupplyOfRequest { - const message = { ...baseQuerySupplyOfRequest } as QuerySupplyOfRequest; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - return message; - }, -}; - -const baseQuerySupplyOfResponse: object = {}; - -export const QuerySupplyOfResponse = { - encode( - message: QuerySupplyOfResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QuerySupplyOfResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQuerySupplyOfResponse } as QuerySupplyOfResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySupplyOfResponse { - const message = { ...baseQuerySupplyOfResponse } as QuerySupplyOfResponse; - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } else { - message.amount = undefined; - } - return message; - }, - - toJSON(message: QuerySupplyOfResponse): unknown { - const obj: any = {}; - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QuerySupplyOfResponse { - const message = { ...baseQuerySupplyOfResponse } as QuerySupplyOfResponse; - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } else { - message.amount = undefined; - } - return message; - }, -}; - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -const baseQueryDenomsMetadataRequest: object = {}; - -export const QueryDenomsMetadataRequest = { - encode( - message: QueryDenomsMetadataRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomsMetadataRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomsMetadataRequest, - } as QueryDenomsMetadataRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomsMetadataRequest { - const message = { - ...baseQueryDenomsMetadataRequest, - } as QueryDenomsMetadataRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDenomsMetadataRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomsMetadataRequest { - const message = { - ...baseQueryDenomsMetadataRequest, - } as QueryDenomsMetadataRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDenomsMetadataResponse: object = {}; - -export const QueryDenomsMetadataResponse = { - encode( - message: QueryDenomsMetadataResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.metadatas) { - Metadata.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomsMetadataResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomsMetadataResponse, - } as QueryDenomsMetadataResponse; - message.metadatas = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadatas.push(Metadata.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomsMetadataResponse { - const message = { - ...baseQueryDenomsMetadataResponse, - } as QueryDenomsMetadataResponse; - message.metadatas = []; - if (object.metadatas !== undefined && object.metadatas !== null) { - for (const e of object.metadatas) { - message.metadatas.push(Metadata.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDenomsMetadataResponse): unknown { - const obj: any = {}; - if (message.metadatas) { - obj.metadatas = message.metadatas.map((e) => - e ? Metadata.toJSON(e) : undefined - ); - } else { - obj.metadatas = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomsMetadataResponse { - const message = { - ...baseQueryDenomsMetadataResponse, - } as QueryDenomsMetadataResponse; - message.metadatas = []; - if (object.metadatas !== undefined && object.metadatas !== null) { - for (const e of object.metadatas) { - message.metadatas.push(Metadata.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDenomMetadataRequest: object = { denom: "" }; - -export const QueryDenomMetadataRequest = { - encode( - message: QueryDenomMetadataRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomMetadataRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomMetadataRequest, - } as QueryDenomMetadataRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomMetadataRequest { - const message = { - ...baseQueryDenomMetadataRequest, - } as QueryDenomMetadataRequest; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - return message; - }, - - toJSON(message: QueryDenomMetadataRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomMetadataRequest { - const message = { - ...baseQueryDenomMetadataRequest, - } as QueryDenomMetadataRequest; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - return message; - }, -}; - -const baseQueryDenomMetadataResponse: object = {}; - -export const QueryDenomMetadataResponse = { - encode( - message: QueryDenomMetadataResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomMetadataResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomMetadataResponse, - } as QueryDenomMetadataResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadata = Metadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomMetadataResponse { - const message = { - ...baseQueryDenomMetadataResponse, - } as QueryDenomMetadataResponse; - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = Metadata.fromJSON(object.metadata); - } else { - message.metadata = undefined; - } - return message; - }, - - toJSON(message: QueryDenomMetadataResponse): unknown { - const obj: any = {}; - message.metadata !== undefined && - (obj.metadata = message.metadata - ? Metadata.toJSON(message.metadata) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomMetadataResponse { - const message = { - ...baseQueryDenomMetadataResponse, - } as QueryDenomMetadataResponse; - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = Metadata.fromPartial(object.metadata); - } else { - message.metadata = undefined; - } - return message; - }, -}; - -/** Query defines the gRPC querier service. */ -export interface Query { - /** Balance queries the balance of a single coin for a single account. */ - Balance(request: QueryBalanceRequest): Promise; - /** AllBalances queries the balance of all coins for a single account. */ - AllBalances( - request: QueryAllBalancesRequest - ): Promise; - /** - * SpendableBalances queries the spenable balance of all coins for a single - * account. - */ - SpendableBalances( - request: QuerySpendableBalancesRequest - ): Promise; - /** TotalSupply queries the total supply of all coins. */ - TotalSupply( - request: QueryTotalSupplyRequest - ): Promise; - /** SupplyOf queries the supply of a single coin. */ - SupplyOf(request: QuerySupplyOfRequest): Promise; - /** Params queries the parameters of x/bank module. */ - Params(request: QueryParamsRequest): Promise; - /** DenomsMetadata queries the client metadata of a given coin denomination. */ - DenomMetadata( - request: QueryDenomMetadataRequest - ): Promise; - /** DenomsMetadata queries the client metadata for all registered coin denominations. */ - DenomsMetadata( - request: QueryDenomsMetadataRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Balance(request: QueryBalanceRequest): Promise { - const data = QueryBalanceRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Query", - "Balance", - data - ); - return promise.then((data) => - QueryBalanceResponse.decode(new Reader(data)) - ); - } - - AllBalances( - request: QueryAllBalancesRequest - ): Promise { - const data = QueryAllBalancesRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Query", - "AllBalances", - data - ); - return promise.then((data) => - QueryAllBalancesResponse.decode(new Reader(data)) - ); - } - - SpendableBalances( - request: QuerySpendableBalancesRequest - ): Promise { - const data = QuerySpendableBalancesRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Query", - "SpendableBalances", - data - ); - return promise.then((data) => - QuerySpendableBalancesResponse.decode(new Reader(data)) - ); - } - - TotalSupply( - request: QueryTotalSupplyRequest - ): Promise { - const data = QueryTotalSupplyRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Query", - "TotalSupply", - data - ); - return promise.then((data) => - QueryTotalSupplyResponse.decode(new Reader(data)) - ); - } - - SupplyOf(request: QuerySupplyOfRequest): Promise { - const data = QuerySupplyOfRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Query", - "SupplyOf", - data - ); - return promise.then((data) => - QuerySupplyOfResponse.decode(new Reader(data)) - ); - } - - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - - DenomMetadata( - request: QueryDenomMetadataRequest - ): Promise { - const data = QueryDenomMetadataRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Query", - "DenomMetadata", - data - ); - return promise.then((data) => - QueryDenomMetadataResponse.decode(new Reader(data)) - ); - } - - DenomsMetadata( - request: QueryDenomsMetadataRequest - ): Promise { - const data = QueryDenomsMetadataRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Query", - "DenomsMetadata", - data - ); - return promise.then((data) => - QueryDenomsMetadataResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.d.ts deleted file mode 100644 index d6b67b5cf3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Input, Output } from "../../../cosmos/bank/v1beta1/bank"; -export declare const protobufPackage = "cosmos.bank.v1beta1"; -/** MsgSend represents a message to send coins from one account to another. */ -export interface MsgSend { - fromAddress: string; - toAddress: string; - amount: Coin[]; -} -/** MsgSendResponse defines the Msg/Send response type. */ -export interface MsgSendResponse { -} -/** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */ -export interface MsgMultiSend { - inputs: Input[]; - outputs: Output[]; -} -/** MsgMultiSendResponse defines the Msg/MultiSend response type. */ -export interface MsgMultiSendResponse { -} -export declare const MsgSend: { - encode(message: MsgSend, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSend; - fromJSON(object: any): MsgSend; - toJSON(message: MsgSend): unknown; - fromPartial(object: DeepPartial): MsgSend; -}; -export declare const MsgSendResponse: { - encode(_: MsgSendResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSendResponse; - fromJSON(_: any): MsgSendResponse; - toJSON(_: MsgSendResponse): unknown; - fromPartial(_: DeepPartial): MsgSendResponse; -}; -export declare const MsgMultiSend: { - encode(message: MsgMultiSend, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgMultiSend; - fromJSON(object: any): MsgMultiSend; - toJSON(message: MsgMultiSend): unknown; - fromPartial(object: DeepPartial): MsgMultiSend; -}; -export declare const MsgMultiSendResponse: { - encode(_: MsgMultiSendResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgMultiSendResponse; - fromJSON(_: any): MsgMultiSendResponse; - toJSON(_: MsgMultiSendResponse): unknown; - fromPartial(_: DeepPartial): MsgMultiSendResponse; -}; -/** Msg defines the bank Msg service. */ -export interface Msg { - /** Send defines a method for sending coins from one account to another account. */ - Send(request: MsgSend): Promise; - /** MultiSend defines a method for sending coins from some accounts to other accounts. */ - MultiSend(request: MsgMultiSend): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - Send(request: MsgSend): Promise; - MultiSend(request: MsgMultiSend): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.js deleted file mode 100644 index c6f6acbca3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.js +++ /dev/null @@ -1,262 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Input, Output } from "../../../cosmos/bank/v1beta1/bank"; -export const protobufPackage = "cosmos.bank.v1beta1"; -const baseMsgSend = { fromAddress: "", toAddress: "" }; -export const MsgSend = { - encode(message, writer = Writer.create()) { - if (message.fromAddress !== "") { - writer.uint32(10).string(message.fromAddress); - } - if (message.toAddress !== "") { - writer.uint32(18).string(message.toAddress); - } - for (const v of message.amount) { - Coin.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSend }; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgSend }; - message.amount = []; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = String(object.fromAddress); - } - else { - message.fromAddress = ""; - } - if (object.toAddress !== undefined && object.toAddress !== null) { - message.toAddress = String(object.toAddress); - } - else { - message.toAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.fromAddress !== undefined && - (obj.fromAddress = message.fromAddress); - message.toAddress !== undefined && (obj.toAddress = message.toAddress); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.amount = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgSend }; - message.amount = []; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = object.fromAddress; - } - else { - message.fromAddress = ""; - } - if (object.toAddress !== undefined && object.toAddress !== null) { - message.toAddress = object.toAddress; - } - else { - message.toAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseMsgSendResponse = {}; -export const MsgSendResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSendResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgSendResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgSendResponse }; - return message; - }, -}; -const baseMsgMultiSend = {}; -export const MsgMultiSend = { - encode(message, writer = Writer.create()) { - for (const v of message.inputs) { - Input.encode(v, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.outputs) { - Output.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgMultiSend }; - message.inputs = []; - message.outputs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.inputs.push(Input.decode(reader, reader.uint32())); - break; - case 2: - message.outputs.push(Output.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgMultiSend }; - message.inputs = []; - message.outputs = []; - if (object.inputs !== undefined && object.inputs !== null) { - for (const e of object.inputs) { - message.inputs.push(Input.fromJSON(e)); - } - } - if (object.outputs !== undefined && object.outputs !== null) { - for (const e of object.outputs) { - message.outputs.push(Output.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.inputs) { - obj.inputs = message.inputs.map((e) => (e ? Input.toJSON(e) : undefined)); - } - else { - obj.inputs = []; - } - if (message.outputs) { - obj.outputs = message.outputs.map((e) => e ? Output.toJSON(e) : undefined); - } - else { - obj.outputs = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgMultiSend }; - message.inputs = []; - message.outputs = []; - if (object.inputs !== undefined && object.inputs !== null) { - for (const e of object.inputs) { - message.inputs.push(Input.fromPartial(e)); - } - } - if (object.outputs !== undefined && object.outputs !== null) { - for (const e of object.outputs) { - message.outputs.push(Output.fromPartial(e)); - } - } - return message; - }, -}; -const baseMsgMultiSendResponse = {}; -export const MsgMultiSendResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgMultiSendResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgMultiSendResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgMultiSendResponse }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Send(request) { - const data = MsgSend.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "Send", data); - return promise.then((data) => MsgSendResponse.decode(new Reader(data))); - } - MultiSend(request) { - const data = MsgMultiSend.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "MultiSend", data); - return promise.then((data) => MsgMultiSendResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.ts deleted file mode 100644 index 4fd4cd6658..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/tx.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Input, Output } from "../../../cosmos/bank/v1beta1/bank"; - -export const protobufPackage = "cosmos.bank.v1beta1"; - -/** MsgSend represents a message to send coins from one account to another. */ -export interface MsgSend { - from_address: string; - to_address: string; - amount: Coin[]; -} - -/** MsgSendResponse defines the Msg/Send response type. */ -export interface MsgSendResponse {} - -/** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */ -export interface MsgMultiSend { - inputs: Input[]; - outputs: Output[]; -} - -/** MsgMultiSendResponse defines the Msg/MultiSend response type. */ -export interface MsgMultiSendResponse {} - -const baseMsgSend: object = { from_address: "", to_address: "" }; - -export const MsgSend = { - encode(message: MsgSend, writer: Writer = Writer.create()): Writer { - if (message.from_address !== "") { - writer.uint32(10).string(message.from_address); - } - if (message.to_address !== "") { - writer.uint32(18).string(message.to_address); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgSend { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSend } as MsgSend; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.from_address = reader.string(); - break; - case 2: - message.to_address = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgSend { - const message = { ...baseMsgSend } as MsgSend; - message.amount = []; - if (object.from_address !== undefined && object.from_address !== null) { - message.from_address = String(object.from_address); - } else { - message.from_address = ""; - } - if (object.to_address !== undefined && object.to_address !== null) { - message.to_address = String(object.to_address); - } else { - message.to_address = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MsgSend): unknown { - const obj: any = {}; - message.from_address !== undefined && - (obj.from_address = message.from_address); - message.to_address !== undefined && (obj.to_address = message.to_address); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.amount = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MsgSend { - const message = { ...baseMsgSend } as MsgSend; - message.amount = []; - if (object.from_address !== undefined && object.from_address !== null) { - message.from_address = object.from_address; - } else { - message.from_address = ""; - } - if (object.to_address !== undefined && object.to_address !== null) { - message.to_address = object.to_address; - } else { - message.to_address = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMsgSendResponse: object = {}; - -export const MsgSendResponse = { - encode(_: MsgSendResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgSendResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSendResponse } as MsgSendResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgSendResponse { - const message = { ...baseMsgSendResponse } as MsgSendResponse; - return message; - }, - - toJSON(_: MsgSendResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgSendResponse { - const message = { ...baseMsgSendResponse } as MsgSendResponse; - return message; - }, -}; - -const baseMsgMultiSend: object = {}; - -export const MsgMultiSend = { - encode(message: MsgMultiSend, writer: Writer = Writer.create()): Writer { - for (const v of message.inputs) { - Input.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.outputs) { - Output.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgMultiSend { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgMultiSend } as MsgMultiSend; - message.inputs = []; - message.outputs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.inputs.push(Input.decode(reader, reader.uint32())); - break; - case 2: - message.outputs.push(Output.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgMultiSend { - const message = { ...baseMsgMultiSend } as MsgMultiSend; - message.inputs = []; - message.outputs = []; - if (object.inputs !== undefined && object.inputs !== null) { - for (const e of object.inputs) { - message.inputs.push(Input.fromJSON(e)); - } - } - if (object.outputs !== undefined && object.outputs !== null) { - for (const e of object.outputs) { - message.outputs.push(Output.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MsgMultiSend): unknown { - const obj: any = {}; - if (message.inputs) { - obj.inputs = message.inputs.map((e) => (e ? Input.toJSON(e) : undefined)); - } else { - obj.inputs = []; - } - if (message.outputs) { - obj.outputs = message.outputs.map((e) => - e ? Output.toJSON(e) : undefined - ); - } else { - obj.outputs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MsgMultiSend { - const message = { ...baseMsgMultiSend } as MsgMultiSend; - message.inputs = []; - message.outputs = []; - if (object.inputs !== undefined && object.inputs !== null) { - for (const e of object.inputs) { - message.inputs.push(Input.fromPartial(e)); - } - } - if (object.outputs !== undefined && object.outputs !== null) { - for (const e of object.outputs) { - message.outputs.push(Output.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMsgMultiSendResponse: object = {}; - -export const MsgMultiSendResponse = { - encode(_: MsgMultiSendResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgMultiSendResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgMultiSendResponse } as MsgMultiSendResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgMultiSendResponse { - const message = { ...baseMsgMultiSendResponse } as MsgMultiSendResponse; - return message; - }, - - toJSON(_: MsgMultiSendResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgMultiSendResponse { - const message = { ...baseMsgMultiSendResponse } as MsgMultiSendResponse; - return message; - }, -}; - -/** Msg defines the bank Msg service. */ -export interface Msg { - /** Send defines a method for sending coins from one account to another account. */ - Send(request: MsgSend): Promise; - /** MultiSend defines a method for sending coins from some accounts to other accounts. */ - MultiSend(request: MsgMultiSend): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Send(request: MsgSend): Promise { - const data = MsgSend.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "Send", data); - return promise.then((data) => MsgSendResponse.decode(new Reader(data))); - } - - MultiSend(request: MsgMultiSend): Promise { - const data = MsgMultiSend.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.bank.v1beta1.Msg", - "MultiSend", - data - ); - return promise.then((data) => - MsgMultiSendResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index 767d2c358f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - countTotal: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; -} -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index b5f5ced3d6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,242 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { - offset: 0, - limit: 0, - countTotal: false, - reverse: false, -}; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } - else { - message.reverse = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - message.reverse !== undefined && (obj.reverse = message.reverse); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } - else { - message.reverse = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 9c87ac0c9c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - 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; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { - offset: 0, - limit: 0, - count_total: false, - reverse: false, -}; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } else { - message.reverse = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - 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; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } else { - message.reverse = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac6a3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb30cd..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98406..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.d.ts deleted file mode 100644 index ac37814871..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.js deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30bdc6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0776..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.js deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7fb6d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b699..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index a3076569af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,1022 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 252725808b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4144 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } - else { - message.proto3Optional = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } - else { - message.proto3Optional = false; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/package.json b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/package.json deleted file mode 100755 index f539988591..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmos-bank-v1beta1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmos.bank.v1beta1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/cosmos-sdk/x/bank/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/index.ts deleted file mode 100755 index 96097f427d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/index.ts +++ /dev/null @@ -1,298 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { Validator } from "./module/types/cosmos/base/tendermint/v1beta1/query" -import { VersionInfo } from "./module/types/cosmos/base/tendermint/v1beta1/query" -import { Module } from "./module/types/cosmos/base/tendermint/v1beta1/query" - - -export { Validator, VersionInfo, Module }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - GetNodeInfo: {}, - GetSyncing: {}, - GetLatestBlock: {}, - GetBlockByHeight: {}, - GetLatestValidatorSet: {}, - GetValidatorSetByHeight: {}, - - _Structure: { - Validator: getStructure(Validator.fromPartial({})), - VersionInfo: getStructure(VersionInfo.fromPartial({})), - Module: getStructure(Module.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getGetNodeInfo: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetNodeInfo[JSON.stringify(params)] ?? {} - }, - getGetSyncing: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetSyncing[JSON.stringify(params)] ?? {} - }, - getGetLatestBlock: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetLatestBlock[JSON.stringify(params)] ?? {} - }, - getGetBlockByHeight: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetBlockByHeight[JSON.stringify(params)] ?? {} - }, - getGetLatestValidatorSet: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetLatestValidatorSet[JSON.stringify(params)] ?? {} - }, - getGetValidatorSetByHeight: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetValidatorSetByHeight[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.base.tendermint.v1beta1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async ServiceGetNodeInfo({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.serviceGetNodeInfo()).data - - - commit('QUERY', { query: 'GetNodeInfo', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'ServiceGetNodeInfo', payload: { options: { all }, params: {...key},query }}) - return getters['getGetNodeInfo']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:ServiceGetNodeInfo API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async ServiceGetSyncing({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.serviceGetSyncing()).data - - - commit('QUERY', { query: 'GetSyncing', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'ServiceGetSyncing', payload: { options: { all }, params: {...key},query }}) - return getters['getGetSyncing']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:ServiceGetSyncing API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async ServiceGetLatestBlock({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.serviceGetLatestBlock()).data - - - commit('QUERY', { query: 'GetLatestBlock', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'ServiceGetLatestBlock', payload: { options: { all }, params: {...key},query }}) - return getters['getGetLatestBlock']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:ServiceGetLatestBlock API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async ServiceGetBlockByHeight({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.serviceGetBlockByHeight( key.height)).data - - - commit('QUERY', { query: 'GetBlockByHeight', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'ServiceGetBlockByHeight', payload: { options: { all }, params: {...key},query }}) - return getters['getGetBlockByHeight']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:ServiceGetBlockByHeight API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async ServiceGetLatestValidatorSet({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.serviceGetLatestValidatorSet(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.serviceGetLatestValidatorSet({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'GetLatestValidatorSet', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'ServiceGetLatestValidatorSet', payload: { options: { all }, params: {...key},query }}) - return getters['getGetLatestValidatorSet']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:ServiceGetLatestValidatorSet API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async ServiceGetValidatorSetByHeight({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.serviceGetValidatorSetByHeight( key.height, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.serviceGetValidatorSetByHeight( key.height, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'GetValidatorSetByHeight', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'ServiceGetValidatorSetByHeight', payload: { options: { all }, params: {...key},query }}) - return getters['getGetValidatorSetByHeight']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:ServiceGetValidatorSetByHeight API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/index.ts deleted file mode 100755 index 67d4b093f0..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; - - -const types = [ - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/rest.ts deleted file mode 100644 index 30076226ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/rest.ts +++ /dev/null @@ -1,987 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface CryptoPublicKey { - /** @format byte */ - ed25519?: string; - - /** @format byte */ - secp256k1?: string; -} - -export interface P2PDefaultNodeInfo { - protocol_version?: P2PProtocolVersion; - default_node_id?: string; - listen_addr?: string; - network?: string; - version?: string; - - /** @format byte */ - channels?: string; - moniker?: string; - other?: P2PDefaultNodeInfoOther; -} - -export interface P2PDefaultNodeInfoOther { - tx_index?: string; - rpc_address?: string; -} - -export interface P2PProtocolVersion { - /** @format uint64 */ - p2p?: string; - - /** @format uint64 */ - block?: string; - - /** @format uint64 */ - app?: string; -} - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -export interface TenderminttypesValidator { - /** @format byte */ - address?: string; - pub_key?: CryptoPublicKey; - - /** @format int64 */ - voting_power?: string; - - /** @format int64 */ - proposer_priority?: string; -} - -/** - * Validator is the type for the validator-set. - */ -export interface Tendermintv1Beta1Validator { - address?: string; - - /** - * `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" - * } - */ - pub_key?: ProtobufAny; - - /** @format int64 */ - voting_power?: string; - - /** @format int64 */ - proposer_priority?: string; -} - -export interface TypesBlock { - /** Header defines the structure of a Tendermint block header. */ - header?: TypesHeader; - data?: TypesData; - evidence?: TypesEvidenceList; - - /** Commit contains the evidence that a block was committed by a set of validators. */ - last_commit?: TypesCommit; -} - -export interface TypesBlockID { - /** @format byte */ - hash?: string; - part_set_header?: TypesPartSetHeader; -} - -export enum TypesBlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = "BLOCK_ID_FLAG_UNKNOWN", - BLOCK_ID_FLAG_ABSENT = "BLOCK_ID_FLAG_ABSENT", - BLOCK_ID_FLAG_COMMIT = "BLOCK_ID_FLAG_COMMIT", - BLOCK_ID_FLAG_NIL = "BLOCK_ID_FLAG_NIL", -} - -/** - * Commit contains the evidence that a block was committed by a set of validators. - */ -export interface TypesCommit { - /** @format int64 */ - height?: string; - - /** @format int32 */ - round?: number; - block_id?: TypesBlockID; - signatures?: TypesCommitSig[]; -} - -/** - * CommitSig is a part of the Vote included in a Commit. - */ -export interface TypesCommitSig { - block_id_flag?: TypesBlockIDFlag; - - /** @format byte */ - validator_address?: string; - - /** @format date-time */ - timestamp?: string; - - /** @format byte */ - signature?: string; -} - -export interface TypesData { - /** - * 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. - */ - txs?: string[]; -} - -/** - * DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. - */ -export interface TypesDuplicateVoteEvidence { - /** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ - vote_a?: TypesVote; - - /** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ - vote_b?: TypesVote; - - /** @format int64 */ - total_voting_power?: string; - - /** @format int64 */ - validator_power?: string; - - /** @format date-time */ - timestamp?: string; -} - -export interface TypesEvidence { - /** DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. */ - duplicate_vote_evidence?: TypesDuplicateVoteEvidence; - - /** LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. */ - light_client_attack_evidence?: TypesLightClientAttackEvidence; -} - -export interface TypesEvidenceList { - evidence?: TypesEvidence[]; -} - -/** - * Header defines the structure of a Tendermint block header. - */ -export interface TypesHeader { - /** - * 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. - */ - version?: VersionConsensus; - chain_id?: string; - - /** @format int64 */ - height?: string; - - /** @format date-time */ - time?: string; - last_block_id?: TypesBlockID; - - /** @format byte */ - last_commit_hash?: string; - - /** @format byte */ - data_hash?: string; - - /** @format byte */ - validators_hash?: string; - - /** @format byte */ - next_validators_hash?: string; - - /** @format byte */ - consensus_hash?: string; - - /** @format byte */ - app_hash?: string; - - /** @format byte */ - last_results_hash?: string; - - /** @format byte */ - evidence_hash?: string; - - /** @format byte */ - proposer_address?: string; -} - -export interface TypesLightBlock { - signed_header?: TypesSignedHeader; - validator_set?: TypesValidatorSet; -} - -/** - * LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. - */ -export interface TypesLightClientAttackEvidence { - conflicting_block?: TypesLightBlock; - - /** @format int64 */ - common_height?: string; - byzantine_validators?: TenderminttypesValidator[]; - - /** @format int64 */ - total_voting_power?: string; - - /** @format date-time */ - timestamp?: string; -} - -export interface TypesPartSetHeader { - /** @format int64 */ - total?: number; - - /** @format byte */ - hash?: string; -} - -export interface TypesSignedHeader { - /** Header defines the structure of a Tendermint block header. */ - header?: TypesHeader; - - /** Commit contains the evidence that a block was committed by a set of validators. */ - commit?: TypesCommit; -} - -/** -* SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals -*/ -export enum TypesSignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = "SIGNED_MSG_TYPE_UNKNOWN", - SIGNED_MSG_TYPE_PREVOTE = "SIGNED_MSG_TYPE_PREVOTE", - SIGNED_MSG_TYPE_PRECOMMIT = "SIGNED_MSG_TYPE_PRECOMMIT", - SIGNED_MSG_TYPE_PROPOSAL = "SIGNED_MSG_TYPE_PROPOSAL", -} - -export interface TypesValidatorSet { - validators?: TenderminttypesValidator[]; - proposer?: TenderminttypesValidator; - - /** @format int64 */ - total_voting_power?: string; -} - -/** -* Vote represents a prevote, precommit, or commit vote from validators for -consensus. -*/ -export interface TypesVote { - /** - * SignedMsgType is a type of signed message in the consensus. - * - * - SIGNED_MSG_TYPE_PREVOTE: Votes - * - SIGNED_MSG_TYPE_PROPOSAL: Proposals - */ - type?: TypesSignedMsgType; - - /** @format int64 */ - height?: string; - - /** @format int32 */ - round?: number; - block_id?: TypesBlockID; - - /** @format date-time */ - timestamp?: string; - - /** @format byte */ - validator_address?: string; - - /** @format int32 */ - validator_index?: number; - - /** @format byte */ - signature?: string; -} - -/** - * GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. - */ -export interface V1Beta1GetBlockByHeightResponse { - block_id?: TypesBlockID; - block?: TypesBlock; -} - -/** - * GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. - */ -export interface V1Beta1GetLatestBlockResponse { - block_id?: TypesBlockID; - block?: TypesBlock; -} - -/** - * GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. - */ -export interface V1Beta1GetLatestValidatorSetResponse { - /** @format int64 */ - block_height?: string; - validators?: Tendermintv1Beta1Validator[]; - - /** pagination defines an pagination for the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. - */ -export interface V1Beta1GetNodeInfoResponse { - default_node_info?: P2PDefaultNodeInfo; - - /** VersionInfo is the type for the GetNodeInfoResponse message. */ - application_version?: V1Beta1VersionInfo; -} - -/** - * GetSyncingResponse is the response type for the Query/GetSyncing RPC method. - */ -export interface V1Beta1GetSyncingResponse { - syncing?: boolean; -} - -/** - * GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. - */ -export interface V1Beta1GetValidatorSetByHeightResponse { - /** @format int64 */ - block_height?: string; - validators?: Tendermintv1Beta1Validator[]; - - /** pagination defines an pagination for the response. */ - pagination?: V1Beta1PageResponse; -} - -export interface V1Beta1Module { - path?: string; - version?: string; - sum?: string; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - 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; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -/** - * VersionInfo is the type for the GetNodeInfoResponse message. - */ -export interface V1Beta1VersionInfo { - name?: string; - app_name?: string; - version?: string; - git_commit?: string; - build_tags?: string; - go_version?: string; - build_deps?: V1Beta1Module[]; - cosmos_sdk_version?: string; -} - -/** -* 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. -*/ -export interface VersionConsensus { - /** @format uint64 */ - block?: string; - - /** @format uint64 */ - app?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/base/tendermint/v1beta1/query.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Service - * @name ServiceGetLatestBlock - * @summary GetLatestBlock returns the latest block. - * @request GET:/cosmos/base/tendermint/v1beta1/blocks/latest - */ - serviceGetLatestBlock = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/base/tendermint/v1beta1/blocks/latest`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Service - * @name ServiceGetBlockByHeight - * @summary GetBlockByHeight queries block for given height. - * @request GET:/cosmos/base/tendermint/v1beta1/blocks/{height} - */ - serviceGetBlockByHeight = (height: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/base/tendermint/v1beta1/blocks/${height}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Service - * @name ServiceGetNodeInfo - * @summary GetNodeInfo queries the current node info. - * @request GET:/cosmos/base/tendermint/v1beta1/node_info - */ - serviceGetNodeInfo = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/base/tendermint/v1beta1/node_info`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Service - * @name ServiceGetSyncing - * @summary GetSyncing queries node syncing. - * @request GET:/cosmos/base/tendermint/v1beta1/syncing - */ - serviceGetSyncing = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/base/tendermint/v1beta1/syncing`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Service - * @name ServiceGetLatestValidatorSet - * @summary GetLatestValidatorSet queries latest validator-set. - * @request GET:/cosmos/base/tendermint/v1beta1/validatorsets/latest - */ - serviceGetLatestValidatorSet = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/base/tendermint/v1beta1/validatorsets/latest`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Service - * @name ServiceGetValidatorSetByHeight - * @summary GetValidatorSetByHeight queries validator-set at a given height. - * @request GET:/cosmos/base/tendermint/v1beta1/validatorsets/{height} - */ - serviceGetValidatorSetByHeight = ( - height: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/base/tendermint/v1beta1/validatorsets/${height}`, - method: "GET", - query: query, - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 9c87ac0c9c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - 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; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { - offset: 0, - limit: 0, - count_total: false, - reverse: false, -}; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } else { - message.reverse = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - 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; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } else { - message.reverse = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/cosmos/base/tendermint/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/cosmos/base/tendermint/v1beta1/query.ts deleted file mode 100644 index f06a1f7046..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/cosmos/base/tendermint/v1beta1/query.ts +++ /dev/null @@ -1,1584 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - PageRequest, - PageResponse, -} from "../../../../cosmos/base/query/v1beta1/pagination"; -import { Any } from "../../../../google/protobuf/any"; -import { BlockID } from "../../../../tendermint/types/types"; -import { Block } from "../../../../tendermint/types/block"; -import { DefaultNodeInfo } from "../../../../tendermint/p2p/types"; - -export const protobufPackage = "cosmos.base.tendermint.v1beta1"; - -/** GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetValidatorSetByHeightRequest { - height: number; - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetValidatorSetByHeightResponse { - block_height: number; - validators: Validator[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} - -/** GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetLatestValidatorSetRequest { - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetLatestValidatorSetResponse { - block_height: number; - validators: Validator[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} - -/** Validator is the type for the validator-set. */ -export interface Validator { - address: string; - pub_key: Any | undefined; - voting_power: number; - proposer_priority: number; -} - -/** GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. */ -export interface GetBlockByHeightRequest { - height: number; -} - -/** GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. */ -export interface GetBlockByHeightResponse { - block_id: BlockID | undefined; - block: Block | undefined; -} - -/** GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. */ -export interface GetLatestBlockRequest {} - -/** GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. */ -export interface GetLatestBlockResponse { - block_id: BlockID | undefined; - block: Block | undefined; -} - -/** GetSyncingRequest is the request type for the Query/GetSyncing RPC method. */ -export interface GetSyncingRequest {} - -/** GetSyncingResponse is the response type for the Query/GetSyncing RPC method. */ -export interface GetSyncingResponse { - syncing: boolean; -} - -/** GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. */ -export interface GetNodeInfoRequest {} - -/** GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. */ -export interface GetNodeInfoResponse { - default_node_info: DefaultNodeInfo | undefined; - application_version: VersionInfo | undefined; -} - -/** VersionInfo is the type for the GetNodeInfoResponse message. */ -export interface VersionInfo { - name: string; - app_name: string; - version: string; - git_commit: string; - build_tags: string; - go_version: string; - build_deps: Module[]; - /** Since: cosmos-sdk 0.43 */ - cosmos_sdk_version: string; -} - -/** Module is the type for VersionInfo */ -export interface Module { - /** module path */ - path: string; - /** module version */ - version: string; - /** checksum */ - sum: string; -} - -const baseGetValidatorSetByHeightRequest: object = { height: 0 }; - -export const GetValidatorSetByHeightRequest = { - encode( - message: GetValidatorSetByHeightRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GetValidatorSetByHeightRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGetValidatorSetByHeightRequest, - } as GetValidatorSetByHeightRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetValidatorSetByHeightRequest { - const message = { - ...baseGetValidatorSetByHeightRequest, - } as GetValidatorSetByHeightRequest; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: GetValidatorSetByHeightRequest): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GetValidatorSetByHeightRequest { - const message = { - ...baseGetValidatorSetByHeightRequest, - } as GetValidatorSetByHeightRequest; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseGetValidatorSetByHeightResponse: object = { block_height: 0 }; - -export const GetValidatorSetByHeightResponse = { - encode( - message: GetValidatorSetByHeightResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.block_height !== 0) { - writer.uint32(8).int64(message.block_height); - } - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GetValidatorSetByHeightResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGetValidatorSetByHeightResponse, - } as GetValidatorSetByHeightResponse; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_height = longToNumber(reader.int64() as Long); - break; - case 2: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 3: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetValidatorSetByHeightResponse { - const message = { - ...baseGetValidatorSetByHeightResponse, - } as GetValidatorSetByHeightResponse; - message.validators = []; - if (object.block_height !== undefined && object.block_height !== null) { - message.block_height = Number(object.block_height); - } else { - message.block_height = 0; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: GetValidatorSetByHeightResponse): unknown { - const obj: any = {}; - message.block_height !== undefined && - (obj.block_height = message.block_height); - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GetValidatorSetByHeightResponse { - const message = { - ...baseGetValidatorSetByHeightResponse, - } as GetValidatorSetByHeightResponse; - message.validators = []; - if (object.block_height !== undefined && object.block_height !== null) { - message.block_height = object.block_height; - } else { - message.block_height = 0; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseGetLatestValidatorSetRequest: object = {}; - -export const GetLatestValidatorSetRequest = { - encode( - message: GetLatestValidatorSetRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GetLatestValidatorSetRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGetLatestValidatorSetRequest, - } as GetLatestValidatorSetRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetLatestValidatorSetRequest { - const message = { - ...baseGetLatestValidatorSetRequest, - } as GetLatestValidatorSetRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: GetLatestValidatorSetRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GetLatestValidatorSetRequest { - const message = { - ...baseGetLatestValidatorSetRequest, - } as GetLatestValidatorSetRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseGetLatestValidatorSetResponse: object = { block_height: 0 }; - -export const GetLatestValidatorSetResponse = { - encode( - message: GetLatestValidatorSetResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.block_height !== 0) { - writer.uint32(8).int64(message.block_height); - } - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GetLatestValidatorSetResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGetLatestValidatorSetResponse, - } as GetLatestValidatorSetResponse; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_height = longToNumber(reader.int64() as Long); - break; - case 2: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 3: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetLatestValidatorSetResponse { - const message = { - ...baseGetLatestValidatorSetResponse, - } as GetLatestValidatorSetResponse; - message.validators = []; - if (object.block_height !== undefined && object.block_height !== null) { - message.block_height = Number(object.block_height); - } else { - message.block_height = 0; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: GetLatestValidatorSetResponse): unknown { - const obj: any = {}; - message.block_height !== undefined && - (obj.block_height = message.block_height); - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GetLatestValidatorSetResponse { - const message = { - ...baseGetLatestValidatorSetResponse, - } as GetLatestValidatorSetResponse; - message.validators = []; - if (object.block_height !== undefined && object.block_height !== null) { - message.block_height = object.block_height; - } else { - message.block_height = 0; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseValidator: object = { - address: "", - voting_power: 0, - proposer_priority: 0, -}; - -export const Validator = { - encode(message: Validator, writer: Writer = Writer.create()): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pub_key !== undefined) { - Any.encode(message.pub_key, writer.uint32(18).fork()).ldelim(); - } - if (message.voting_power !== 0) { - writer.uint32(24).int64(message.voting_power); - } - if (message.proposer_priority !== 0) { - writer.uint32(32).int64(message.proposer_priority); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Validator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator } as Validator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pub_key = Any.decode(reader, reader.uint32()); - break; - case 3: - message.voting_power = longToNumber(reader.int64() as Long); - break; - case 4: - message.proposer_priority = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = Any.fromJSON(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.voting_power !== undefined && object.voting_power !== null) { - message.voting_power = Number(object.voting_power); - } else { - message.voting_power = 0; - } - if ( - object.proposer_priority !== undefined && - object.proposer_priority !== null - ) { - message.proposer_priority = Number(object.proposer_priority); - } else { - message.proposer_priority = 0; - } - return message; - }, - - toJSON(message: Validator): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pub_key !== undefined && - (obj.pub_key = message.pub_key ? Any.toJSON(message.pub_key) : undefined); - message.voting_power !== undefined && - (obj.voting_power = message.voting_power); - message.proposer_priority !== undefined && - (obj.proposer_priority = message.proposer_priority); - return obj; - }, - - fromPartial(object: DeepPartial): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = Any.fromPartial(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.voting_power !== undefined && object.voting_power !== null) { - message.voting_power = object.voting_power; - } else { - message.voting_power = 0; - } - if ( - object.proposer_priority !== undefined && - object.proposer_priority !== null - ) { - message.proposer_priority = object.proposer_priority; - } else { - message.proposer_priority = 0; - } - return message; - }, -}; - -const baseGetBlockByHeightRequest: object = { height: 0 }; - -export const GetBlockByHeightRequest = { - encode( - message: GetBlockByHeightRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GetBlockByHeightRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGetBlockByHeightRequest, - } as GetBlockByHeightRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetBlockByHeightRequest { - const message = { - ...baseGetBlockByHeightRequest, - } as GetBlockByHeightRequest; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - return message; - }, - - toJSON(message: GetBlockByHeightRequest): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GetBlockByHeightRequest { - const message = { - ...baseGetBlockByHeightRequest, - } as GetBlockByHeightRequest; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - return message; - }, -}; - -const baseGetBlockByHeightResponse: object = {}; - -export const GetBlockByHeightResponse = { - encode( - message: GetBlockByHeightResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.block_id !== undefined) { - BlockID.encode(message.block_id, writer.uint32(10).fork()).ldelim(); - } - if (message.block !== undefined) { - Block.encode(message.block, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GetBlockByHeightResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGetBlockByHeightResponse, - } as GetBlockByHeightResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_id = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.block = Block.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetBlockByHeightResponse { - const message = { - ...baseGetBlockByHeightResponse, - } as GetBlockByHeightResponse; - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromJSON(object.block_id); - } else { - message.block_id = undefined; - } - if (object.block !== undefined && object.block !== null) { - message.block = Block.fromJSON(object.block); - } else { - message.block = undefined; - } - return message; - }, - - toJSON(message: GetBlockByHeightResponse): unknown { - const obj: any = {}; - message.block_id !== undefined && - (obj.block_id = message.block_id - ? BlockID.toJSON(message.block_id) - : undefined); - message.block !== undefined && - (obj.block = message.block ? Block.toJSON(message.block) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GetBlockByHeightResponse { - const message = { - ...baseGetBlockByHeightResponse, - } as GetBlockByHeightResponse; - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromPartial(object.block_id); - } else { - message.block_id = undefined; - } - if (object.block !== undefined && object.block !== null) { - message.block = Block.fromPartial(object.block); - } else { - message.block = undefined; - } - return message; - }, -}; - -const baseGetLatestBlockRequest: object = {}; - -export const GetLatestBlockRequest = { - encode(_: GetLatestBlockRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GetLatestBlockRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGetLatestBlockRequest } as GetLatestBlockRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): GetLatestBlockRequest { - const message = { ...baseGetLatestBlockRequest } as GetLatestBlockRequest; - return message; - }, - - toJSON(_: GetLatestBlockRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): GetLatestBlockRequest { - const message = { ...baseGetLatestBlockRequest } as GetLatestBlockRequest; - return message; - }, -}; - -const baseGetLatestBlockResponse: object = {}; - -export const GetLatestBlockResponse = { - encode( - message: GetLatestBlockResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.block_id !== undefined) { - BlockID.encode(message.block_id, writer.uint32(10).fork()).ldelim(); - } - if (message.block !== undefined) { - Block.encode(message.block, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GetLatestBlockResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGetLatestBlockResponse } as GetLatestBlockResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_id = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.block = Block.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetLatestBlockResponse { - const message = { ...baseGetLatestBlockResponse } as GetLatestBlockResponse; - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromJSON(object.block_id); - } else { - message.block_id = undefined; - } - if (object.block !== undefined && object.block !== null) { - message.block = Block.fromJSON(object.block); - } else { - message.block = undefined; - } - return message; - }, - - toJSON(message: GetLatestBlockResponse): unknown { - const obj: any = {}; - message.block_id !== undefined && - (obj.block_id = message.block_id - ? BlockID.toJSON(message.block_id) - : undefined); - message.block !== undefined && - (obj.block = message.block ? Block.toJSON(message.block) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GetLatestBlockResponse { - const message = { ...baseGetLatestBlockResponse } as GetLatestBlockResponse; - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromPartial(object.block_id); - } else { - message.block_id = undefined; - } - if (object.block !== undefined && object.block !== null) { - message.block = Block.fromPartial(object.block); - } else { - message.block = undefined; - } - return message; - }, -}; - -const baseGetSyncingRequest: object = {}; - -export const GetSyncingRequest = { - encode(_: GetSyncingRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GetSyncingRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGetSyncingRequest } as GetSyncingRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): GetSyncingRequest { - const message = { ...baseGetSyncingRequest } as GetSyncingRequest; - return message; - }, - - toJSON(_: GetSyncingRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): GetSyncingRequest { - const message = { ...baseGetSyncingRequest } as GetSyncingRequest; - return message; - }, -}; - -const baseGetSyncingResponse: object = { syncing: false }; - -export const GetSyncingResponse = { - encode( - message: GetSyncingResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.syncing === true) { - writer.uint32(8).bool(message.syncing); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GetSyncingResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGetSyncingResponse } as GetSyncingResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.syncing = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetSyncingResponse { - const message = { ...baseGetSyncingResponse } as GetSyncingResponse; - if (object.syncing !== undefined && object.syncing !== null) { - message.syncing = Boolean(object.syncing); - } else { - message.syncing = false; - } - return message; - }, - - toJSON(message: GetSyncingResponse): unknown { - const obj: any = {}; - message.syncing !== undefined && (obj.syncing = message.syncing); - return obj; - }, - - fromPartial(object: DeepPartial): GetSyncingResponse { - const message = { ...baseGetSyncingResponse } as GetSyncingResponse; - if (object.syncing !== undefined && object.syncing !== null) { - message.syncing = object.syncing; - } else { - message.syncing = false; - } - return message; - }, -}; - -const baseGetNodeInfoRequest: object = {}; - -export const GetNodeInfoRequest = { - encode(_: GetNodeInfoRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GetNodeInfoRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGetNodeInfoRequest } as GetNodeInfoRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): GetNodeInfoRequest { - const message = { ...baseGetNodeInfoRequest } as GetNodeInfoRequest; - return message; - }, - - toJSON(_: GetNodeInfoRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): GetNodeInfoRequest { - const message = { ...baseGetNodeInfoRequest } as GetNodeInfoRequest; - return message; - }, -}; - -const baseGetNodeInfoResponse: object = {}; - -export const GetNodeInfoResponse = { - encode( - message: GetNodeInfoResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.default_node_info !== undefined) { - DefaultNodeInfo.encode( - message.default_node_info, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.application_version !== undefined) { - VersionInfo.encode( - message.application_version, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GetNodeInfoResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGetNodeInfoResponse } as GetNodeInfoResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.default_node_info = DefaultNodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.application_version = VersionInfo.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetNodeInfoResponse { - const message = { ...baseGetNodeInfoResponse } as GetNodeInfoResponse; - if ( - object.default_node_info !== undefined && - object.default_node_info !== null - ) { - message.default_node_info = DefaultNodeInfo.fromJSON( - object.default_node_info - ); - } else { - message.default_node_info = undefined; - } - if ( - object.application_version !== undefined && - object.application_version !== null - ) { - message.application_version = VersionInfo.fromJSON( - object.application_version - ); - } else { - message.application_version = undefined; - } - return message; - }, - - toJSON(message: GetNodeInfoResponse): unknown { - const obj: any = {}; - message.default_node_info !== undefined && - (obj.default_node_info = message.default_node_info - ? DefaultNodeInfo.toJSON(message.default_node_info) - : undefined); - message.application_version !== undefined && - (obj.application_version = message.application_version - ? VersionInfo.toJSON(message.application_version) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GetNodeInfoResponse { - const message = { ...baseGetNodeInfoResponse } as GetNodeInfoResponse; - if ( - object.default_node_info !== undefined && - object.default_node_info !== null - ) { - message.default_node_info = DefaultNodeInfo.fromPartial( - object.default_node_info - ); - } else { - message.default_node_info = undefined; - } - if ( - object.application_version !== undefined && - object.application_version !== null - ) { - message.application_version = VersionInfo.fromPartial( - object.application_version - ); - } else { - message.application_version = undefined; - } - return message; - }, -}; - -const baseVersionInfo: object = { - name: "", - app_name: "", - version: "", - git_commit: "", - build_tags: "", - go_version: "", - cosmos_sdk_version: "", -}; - -export const VersionInfo = { - encode(message: VersionInfo, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.app_name !== "") { - writer.uint32(18).string(message.app_name); - } - if (message.version !== "") { - writer.uint32(26).string(message.version); - } - if (message.git_commit !== "") { - writer.uint32(34).string(message.git_commit); - } - if (message.build_tags !== "") { - writer.uint32(42).string(message.build_tags); - } - if (message.go_version !== "") { - writer.uint32(50).string(message.go_version); - } - for (const v of message.build_deps) { - Module.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.cosmos_sdk_version !== "") { - writer.uint32(66).string(message.cosmos_sdk_version); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): VersionInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVersionInfo } as VersionInfo; - message.build_deps = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.app_name = reader.string(); - break; - case 3: - message.version = reader.string(); - break; - case 4: - message.git_commit = reader.string(); - break; - case 5: - message.build_tags = reader.string(); - break; - case 6: - message.go_version = reader.string(); - break; - case 7: - message.build_deps.push(Module.decode(reader, reader.uint32())); - break; - case 8: - message.cosmos_sdk_version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): VersionInfo { - const message = { ...baseVersionInfo } as VersionInfo; - message.build_deps = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.app_name !== undefined && object.app_name !== null) { - message.app_name = String(object.app_name); - } else { - message.app_name = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } else { - message.version = ""; - } - if (object.git_commit !== undefined && object.git_commit !== null) { - message.git_commit = String(object.git_commit); - } else { - message.git_commit = ""; - } - if (object.build_tags !== undefined && object.build_tags !== null) { - message.build_tags = String(object.build_tags); - } else { - message.build_tags = ""; - } - if (object.go_version !== undefined && object.go_version !== null) { - message.go_version = String(object.go_version); - } else { - message.go_version = ""; - } - if (object.build_deps !== undefined && object.build_deps !== null) { - for (const e of object.build_deps) { - message.build_deps.push(Module.fromJSON(e)); - } - } - if ( - object.cosmos_sdk_version !== undefined && - object.cosmos_sdk_version !== null - ) { - message.cosmos_sdk_version = String(object.cosmos_sdk_version); - } else { - message.cosmos_sdk_version = ""; - } - return message; - }, - - toJSON(message: VersionInfo): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.app_name !== undefined && (obj.app_name = message.app_name); - message.version !== undefined && (obj.version = message.version); - message.git_commit !== undefined && (obj.git_commit = message.git_commit); - message.build_tags !== undefined && (obj.build_tags = message.build_tags); - message.go_version !== undefined && (obj.go_version = message.go_version); - if (message.build_deps) { - obj.build_deps = message.build_deps.map((e) => - e ? Module.toJSON(e) : undefined - ); - } else { - obj.build_deps = []; - } - message.cosmos_sdk_version !== undefined && - (obj.cosmos_sdk_version = message.cosmos_sdk_version); - return obj; - }, - - fromPartial(object: DeepPartial): VersionInfo { - const message = { ...baseVersionInfo } as VersionInfo; - message.build_deps = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.app_name !== undefined && object.app_name !== null) { - message.app_name = object.app_name; - } else { - message.app_name = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } else { - message.version = ""; - } - if (object.git_commit !== undefined && object.git_commit !== null) { - message.git_commit = object.git_commit; - } else { - message.git_commit = ""; - } - if (object.build_tags !== undefined && object.build_tags !== null) { - message.build_tags = object.build_tags; - } else { - message.build_tags = ""; - } - if (object.go_version !== undefined && object.go_version !== null) { - message.go_version = object.go_version; - } else { - message.go_version = ""; - } - if (object.build_deps !== undefined && object.build_deps !== null) { - for (const e of object.build_deps) { - message.build_deps.push(Module.fromPartial(e)); - } - } - if ( - object.cosmos_sdk_version !== undefined && - object.cosmos_sdk_version !== null - ) { - message.cosmos_sdk_version = object.cosmos_sdk_version; - } else { - message.cosmos_sdk_version = ""; - } - return message; - }, -}; - -const baseModule: object = { path: "", version: "", sum: "" }; - -export const Module = { - encode(message: Module, writer: Writer = Writer.create()): Writer { - if (message.path !== "") { - writer.uint32(10).string(message.path); - } - if (message.version !== "") { - writer.uint32(18).string(message.version); - } - if (message.sum !== "") { - writer.uint32(26).string(message.sum); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Module { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseModule } as Module; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.string(); - break; - case 2: - message.version = reader.string(); - break; - case 3: - message.sum = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Module { - const message = { ...baseModule } as Module; - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } else { - message.version = ""; - } - if (object.sum !== undefined && object.sum !== null) { - message.sum = String(object.sum); - } else { - message.sum = ""; - } - return message; - }, - - toJSON(message: Module): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = message.path); - message.version !== undefined && (obj.version = message.version); - message.sum !== undefined && (obj.sum = message.sum); - return obj; - }, - - fromPartial(object: DeepPartial): Module { - const message = { ...baseModule } as Module; - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } else { - message.version = ""; - } - if (object.sum !== undefined && object.sum !== null) { - message.sum = object.sum; - } else { - message.sum = ""; - } - return message; - }, -}; - -/** Service defines the gRPC querier service for tendermint queries. */ -export interface Service { - /** GetNodeInfo queries the current node info. */ - GetNodeInfo(request: GetNodeInfoRequest): Promise; - /** GetSyncing queries node syncing. */ - GetSyncing(request: GetSyncingRequest): Promise; - /** GetLatestBlock returns the latest block. */ - GetLatestBlock( - request: GetLatestBlockRequest - ): Promise; - /** GetBlockByHeight queries block for given height. */ - GetBlockByHeight( - request: GetBlockByHeightRequest - ): Promise; - /** GetLatestValidatorSet queries latest validator-set. */ - GetLatestValidatorSet( - request: GetLatestValidatorSetRequest - ): Promise; - /** GetValidatorSetByHeight queries validator-set at a given height. */ - GetValidatorSetByHeight( - request: GetValidatorSetByHeightRequest - ): Promise; -} - -export class ServiceClientImpl implements Service { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - GetNodeInfo(request: GetNodeInfoRequest): Promise { - const data = GetNodeInfoRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.base.tendermint.v1beta1.Service", - "GetNodeInfo", - data - ); - return promise.then((data) => GetNodeInfoResponse.decode(new Reader(data))); - } - - GetSyncing(request: GetSyncingRequest): Promise { - const data = GetSyncingRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.base.tendermint.v1beta1.Service", - "GetSyncing", - data - ); - return promise.then((data) => GetSyncingResponse.decode(new Reader(data))); - } - - GetLatestBlock( - request: GetLatestBlockRequest - ): Promise { - const data = GetLatestBlockRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.base.tendermint.v1beta1.Service", - "GetLatestBlock", - data - ); - return promise.then((data) => - GetLatestBlockResponse.decode(new Reader(data)) - ); - } - - GetBlockByHeight( - request: GetBlockByHeightRequest - ): Promise { - const data = GetBlockByHeightRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.base.tendermint.v1beta1.Service", - "GetBlockByHeight", - data - ); - return promise.then((data) => - GetBlockByHeightResponse.decode(new Reader(data)) - ); - } - - GetLatestValidatorSet( - request: GetLatestValidatorSetRequest - ): Promise { - const data = GetLatestValidatorSetRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.base.tendermint.v1beta1.Service", - "GetLatestValidatorSet", - data - ); - return promise.then((data) => - GetLatestValidatorSetResponse.decode(new Reader(data)) - ); - } - - GetValidatorSetByHeight( - request: GetValidatorSetByHeightRequest - ): Promise { - const data = GetValidatorSetByHeightRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.base.tendermint.v1beta1.Service", - "GetValidatorSetByHeight", - data - ); - return promise.then((data) => - GetValidatorSetByHeightResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/protobuf/any.ts deleted file mode 100644 index 233eae465d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - type_url: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { type_url: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.type_url !== "") { - writer.uint32(10).string(message.type_url); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = String(object.type_url); - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.type_url !== undefined && (obj.type_url = message.type_url); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = object.type_url; - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 11864afc86..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/crypto/keys.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/crypto/keys.ts deleted file mode 100644 index 450db2a15d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/crypto/keys.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.crypto"; - -/** PublicKey defines the keys available for use with Tendermint Validators */ -export interface PublicKey { - ed25519: Uint8Array | undefined; - secp256k1: Uint8Array | undefined; -} - -const basePublicKey: object = {}; - -export const PublicKey = { - encode(message: PublicKey, writer: Writer = Writer.create()): Writer { - if (message.ed25519 !== undefined) { - writer.uint32(10).bytes(message.ed25519); - } - if (message.secp256k1 !== undefined) { - writer.uint32(18).bytes(message.secp256k1); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PublicKey { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePublicKey } as PublicKey; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ed25519 = reader.bytes(); - break; - case 2: - message.secp256k1 = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PublicKey { - const message = { ...basePublicKey } as PublicKey; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = bytesFromBase64(object.ed25519); - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = bytesFromBase64(object.secp256k1); - } - return message; - }, - - toJSON(message: PublicKey): unknown { - const obj: any = {}; - message.ed25519 !== undefined && - (obj.ed25519 = - message.ed25519 !== undefined - ? base64FromBytes(message.ed25519) - : undefined); - message.secp256k1 !== undefined && - (obj.secp256k1 = - message.secp256k1 !== undefined - ? base64FromBytes(message.secp256k1) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): PublicKey { - const message = { ...basePublicKey } as PublicKey; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = object.ed25519; - } else { - message.ed25519 = undefined; - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = object.secp256k1; - } else { - message.secp256k1 = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/crypto/proof.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/crypto/proof.ts deleted file mode 100644 index db05869473..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/crypto/proof.ts +++ /dev/null @@ -1,529 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.crypto"; - -export interface Proof { - total: number; - index: number; - leaf_hash: Uint8Array; - aunts: Uint8Array[]; -} - -export interface ValueOp { - /** Encoded in ProofOp.Key. */ - key: Uint8Array; - /** To encode in ProofOp.Data */ - proof: Proof | undefined; -} - -export interface DominoOp { - key: string; - input: string; - output: string; -} - -/** - * ProofOp defines an operation used for calculating Merkle root - * The data could be arbitrary format, providing nessecary data - * for example neighbouring node hash - */ -export interface ProofOp { - type: string; - key: Uint8Array; - data: Uint8Array; -} - -/** ProofOps is Merkle proof defined by the list of ProofOps */ -export interface ProofOps { - ops: ProofOp[]; -} - -const baseProof: object = { total: 0, index: 0 }; - -export const Proof = { - encode(message: Proof, writer: Writer = Writer.create()): Writer { - if (message.total !== 0) { - writer.uint32(8).int64(message.total); - } - if (message.index !== 0) { - writer.uint32(16).int64(message.index); - } - if (message.leaf_hash.length !== 0) { - writer.uint32(26).bytes(message.leaf_hash); - } - for (const v of message.aunts) { - writer.uint32(34).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Proof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProof } as Proof; - message.aunts = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = longToNumber(reader.int64() as Long); - break; - case 2: - message.index = longToNumber(reader.int64() as Long); - break; - case 3: - message.leaf_hash = reader.bytes(); - break; - case 4: - message.aunts.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Proof { - const message = { ...baseProof } as Proof; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.leaf_hash !== undefined && object.leaf_hash !== null) { - message.leaf_hash = bytesFromBase64(object.leaf_hash); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: Proof): unknown { - const obj: any = {}; - message.total !== undefined && (obj.total = message.total); - message.index !== undefined && (obj.index = message.index); - message.leaf_hash !== undefined && - (obj.leaf_hash = base64FromBytes( - message.leaf_hash !== undefined ? message.leaf_hash : new Uint8Array() - )); - if (message.aunts) { - obj.aunts = message.aunts.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.aunts = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Proof { - const message = { ...baseProof } as Proof; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.leaf_hash !== undefined && object.leaf_hash !== null) { - message.leaf_hash = object.leaf_hash; - } else { - message.leaf_hash = new Uint8Array(); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(e); - } - } - return message; - }, -}; - -const baseValueOp: object = {}; - -export const ValueOp = { - encode(message: ValueOp, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValueOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValueOp } as ValueOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValueOp { - const message = { ...baseValueOp } as ValueOp; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: ValueOp): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ValueOp { - const message = { ...baseValueOp } as ValueOp; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -const baseDominoOp: object = { key: "", input: "", output: "" }; - -export const DominoOp = { - encode(message: DominoOp, writer: Writer = Writer.create()): Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.input !== "") { - writer.uint32(18).string(message.input); - } - if (message.output !== "") { - writer.uint32(26).string(message.output); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DominoOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDominoOp } as DominoOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.input = reader.string(); - break; - case 3: - message.output = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DominoOp { - const message = { ...baseDominoOp } as DominoOp; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = String(object.input); - } else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = String(object.output); - } else { - message.output = ""; - } - return message; - }, - - toJSON(message: DominoOp): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.input !== undefined && (obj.input = message.input); - message.output !== undefined && (obj.output = message.output); - return obj; - }, - - fromPartial(object: DeepPartial): DominoOp { - const message = { ...baseDominoOp } as DominoOp; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = object.input; - } else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = object.output; - } else { - message.output = ""; - } - return message; - }, -}; - -const baseProofOp: object = { type: "" }; - -export const ProofOp = { - encode(message: ProofOp, writer: Writer = Writer.create()): Writer { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - if (message.key.length !== 0) { - writer.uint32(18).bytes(message.key); - } - if (message.data.length !== 0) { - writer.uint32(26).bytes(message.data); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ProofOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOp } as ProofOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.key = reader.bytes(); - break; - case 3: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ProofOp { - const message = { ...baseProofOp } as ProofOp; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: ProofOp): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): ProofOp { - const message = { ...baseProofOp } as ProofOp; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseProofOps: object = {}; - -export const ProofOps = { - encode(message: ProofOps, writer: Writer = Writer.create()): Writer { - for (const v of message.ops) { - ProofOp.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ProofOps { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ops.push(ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ProofOps { - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ProofOps): unknown { - const obj: any = {}; - if (message.ops) { - obj.ops = message.ops.map((e) => (e ? ProofOp.toJSON(e) : undefined)); - } else { - obj.ops = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ProofOps { - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/p2p/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/p2p/types.ts deleted file mode 100644 index 919ca4973b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/p2p/types.ts +++ /dev/null @@ -1,557 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.p2p"; - -export interface NetAddress { - id: string; - ip: string; - port: number; -} - -export interface ProtocolVersion { - p2p: number; - block: number; - app: number; -} - -export interface DefaultNodeInfo { - protocol_version: ProtocolVersion | undefined; - default_node_id: string; - listen_addr: string; - network: string; - version: string; - channels: Uint8Array; - moniker: string; - other: DefaultNodeInfoOther | undefined; -} - -export interface DefaultNodeInfoOther { - tx_index: string; - rpc_address: string; -} - -const baseNetAddress: object = { id: "", ip: "", port: 0 }; - -export const NetAddress = { - encode(message: NetAddress, writer: Writer = Writer.create()): Writer { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.ip !== "") { - writer.uint32(18).string(message.ip); - } - if (message.port !== 0) { - writer.uint32(24).uint32(message.port); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): NetAddress { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseNetAddress } as NetAddress; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.ip = reader.string(); - break; - case 3: - message.port = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): NetAddress { - const message = { ...baseNetAddress } as NetAddress; - if (object.id !== undefined && object.id !== null) { - message.id = String(object.id); - } else { - message.id = ""; - } - if (object.ip !== undefined && object.ip !== null) { - message.ip = String(object.ip); - } else { - message.ip = ""; - } - if (object.port !== undefined && object.port !== null) { - message.port = Number(object.port); - } else { - message.port = 0; - } - return message; - }, - - toJSON(message: NetAddress): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.ip !== undefined && (obj.ip = message.ip); - message.port !== undefined && (obj.port = message.port); - return obj; - }, - - fromPartial(object: DeepPartial): NetAddress { - const message = { ...baseNetAddress } as NetAddress; - if (object.id !== undefined && object.id !== null) { - message.id = object.id; - } else { - message.id = ""; - } - if (object.ip !== undefined && object.ip !== null) { - message.ip = object.ip; - } else { - message.ip = ""; - } - if (object.port !== undefined && object.port !== null) { - message.port = object.port; - } else { - message.port = 0; - } - return message; - }, -}; - -const baseProtocolVersion: object = { p2p: 0, block: 0, app: 0 }; - -export const ProtocolVersion = { - encode(message: ProtocolVersion, writer: Writer = Writer.create()): Writer { - if (message.p2p !== 0) { - writer.uint32(8).uint64(message.p2p); - } - if (message.block !== 0) { - writer.uint32(16).uint64(message.block); - } - if (message.app !== 0) { - writer.uint32(24).uint64(message.app); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ProtocolVersion { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProtocolVersion } as ProtocolVersion; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.p2p = longToNumber(reader.uint64() as Long); - break; - case 2: - message.block = longToNumber(reader.uint64() as Long); - break; - case 3: - message.app = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ProtocolVersion { - const message = { ...baseProtocolVersion } as ProtocolVersion; - if (object.p2p !== undefined && object.p2p !== null) { - message.p2p = Number(object.p2p); - } else { - message.p2p = 0; - } - if (object.block !== undefined && object.block !== null) { - message.block = Number(object.block); - } else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = Number(object.app); - } else { - message.app = 0; - } - return message; - }, - - toJSON(message: ProtocolVersion): unknown { - const obj: any = {}; - message.p2p !== undefined && (obj.p2p = message.p2p); - message.block !== undefined && (obj.block = message.block); - message.app !== undefined && (obj.app = message.app); - return obj; - }, - - fromPartial(object: DeepPartial): ProtocolVersion { - const message = { ...baseProtocolVersion } as ProtocolVersion; - if (object.p2p !== undefined && object.p2p !== null) { - message.p2p = object.p2p; - } else { - message.p2p = 0; - } - if (object.block !== undefined && object.block !== null) { - message.block = object.block; - } else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = object.app; - } else { - message.app = 0; - } - return message; - }, -}; - -const baseDefaultNodeInfo: object = { - default_node_id: "", - listen_addr: "", - network: "", - version: "", - moniker: "", -}; - -export const DefaultNodeInfo = { - encode(message: DefaultNodeInfo, writer: Writer = Writer.create()): Writer { - if (message.protocol_version !== undefined) { - ProtocolVersion.encode( - message.protocol_version, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.default_node_id !== "") { - writer.uint32(18).string(message.default_node_id); - } - if (message.listen_addr !== "") { - writer.uint32(26).string(message.listen_addr); - } - if (message.network !== "") { - writer.uint32(34).string(message.network); - } - if (message.version !== "") { - writer.uint32(42).string(message.version); - } - if (message.channels.length !== 0) { - writer.uint32(50).bytes(message.channels); - } - if (message.moniker !== "") { - writer.uint32(58).string(message.moniker); - } - if (message.other !== undefined) { - DefaultNodeInfoOther.encode( - message.other, - writer.uint32(66).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DefaultNodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDefaultNodeInfo } as DefaultNodeInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocol_version = ProtocolVersion.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.default_node_id = reader.string(); - break; - case 3: - message.listen_addr = reader.string(); - break; - case 4: - message.network = reader.string(); - break; - case 5: - message.version = reader.string(); - break; - case 6: - message.channels = reader.bytes(); - break; - case 7: - message.moniker = reader.string(); - break; - case 8: - message.other = DefaultNodeInfoOther.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DefaultNodeInfo { - const message = { ...baseDefaultNodeInfo } as DefaultNodeInfo; - if ( - object.protocol_version !== undefined && - object.protocol_version !== null - ) { - message.protocol_version = ProtocolVersion.fromJSON( - object.protocol_version - ); - } else { - message.protocol_version = undefined; - } - if ( - object.default_node_id !== undefined && - object.default_node_id !== null - ) { - message.default_node_id = String(object.default_node_id); - } else { - message.default_node_id = ""; - } - if (object.listen_addr !== undefined && object.listen_addr !== null) { - message.listen_addr = String(object.listen_addr); - } else { - message.listen_addr = ""; - } - if (object.network !== undefined && object.network !== null) { - message.network = String(object.network); - } else { - message.network = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } else { - message.version = ""; - } - if (object.channels !== undefined && object.channels !== null) { - message.channels = bytesFromBase64(object.channels); - } - if (object.moniker !== undefined && object.moniker !== null) { - message.moniker = String(object.moniker); - } else { - message.moniker = ""; - } - if (object.other !== undefined && object.other !== null) { - message.other = DefaultNodeInfoOther.fromJSON(object.other); - } else { - message.other = undefined; - } - return message; - }, - - toJSON(message: DefaultNodeInfo): unknown { - const obj: any = {}; - message.protocol_version !== undefined && - (obj.protocol_version = message.protocol_version - ? ProtocolVersion.toJSON(message.protocol_version) - : undefined); - message.default_node_id !== undefined && - (obj.default_node_id = message.default_node_id); - message.listen_addr !== undefined && - (obj.listen_addr = message.listen_addr); - message.network !== undefined && (obj.network = message.network); - message.version !== undefined && (obj.version = message.version); - message.channels !== undefined && - (obj.channels = base64FromBytes( - message.channels !== undefined ? message.channels : new Uint8Array() - )); - message.moniker !== undefined && (obj.moniker = message.moniker); - message.other !== undefined && - (obj.other = message.other - ? DefaultNodeInfoOther.toJSON(message.other) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): DefaultNodeInfo { - const message = { ...baseDefaultNodeInfo } as DefaultNodeInfo; - if ( - object.protocol_version !== undefined && - object.protocol_version !== null - ) { - message.protocol_version = ProtocolVersion.fromPartial( - object.protocol_version - ); - } else { - message.protocol_version = undefined; - } - if ( - object.default_node_id !== undefined && - object.default_node_id !== null - ) { - message.default_node_id = object.default_node_id; - } else { - message.default_node_id = ""; - } - if (object.listen_addr !== undefined && object.listen_addr !== null) { - message.listen_addr = object.listen_addr; - } else { - message.listen_addr = ""; - } - if (object.network !== undefined && object.network !== null) { - message.network = object.network; - } else { - message.network = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } else { - message.version = ""; - } - if (object.channels !== undefined && object.channels !== null) { - message.channels = object.channels; - } else { - message.channels = new Uint8Array(); - } - if (object.moniker !== undefined && object.moniker !== null) { - message.moniker = object.moniker; - } else { - message.moniker = ""; - } - if (object.other !== undefined && object.other !== null) { - message.other = DefaultNodeInfoOther.fromPartial(object.other); - } else { - message.other = undefined; - } - return message; - }, -}; - -const baseDefaultNodeInfoOther: object = { tx_index: "", rpc_address: "" }; - -export const DefaultNodeInfoOther = { - encode( - message: DefaultNodeInfoOther, - writer: Writer = Writer.create() - ): Writer { - if (message.tx_index !== "") { - writer.uint32(10).string(message.tx_index); - } - if (message.rpc_address !== "") { - writer.uint32(18).string(message.rpc_address); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DefaultNodeInfoOther { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDefaultNodeInfoOther } as DefaultNodeInfoOther; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx_index = reader.string(); - break; - case 2: - message.rpc_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DefaultNodeInfoOther { - const message = { ...baseDefaultNodeInfoOther } as DefaultNodeInfoOther; - if (object.tx_index !== undefined && object.tx_index !== null) { - message.tx_index = String(object.tx_index); - } else { - message.tx_index = ""; - } - if (object.rpc_address !== undefined && object.rpc_address !== null) { - message.rpc_address = String(object.rpc_address); - } else { - message.rpc_address = ""; - } - return message; - }, - - toJSON(message: DefaultNodeInfoOther): unknown { - const obj: any = {}; - message.tx_index !== undefined && (obj.tx_index = message.tx_index); - message.rpc_address !== undefined && - (obj.rpc_address = message.rpc_address); - return obj; - }, - - fromPartial(object: DeepPartial): DefaultNodeInfoOther { - const message = { ...baseDefaultNodeInfoOther } as DefaultNodeInfoOther; - if (object.tx_index !== undefined && object.tx_index !== null) { - message.tx_index = object.tx_index; - } else { - message.tx_index = ""; - } - if (object.rpc_address !== undefined && object.rpc_address !== null) { - message.rpc_address = object.rpc_address; - } else { - message.rpc_address = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/block.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/block.ts deleted file mode 100644 index 8c97308fd5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/block.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* eslint-disable */ -import { Header, Data, Commit } from "../../tendermint/types/types"; -import { EvidenceList } from "../../tendermint/types/evidence"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.types"; - -export interface Block { - header: Header | undefined; - data: Data | undefined; - evidence: EvidenceList | undefined; - last_commit: Commit | undefined; -} - -const baseBlock: object = {}; - -export const Block = { - encode(message: Block, writer: Writer = Writer.create()): Writer { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.data !== undefined) { - Data.encode(message.data, writer.uint32(18).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceList.encode(message.evidence, writer.uint32(26).fork()).ldelim(); - } - if (message.last_commit !== undefined) { - Commit.encode(message.last_commit, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Block { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlock } as Block; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.data = Data.decode(reader, reader.uint32()); - break; - case 3: - message.evidence = EvidenceList.decode(reader, reader.uint32()); - break; - case 4: - message.last_commit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Block { - const message = { ...baseBlock } as Block; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.data !== undefined && object.data !== null) { - message.data = Data.fromJSON(object.data); - } else { - message.data = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceList.fromJSON(object.evidence); - } else { - message.evidence = undefined; - } - if (object.last_commit !== undefined && object.last_commit !== null) { - message.last_commit = Commit.fromJSON(object.last_commit); - } else { - message.last_commit = undefined; - } - return message; - }, - - toJSON(message: Block): unknown { - const obj: any = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.data !== undefined && - (obj.data = message.data ? Data.toJSON(message.data) : undefined); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? EvidenceList.toJSON(message.evidence) - : undefined); - message.last_commit !== undefined && - (obj.last_commit = message.last_commit - ? Commit.toJSON(message.last_commit) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Block { - const message = { ...baseBlock } as Block; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.data !== undefined && object.data !== null) { - message.data = Data.fromPartial(object.data); - } else { - message.data = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceList.fromPartial(object.evidence); - } else { - message.evidence = undefined; - } - if (object.last_commit !== undefined && object.last_commit !== null) { - message.last_commit = Commit.fromPartial(object.last_commit); - } else { - message.last_commit = undefined; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/evidence.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/evidence.ts deleted file mode 100644 index 17994953ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/evidence.ts +++ /dev/null @@ -1,611 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Vote, LightBlock } from "../../tendermint/types/types"; -import { Validator } from "../../tendermint/types/validator"; - -export const protobufPackage = "tendermint.types"; - -export interface Evidence { - duplicate_vote_evidence: DuplicateVoteEvidence | undefined; - light_client_attack_evidence: LightClientAttackEvidence | undefined; -} - -/** DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. */ -export interface DuplicateVoteEvidence { - vote_a: Vote | undefined; - vote_b: Vote | undefined; - total_voting_power: number; - validator_power: number; - timestamp: Date | undefined; -} - -/** LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. */ -export interface LightClientAttackEvidence { - conflicting_block: LightBlock | undefined; - common_height: number; - byzantine_validators: Validator[]; - total_voting_power: number; - timestamp: Date | undefined; -} - -export interface EvidenceList { - evidence: Evidence[]; -} - -const baseEvidence: object = {}; - -export const Evidence = { - encode(message: Evidence, writer: Writer = Writer.create()): Writer { - if (message.duplicate_vote_evidence !== undefined) { - DuplicateVoteEvidence.encode( - message.duplicate_vote_evidence, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.light_client_attack_evidence !== undefined) { - LightClientAttackEvidence.encode( - message.light_client_attack_evidence, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Evidence { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvidence } as Evidence; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.duplicate_vote_evidence = DuplicateVoteEvidence.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.light_client_attack_evidence = LightClientAttackEvidence.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Evidence { - const message = { ...baseEvidence } as Evidence; - if ( - object.duplicate_vote_evidence !== undefined && - object.duplicate_vote_evidence !== null - ) { - message.duplicate_vote_evidence = DuplicateVoteEvidence.fromJSON( - object.duplicate_vote_evidence - ); - } else { - message.duplicate_vote_evidence = undefined; - } - if ( - object.light_client_attack_evidence !== undefined && - object.light_client_attack_evidence !== null - ) { - message.light_client_attack_evidence = LightClientAttackEvidence.fromJSON( - object.light_client_attack_evidence - ); - } else { - message.light_client_attack_evidence = undefined; - } - return message; - }, - - toJSON(message: Evidence): unknown { - const obj: any = {}; - message.duplicate_vote_evidence !== undefined && - (obj.duplicate_vote_evidence = message.duplicate_vote_evidence - ? DuplicateVoteEvidence.toJSON(message.duplicate_vote_evidence) - : undefined); - message.light_client_attack_evidence !== undefined && - (obj.light_client_attack_evidence = message.light_client_attack_evidence - ? LightClientAttackEvidence.toJSON(message.light_client_attack_evidence) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Evidence { - const message = { ...baseEvidence } as Evidence; - if ( - object.duplicate_vote_evidence !== undefined && - object.duplicate_vote_evidence !== null - ) { - message.duplicate_vote_evidence = DuplicateVoteEvidence.fromPartial( - object.duplicate_vote_evidence - ); - } else { - message.duplicate_vote_evidence = undefined; - } - if ( - object.light_client_attack_evidence !== undefined && - object.light_client_attack_evidence !== null - ) { - message.light_client_attack_evidence = LightClientAttackEvidence.fromPartial( - object.light_client_attack_evidence - ); - } else { - message.light_client_attack_evidence = undefined; - } - return message; - }, -}; - -const baseDuplicateVoteEvidence: object = { - total_voting_power: 0, - validator_power: 0, -}; - -export const DuplicateVoteEvidence = { - encode( - message: DuplicateVoteEvidence, - writer: Writer = Writer.create() - ): Writer { - if (message.vote_a !== undefined) { - Vote.encode(message.vote_a, writer.uint32(10).fork()).ldelim(); - } - if (message.vote_b !== undefined) { - Vote.encode(message.vote_b, writer.uint32(18).fork()).ldelim(); - } - if (message.total_voting_power !== 0) { - writer.uint32(24).int64(message.total_voting_power); - } - if (message.validator_power !== 0) { - writer.uint32(32).int64(message.validator_power); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(42).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DuplicateVoteEvidence { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuplicateVoteEvidence } as DuplicateVoteEvidence; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.vote_a = Vote.decode(reader, reader.uint32()); - break; - case 2: - message.vote_b = Vote.decode(reader, reader.uint32()); - break; - case 3: - message.total_voting_power = longToNumber(reader.int64() as Long); - break; - case 4: - message.validator_power = longToNumber(reader.int64() as Long); - break; - case 5: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DuplicateVoteEvidence { - const message = { ...baseDuplicateVoteEvidence } as DuplicateVoteEvidence; - if (object.vote_a !== undefined && object.vote_a !== null) { - message.vote_a = Vote.fromJSON(object.vote_a); - } else { - message.vote_a = undefined; - } - if (object.vote_b !== undefined && object.vote_b !== null) { - message.vote_b = Vote.fromJSON(object.vote_b); - } else { - message.vote_b = undefined; - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = Number(object.total_voting_power); - } else { - message.total_voting_power = 0; - } - if ( - object.validator_power !== undefined && - object.validator_power !== null - ) { - message.validator_power = Number(object.validator_power); - } else { - message.validator_power = 0; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - return message; - }, - - toJSON(message: DuplicateVoteEvidence): unknown { - const obj: any = {}; - message.vote_a !== undefined && - (obj.vote_a = message.vote_a ? Vote.toJSON(message.vote_a) : undefined); - message.vote_b !== undefined && - (obj.vote_b = message.vote_b ? Vote.toJSON(message.vote_b) : undefined); - message.total_voting_power !== undefined && - (obj.total_voting_power = message.total_voting_power); - message.validator_power !== undefined && - (obj.validator_power = message.validator_power); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DuplicateVoteEvidence { - const message = { ...baseDuplicateVoteEvidence } as DuplicateVoteEvidence; - if (object.vote_a !== undefined && object.vote_a !== null) { - message.vote_a = Vote.fromPartial(object.vote_a); - } else { - message.vote_a = undefined; - } - if (object.vote_b !== undefined && object.vote_b !== null) { - message.vote_b = Vote.fromPartial(object.vote_b); - } else { - message.vote_b = undefined; - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = object.total_voting_power; - } else { - message.total_voting_power = 0; - } - if ( - object.validator_power !== undefined && - object.validator_power !== null - ) { - message.validator_power = object.validator_power; - } else { - message.validator_power = 0; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - return message; - }, -}; - -const baseLightClientAttackEvidence: object = { - common_height: 0, - total_voting_power: 0, -}; - -export const LightClientAttackEvidence = { - encode( - message: LightClientAttackEvidence, - writer: Writer = Writer.create() - ): Writer { - if (message.conflicting_block !== undefined) { - LightBlock.encode( - message.conflicting_block, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.common_height !== 0) { - writer.uint32(16).int64(message.common_height); - } - for (const v of message.byzantine_validators) { - Validator.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.total_voting_power !== 0) { - writer.uint32(32).int64(message.total_voting_power); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(42).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): LightClientAttackEvidence { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseLightClientAttackEvidence, - } as LightClientAttackEvidence; - message.byzantine_validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.conflicting_block = LightBlock.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.common_height = longToNumber(reader.int64() as Long); - break; - case 3: - message.byzantine_validators.push( - Validator.decode(reader, reader.uint32()) - ); - break; - case 4: - message.total_voting_power = longToNumber(reader.int64() as Long); - break; - case 5: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LightClientAttackEvidence { - const message = { - ...baseLightClientAttackEvidence, - } as LightClientAttackEvidence; - message.byzantine_validators = []; - if ( - object.conflicting_block !== undefined && - object.conflicting_block !== null - ) { - message.conflicting_block = LightBlock.fromJSON(object.conflicting_block); - } else { - message.conflicting_block = undefined; - } - if (object.common_height !== undefined && object.common_height !== null) { - message.common_height = Number(object.common_height); - } else { - message.common_height = 0; - } - if ( - object.byzantine_validators !== undefined && - object.byzantine_validators !== null - ) { - for (const e of object.byzantine_validators) { - message.byzantine_validators.push(Validator.fromJSON(e)); - } - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = Number(object.total_voting_power); - } else { - message.total_voting_power = 0; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - return message; - }, - - toJSON(message: LightClientAttackEvidence): unknown { - const obj: any = {}; - message.conflicting_block !== undefined && - (obj.conflicting_block = message.conflicting_block - ? LightBlock.toJSON(message.conflicting_block) - : undefined); - message.common_height !== undefined && - (obj.common_height = message.common_height); - if (message.byzantine_validators) { - obj.byzantine_validators = message.byzantine_validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.byzantine_validators = []; - } - message.total_voting_power !== undefined && - (obj.total_voting_power = message.total_voting_power); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - return obj; - }, - - fromPartial( - object: DeepPartial - ): LightClientAttackEvidence { - const message = { - ...baseLightClientAttackEvidence, - } as LightClientAttackEvidence; - message.byzantine_validators = []; - if ( - object.conflicting_block !== undefined && - object.conflicting_block !== null - ) { - message.conflicting_block = LightBlock.fromPartial( - object.conflicting_block - ); - } else { - message.conflicting_block = undefined; - } - if (object.common_height !== undefined && object.common_height !== null) { - message.common_height = object.common_height; - } else { - message.common_height = 0; - } - if ( - object.byzantine_validators !== undefined && - object.byzantine_validators !== null - ) { - for (const e of object.byzantine_validators) { - message.byzantine_validators.push(Validator.fromPartial(e)); - } - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = object.total_voting_power; - } else { - message.total_voting_power = 0; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - return message; - }, -}; - -const baseEvidenceList: object = {}; - -export const EvidenceList = { - encode(message: EvidenceList, writer: Writer = Writer.create()): Writer { - for (const v of message.evidence) { - Evidence.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EvidenceList { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvidenceList } as EvidenceList; - message.evidence = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence.push(Evidence.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EvidenceList { - const message = { ...baseEvidenceList } as EvidenceList; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Evidence.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EvidenceList): unknown { - const obj: any = {}; - if (message.evidence) { - obj.evidence = message.evidence.map((e) => - e ? Evidence.toJSON(e) : undefined - ); - } else { - obj.evidence = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EvidenceList { - const message = { ...baseEvidenceList } as EvidenceList; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Evidence.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/types.ts deleted file mode 100644 index 59a41a8e5b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/types.ts +++ /dev/null @@ -1,1943 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Proof } from "../../tendermint/crypto/proof"; -import { Consensus } from "../../tendermint/version/types"; -import { ValidatorSet } from "../../tendermint/types/validator"; - -export const protobufPackage = "tendermint.types"; - -/** BlockIdFlag indicates which BlcokID the signature is for */ -export enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0, - BLOCK_ID_FLAG_ABSENT = 1, - BLOCK_ID_FLAG_COMMIT = 2, - BLOCK_ID_FLAG_NIL = 3, - UNRECOGNIZED = -1, -} - -export function blockIDFlagFromJSON(object: any): BlockIDFlag { - switch (object) { - case 0: - case "BLOCK_ID_FLAG_UNKNOWN": - return BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN; - case 1: - case "BLOCK_ID_FLAG_ABSENT": - return BlockIDFlag.BLOCK_ID_FLAG_ABSENT; - case 2: - case "BLOCK_ID_FLAG_COMMIT": - return BlockIDFlag.BLOCK_ID_FLAG_COMMIT; - case 3: - case "BLOCK_ID_FLAG_NIL": - return BlockIDFlag.BLOCK_ID_FLAG_NIL; - case -1: - case "UNRECOGNIZED": - default: - return BlockIDFlag.UNRECOGNIZED; - } -} - -export function blockIDFlagToJSON(object: BlockIDFlag): string { - switch (object) { - case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN: - return "BLOCK_ID_FLAG_UNKNOWN"; - case BlockIDFlag.BLOCK_ID_FLAG_ABSENT: - return "BLOCK_ID_FLAG_ABSENT"; - case BlockIDFlag.BLOCK_ID_FLAG_COMMIT: - return "BLOCK_ID_FLAG_COMMIT"; - case BlockIDFlag.BLOCK_ID_FLAG_NIL: - return "BLOCK_ID_FLAG_NIL"; - default: - return "UNKNOWN"; - } -} - -/** SignedMsgType is a type of signed message in the consensus. */ -export enum SignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = 0, - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SIGNED_MSG_TYPE_PREVOTE = 1, - SIGNED_MSG_TYPE_PRECOMMIT = 2, - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SIGNED_MSG_TYPE_PROPOSAL = 32, - UNRECOGNIZED = -1, -} - -export function signedMsgTypeFromJSON(object: any): SignedMsgType { - switch (object) { - case 0: - case "SIGNED_MSG_TYPE_UNKNOWN": - return SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN; - case 1: - case "SIGNED_MSG_TYPE_PREVOTE": - return SignedMsgType.SIGNED_MSG_TYPE_PREVOTE; - case 2: - case "SIGNED_MSG_TYPE_PRECOMMIT": - return SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT; - case 32: - case "SIGNED_MSG_TYPE_PROPOSAL": - return SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL; - case -1: - case "UNRECOGNIZED": - default: - return SignedMsgType.UNRECOGNIZED; - } -} - -export function signedMsgTypeToJSON(object: SignedMsgType): string { - switch (object) { - case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN: - return "SIGNED_MSG_TYPE_UNKNOWN"; - case SignedMsgType.SIGNED_MSG_TYPE_PREVOTE: - return "SIGNED_MSG_TYPE_PREVOTE"; - case SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT: - return "SIGNED_MSG_TYPE_PRECOMMIT"; - case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL: - return "SIGNED_MSG_TYPE_PROPOSAL"; - default: - return "UNKNOWN"; - } -} - -/** PartsetHeader */ -export interface PartSetHeader { - total: number; - hash: Uint8Array; -} - -export interface Part { - index: number; - bytes: Uint8Array; - proof: Proof | undefined; -} - -/** BlockID */ -export interface BlockID { - hash: Uint8Array; - part_set_header: PartSetHeader | undefined; -} - -/** Header defines the structure of a Tendermint block header. */ -export interface Header { - /** basic block info */ - version: Consensus | undefined; - chain_id: string; - height: number; - time: Date | undefined; - /** prev block info */ - last_block_id: BlockID | undefined; - /** hashes of block data */ - last_commit_hash: Uint8Array; - /** transactions */ - data_hash: Uint8Array; - /** hashes from the app output from the prev block */ - validators_hash: Uint8Array; - /** validators for the next block */ - next_validators_hash: Uint8Array; - /** consensus params for current block */ - consensus_hash: Uint8Array; - /** state after txs from the previous block */ - app_hash: Uint8Array; - /** root hash of all results from the txs from the previous block */ - last_results_hash: Uint8Array; - /** consensus info */ - evidence_hash: Uint8Array; - /** original proposer of the block */ - proposer_address: Uint8Array; -} - -/** Data contains the set of transactions included in the block */ -export interface Data { - /** - * 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. - */ - txs: Uint8Array[]; -} - -/** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ -export interface Vote { - type: SignedMsgType; - height: number; - round: number; - /** zero if vote is nil. */ - block_id: BlockID | undefined; - timestamp: Date | undefined; - validator_address: Uint8Array; - validator_index: number; - signature: Uint8Array; -} - -/** Commit contains the evidence that a block was committed by a set of validators. */ -export interface Commit { - height: number; - round: number; - block_id: BlockID | undefined; - signatures: CommitSig[]; -} - -/** CommitSig is a part of the Vote included in a Commit. */ -export interface CommitSig { - block_id_flag: BlockIDFlag; - validator_address: Uint8Array; - timestamp: Date | undefined; - signature: Uint8Array; -} - -export interface Proposal { - type: SignedMsgType; - height: number; - round: number; - pol_round: number; - block_id: BlockID | undefined; - timestamp: Date | undefined; - signature: Uint8Array; -} - -export interface SignedHeader { - header: Header | undefined; - commit: Commit | undefined; -} - -export interface LightBlock { - signed_header: SignedHeader | undefined; - validator_set: ValidatorSet | undefined; -} - -export interface BlockMeta { - block_id: BlockID | undefined; - block_size: number; - header: Header | undefined; - num_txs: number; -} - -/** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ -export interface TxProof { - root_hash: Uint8Array; - data: Uint8Array; - proof: Proof | undefined; -} - -const basePartSetHeader: object = { total: 0 }; - -export const PartSetHeader = { - encode(message: PartSetHeader, writer: Writer = Writer.create()): Writer { - if (message.total !== 0) { - writer.uint32(8).uint32(message.total); - } - if (message.hash.length !== 0) { - writer.uint32(18).bytes(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PartSetHeader { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePartSetHeader } as PartSetHeader; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.uint32(); - break; - case 2: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PartSetHeader { - const message = { ...basePartSetHeader } as PartSetHeader; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - - toJSON(message: PartSetHeader): unknown { - const obj: any = {}; - message.total !== undefined && (obj.total = message.total); - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): PartSetHeader { - const message = { ...basePartSetHeader } as PartSetHeader; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - return message; - }, -}; - -const basePart: object = { index: 0 }; - -export const Part = { - encode(message: Part, writer: Writer = Writer.create()): Writer { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.bytes.length !== 0) { - writer.uint32(18).bytes(message.bytes); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Part { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePart } as Part; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Part { - const message = { ...basePart } as Part; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = bytesFromBase64(object.bytes); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: Part): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = message.index); - message.bytes !== undefined && - (obj.bytes = base64FromBytes( - message.bytes !== undefined ? message.bytes : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Part { - const message = { ...basePart } as Part; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = object.bytes; - } else { - message.bytes = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -const baseBlockID: object = {}; - -export const BlockID = { - encode(message: BlockID, writer: Writer = Writer.create()): Writer { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.part_set_header !== undefined) { - PartSetHeader.encode( - message.part_set_header, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockID { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockID } as BlockID; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.part_set_header = PartSetHeader.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockID { - const message = { ...baseBlockID } as BlockID; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if ( - object.part_set_header !== undefined && - object.part_set_header !== null - ) { - message.part_set_header = PartSetHeader.fromJSON(object.part_set_header); - } else { - message.part_set_header = undefined; - } - return message; - }, - - toJSON(message: BlockID): unknown { - const obj: any = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - message.part_set_header !== undefined && - (obj.part_set_header = message.part_set_header - ? PartSetHeader.toJSON(message.part_set_header) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): BlockID { - const message = { ...baseBlockID } as BlockID; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - if ( - object.part_set_header !== undefined && - object.part_set_header !== null - ) { - message.part_set_header = PartSetHeader.fromPartial( - object.part_set_header - ); - } else { - message.part_set_header = undefined; - } - return message; - }, -}; - -const baseHeader: object = { chain_id: "", height: 0 }; - -export const Header = { - encode(message: Header, writer: Writer = Writer.create()): Writer { - if (message.version !== undefined) { - Consensus.encode(message.version, writer.uint32(10).fork()).ldelim(); - } - if (message.chain_id !== "") { - writer.uint32(18).string(message.chain_id); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(34).fork() - ).ldelim(); - } - if (message.last_block_id !== undefined) { - BlockID.encode(message.last_block_id, writer.uint32(42).fork()).ldelim(); - } - if (message.last_commit_hash.length !== 0) { - writer.uint32(50).bytes(message.last_commit_hash); - } - if (message.data_hash.length !== 0) { - writer.uint32(58).bytes(message.data_hash); - } - if (message.validators_hash.length !== 0) { - writer.uint32(66).bytes(message.validators_hash); - } - if (message.next_validators_hash.length !== 0) { - writer.uint32(74).bytes(message.next_validators_hash); - } - if (message.consensus_hash.length !== 0) { - writer.uint32(82).bytes(message.consensus_hash); - } - if (message.app_hash.length !== 0) { - writer.uint32(90).bytes(message.app_hash); - } - if (message.last_results_hash.length !== 0) { - writer.uint32(98).bytes(message.last_results_hash); - } - if (message.evidence_hash.length !== 0) { - writer.uint32(106).bytes(message.evidence_hash); - } - if (message.proposer_address.length !== 0) { - writer.uint32(114).bytes(message.proposer_address); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Header { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeader } as Header; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chain_id = reader.string(); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 5: - message.last_block_id = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.last_commit_hash = reader.bytes(); - break; - case 7: - message.data_hash = reader.bytes(); - break; - case 8: - message.validators_hash = reader.bytes(); - break; - case 9: - message.next_validators_hash = reader.bytes(); - break; - case 10: - message.consensus_hash = reader.bytes(); - break; - case 11: - message.app_hash = reader.bytes(); - break; - case 12: - message.last_results_hash = reader.bytes(); - break; - case 13: - message.evidence_hash = reader.bytes(); - break; - case 14: - message.proposer_address = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Header { - const message = { ...baseHeader } as Header; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromJSON(object.version); - } else { - message.version = undefined; - } - if (object.chain_id !== undefined && object.chain_id !== null) { - message.chain_id = String(object.chain_id); - } else { - message.chain_id = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.last_block_id !== undefined && object.last_block_id !== null) { - message.last_block_id = BlockID.fromJSON(object.last_block_id); - } else { - message.last_block_id = undefined; - } - if ( - object.last_commit_hash !== undefined && - object.last_commit_hash !== null - ) { - message.last_commit_hash = bytesFromBase64(object.last_commit_hash); - } - if (object.data_hash !== undefined && object.data_hash !== null) { - message.data_hash = bytesFromBase64(object.data_hash); - } - if ( - object.validators_hash !== undefined && - object.validators_hash !== null - ) { - message.validators_hash = bytesFromBase64(object.validators_hash); - } - if ( - object.next_validators_hash !== undefined && - object.next_validators_hash !== null - ) { - message.next_validators_hash = bytesFromBase64( - object.next_validators_hash - ); - } - if (object.consensus_hash !== undefined && object.consensus_hash !== null) { - message.consensus_hash = bytesFromBase64(object.consensus_hash); - } - if (object.app_hash !== undefined && object.app_hash !== null) { - message.app_hash = bytesFromBase64(object.app_hash); - } - if ( - object.last_results_hash !== undefined && - object.last_results_hash !== null - ) { - message.last_results_hash = bytesFromBase64(object.last_results_hash); - } - if (object.evidence_hash !== undefined && object.evidence_hash !== null) { - message.evidence_hash = bytesFromBase64(object.evidence_hash); - } - if ( - object.proposer_address !== undefined && - object.proposer_address !== null - ) { - message.proposer_address = bytesFromBase64(object.proposer_address); - } - return message; - }, - - toJSON(message: Header): unknown { - const obj: any = {}; - message.version !== undefined && - (obj.version = message.version - ? Consensus.toJSON(message.version) - : undefined); - message.chain_id !== undefined && (obj.chain_id = message.chain_id); - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.last_block_id !== undefined && - (obj.last_block_id = message.last_block_id - ? BlockID.toJSON(message.last_block_id) - : undefined); - message.last_commit_hash !== undefined && - (obj.last_commit_hash = base64FromBytes( - message.last_commit_hash !== undefined - ? message.last_commit_hash - : new Uint8Array() - )); - message.data_hash !== undefined && - (obj.data_hash = base64FromBytes( - message.data_hash !== undefined ? message.data_hash : new Uint8Array() - )); - message.validators_hash !== undefined && - (obj.validators_hash = base64FromBytes( - message.validators_hash !== undefined - ? message.validators_hash - : new Uint8Array() - )); - message.next_validators_hash !== undefined && - (obj.next_validators_hash = base64FromBytes( - message.next_validators_hash !== undefined - ? message.next_validators_hash - : new Uint8Array() - )); - message.consensus_hash !== undefined && - (obj.consensus_hash = base64FromBytes( - message.consensus_hash !== undefined - ? message.consensus_hash - : new Uint8Array() - )); - message.app_hash !== undefined && - (obj.app_hash = base64FromBytes( - message.app_hash !== undefined ? message.app_hash : new Uint8Array() - )); - message.last_results_hash !== undefined && - (obj.last_results_hash = base64FromBytes( - message.last_results_hash !== undefined - ? message.last_results_hash - : new Uint8Array() - )); - message.evidence_hash !== undefined && - (obj.evidence_hash = base64FromBytes( - message.evidence_hash !== undefined - ? message.evidence_hash - : new Uint8Array() - )); - message.proposer_address !== undefined && - (obj.proposer_address = base64FromBytes( - message.proposer_address !== undefined - ? message.proposer_address - : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial
): Header { - const message = { ...baseHeader } as Header; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromPartial(object.version); - } else { - message.version = undefined; - } - if (object.chain_id !== undefined && object.chain_id !== null) { - message.chain_id = object.chain_id; - } else { - message.chain_id = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.last_block_id !== undefined && object.last_block_id !== null) { - message.last_block_id = BlockID.fromPartial(object.last_block_id); - } else { - message.last_block_id = undefined; - } - if ( - object.last_commit_hash !== undefined && - object.last_commit_hash !== null - ) { - message.last_commit_hash = object.last_commit_hash; - } else { - message.last_commit_hash = new Uint8Array(); - } - if (object.data_hash !== undefined && object.data_hash !== null) { - message.data_hash = object.data_hash; - } else { - message.data_hash = new Uint8Array(); - } - if ( - object.validators_hash !== undefined && - object.validators_hash !== null - ) { - message.validators_hash = object.validators_hash; - } else { - message.validators_hash = new Uint8Array(); - } - if ( - object.next_validators_hash !== undefined && - object.next_validators_hash !== null - ) { - message.next_validators_hash = object.next_validators_hash; - } else { - message.next_validators_hash = new Uint8Array(); - } - if (object.consensus_hash !== undefined && object.consensus_hash !== null) { - message.consensus_hash = object.consensus_hash; - } else { - message.consensus_hash = new Uint8Array(); - } - if (object.app_hash !== undefined && object.app_hash !== null) { - message.app_hash = object.app_hash; - } else { - message.app_hash = new Uint8Array(); - } - if ( - object.last_results_hash !== undefined && - object.last_results_hash !== null - ) { - message.last_results_hash = object.last_results_hash; - } else { - message.last_results_hash = new Uint8Array(); - } - if (object.evidence_hash !== undefined && object.evidence_hash !== null) { - message.evidence_hash = object.evidence_hash; - } else { - message.evidence_hash = new Uint8Array(); - } - if ( - object.proposer_address !== undefined && - object.proposer_address !== null - ) { - message.proposer_address = object.proposer_address; - } else { - message.proposer_address = new Uint8Array(); - } - return message; - }, -}; - -const baseData: object = {}; - -export const Data = { - encode(message: Data, writer: Writer = Writer.create()): Writer { - for (const v of message.txs) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Data { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseData } as Data; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Data { - const message = { ...baseData } as Data; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: Data): unknown { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.txs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Data { - const message = { ...baseData } as Data; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(e); - } - } - return message; - }, -}; - -const baseVote: object = { type: 0, height: 0, round: 0, validator_index: 0 }; - -export const Vote = { - encode(message: Vote, writer: Writer = Writer.create()): Writer { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.block_id !== undefined) { - BlockID.encode(message.block_id, writer.uint32(34).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(42).fork() - ).ldelim(); - } - if (message.validator_address.length !== 0) { - writer.uint32(50).bytes(message.validator_address); - } - if (message.validator_index !== 0) { - writer.uint32(56).int32(message.validator_index); - } - if (message.signature.length !== 0) { - writer.uint32(66).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Vote { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVote } as Vote; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32() as any; - break; - case 2: - message.height = longToNumber(reader.int64() as Long); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.block_id = BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 6: - message.validator_address = reader.bytes(); - break; - case 7: - message.validator_index = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Vote { - const message = { ...baseVote } as Vote; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromJSON(object.block_id); - } else { - message.block_id = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = bytesFromBase64(object.validator_address); - } - if ( - object.validator_index !== undefined && - object.validator_index !== null - ) { - message.validator_index = Number(object.validator_index); - } else { - message.validator_index = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: Vote): unknown { - const obj: any = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.block_id !== undefined && - (obj.block_id = message.block_id - ? BlockID.toJSON(message.block_id) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.validator_address !== undefined && - (obj.validator_address = base64FromBytes( - message.validator_address !== undefined - ? message.validator_address - : new Uint8Array() - )); - message.validator_index !== undefined && - (obj.validator_index = message.validator_index); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Vote { - const message = { ...baseVote } as Vote; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromPartial(object.block_id); - } else { - message.block_id = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = new Uint8Array(); - } - if ( - object.validator_index !== undefined && - object.validator_index !== null - ) { - message.validator_index = object.validator_index; - } else { - message.validator_index = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseCommit: object = { height: 0, round: 0 }; - -export const Commit = { - encode(message: Commit, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(16).int32(message.round); - } - if (message.block_id !== undefined) { - BlockID.encode(message.block_id, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.signatures) { - CommitSig.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Commit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommit } as Commit; - message.signatures = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.block_id = BlockID.decode(reader, reader.uint32()); - break; - case 4: - message.signatures.push(CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Commit { - const message = { ...baseCommit } as Commit; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromJSON(object.block_id); - } else { - message.block_id = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Commit): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.block_id !== undefined && - (obj.block_id = message.block_id - ? BlockID.toJSON(message.block_id) - : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map((e) => - e ? CommitSig.toJSON(e) : undefined - ); - } else { - obj.signatures = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Commit { - const message = { ...baseCommit } as Commit; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromPartial(object.block_id); - } else { - message.block_id = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCommitSig: object = { block_id_flag: 0 }; - -export const CommitSig = { - encode(message: CommitSig, writer: Writer = Writer.create()): Writer { - if (message.block_id_flag !== 0) { - writer.uint32(8).int32(message.block_id_flag); - } - if (message.validator_address.length !== 0) { - writer.uint32(18).bytes(message.validator_address); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(26).fork() - ).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(34).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CommitSig { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommitSig } as CommitSig; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_id_flag = reader.int32() as any; - break; - case 2: - message.validator_address = reader.bytes(); - break; - case 3: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CommitSig { - const message = { ...baseCommitSig } as CommitSig; - if (object.block_id_flag !== undefined && object.block_id_flag !== null) { - message.block_id_flag = blockIDFlagFromJSON(object.block_id_flag); - } else { - message.block_id_flag = 0; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = bytesFromBase64(object.validator_address); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: CommitSig): unknown { - const obj: any = {}; - message.block_id_flag !== undefined && - (obj.block_id_flag = blockIDFlagToJSON(message.block_id_flag)); - message.validator_address !== undefined && - (obj.validator_address = base64FromBytes( - message.validator_address !== undefined - ? message.validator_address - : new Uint8Array() - )); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): CommitSig { - const message = { ...baseCommitSig } as CommitSig; - if (object.block_id_flag !== undefined && object.block_id_flag !== null) { - message.block_id_flag = object.block_id_flag; - } else { - message.block_id_flag = 0; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = new Uint8Array(); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseProposal: object = { type: 0, height: 0, round: 0, pol_round: 0 }; - -export const Proposal = { - encode(message: Proposal, writer: Writer = Writer.create()): Writer { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.pol_round !== 0) { - writer.uint32(32).int32(message.pol_round); - } - if (message.block_id !== undefined) { - BlockID.encode(message.block_id, writer.uint32(42).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(50).fork() - ).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(58).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Proposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProposal } as Proposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32() as any; - break; - case 2: - message.height = longToNumber(reader.int64() as Long); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.pol_round = reader.int32(); - break; - case 5: - message.block_id = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Proposal { - const message = { ...baseProposal } as Proposal; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.pol_round !== undefined && object.pol_round !== null) { - message.pol_round = Number(object.pol_round); - } else { - message.pol_round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromJSON(object.block_id); - } else { - message.block_id = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: Proposal): unknown { - const obj: any = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.pol_round !== undefined && (obj.pol_round = message.pol_round); - message.block_id !== undefined && - (obj.block_id = message.block_id - ? BlockID.toJSON(message.block_id) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Proposal { - const message = { ...baseProposal } as Proposal; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.pol_round !== undefined && object.pol_round !== null) { - message.pol_round = object.pol_round; - } else { - message.pol_round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromPartial(object.block_id); - } else { - message.block_id = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseSignedHeader: object = {}; - -export const SignedHeader = { - encode(message: SignedHeader, writer: Writer = Writer.create()): Writer { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.commit !== undefined) { - Commit.encode(message.commit, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SignedHeader { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSignedHeader } as SignedHeader; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SignedHeader { - const message = { ...baseSignedHeader } as SignedHeader; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromJSON(object.commit); - } else { - message.commit = undefined; - } - return message; - }, - - toJSON(message: SignedHeader): unknown { - const obj: any = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.commit !== undefined && - (obj.commit = message.commit ? Commit.toJSON(message.commit) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): SignedHeader { - const message = { ...baseSignedHeader } as SignedHeader; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromPartial(object.commit); - } else { - message.commit = undefined; - } - return message; - }, -}; - -const baseLightBlock: object = {}; - -export const LightBlock = { - encode(message: LightBlock, writer: Writer = Writer.create()): Writer { - if (message.signed_header !== undefined) { - SignedHeader.encode( - message.signed_header, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.validator_set !== undefined) { - ValidatorSet.encode( - message.validator_set, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): LightBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLightBlock } as LightBlock; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signed_header = SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validator_set = ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LightBlock { - const message = { ...baseLightBlock } as LightBlock; - if (object.signed_header !== undefined && object.signed_header !== null) { - message.signed_header = SignedHeader.fromJSON(object.signed_header); - } else { - message.signed_header = undefined; - } - if (object.validator_set !== undefined && object.validator_set !== null) { - message.validator_set = ValidatorSet.fromJSON(object.validator_set); - } else { - message.validator_set = undefined; - } - return message; - }, - - toJSON(message: LightBlock): unknown { - const obj: any = {}; - message.signed_header !== undefined && - (obj.signed_header = message.signed_header - ? SignedHeader.toJSON(message.signed_header) - : undefined); - message.validator_set !== undefined && - (obj.validator_set = message.validator_set - ? ValidatorSet.toJSON(message.validator_set) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): LightBlock { - const message = { ...baseLightBlock } as LightBlock; - if (object.signed_header !== undefined && object.signed_header !== null) { - message.signed_header = SignedHeader.fromPartial(object.signed_header); - } else { - message.signed_header = undefined; - } - if (object.validator_set !== undefined && object.validator_set !== null) { - message.validator_set = ValidatorSet.fromPartial(object.validator_set); - } else { - message.validator_set = undefined; - } - return message; - }, -}; - -const baseBlockMeta: object = { block_size: 0, num_txs: 0 }; - -export const BlockMeta = { - encode(message: BlockMeta, writer: Writer = Writer.create()): Writer { - if (message.block_id !== undefined) { - BlockID.encode(message.block_id, writer.uint32(10).fork()).ldelim(); - } - if (message.block_size !== 0) { - writer.uint32(16).int64(message.block_size); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(26).fork()).ldelim(); - } - if (message.num_txs !== 0) { - writer.uint32(32).int64(message.num_txs); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockMeta { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockMeta } as BlockMeta; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_id = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.block_size = longToNumber(reader.int64() as Long); - break; - case 3: - message.header = Header.decode(reader, reader.uint32()); - break; - case 4: - message.num_txs = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockMeta { - const message = { ...baseBlockMeta } as BlockMeta; - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromJSON(object.block_id); - } else { - message.block_id = undefined; - } - if (object.block_size !== undefined && object.block_size !== null) { - message.block_size = Number(object.block_size); - } else { - message.block_size = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.num_txs !== undefined && object.num_txs !== null) { - message.num_txs = Number(object.num_txs); - } else { - message.num_txs = 0; - } - return message; - }, - - toJSON(message: BlockMeta): unknown { - const obj: any = {}; - message.block_id !== undefined && - (obj.block_id = message.block_id - ? BlockID.toJSON(message.block_id) - : undefined); - message.block_size !== undefined && (obj.block_size = message.block_size); - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.num_txs !== undefined && (obj.num_txs = message.num_txs); - return obj; - }, - - fromPartial(object: DeepPartial): BlockMeta { - const message = { ...baseBlockMeta } as BlockMeta; - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromPartial(object.block_id); - } else { - message.block_id = undefined; - } - if (object.block_size !== undefined && object.block_size !== null) { - message.block_size = object.block_size; - } else { - message.block_size = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.num_txs !== undefined && object.num_txs !== null) { - message.num_txs = object.num_txs; - } else { - message.num_txs = 0; - } - return message; - }, -}; - -const baseTxProof: object = {}; - -export const TxProof = { - encode(message: TxProof, writer: Writer = Writer.create()): Writer { - if (message.root_hash.length !== 0) { - writer.uint32(10).bytes(message.root_hash); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxProof } as TxProof; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.root_hash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxProof { - const message = { ...baseTxProof } as TxProof; - if (object.root_hash !== undefined && object.root_hash !== null) { - message.root_hash = bytesFromBase64(object.root_hash); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: TxProof): unknown { - const obj: any = {}; - message.root_hash !== undefined && - (obj.root_hash = base64FromBytes( - message.root_hash !== undefined ? message.root_hash : new Uint8Array() - )); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): TxProof { - const message = { ...baseTxProof } as TxProof; - if (object.root_hash !== undefined && object.root_hash !== null) { - message.root_hash = object.root_hash; - } else { - message.root_hash = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/validator.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/validator.ts deleted file mode 100644 index 8c3581c198..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/types/validator.ts +++ /dev/null @@ -1,382 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { PublicKey } from "../../tendermint/crypto/keys"; - -export const protobufPackage = "tendermint.types"; - -export interface ValidatorSet { - validators: Validator[]; - proposer: Validator | undefined; - total_voting_power: number; -} - -export interface Validator { - address: Uint8Array; - pub_key: PublicKey | undefined; - voting_power: number; - proposer_priority: number; -} - -export interface SimpleValidator { - pub_key: PublicKey | undefined; - voting_power: number; -} - -const baseValidatorSet: object = { total_voting_power: 0 }; - -export const ValidatorSet = { - encode(message: ValidatorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.proposer !== undefined) { - Validator.encode(message.proposer, writer.uint32(18).fork()).ldelim(); - } - if (message.total_voting_power !== 0) { - writer.uint32(24).int64(message.total_voting_power); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.total_voting_power = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorSet { - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromJSON(object.proposer); - } else { - message.proposer = undefined; - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = Number(object.total_voting_power); - } else { - message.total_voting_power = 0; - } - return message; - }, - - toJSON(message: ValidatorSet): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.proposer !== undefined && - (obj.proposer = message.proposer - ? Validator.toJSON(message.proposer) - : undefined); - message.total_voting_power !== undefined && - (obj.total_voting_power = message.total_voting_power); - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorSet { - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromPartial(object.proposer); - } else { - message.proposer = undefined; - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = object.total_voting_power; - } else { - message.total_voting_power = 0; - } - return message; - }, -}; - -const baseValidator: object = { voting_power: 0, proposer_priority: 0 }; - -export const Validator = { - encode(message: Validator, writer: Writer = Writer.create()): Writer { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.pub_key !== undefined) { - PublicKey.encode(message.pub_key, writer.uint32(18).fork()).ldelim(); - } - if (message.voting_power !== 0) { - writer.uint32(24).int64(message.voting_power); - } - if (message.proposer_priority !== 0) { - writer.uint32(32).int64(message.proposer_priority); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Validator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator } as Validator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pub_key = PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.voting_power = longToNumber(reader.int64() as Long); - break; - case 4: - message.proposer_priority = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = bytesFromBase64(object.address); - } - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = PublicKey.fromJSON(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.voting_power !== undefined && object.voting_power !== null) { - message.voting_power = Number(object.voting_power); - } else { - message.voting_power = 0; - } - if ( - object.proposer_priority !== undefined && - object.proposer_priority !== null - ) { - message.proposer_priority = Number(object.proposer_priority); - } else { - message.proposer_priority = 0; - } - return message; - }, - - toJSON(message: Validator): unknown { - const obj: any = {}; - message.address !== undefined && - (obj.address = base64FromBytes( - message.address !== undefined ? message.address : new Uint8Array() - )); - message.pub_key !== undefined && - (obj.pub_key = message.pub_key - ? PublicKey.toJSON(message.pub_key) - : undefined); - message.voting_power !== undefined && - (obj.voting_power = message.voting_power); - message.proposer_priority !== undefined && - (obj.proposer_priority = message.proposer_priority); - return obj; - }, - - fromPartial(object: DeepPartial): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = new Uint8Array(); - } - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = PublicKey.fromPartial(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.voting_power !== undefined && object.voting_power !== null) { - message.voting_power = object.voting_power; - } else { - message.voting_power = 0; - } - if ( - object.proposer_priority !== undefined && - object.proposer_priority !== null - ) { - message.proposer_priority = object.proposer_priority; - } else { - message.proposer_priority = 0; - } - return message; - }, -}; - -const baseSimpleValidator: object = { voting_power: 0 }; - -export const SimpleValidator = { - encode(message: SimpleValidator, writer: Writer = Writer.create()): Writer { - if (message.pub_key !== undefined) { - PublicKey.encode(message.pub_key, writer.uint32(10).fork()).ldelim(); - } - if (message.voting_power !== 0) { - writer.uint32(16).int64(message.voting_power); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SimpleValidator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimpleValidator } as SimpleValidator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pub_key = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.voting_power = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SimpleValidator { - const message = { ...baseSimpleValidator } as SimpleValidator; - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = PublicKey.fromJSON(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.voting_power !== undefined && object.voting_power !== null) { - message.voting_power = Number(object.voting_power); - } else { - message.voting_power = 0; - } - return message; - }, - - toJSON(message: SimpleValidator): unknown { - const obj: any = {}; - message.pub_key !== undefined && - (obj.pub_key = message.pub_key - ? PublicKey.toJSON(message.pub_key) - : undefined); - message.voting_power !== undefined && - (obj.voting_power = message.voting_power); - return obj; - }, - - fromPartial(object: DeepPartial): SimpleValidator { - const message = { ...baseSimpleValidator } as SimpleValidator; - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = PublicKey.fromPartial(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.voting_power !== undefined && object.voting_power !== null) { - message.voting_power = object.voting_power; - } else { - message.voting_power = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/version/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/version/types.ts deleted file mode 100644 index 4bc6ad8232..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/module/types/tendermint/version/types.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.version"; - -/** - * App includes the protocol and software version for the application. - * This information is included in ResponseInfo. The App.Protocol can be - * updated in ResponseEndBlock. - */ -export interface App { - protocol: number; - software: string; -} - -/** - * 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. - */ -export interface Consensus { - block: number; - app: number; -} - -const baseApp: object = { protocol: 0, software: "" }; - -export const App = { - encode(message: App, writer: Writer = Writer.create()): Writer { - if (message.protocol !== 0) { - writer.uint32(8).uint64(message.protocol); - } - if (message.software !== "") { - writer.uint32(18).string(message.software); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): App { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseApp } as App; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocol = longToNumber(reader.uint64() as Long); - break; - case 2: - message.software = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): App { - const message = { ...baseApp } as App; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = Number(object.protocol); - } else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = String(object.software); - } else { - message.software = ""; - } - return message; - }, - - toJSON(message: App): unknown { - const obj: any = {}; - message.protocol !== undefined && (obj.protocol = message.protocol); - message.software !== undefined && (obj.software = message.software); - return obj; - }, - - fromPartial(object: DeepPartial): App { - const message = { ...baseApp } as App; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = object.protocol; - } else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = object.software; - } else { - message.software = ""; - } - return message; - }, -}; - -const baseConsensus: object = { block: 0, app: 0 }; - -export const Consensus = { - encode(message: Consensus, writer: Writer = Writer.create()): Writer { - if (message.block !== 0) { - writer.uint32(8).uint64(message.block); - } - if (message.app !== 0) { - writer.uint32(16).uint64(message.app); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Consensus { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensus } as Consensus; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = longToNumber(reader.uint64() as Long); - break; - case 2: - message.app = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Consensus { - const message = { ...baseConsensus } as Consensus; - if (object.block !== undefined && object.block !== null) { - message.block = Number(object.block); - } else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = Number(object.app); - } else { - message.app = 0; - } - return message; - }, - - toJSON(message: Consensus): unknown { - const obj: any = {}; - message.block !== undefined && (obj.block = message.block); - message.app !== undefined && (obj.app = message.app); - return obj; - }, - - fromPartial(object: DeepPartial): Consensus { - const message = { ...baseConsensus } as Consensus; - if (object.block !== undefined && object.block !== null) { - message.block = object.block; - } else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = object.app; - } else { - message.app = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/package.json b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/package.json deleted file mode 100755 index 87e59ce907..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmos-base-tendermint-v1beta1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmos.base.tendermint.v1beta1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/cosmos-sdk/client/grpc/tmservice", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.d.ts deleted file mode 100644 index 1decd9515f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export {}; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.js deleted file mode 100644 index 74c798b6de..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.js +++ /dev/null @@ -1,128 +0,0 @@ -import { txClient, queryClient, MissingWalletError, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - _Structure: {}, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.crisis.v1beta1 initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - async sendMsgVerifyInvariant({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgVerifyInvariant(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgVerifyInvariant:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgVerifyInvariant:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async MsgVerifyInvariant({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgVerifyInvariant(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgVerifyInvariant:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgVerifyInvariant:Create', 'Could not create message: ' + e.message); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.ts deleted file mode 100755 index eaba47f54c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.ts +++ /dev/null @@ -1,138 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - - - -export { }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - - _Structure: { - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.crisis.v1beta1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - async sendMsgVerifyInvariant({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgVerifyInvariant(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgVerifyInvariant:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgVerifyInvariant:Send Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgVerifyInvariant({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgVerifyInvariant(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgVerifyInvariant:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgVerifyInvariant:Create Could not create message: ' + e.message) - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.d.ts deleted file mode 100644 index 7a822d58ea..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgVerifyInvariant } from "./types/cosmos/crisis/v1beta1/tx"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; - msgVerifyInvariant: (data: MsgVerifyInvariant) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.js deleted file mode 100644 index 8124aee3f9..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.js +++ /dev/null @@ -1,34 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgVerifyInvariant } from "./types/cosmos/crisis/v1beta1/tx"; -const types = [ - ["/cosmos.crisis.v1beta1.MsgVerifyInvariant", MsgVerifyInvariant], -]; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - msgVerifyInvariant: (data) => ({ typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariant", value: MsgVerifyInvariant.fromPartial(data) }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.ts deleted file mode 100755 index 1e4294a480..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.ts +++ /dev/null @@ -1,60 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgVerifyInvariant } from "./types/cosmos/crisis/v1beta1/tx"; - - -const types = [ - ["/cosmos.crisis.v1beta1.MsgVerifyInvariant", MsgVerifyInvariant], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgVerifyInvariant: (data: MsgVerifyInvariant): EncodeObject => ({ typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariant", value: MsgVerifyInvariant.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.d.ts deleted file mode 100644 index 8c0da4c705..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -export interface ProtobufAny { - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** - * MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. - */ -export declare type V1Beta1MsgVerifyInvariantResponse = object; -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/crisis/v1beta1/genesis.proto - * @version version not set - */ -export declare class Api extends HttpClient { -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.js deleted file mode 100644 index fd8aecc56d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.js +++ /dev/null @@ -1,137 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/crisis/v1beta1/genesis.proto - * @version version not set - */ -export class Api extends HttpClient { -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.ts deleted file mode 100644 index 6f35bbfff1..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/rest.ts +++ /dev/null @@ -1,223 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface ProtobufAny { - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** - * MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. - */ -export type V1Beta1MsgVerifyInvariantResponse = object; - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/crisis/v1beta1/genesis.proto - * @version version not set - */ -export class Api extends HttpClient {} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac6a3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb30cd..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98406..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.d.ts deleted file mode 100644 index daee179603..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.crisis.v1beta1"; -/** GenesisState defines the crisis module's genesis state. */ -export interface GenesisState { - /** - * constant_fee is the fee used to verify the invariant in the crisis - * module. - */ - constantFee: Coin | undefined; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.js deleted file mode 100644 index f9c1515468..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.js +++ /dev/null @@ -1,58 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.crisis.v1beta1"; -const baseGenesisState = {}; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.constantFee !== undefined) { - Coin.encode(message.constantFee, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.constantFee = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - if (object.constantFee !== undefined && object.constantFee !== null) { - message.constantFee = Coin.fromJSON(object.constantFee); - } - else { - message.constantFee = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.constantFee !== undefined && - (obj.constantFee = message.constantFee - ? Coin.toJSON(message.constantFee) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - if (object.constantFee !== undefined && object.constantFee !== null) { - message.constantFee = Coin.fromPartial(object.constantFee); - } - else { - message.constantFee = undefined; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.ts deleted file mode 100644 index 0df431eec6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.crisis.v1beta1"; - -/** GenesisState defines the crisis module's genesis state. */ -export interface GenesisState { - /** - * constant_fee is the fee used to verify the invariant in the crisis - * module. - */ - constant_fee: Coin | undefined; -} - -const baseGenesisState: object = {}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.constant_fee !== undefined) { - Coin.encode(message.constant_fee, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.constant_fee = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - if (object.constant_fee !== undefined && object.constant_fee !== null) { - message.constant_fee = Coin.fromJSON(object.constant_fee); - } else { - message.constant_fee = undefined; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.constant_fee !== undefined && - (obj.constant_fee = message.constant_fee - ? Coin.toJSON(message.constant_fee) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - if (object.constant_fee !== undefined && object.constant_fee !== null) { - message.constant_fee = Coin.fromPartial(object.constant_fee); - } else { - message.constant_fee = undefined; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.d.ts deleted file mode 100644 index 9d8968b90b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.crisis.v1beta1"; -/** MsgVerifyInvariant represents a message to verify a particular invariance. */ -export interface MsgVerifyInvariant { - sender: string; - invariantModuleName: string; - invariantRoute: string; -} -/** MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. */ -export interface MsgVerifyInvariantResponse { -} -export declare const MsgVerifyInvariant: { - encode(message: MsgVerifyInvariant, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgVerifyInvariant; - fromJSON(object: any): MsgVerifyInvariant; - toJSON(message: MsgVerifyInvariant): unknown; - fromPartial(object: DeepPartial): MsgVerifyInvariant; -}; -export declare const MsgVerifyInvariantResponse: { - encode(_: MsgVerifyInvariantResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgVerifyInvariantResponse; - fromJSON(_: any): MsgVerifyInvariantResponse; - toJSON(_: MsgVerifyInvariantResponse): unknown; - fromPartial(_: DeepPartial): MsgVerifyInvariantResponse; -}; -/** Msg defines the bank Msg service. */ -export interface Msg { - /** VerifyInvariant defines a method to verify a particular invariance. */ - VerifyInvariant(request: MsgVerifyInvariant): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - VerifyInvariant(request: MsgVerifyInvariant): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.js deleted file mode 100644 index 2ca4b9c03a..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.js +++ /dev/null @@ -1,148 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.crisis.v1beta1"; -const baseMsgVerifyInvariant = { - sender: "", - invariantModuleName: "", - invariantRoute: "", -}; -export const MsgVerifyInvariant = { - encode(message, writer = Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.invariantModuleName !== "") { - writer.uint32(18).string(message.invariantModuleName); - } - if (message.invariantRoute !== "") { - writer.uint32(26).string(message.invariantRoute); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgVerifyInvariant }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.invariantModuleName = reader.string(); - break; - case 3: - message.invariantRoute = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgVerifyInvariant }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.invariantModuleName !== undefined && - object.invariantModuleName !== null) { - message.invariantModuleName = String(object.invariantModuleName); - } - else { - message.invariantModuleName = ""; - } - if (object.invariantRoute !== undefined && object.invariantRoute !== null) { - message.invariantRoute = String(object.invariantRoute); - } - else { - message.invariantRoute = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.invariantModuleName !== undefined && - (obj.invariantModuleName = message.invariantModuleName); - message.invariantRoute !== undefined && - (obj.invariantRoute = message.invariantRoute); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgVerifyInvariant }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.invariantModuleName !== undefined && - object.invariantModuleName !== null) { - message.invariantModuleName = object.invariantModuleName; - } - else { - message.invariantModuleName = ""; - } - if (object.invariantRoute !== undefined && object.invariantRoute !== null) { - message.invariantRoute = object.invariantRoute; - } - else { - message.invariantRoute = ""; - } - return message; - }, -}; -const baseMsgVerifyInvariantResponse = {}; -export const MsgVerifyInvariantResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgVerifyInvariantResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgVerifyInvariantResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgVerifyInvariantResponse, - }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - VerifyInvariant(request) { - const data = MsgVerifyInvariant.encode(request).finish(); - const promise = this.rpc.request("cosmos.crisis.v1beta1.Msg", "VerifyInvariant", data); - return promise.then((data) => MsgVerifyInvariantResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.ts deleted file mode 100644 index 27012d21f1..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/tx.ts +++ /dev/null @@ -1,223 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.crisis.v1beta1"; - -/** MsgVerifyInvariant represents a message to verify a particular invariance. */ -export interface MsgVerifyInvariant { - sender: string; - invariant_module_name: string; - invariant_route: string; -} - -/** MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. */ -export interface MsgVerifyInvariantResponse {} - -const baseMsgVerifyInvariant: object = { - sender: "", - invariant_module_name: "", - invariant_route: "", -}; - -export const MsgVerifyInvariant = { - encode( - message: MsgVerifyInvariant, - writer: Writer = Writer.create() - ): Writer { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.invariant_module_name !== "") { - writer.uint32(18).string(message.invariant_module_name); - } - if (message.invariant_route !== "") { - writer.uint32(26).string(message.invariant_route); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgVerifyInvariant { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgVerifyInvariant } as MsgVerifyInvariant; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.invariant_module_name = reader.string(); - break; - case 3: - message.invariant_route = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgVerifyInvariant { - const message = { ...baseMsgVerifyInvariant } as MsgVerifyInvariant; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if ( - object.invariant_module_name !== undefined && - object.invariant_module_name !== null - ) { - message.invariant_module_name = String(object.invariant_module_name); - } else { - message.invariant_module_name = ""; - } - if ( - object.invariant_route !== undefined && - object.invariant_route !== null - ) { - message.invariant_route = String(object.invariant_route); - } else { - message.invariant_route = ""; - } - return message; - }, - - toJSON(message: MsgVerifyInvariant): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.invariant_module_name !== undefined && - (obj.invariant_module_name = message.invariant_module_name); - message.invariant_route !== undefined && - (obj.invariant_route = message.invariant_route); - return obj; - }, - - fromPartial(object: DeepPartial): MsgVerifyInvariant { - const message = { ...baseMsgVerifyInvariant } as MsgVerifyInvariant; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if ( - object.invariant_module_name !== undefined && - object.invariant_module_name !== null - ) { - message.invariant_module_name = object.invariant_module_name; - } else { - message.invariant_module_name = ""; - } - if ( - object.invariant_route !== undefined && - object.invariant_route !== null - ) { - message.invariant_route = object.invariant_route; - } else { - message.invariant_route = ""; - } - return message; - }, -}; - -const baseMsgVerifyInvariantResponse: object = {}; - -export const MsgVerifyInvariantResponse = { - encode( - _: MsgVerifyInvariantResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgVerifyInvariantResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgVerifyInvariantResponse, - } as MsgVerifyInvariantResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgVerifyInvariantResponse { - const message = { - ...baseMsgVerifyInvariantResponse, - } as MsgVerifyInvariantResponse; - return message; - }, - - toJSON(_: MsgVerifyInvariantResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgVerifyInvariantResponse { - const message = { - ...baseMsgVerifyInvariantResponse, - } as MsgVerifyInvariantResponse; - return message; - }, -}; - -/** Msg defines the bank Msg service. */ -export interface Msg { - /** VerifyInvariant defines a method to verify a particular invariance. */ - VerifyInvariant( - request: MsgVerifyInvariant - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - VerifyInvariant( - request: MsgVerifyInvariant - ): Promise { - const data = MsgVerifyInvariant.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.crisis.v1beta1.Msg", - "VerifyInvariant", - data - ); - return promise.then((data) => - MsgVerifyInvariantResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30bdc6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index a3076569af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,1022 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 252725808b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4144 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } - else { - message.proto3Optional = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } - else { - message.proto3Optional = false; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/package.json b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/package.json deleted file mode 100755 index 58eb0eca5f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmos-crisis-v1beta1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmos.crisis.v1beta1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/cosmos-sdk/x/crisis/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.d.ts deleted file mode 100644 index c0d08f08c0..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Params } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorHistoricalRewards } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorCurrentRewards } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorAccumulatedCommission } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorOutstandingRewards } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorSlashEvent } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorSlashEvents } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { FeePool } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { CommunityPoolSpendProposal } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { DelegatorStartingInfo } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { DelegationDelegatorReward } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { CommunityPoolSpendProposalWithDeposit } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { DelegatorWithdrawInfo } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { ValidatorOutstandingRewardsRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { ValidatorAccumulatedCommissionRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { ValidatorHistoricalRewardsRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { ValidatorCurrentRewardsRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { DelegatorStartingInfoRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { ValidatorSlashEventRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -export { Params, ValidatorHistoricalRewards, ValidatorCurrentRewards, ValidatorAccumulatedCommission, ValidatorOutstandingRewards, ValidatorSlashEvent, ValidatorSlashEvents, FeePool, CommunityPoolSpendProposal, DelegatorStartingInfo, DelegationDelegatorReward, CommunityPoolSpendProposalWithDeposit, DelegatorWithdrawInfo, ValidatorOutstandingRewardsRecord, ValidatorAccumulatedCommissionRecord, ValidatorHistoricalRewardsRecord, ValidatorCurrentRewardsRecord, DelegatorStartingInfoRecord, ValidatorSlashEventRecord }; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.js deleted file mode 100644 index 84e8872199..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.js +++ /dev/null @@ -1,457 +0,0 @@ -import { txClient, queryClient, MissingWalletError, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { Params } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorHistoricalRewards } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorCurrentRewards } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorAccumulatedCommission } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorOutstandingRewards } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorSlashEvent } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { ValidatorSlashEvents } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { FeePool } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { CommunityPoolSpendProposal } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { DelegatorStartingInfo } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { DelegationDelegatorReward } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { CommunityPoolSpendProposalWithDeposit } from "./module/types/cosmos/distribution/v1beta1/distribution"; -import { DelegatorWithdrawInfo } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { ValidatorOutstandingRewardsRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { ValidatorAccumulatedCommissionRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { ValidatorHistoricalRewardsRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { ValidatorCurrentRewardsRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { DelegatorStartingInfoRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -import { ValidatorSlashEventRecord } from "./module/types/cosmos/distribution/v1beta1/genesis"; -export { Params, ValidatorHistoricalRewards, ValidatorCurrentRewards, ValidatorAccumulatedCommission, ValidatorOutstandingRewards, ValidatorSlashEvent, ValidatorSlashEvents, FeePool, CommunityPoolSpendProposal, DelegatorStartingInfo, DelegationDelegatorReward, CommunityPoolSpendProposalWithDeposit, DelegatorWithdrawInfo, ValidatorOutstandingRewardsRecord, ValidatorAccumulatedCommissionRecord, ValidatorHistoricalRewardsRecord, ValidatorCurrentRewardsRecord, DelegatorStartingInfoRecord, ValidatorSlashEventRecord }; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Params: {}, - ValidatorOutstandingRewards: {}, - ValidatorCommission: {}, - ValidatorSlashes: {}, - DelegationRewards: {}, - DelegationTotalRewards: {}, - DelegatorValidators: {}, - DelegatorWithdrawAddress: {}, - CommunityPool: {}, - _Structure: { - Params: getStructure(Params.fromPartial({})), - ValidatorHistoricalRewards: getStructure(ValidatorHistoricalRewards.fromPartial({})), - ValidatorCurrentRewards: getStructure(ValidatorCurrentRewards.fromPartial({})), - ValidatorAccumulatedCommission: getStructure(ValidatorAccumulatedCommission.fromPartial({})), - ValidatorOutstandingRewards: getStructure(ValidatorOutstandingRewards.fromPartial({})), - ValidatorSlashEvent: getStructure(ValidatorSlashEvent.fromPartial({})), - ValidatorSlashEvents: getStructure(ValidatorSlashEvents.fromPartial({})), - FeePool: getStructure(FeePool.fromPartial({})), - CommunityPoolSpendProposal: getStructure(CommunityPoolSpendProposal.fromPartial({})), - DelegatorStartingInfo: getStructure(DelegatorStartingInfo.fromPartial({})), - DelegationDelegatorReward: getStructure(DelegationDelegatorReward.fromPartial({})), - CommunityPoolSpendProposalWithDeposit: getStructure(CommunityPoolSpendProposalWithDeposit.fromPartial({})), - DelegatorWithdrawInfo: getStructure(DelegatorWithdrawInfo.fromPartial({})), - ValidatorOutstandingRewardsRecord: getStructure(ValidatorOutstandingRewardsRecord.fromPartial({})), - ValidatorAccumulatedCommissionRecord: getStructure(ValidatorAccumulatedCommissionRecord.fromPartial({})), - ValidatorHistoricalRewardsRecord: getStructure(ValidatorHistoricalRewardsRecord.fromPartial({})), - ValidatorCurrentRewardsRecord: getStructure(ValidatorCurrentRewardsRecord.fromPartial({})), - DelegatorStartingInfoRecord: getStructure(DelegatorStartingInfoRecord.fromPartial({})), - ValidatorSlashEventRecord: getStructure(ValidatorSlashEventRecord.fromPartial({})), - }, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getParams: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Params[JSON.stringify(params)] ?? {}; - }, - getValidatorOutstandingRewards: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.ValidatorOutstandingRewards[JSON.stringify(params)] ?? {}; - }, - getValidatorCommission: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.ValidatorCommission[JSON.stringify(params)] ?? {}; - }, - getValidatorSlashes: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.ValidatorSlashes[JSON.stringify(params)] ?? {}; - }, - getDelegationRewards: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DelegationRewards[JSON.stringify(params)] ?? {}; - }, - getDelegationTotalRewards: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DelegationTotalRewards[JSON.stringify(params)] ?? {}; - }, - getDelegatorValidators: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DelegatorValidators[JSON.stringify(params)] ?? {}; - }, - getDelegatorWithdrawAddress: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DelegatorWithdrawAddress[JSON.stringify(params)] ?? {}; - }, - getCommunityPool: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.CommunityPool[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.distribution.v1beta1 initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryParams()).data; - commit('QUERY', { query: 'Params', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryValidatorOutstandingRewards({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryValidatorOutstandingRewards(key.validator_address)).data; - commit('QUERY', { query: 'ValidatorOutstandingRewards', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryValidatorOutstandingRewards', payload: { options: { all }, params: { ...key }, query } }); - return getters['getValidatorOutstandingRewards']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryValidatorOutstandingRewards', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryValidatorCommission({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryValidatorCommission(key.validator_address)).data; - commit('QUERY', { query: 'ValidatorCommission', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryValidatorCommission', payload: { options: { all }, params: { ...key }, query } }); - return getters['getValidatorCommission']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryValidatorCommission', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryValidatorSlashes({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryValidatorSlashes(key.validator_address, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryValidatorSlashes(key.validator_address, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ValidatorSlashes', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryValidatorSlashes', payload: { options: { all }, params: { ...key }, query } }); - return getters['getValidatorSlashes']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryValidatorSlashes', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDelegationRewards({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDelegationRewards(key.delegator_address, key.validator_address)).data; - commit('QUERY', { query: 'DelegationRewards', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegationRewards', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegationRewards']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDelegationRewards', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDelegationTotalRewards({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDelegationTotalRewards(key.delegator_address)).data; - commit('QUERY', { query: 'DelegationTotalRewards', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegationTotalRewards', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegationTotalRewards']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDelegationTotalRewards', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDelegatorValidators({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDelegatorValidators(key.delegator_address)).data; - commit('QUERY', { query: 'DelegatorValidators', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegatorValidators', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegatorValidators']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDelegatorValidators', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDelegatorWithdrawAddress({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDelegatorWithdrawAddress(key.delegator_address)).data; - commit('QUERY', { query: 'DelegatorWithdrawAddress', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegatorWithdrawAddress', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegatorWithdrawAddress']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDelegatorWithdrawAddress', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryCommunityPool({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryCommunityPool()).data; - commit('QUERY', { query: 'CommunityPool', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryCommunityPool', payload: { options: { all }, params: { ...key }, query } }); - return getters['getCommunityPool']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryCommunityPool', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async sendMsgWithdrawValidatorCommission({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgWithdrawValidatorCommission(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgWithdrawValidatorCommission:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgWithdrawValidatorCommission:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgFundCommunityPool({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgFundCommunityPool(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgFundCommunityPool:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgFundCommunityPool:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgWithdrawDelegatorReward({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgWithdrawDelegatorReward(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgWithdrawDelegatorReward:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgWithdrawDelegatorReward:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgSetWithdrawAddress({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgSetWithdrawAddress(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgSetWithdrawAddress:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSetWithdrawAddress:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async MsgWithdrawValidatorCommission({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgWithdrawValidatorCommission(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgWithdrawValidatorCommission:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgWithdrawValidatorCommission:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgFundCommunityPool({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgFundCommunityPool(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgFundCommunityPool:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgFundCommunityPool:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgWithdrawDelegatorReward({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgWithdrawDelegatorReward(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgWithdrawDelegatorReward:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgWithdrawDelegatorReward:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgSetWithdrawAddress({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgSetWithdrawAddress(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgSetWithdrawAddress:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSetWithdrawAddress:Create', 'Could not create message: ' + e.message); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.ts deleted file mode 100755 index aec02fa79b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/index.ts +++ /dev/null @@ -1,525 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { Params } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { ValidatorHistoricalRewards } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { ValidatorCurrentRewards } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { ValidatorAccumulatedCommission } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { ValidatorOutstandingRewards } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { ValidatorSlashEvent } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { ValidatorSlashEvents } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { FeePool } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { CommunityPoolSpendProposal } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { DelegatorStartingInfo } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { DelegationDelegatorReward } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { CommunityPoolSpendProposalWithDeposit } from "./module/types/cosmos/distribution/v1beta1/distribution" -import { DelegatorWithdrawInfo } from "./module/types/cosmos/distribution/v1beta1/genesis" -import { ValidatorOutstandingRewardsRecord } from "./module/types/cosmos/distribution/v1beta1/genesis" -import { ValidatorAccumulatedCommissionRecord } from "./module/types/cosmos/distribution/v1beta1/genesis" -import { ValidatorHistoricalRewardsRecord } from "./module/types/cosmos/distribution/v1beta1/genesis" -import { ValidatorCurrentRewardsRecord } from "./module/types/cosmos/distribution/v1beta1/genesis" -import { DelegatorStartingInfoRecord } from "./module/types/cosmos/distribution/v1beta1/genesis" -import { ValidatorSlashEventRecord } from "./module/types/cosmos/distribution/v1beta1/genesis" - - -export { Params, ValidatorHistoricalRewards, ValidatorCurrentRewards, ValidatorAccumulatedCommission, ValidatorOutstandingRewards, ValidatorSlashEvent, ValidatorSlashEvents, FeePool, CommunityPoolSpendProposal, DelegatorStartingInfo, DelegationDelegatorReward, CommunityPoolSpendProposalWithDeposit, DelegatorWithdrawInfo, ValidatorOutstandingRewardsRecord, ValidatorAccumulatedCommissionRecord, ValidatorHistoricalRewardsRecord, ValidatorCurrentRewardsRecord, DelegatorStartingInfoRecord, ValidatorSlashEventRecord }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Params: {}, - ValidatorOutstandingRewards: {}, - ValidatorCommission: {}, - ValidatorSlashes: {}, - DelegationRewards: {}, - DelegationTotalRewards: {}, - DelegatorValidators: {}, - DelegatorWithdrawAddress: {}, - CommunityPool: {}, - - _Structure: { - Params: getStructure(Params.fromPartial({})), - ValidatorHistoricalRewards: getStructure(ValidatorHistoricalRewards.fromPartial({})), - ValidatorCurrentRewards: getStructure(ValidatorCurrentRewards.fromPartial({})), - ValidatorAccumulatedCommission: getStructure(ValidatorAccumulatedCommission.fromPartial({})), - ValidatorOutstandingRewards: getStructure(ValidatorOutstandingRewards.fromPartial({})), - ValidatorSlashEvent: getStructure(ValidatorSlashEvent.fromPartial({})), - ValidatorSlashEvents: getStructure(ValidatorSlashEvents.fromPartial({})), - FeePool: getStructure(FeePool.fromPartial({})), - CommunityPoolSpendProposal: getStructure(CommunityPoolSpendProposal.fromPartial({})), - DelegatorStartingInfo: getStructure(DelegatorStartingInfo.fromPartial({})), - DelegationDelegatorReward: getStructure(DelegationDelegatorReward.fromPartial({})), - CommunityPoolSpendProposalWithDeposit: getStructure(CommunityPoolSpendProposalWithDeposit.fromPartial({})), - DelegatorWithdrawInfo: getStructure(DelegatorWithdrawInfo.fromPartial({})), - ValidatorOutstandingRewardsRecord: getStructure(ValidatorOutstandingRewardsRecord.fromPartial({})), - ValidatorAccumulatedCommissionRecord: getStructure(ValidatorAccumulatedCommissionRecord.fromPartial({})), - ValidatorHistoricalRewardsRecord: getStructure(ValidatorHistoricalRewardsRecord.fromPartial({})), - ValidatorCurrentRewardsRecord: getStructure(ValidatorCurrentRewardsRecord.fromPartial({})), - DelegatorStartingInfoRecord: getStructure(DelegatorStartingInfoRecord.fromPartial({})), - ValidatorSlashEventRecord: getStructure(ValidatorSlashEventRecord.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - getValidatorOutstandingRewards: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ValidatorOutstandingRewards[JSON.stringify(params)] ?? {} - }, - getValidatorCommission: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ValidatorCommission[JSON.stringify(params)] ?? {} - }, - getValidatorSlashes: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ValidatorSlashes[JSON.stringify(params)] ?? {} - }, - getDelegationRewards: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegationRewards[JSON.stringify(params)] ?? {} - }, - getDelegationTotalRewards: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegationTotalRewards[JSON.stringify(params)] ?? {} - }, - getDelegatorValidators: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegatorValidators[JSON.stringify(params)] ?? {} - }, - getDelegatorWithdrawAddress: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegatorWithdrawAddress[JSON.stringify(params)] ?? {} - }, - getCommunityPool: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.CommunityPool[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.distribution.v1beta1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams()).data - - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryValidatorOutstandingRewards({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryValidatorOutstandingRewards( key.validator_address)).data - - - commit('QUERY', { query: 'ValidatorOutstandingRewards', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryValidatorOutstandingRewards', payload: { options: { all }, params: {...key},query }}) - return getters['getValidatorOutstandingRewards']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryValidatorOutstandingRewards API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryValidatorCommission({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryValidatorCommission( key.validator_address)).data - - - commit('QUERY', { query: 'ValidatorCommission', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryValidatorCommission', payload: { options: { all }, params: {...key},query }}) - return getters['getValidatorCommission']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryValidatorCommission API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryValidatorSlashes({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryValidatorSlashes( key.validator_address, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryValidatorSlashes( key.validator_address, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ValidatorSlashes', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryValidatorSlashes', payload: { options: { all }, params: {...key},query }}) - return getters['getValidatorSlashes']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryValidatorSlashes API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDelegationRewards({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDelegationRewards( key.delegator_address, key.validator_address)).data - - - commit('QUERY', { query: 'DelegationRewards', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegationRewards', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegationRewards']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDelegationRewards API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDelegationTotalRewards({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDelegationTotalRewards( key.delegator_address)).data - - - commit('QUERY', { query: 'DelegationTotalRewards', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegationTotalRewards', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegationTotalRewards']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDelegationTotalRewards API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDelegatorValidators({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDelegatorValidators( key.delegator_address)).data - - - commit('QUERY', { query: 'DelegatorValidators', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegatorValidators', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegatorValidators']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDelegatorValidators API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDelegatorWithdrawAddress({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDelegatorWithdrawAddress( key.delegator_address)).data - - - commit('QUERY', { query: 'DelegatorWithdrawAddress', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegatorWithdrawAddress', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegatorWithdrawAddress']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDelegatorWithdrawAddress API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryCommunityPool({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryCommunityPool()).data - - - commit('QUERY', { query: 'CommunityPool', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryCommunityPool', payload: { options: { all }, params: {...key},query }}) - return getters['getCommunityPool']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryCommunityPool API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - async sendMsgWithdrawValidatorCommission({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgWithdrawValidatorCommission(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgWithdrawValidatorCommission:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgWithdrawValidatorCommission:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgWithdrawDelegatorReward({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgWithdrawDelegatorReward(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgWithdrawDelegatorReward:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgWithdrawDelegatorReward:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgFundCommunityPool({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgFundCommunityPool(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgFundCommunityPool:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgFundCommunityPool:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgSetWithdrawAddress({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSetWithdrawAddress(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgSetWithdrawAddress:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgSetWithdrawAddress:Send Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgWithdrawValidatorCommission({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgWithdrawValidatorCommission(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgWithdrawValidatorCommission:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgWithdrawValidatorCommission:Create Could not create message: ' + e.message) - } - } - }, - async MsgWithdrawDelegatorReward({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgWithdrawDelegatorReward(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgWithdrawDelegatorReward:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgWithdrawDelegatorReward:Create Could not create message: ' + e.message) - } - } - }, - async MsgFundCommunityPool({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgFundCommunityPool(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgFundCommunityPool:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgFundCommunityPool:Create Could not create message: ' + e.message) - } - } - }, - async MsgSetWithdrawAddress({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSetWithdrawAddress(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgSetWithdrawAddress:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgSetWithdrawAddress:Create Could not create message: ' + e.message) - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.d.ts deleted file mode 100644 index 1281e63f66..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; - msgWithdrawValidatorCommission: (data: MsgWithdrawValidatorCommission) => EncodeObject; - msgFundCommunityPool: (data: MsgFundCommunityPool) => EncodeObject; - msgWithdrawDelegatorReward: (data: MsgWithdrawDelegatorReward) => EncodeObject; - msgSetWithdrawAddress: (data: MsgSetWithdrawAddress) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.js deleted file mode 100644 index a72ab64c42..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.js +++ /dev/null @@ -1,43 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx"; -const types = [ - ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission], - ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool], - ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward], - ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress], -]; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - msgWithdrawValidatorCommission: (data) => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.fromPartial(data) }), - msgFundCommunityPool: (data) => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: MsgFundCommunityPool.fromPartial(data) }), - msgWithdrawDelegatorReward: (data) => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", value: MsgWithdrawDelegatorReward.fromPartial(data) }), - msgSetWithdrawAddress: (data) => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.fromPartial(data) }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.ts deleted file mode 100755 index a14394788a..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.ts +++ /dev/null @@ -1,69 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx"; - - -const types = [ - ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission], - ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward], - ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool], - ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgWithdrawValidatorCommission: (data: MsgWithdrawValidatorCommission): EncodeObject => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.fromPartial( data ) }), - msgWithdrawDelegatorReward: (data: MsgWithdrawDelegatorReward): EncodeObject => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", value: MsgWithdrawDelegatorReward.fromPartial( data ) }), - msgFundCommunityPool: (data: MsgFundCommunityPool): EncodeObject => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: MsgFundCommunityPool.fromPartial( data ) }), - msgSetWithdrawAddress: (data: MsgSetWithdrawAddress): EncodeObject => ({ typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.d.ts deleted file mode 100644 index e6b4363485..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,367 +0,0 @@ -export interface ProtobufAny { - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} -/** -* 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. -*/ -export interface V1Beta1DecCoin { - denom?: string; - amount?: string; -} -/** -* DelegationDelegatorReward represents the properties -of a delegator's delegation reward. -*/ -export interface V1Beta1DelegationDelegatorReward { - validatorAddress?: string; - reward?: V1Beta1DecCoin[]; -} -/** - * MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. - */ -export declare type V1Beta1MsgFundCommunityPoolResponse = object; -/** - * MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. - */ -export declare type V1Beta1MsgSetWithdrawAddressResponse = object; -/** - * MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. - */ -export declare type V1Beta1MsgWithdrawDelegatorRewardResponse = object; -/** - * MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. - */ -export declare type V1Beta1MsgWithdrawValidatorCommissionResponse = object; -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - /** - * 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. - * @format uint64 - */ - offset?: string; - /** - * 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. - * @format uint64 - */ - limit?: string; - /** - * 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. - */ - countTotal?: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse?: boolean; -} -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -/** - * Params defines the set of params for the distribution module. - */ -export interface V1Beta1Params { - communityTax?: string; - baseProposerReward?: string; - bonusProposerReward?: string; - withdrawAddrEnabled?: boolean; -} -/** -* QueryCommunityPoolResponse is the response type for the Query/CommunityPool -RPC method. -*/ -export interface V1Beta1QueryCommunityPoolResponse { - /** pool defines community pool's coins. */ - pool?: V1Beta1DecCoin[]; -} -/** -* QueryDelegationRewardsResponse is the response type for the -Query/DelegationRewards RPC method. -*/ -export interface V1Beta1QueryDelegationRewardsResponse { - /** rewards defines the rewards accrued by a delegation. */ - rewards?: V1Beta1DecCoin[]; -} -/** -* QueryDelegationTotalRewardsResponse is the response type for the -Query/DelegationTotalRewards RPC method. -*/ -export interface V1Beta1QueryDelegationTotalRewardsResponse { - /** rewards defines all the rewards accrued by a delegator. */ - rewards?: V1Beta1DelegationDelegatorReward[]; - /** total defines the sum of all the rewards. */ - total?: V1Beta1DecCoin[]; -} -/** -* QueryDelegatorValidatorsResponse is the response type for the -Query/DelegatorValidators RPC method. -*/ -export interface V1Beta1QueryDelegatorValidatorsResponse { - /** validators defines the validators a delegator is delegating for. */ - validators?: string[]; -} -/** -* QueryDelegatorWithdrawAddressResponse is the response type for the -Query/DelegatorWithdrawAddress RPC method. -*/ -export interface V1Beta1QueryDelegatorWithdrawAddressResponse { - /** withdraw_address defines the delegator address to query for. */ - withdrawAddress?: string; -} -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1Beta1QueryParamsResponse { - /** params defines the parameters of the module. */ - params?: V1Beta1Params; -} -export interface V1Beta1QueryValidatorCommissionResponse { - /** commission defines the commision the validator received. */ - commission?: V1Beta1ValidatorAccumulatedCommission; -} -/** -* QueryValidatorOutstandingRewardsResponse is the response type for the -Query/ValidatorOutstandingRewards RPC method. -*/ -export interface V1Beta1QueryValidatorOutstandingRewardsResponse { - /** - * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards - * for a validator inexpensive to track, allows simple sanity checks. - */ - rewards?: V1Beta1ValidatorOutstandingRewards; -} -/** -* QueryValidatorSlashesResponse is the response type for the -Query/ValidatorSlashes RPC method. -*/ -export interface V1Beta1QueryValidatorSlashesResponse { - /** slashes defines the slashes the validator received. */ - slashes?: V1Beta1ValidatorSlashEvent[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** -* ValidatorAccumulatedCommission represents accumulated commission -for a validator kept as a running counter, can be withdrawn at any time. -*/ -export interface V1Beta1ValidatorAccumulatedCommission { - commission?: V1Beta1DecCoin[]; -} -/** -* ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards -for a validator inexpensive to track, allows simple sanity checks. -*/ -export interface V1Beta1ValidatorOutstandingRewards { - rewards?: V1Beta1DecCoin[]; -} -/** -* 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. -*/ -export interface V1Beta1ValidatorSlashEvent { - /** @format uint64 */ - validatorPeriod?: string; - fraction?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/distribution/v1beta1/distribution.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryCommunityPool - * @summary CommunityPool queries the community pool coins. - * @request GET:/cosmos/distribution/v1beta1/community_pool - */ - queryCommunityPool: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegationTotalRewards - * @summary DelegationTotalRewards queries the total rewards accrued by a each - validator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards - */ - queryDelegationTotalRewards: (delegatorAddress: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegationRewards - * @summary DelegationRewards queries the total rewards accrued by a delegation. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards/{validatorAddress} - */ - queryDelegationRewards: (delegatorAddress: string, validatorAddress: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidators - * @summary DelegatorValidators queries the validators of a delegator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/validators - */ - queryDelegatorValidators: (delegatorAddress: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegatorWithdrawAddress - * @summary DelegatorWithdrawAddress queries withdraw address of a delegator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/withdraw_address - */ - queryDelegatorWithdrawAddress: (delegatorAddress: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries params of the distribution module. - * @request GET:/cosmos/distribution/v1beta1/params - */ - queryParams: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryValidatorCommission - * @summary ValidatorCommission queries accumulated commission for a validator. - * @request GET:/cosmos/distribution/v1beta1/validators/{validatorAddress}/commission - */ - queryValidatorCommission: (validatorAddress: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryValidatorOutstandingRewards - * @summary ValidatorOutstandingRewards queries rewards of a validator address. - * @request GET:/cosmos/distribution/v1beta1/validators/{validatorAddress}/outstanding_rewards - */ - queryValidatorOutstandingRewards: (validatorAddress: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryValidatorSlashes - * @summary ValidatorSlashes queries slash events of a validator. - * @request GET:/cosmos/distribution/v1beta1/validators/{validatorAddress}/slashes - */ - queryValidatorSlashes: (validatorAddress: string, query?: { - startingHeight?: string; - endingHeight?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.js deleted file mode 100644 index d5f2150c47..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.js +++ /dev/null @@ -1,268 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/distribution/v1beta1/distribution.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryCommunityPool - * @summary CommunityPool queries the community pool coins. - * @request GET:/cosmos/distribution/v1beta1/community_pool - */ - this.queryCommunityPool = (params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/community_pool`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegationTotalRewards - * @summary DelegationTotalRewards queries the total rewards accrued by a each - validator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards - */ - this.queryDelegationTotalRewards = (delegatorAddress, params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegationRewards - * @summary DelegationRewards queries the total rewards accrued by a delegation. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards/{validatorAddress} - */ - this.queryDelegationRewards = (delegatorAddress, validatorAddress, params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards/${validatorAddress}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidators - * @summary DelegatorValidators queries the validators of a delegator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/validators - */ - this.queryDelegatorValidators = (delegatorAddress, params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/validators`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegatorWithdrawAddress - * @summary DelegatorWithdrawAddress queries withdraw address of a delegator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/withdraw_address - */ - this.queryDelegatorWithdrawAddress = (delegatorAddress, params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/withdraw_address`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries params of the distribution module. - * @request GET:/cosmos/distribution/v1beta1/params - */ - this.queryParams = (params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryValidatorCommission - * @summary ValidatorCommission queries accumulated commission for a validator. - * @request GET:/cosmos/distribution/v1beta1/validators/{validatorAddress}/commission - */ - this.queryValidatorCommission = (validatorAddress, params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/commission`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryValidatorOutstandingRewards - * @summary ValidatorOutstandingRewards queries rewards of a validator address. - * @request GET:/cosmos/distribution/v1beta1/validators/{validatorAddress}/outstanding_rewards - */ - this.queryValidatorOutstandingRewards = (validatorAddress, params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/outstanding_rewards`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryValidatorSlashes - * @summary ValidatorSlashes queries slash events of a validator. - * @request GET:/cosmos/distribution/v1beta1/validators/{validatorAddress}/slashes - */ - this.queryValidatorSlashes = (validatorAddress, query, params = {}) => this.request({ - path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/slashes`, - method: "GET", - query: query, - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.ts deleted file mode 100644 index a0507ad1c6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/rest.ts +++ /dev/null @@ -1,613 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface ProtobufAny { - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** -* 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. -*/ -export interface V1Beta1DecCoin { - denom?: string; - amount?: string; -} - -/** -* DelegationDelegatorReward represents the properties -of a delegator's delegation reward. -*/ -export interface V1Beta1DelegationDelegatorReward { - validator_address?: string; - reward?: V1Beta1DecCoin[]; -} - -/** - * MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. - */ -export type V1Beta1MsgFundCommunityPoolResponse = object; - -/** - * MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. - */ -export type V1Beta1MsgSetWithdrawAddressResponse = object; - -/** - * MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. - */ -export type V1Beta1MsgWithdrawDelegatorRewardResponse = object; - -/** - * MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. - */ -export type V1Beta1MsgWithdrawValidatorCommissionResponse = object; - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - 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; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -/** - * Params defines the set of params for the distribution module. - */ -export interface V1Beta1Params { - community_tax?: string; - base_proposer_reward?: string; - bonus_proposer_reward?: string; - withdraw_addr_enabled?: boolean; -} - -/** -* QueryCommunityPoolResponse is the response type for the Query/CommunityPool -RPC method. -*/ -export interface V1Beta1QueryCommunityPoolResponse { - /** pool defines community pool's coins. */ - pool?: V1Beta1DecCoin[]; -} - -/** -* QueryDelegationRewardsResponse is the response type for the -Query/DelegationRewards RPC method. -*/ -export interface V1Beta1QueryDelegationRewardsResponse { - /** rewards defines the rewards accrued by a delegation. */ - rewards?: V1Beta1DecCoin[]; -} - -/** -* QueryDelegationTotalRewardsResponse is the response type for the -Query/DelegationTotalRewards RPC method. -*/ -export interface V1Beta1QueryDelegationTotalRewardsResponse { - /** rewards defines all the rewards accrued by a delegator. */ - rewards?: V1Beta1DelegationDelegatorReward[]; - - /** total defines the sum of all the rewards. */ - total?: V1Beta1DecCoin[]; -} - -/** -* QueryDelegatorValidatorsResponse is the response type for the -Query/DelegatorValidators RPC method. -*/ -export interface V1Beta1QueryDelegatorValidatorsResponse { - /** validators defines the validators a delegator is delegating for. */ - validators?: string[]; -} - -/** -* QueryDelegatorWithdrawAddressResponse is the response type for the -Query/DelegatorWithdrawAddress RPC method. -*/ -export interface V1Beta1QueryDelegatorWithdrawAddressResponse { - /** withdraw_address defines the delegator address to query for. */ - withdraw_address?: string; -} - -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1Beta1QueryParamsResponse { - /** params defines the parameters of the module. */ - params?: V1Beta1Params; -} - -export interface V1Beta1QueryValidatorCommissionResponse { - /** commission defines the commision the validator received. */ - commission?: V1Beta1ValidatorAccumulatedCommission; -} - -/** -* QueryValidatorOutstandingRewardsResponse is the response type for the -Query/ValidatorOutstandingRewards RPC method. -*/ -export interface V1Beta1QueryValidatorOutstandingRewardsResponse { - /** - * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards - * for a validator inexpensive to track, allows simple sanity checks. - */ - rewards?: V1Beta1ValidatorOutstandingRewards; -} - -/** -* QueryValidatorSlashesResponse is the response type for the -Query/ValidatorSlashes RPC method. -*/ -export interface V1Beta1QueryValidatorSlashesResponse { - /** slashes defines the slashes the validator received. */ - slashes?: V1Beta1ValidatorSlashEvent[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** -* ValidatorAccumulatedCommission represents accumulated commission -for a validator kept as a running counter, can be withdrawn at any time. -*/ -export interface V1Beta1ValidatorAccumulatedCommission { - commission?: V1Beta1DecCoin[]; -} - -/** -* ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards -for a validator inexpensive to track, allows simple sanity checks. -*/ -export interface V1Beta1ValidatorOutstandingRewards { - rewards?: V1Beta1DecCoin[]; -} - -/** -* 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. -*/ -export interface V1Beta1ValidatorSlashEvent { - /** @format uint64 */ - validator_period?: string; - fraction?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/distribution/v1beta1/distribution.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryCommunityPool - * @summary CommunityPool queries the community pool coins. - * @request GET:/cosmos/distribution/v1beta1/community_pool - */ - queryCommunityPool = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/community_pool`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegationTotalRewards - * @summary DelegationTotalRewards queries the total rewards accrued by a each -validator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards - */ - queryDelegationTotalRewards = (delegator_address: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegator_address}/rewards`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegationRewards - * @summary DelegationRewards queries the total rewards accrued by a delegation. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address} - */ - queryDelegationRewards = (delegator_address: string, validator_address: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegator_address}/rewards/${validator_address}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidators - * @summary DelegatorValidators queries the validators of a delegator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators - */ - queryDelegatorValidators = (delegator_address: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegator_address}/validators`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegatorWithdrawAddress - * @summary DelegatorWithdrawAddress queries withdraw address of a delegator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address - */ - queryDelegatorWithdrawAddress = (delegator_address: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/delegators/${delegator_address}/withdraw_address`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries params of the distribution module. - * @request GET:/cosmos/distribution/v1beta1/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryValidatorCommission - * @summary ValidatorCommission queries accumulated commission for a validator. - * @request GET:/cosmos/distribution/v1beta1/validators/{validator_address}/commission - */ - queryValidatorCommission = (validator_address: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/validators/${validator_address}/commission`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryValidatorOutstandingRewards - * @summary ValidatorOutstandingRewards queries rewards of a validator address. - * @request GET:/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards - */ - queryValidatorOutstandingRewards = (validator_address: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/distribution/v1beta1/validators/${validator_address}/outstanding_rewards`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryValidatorSlashes - * @summary ValidatorSlashes queries slash events of a validator. - * @request GET:/cosmos/distribution/v1beta1/validators/{validator_address}/slashes - */ - queryValidatorSlashes = ( - validator_address: string, - query?: { - starting_height?: string; - ending_height?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/distribution/v1beta1/validators/${validator_address}/slashes`, - method: "GET", - query: query, - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index 767d2c358f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - countTotal: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; -} -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index b5f5ced3d6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,242 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { - offset: 0, - limit: 0, - countTotal: false, - reverse: false, -}; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } - else { - message.reverse = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - message.reverse !== undefined && (obj.reverse = message.reverse); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } - else { - message.reverse = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 9c87ac0c9c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - 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; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { - offset: 0, - limit: 0, - count_total: false, - reverse: false, -}; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } else { - message.reverse = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - 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; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } else { - message.reverse = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac6a3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb30cd..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98406..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.d.ts deleted file mode 100644 index 3286a30046..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.d.ts +++ /dev/null @@ -1,201 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { DecCoin, Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.distribution.v1beta1"; -/** Params defines the set of params for the distribution module. */ -export interface Params { - communityTax: string; - baseProposerReward: string; - bonusProposerReward: string; - withdrawAddrEnabled: boolean; -} -/** - * ValidatorHistoricalRewards represents historical rewards for a validator. - * Height is implicit within the store key. - * Cumulative reward ratio is the sum from the zeroeth period - * until this period of rewards / tokens, per the spec. - * The reference count indicates the number of objects - * which might need to reference this historical entry at any point. - * ReferenceCount = - * number of outstanding delegations which ended the associated period (and - * might need to read that record) - * + number of slashes which ended the associated period (and might need to - * read that record) - * + one per validator for the zeroeth period, set on initialization - */ -export interface ValidatorHistoricalRewards { - cumulativeRewardRatio: DecCoin[]; - referenceCount: number; -} -/** - * ValidatorCurrentRewards represents current rewards and current - * period for a validator kept as a running counter and incremented - * each block as long as the validator's tokens remain constant. - */ -export interface ValidatorCurrentRewards { - rewards: DecCoin[]; - period: number; -} -/** - * ValidatorAccumulatedCommission represents accumulated commission - * for a validator kept as a running counter, can be withdrawn at any time. - */ -export interface ValidatorAccumulatedCommission { - commission: DecCoin[]; -} -/** - * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards - * for a validator inexpensive to track, allows simple sanity checks. - */ -export interface ValidatorOutstandingRewards { - rewards: DecCoin[]; -} -/** - * 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. - */ -export interface ValidatorSlashEvent { - validatorPeriod: number; - fraction: string; -} -/** ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. */ -export interface ValidatorSlashEvents { - validatorSlashEvents: ValidatorSlashEvent[]; -} -/** FeePool is the global fee pool for distribution. */ -export interface FeePool { - communityPool: DecCoin[]; -} -/** - * CommunityPoolSpendProposal details a proposal for use of community funds, - * together with how many coins are proposed to be spent, and to which - * recipient account. - */ -export interface CommunityPoolSpendProposal { - title: string; - description: string; - recipient: string; - amount: Coin[]; -} -/** - * DelegatorStartingInfo represents the starting info for a delegator reward - * period. It tracks the previous validator period, the delegation's amount of - * staking token, and the creation height (to check later on if any slashes have - * occurred). NOTE: Even though validators are slashed to whole staking tokens, - * the delegators within the validator may be left with less than a full token, - * thus sdk.Dec is used. - */ -export interface DelegatorStartingInfo { - previousPeriod: number; - stake: string; - height: number; -} -/** - * DelegationDelegatorReward represents the properties - * of a delegator's delegation reward. - */ -export interface DelegationDelegatorReward { - validatorAddress: string; - reward: DecCoin[]; -} -/** - * CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal - * with a deposit - */ -export interface CommunityPoolSpendProposalWithDeposit { - title: string; - description: string; - recipient: string; - amount: string; - deposit: string; -} -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -export declare const ValidatorHistoricalRewards: { - encode(message: ValidatorHistoricalRewards, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorHistoricalRewards; - fromJSON(object: any): ValidatorHistoricalRewards; - toJSON(message: ValidatorHistoricalRewards): unknown; - fromPartial(object: DeepPartial): ValidatorHistoricalRewards; -}; -export declare const ValidatorCurrentRewards: { - encode(message: ValidatorCurrentRewards, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorCurrentRewards; - fromJSON(object: any): ValidatorCurrentRewards; - toJSON(message: ValidatorCurrentRewards): unknown; - fromPartial(object: DeepPartial): ValidatorCurrentRewards; -}; -export declare const ValidatorAccumulatedCommission: { - encode(message: ValidatorAccumulatedCommission, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorAccumulatedCommission; - fromJSON(object: any): ValidatorAccumulatedCommission; - toJSON(message: ValidatorAccumulatedCommission): unknown; - fromPartial(object: DeepPartial): ValidatorAccumulatedCommission; -}; -export declare const ValidatorOutstandingRewards: { - encode(message: ValidatorOutstandingRewards, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorOutstandingRewards; - fromJSON(object: any): ValidatorOutstandingRewards; - toJSON(message: ValidatorOutstandingRewards): unknown; - fromPartial(object: DeepPartial): ValidatorOutstandingRewards; -}; -export declare const ValidatorSlashEvent: { - encode(message: ValidatorSlashEvent, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorSlashEvent; - fromJSON(object: any): ValidatorSlashEvent; - toJSON(message: ValidatorSlashEvent): unknown; - fromPartial(object: DeepPartial): ValidatorSlashEvent; -}; -export declare const ValidatorSlashEvents: { - encode(message: ValidatorSlashEvents, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorSlashEvents; - fromJSON(object: any): ValidatorSlashEvents; - toJSON(message: ValidatorSlashEvents): unknown; - fromPartial(object: DeepPartial): ValidatorSlashEvents; -}; -export declare const FeePool: { - encode(message: FeePool, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FeePool; - fromJSON(object: any): FeePool; - toJSON(message: FeePool): unknown; - fromPartial(object: DeepPartial): FeePool; -}; -export declare const CommunityPoolSpendProposal: { - encode(message: CommunityPoolSpendProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CommunityPoolSpendProposal; - fromJSON(object: any): CommunityPoolSpendProposal; - toJSON(message: CommunityPoolSpendProposal): unknown; - fromPartial(object: DeepPartial): CommunityPoolSpendProposal; -}; -export declare const DelegatorStartingInfo: { - encode(message: DelegatorStartingInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DelegatorStartingInfo; - fromJSON(object: any): DelegatorStartingInfo; - toJSON(message: DelegatorStartingInfo): unknown; - fromPartial(object: DeepPartial): DelegatorStartingInfo; -}; -export declare const DelegationDelegatorReward: { - encode(message: DelegationDelegatorReward, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DelegationDelegatorReward; - fromJSON(object: any): DelegationDelegatorReward; - toJSON(message: DelegationDelegatorReward): unknown; - fromPartial(object: DeepPartial): DelegationDelegatorReward; -}; -export declare const CommunityPoolSpendProposalWithDeposit: { - encode(message: CommunityPoolSpendProposalWithDeposit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CommunityPoolSpendProposalWithDeposit; - fromJSON(object: any): CommunityPoolSpendProposalWithDeposit; - toJSON(message: CommunityPoolSpendProposalWithDeposit): unknown; - fromPartial(object: DeepPartial): CommunityPoolSpendProposalWithDeposit; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.js deleted file mode 100644 index c3ee057885..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.js +++ /dev/null @@ -1,1075 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { DecCoin, Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.distribution.v1beta1"; -const baseParams = { - communityTax: "", - baseProposerReward: "", - bonusProposerReward: "", - withdrawAddrEnabled: false, -}; -export const Params = { - encode(message, writer = Writer.create()) { - if (message.communityTax !== "") { - writer.uint32(10).string(message.communityTax); - } - if (message.baseProposerReward !== "") { - writer.uint32(18).string(message.baseProposerReward); - } - if (message.bonusProposerReward !== "") { - writer.uint32(26).string(message.bonusProposerReward); - } - if (message.withdrawAddrEnabled === true) { - writer.uint32(32).bool(message.withdrawAddrEnabled); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.communityTax = reader.string(); - break; - case 2: - message.baseProposerReward = reader.string(); - break; - case 3: - message.bonusProposerReward = reader.string(); - break; - case 4: - message.withdrawAddrEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - if (object.communityTax !== undefined && object.communityTax !== null) { - message.communityTax = String(object.communityTax); - } - else { - message.communityTax = ""; - } - if (object.baseProposerReward !== undefined && - object.baseProposerReward !== null) { - message.baseProposerReward = String(object.baseProposerReward); - } - else { - message.baseProposerReward = ""; - } - if (object.bonusProposerReward !== undefined && - object.bonusProposerReward !== null) { - message.bonusProposerReward = String(object.bonusProposerReward); - } - else { - message.bonusProposerReward = ""; - } - if (object.withdrawAddrEnabled !== undefined && - object.withdrawAddrEnabled !== null) { - message.withdrawAddrEnabled = Boolean(object.withdrawAddrEnabled); - } - else { - message.withdrawAddrEnabled = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.communityTax !== undefined && - (obj.communityTax = message.communityTax); - message.baseProposerReward !== undefined && - (obj.baseProposerReward = message.baseProposerReward); - message.bonusProposerReward !== undefined && - (obj.bonusProposerReward = message.bonusProposerReward); - message.withdrawAddrEnabled !== undefined && - (obj.withdrawAddrEnabled = message.withdrawAddrEnabled); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - if (object.communityTax !== undefined && object.communityTax !== null) { - message.communityTax = object.communityTax; - } - else { - message.communityTax = ""; - } - if (object.baseProposerReward !== undefined && - object.baseProposerReward !== null) { - message.baseProposerReward = object.baseProposerReward; - } - else { - message.baseProposerReward = ""; - } - if (object.bonusProposerReward !== undefined && - object.bonusProposerReward !== null) { - message.bonusProposerReward = object.bonusProposerReward; - } - else { - message.bonusProposerReward = ""; - } - if (object.withdrawAddrEnabled !== undefined && - object.withdrawAddrEnabled !== null) { - message.withdrawAddrEnabled = object.withdrawAddrEnabled; - } - else { - message.withdrawAddrEnabled = false; - } - return message; - }, -}; -const baseValidatorHistoricalRewards = { referenceCount: 0 }; -export const ValidatorHistoricalRewards = { - encode(message, writer = Writer.create()) { - for (const v of message.cumulativeRewardRatio) { - DecCoin.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.referenceCount !== 0) { - writer.uint32(16).uint32(message.referenceCount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorHistoricalRewards, - }; - message.cumulativeRewardRatio = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cumulativeRewardRatio.push(DecCoin.decode(reader, reader.uint32())); - break; - case 2: - message.referenceCount = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorHistoricalRewards, - }; - message.cumulativeRewardRatio = []; - if (object.cumulativeRewardRatio !== undefined && - object.cumulativeRewardRatio !== null) { - for (const e of object.cumulativeRewardRatio) { - message.cumulativeRewardRatio.push(DecCoin.fromJSON(e)); - } - } - if (object.referenceCount !== undefined && object.referenceCount !== null) { - message.referenceCount = Number(object.referenceCount); - } - else { - message.referenceCount = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.cumulativeRewardRatio) { - obj.cumulativeRewardRatio = message.cumulativeRewardRatio.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.cumulativeRewardRatio = []; - } - message.referenceCount !== undefined && - (obj.referenceCount = message.referenceCount); - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorHistoricalRewards, - }; - message.cumulativeRewardRatio = []; - if (object.cumulativeRewardRatio !== undefined && - object.cumulativeRewardRatio !== null) { - for (const e of object.cumulativeRewardRatio) { - message.cumulativeRewardRatio.push(DecCoin.fromPartial(e)); - } - } - if (object.referenceCount !== undefined && object.referenceCount !== null) { - message.referenceCount = object.referenceCount; - } - else { - message.referenceCount = 0; - } - return message; - }, -}; -const baseValidatorCurrentRewards = { period: 0 }; -export const ValidatorCurrentRewards = { - encode(message, writer = Writer.create()) { - for (const v of message.rewards) { - DecCoin.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.period !== 0) { - writer.uint32(16).uint64(message.period); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorCurrentRewards, - }; - message.rewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - case 2: - message.period = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorCurrentRewards, - }; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromJSON(e)); - } - } - if (object.period !== undefined && object.period !== null) { - message.period = Number(object.period); - } - else { - message.period = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.rewards = []; - } - message.period !== undefined && (obj.period = message.period); - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorCurrentRewards, - }; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromPartial(e)); - } - } - if (object.period !== undefined && object.period !== null) { - message.period = object.period; - } - else { - message.period = 0; - } - return message; - }, -}; -const baseValidatorAccumulatedCommission = {}; -export const ValidatorAccumulatedCommission = { - encode(message, writer = Writer.create()) { - for (const v of message.commission) { - DecCoin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorAccumulatedCommission, - }; - message.commission = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commission.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorAccumulatedCommission, - }; - message.commission = []; - if (object.commission !== undefined && object.commission !== null) { - for (const e of object.commission) { - message.commission.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.commission) { - obj.commission = message.commission.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.commission = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorAccumulatedCommission, - }; - message.commission = []; - if (object.commission !== undefined && object.commission !== null) { - for (const e of object.commission) { - message.commission.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -const baseValidatorOutstandingRewards = {}; -export const ValidatorOutstandingRewards = { - encode(message, writer = Writer.create()) { - for (const v of message.rewards) { - DecCoin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorOutstandingRewards, - }; - message.rewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorOutstandingRewards, - }; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.rewards = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorOutstandingRewards, - }; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -const baseValidatorSlashEvent = { validatorPeriod: 0, fraction: "" }; -export const ValidatorSlashEvent = { - encode(message, writer = Writer.create()) { - if (message.validatorPeriod !== 0) { - writer.uint32(8).uint64(message.validatorPeriod); - } - if (message.fraction !== "") { - writer.uint32(18).string(message.fraction); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSlashEvent }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorPeriod = longToNumber(reader.uint64()); - break; - case 2: - message.fraction = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorSlashEvent }; - if (object.validatorPeriod !== undefined && - object.validatorPeriod !== null) { - message.validatorPeriod = Number(object.validatorPeriod); - } - else { - message.validatorPeriod = 0; - } - if (object.fraction !== undefined && object.fraction !== null) { - message.fraction = String(object.fraction); - } - else { - message.fraction = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorPeriod !== undefined && - (obj.validatorPeriod = message.validatorPeriod); - message.fraction !== undefined && (obj.fraction = message.fraction); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorSlashEvent }; - if (object.validatorPeriod !== undefined && - object.validatorPeriod !== null) { - message.validatorPeriod = object.validatorPeriod; - } - else { - message.validatorPeriod = 0; - } - if (object.fraction !== undefined && object.fraction !== null) { - message.fraction = object.fraction; - } - else { - message.fraction = ""; - } - return message; - }, -}; -const baseValidatorSlashEvents = {}; -export const ValidatorSlashEvents = { - encode(message, writer = Writer.create()) { - for (const v of message.validatorSlashEvents) { - ValidatorSlashEvent.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSlashEvents }; - message.validatorSlashEvents = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorSlashEvents.push(ValidatorSlashEvent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorSlashEvents }; - message.validatorSlashEvents = []; - if (object.validatorSlashEvents !== undefined && - object.validatorSlashEvents !== null) { - for (const e of object.validatorSlashEvents) { - message.validatorSlashEvents.push(ValidatorSlashEvent.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.validatorSlashEvents) { - obj.validatorSlashEvents = message.validatorSlashEvents.map((e) => e ? ValidatorSlashEvent.toJSON(e) : undefined); - } - else { - obj.validatorSlashEvents = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorSlashEvents }; - message.validatorSlashEvents = []; - if (object.validatorSlashEvents !== undefined && - object.validatorSlashEvents !== null) { - for (const e of object.validatorSlashEvents) { - message.validatorSlashEvents.push(ValidatorSlashEvent.fromPartial(e)); - } - } - return message; - }, -}; -const baseFeePool = {}; -export const FeePool = { - encode(message, writer = Writer.create()) { - for (const v of message.communityPool) { - DecCoin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFeePool }; - message.communityPool = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.communityPool.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFeePool }; - message.communityPool = []; - if (object.communityPool !== undefined && object.communityPool !== null) { - for (const e of object.communityPool) { - message.communityPool.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.communityPool) { - obj.communityPool = message.communityPool.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.communityPool = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFeePool }; - message.communityPool = []; - if (object.communityPool !== undefined && object.communityPool !== null) { - for (const e of object.communityPool) { - message.communityPool.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -const baseCommunityPoolSpendProposal = { - title: "", - description: "", - recipient: "", -}; -export const CommunityPoolSpendProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.recipient !== "") { - writer.uint32(26).string(message.recipient); - } - for (const v of message.amount) { - Coin.encode(v, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCommunityPoolSpendProposal, - }; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.recipient = reader.string(); - break; - case 4: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseCommunityPoolSpendProposal, - }; - message.amount = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = String(object.recipient); - } - else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.recipient !== undefined && (obj.recipient = message.recipient); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.amount = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseCommunityPoolSpendProposal, - }; - message.amount = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = object.recipient; - } - else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseDelegatorStartingInfo = { - previousPeriod: 0, - stake: "", - height: 0, -}; -export const DelegatorStartingInfo = { - encode(message, writer = Writer.create()) { - if (message.previousPeriod !== 0) { - writer.uint32(8).uint64(message.previousPeriod); - } - if (message.stake !== "") { - writer.uint32(18).string(message.stake); - } - if (message.height !== 0) { - writer.uint32(24).uint64(message.height); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegatorStartingInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.previousPeriod = longToNumber(reader.uint64()); - break; - case 2: - message.stake = reader.string(); - break; - case 3: - message.height = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDelegatorStartingInfo }; - if (object.previousPeriod !== undefined && object.previousPeriod !== null) { - message.previousPeriod = Number(object.previousPeriod); - } - else { - message.previousPeriod = 0; - } - if (object.stake !== undefined && object.stake !== null) { - message.stake = String(object.stake); - } - else { - message.stake = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.previousPeriod !== undefined && - (obj.previousPeriod = message.previousPeriod); - message.stake !== undefined && (obj.stake = message.stake); - message.height !== undefined && (obj.height = message.height); - return obj; - }, - fromPartial(object) { - const message = { ...baseDelegatorStartingInfo }; - if (object.previousPeriod !== undefined && object.previousPeriod !== null) { - message.previousPeriod = object.previousPeriod; - } - else { - message.previousPeriod = 0; - } - if (object.stake !== undefined && object.stake !== null) { - message.stake = object.stake; - } - else { - message.stake = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - return message; - }, -}; -const baseDelegationDelegatorReward = { validatorAddress: "" }; -export const DelegationDelegatorReward = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - for (const v of message.reward) { - DecCoin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDelegationDelegatorReward, - }; - message.reward = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.reward.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDelegationDelegatorReward, - }; - message.reward = []; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.reward !== undefined && object.reward !== null) { - for (const e of object.reward) { - message.reward.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - if (message.reward) { - obj.reward = message.reward.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.reward = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseDelegationDelegatorReward, - }; - message.reward = []; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.reward !== undefined && object.reward !== null) { - for (const e of object.reward) { - message.reward.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -const baseCommunityPoolSpendProposalWithDeposit = { - title: "", - description: "", - recipient: "", - amount: "", - deposit: "", -}; -export const CommunityPoolSpendProposalWithDeposit = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.recipient !== "") { - writer.uint32(26).string(message.recipient); - } - if (message.amount !== "") { - writer.uint32(34).string(message.amount); - } - if (message.deposit !== "") { - writer.uint32(42).string(message.deposit); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCommunityPoolSpendProposalWithDeposit, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.recipient = reader.string(); - break; - case 4: - message.amount = reader.string(); - break; - case 5: - message.deposit = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseCommunityPoolSpendProposalWithDeposit, - }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = String(object.recipient); - } - else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = String(object.deposit); - } - else { - message.deposit = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.recipient !== undefined && (obj.recipient = message.recipient); - message.amount !== undefined && (obj.amount = message.amount); - message.deposit !== undefined && (obj.deposit = message.deposit); - return obj; - }, - fromPartial(object) { - const message = { - ...baseCommunityPoolSpendProposalWithDeposit, - }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = object.recipient; - } - else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = object.deposit; - } - else { - message.deposit = ""; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.ts deleted file mode 100644 index 7ed79e05a8..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/distribution.ts +++ /dev/null @@ -1,1355 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { DecCoin, Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.distribution.v1beta1"; - -/** Params defines the set of params for the distribution module. */ -export interface Params { - community_tax: string; - base_proposer_reward: string; - bonus_proposer_reward: string; - withdraw_addr_enabled: boolean; -} - -/** - * ValidatorHistoricalRewards represents historical rewards for a validator. - * Height is implicit within the store key. - * Cumulative reward ratio is the sum from the zeroeth period - * until this period of rewards / tokens, per the spec. - * The reference count indicates the number of objects - * which might need to reference this historical entry at any point. - * ReferenceCount = - * number of outstanding delegations which ended the associated period (and - * might need to read that record) - * + number of slashes which ended the associated period (and might need to - * read that record) - * + one per validator for the zeroeth period, set on initialization - */ -export interface ValidatorHistoricalRewards { - cumulative_reward_ratio: DecCoin[]; - reference_count: number; -} - -/** - * ValidatorCurrentRewards represents current rewards and current - * period for a validator kept as a running counter and incremented - * each block as long as the validator's tokens remain constant. - */ -export interface ValidatorCurrentRewards { - rewards: DecCoin[]; - period: number; -} - -/** - * ValidatorAccumulatedCommission represents accumulated commission - * for a validator kept as a running counter, can be withdrawn at any time. - */ -export interface ValidatorAccumulatedCommission { - commission: DecCoin[]; -} - -/** - * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards - * for a validator inexpensive to track, allows simple sanity checks. - */ -export interface ValidatorOutstandingRewards { - rewards: DecCoin[]; -} - -/** - * 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. - */ -export interface ValidatorSlashEvent { - validator_period: number; - fraction: string; -} - -/** ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. */ -export interface ValidatorSlashEvents { - validator_slash_events: ValidatorSlashEvent[]; -} - -/** FeePool is the global fee pool for distribution. */ -export interface FeePool { - community_pool: DecCoin[]; -} - -/** - * CommunityPoolSpendProposal details a proposal for use of community funds, - * together with how many coins are proposed to be spent, and to which - * recipient account. - */ -export interface CommunityPoolSpendProposal { - title: string; - description: string; - recipient: string; - amount: Coin[]; -} - -/** - * DelegatorStartingInfo represents the starting info for a delegator reward - * period. It tracks the previous validator period, the delegation's amount of - * staking token, and the creation height (to check later on if any slashes have - * occurred). NOTE: Even though validators are slashed to whole staking tokens, - * the delegators within the validator may be left with less than a full token, - * thus sdk.Dec is used. - */ -export interface DelegatorStartingInfo { - previous_period: number; - stake: string; - height: number; -} - -/** - * DelegationDelegatorReward represents the properties - * of a delegator's delegation reward. - */ -export interface DelegationDelegatorReward { - validator_address: string; - reward: DecCoin[]; -} - -/** - * CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal - * with a deposit - */ -export interface CommunityPoolSpendProposalWithDeposit { - title: string; - description: string; - recipient: string; - amount: string; - deposit: string; -} - -const baseParams: object = { - community_tax: "", - base_proposer_reward: "", - bonus_proposer_reward: "", - withdraw_addr_enabled: false, -}; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.community_tax !== "") { - writer.uint32(10).string(message.community_tax); - } - if (message.base_proposer_reward !== "") { - writer.uint32(18).string(message.base_proposer_reward); - } - if (message.bonus_proposer_reward !== "") { - writer.uint32(26).string(message.bonus_proposer_reward); - } - if (message.withdraw_addr_enabled === true) { - writer.uint32(32).bool(message.withdraw_addr_enabled); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.community_tax = reader.string(); - break; - case 2: - message.base_proposer_reward = reader.string(); - break; - case 3: - message.bonus_proposer_reward = reader.string(); - break; - case 4: - message.withdraw_addr_enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if (object.community_tax !== undefined && object.community_tax !== null) { - message.community_tax = String(object.community_tax); - } else { - message.community_tax = ""; - } - if ( - object.base_proposer_reward !== undefined && - object.base_proposer_reward !== null - ) { - message.base_proposer_reward = String(object.base_proposer_reward); - } else { - message.base_proposer_reward = ""; - } - if ( - object.bonus_proposer_reward !== undefined && - object.bonus_proposer_reward !== null - ) { - message.bonus_proposer_reward = String(object.bonus_proposer_reward); - } else { - message.bonus_proposer_reward = ""; - } - if ( - object.withdraw_addr_enabled !== undefined && - object.withdraw_addr_enabled !== null - ) { - message.withdraw_addr_enabled = Boolean(object.withdraw_addr_enabled); - } else { - message.withdraw_addr_enabled = false; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.community_tax !== undefined && - (obj.community_tax = message.community_tax); - message.base_proposer_reward !== undefined && - (obj.base_proposer_reward = message.base_proposer_reward); - message.bonus_proposer_reward !== undefined && - (obj.bonus_proposer_reward = message.bonus_proposer_reward); - message.withdraw_addr_enabled !== undefined && - (obj.withdraw_addr_enabled = message.withdraw_addr_enabled); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if (object.community_tax !== undefined && object.community_tax !== null) { - message.community_tax = object.community_tax; - } else { - message.community_tax = ""; - } - if ( - object.base_proposer_reward !== undefined && - object.base_proposer_reward !== null - ) { - message.base_proposer_reward = object.base_proposer_reward; - } else { - message.base_proposer_reward = ""; - } - if ( - object.bonus_proposer_reward !== undefined && - object.bonus_proposer_reward !== null - ) { - message.bonus_proposer_reward = object.bonus_proposer_reward; - } else { - message.bonus_proposer_reward = ""; - } - if ( - object.withdraw_addr_enabled !== undefined && - object.withdraw_addr_enabled !== null - ) { - message.withdraw_addr_enabled = object.withdraw_addr_enabled; - } else { - message.withdraw_addr_enabled = false; - } - return message; - }, -}; - -const baseValidatorHistoricalRewards: object = { reference_count: 0 }; - -export const ValidatorHistoricalRewards = { - encode( - message: ValidatorHistoricalRewards, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.cumulative_reward_ratio) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.reference_count !== 0) { - writer.uint32(16).uint32(message.reference_count); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorHistoricalRewards { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorHistoricalRewards, - } as ValidatorHistoricalRewards; - message.cumulative_reward_ratio = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cumulative_reward_ratio.push( - DecCoin.decode(reader, reader.uint32()) - ); - break; - case 2: - message.reference_count = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorHistoricalRewards { - const message = { - ...baseValidatorHistoricalRewards, - } as ValidatorHistoricalRewards; - message.cumulative_reward_ratio = []; - if ( - object.cumulative_reward_ratio !== undefined && - object.cumulative_reward_ratio !== null - ) { - for (const e of object.cumulative_reward_ratio) { - message.cumulative_reward_ratio.push(DecCoin.fromJSON(e)); - } - } - if ( - object.reference_count !== undefined && - object.reference_count !== null - ) { - message.reference_count = Number(object.reference_count); - } else { - message.reference_count = 0; - } - return message; - }, - - toJSON(message: ValidatorHistoricalRewards): unknown { - const obj: any = {}; - if (message.cumulative_reward_ratio) { - obj.cumulative_reward_ratio = message.cumulative_reward_ratio.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.cumulative_reward_ratio = []; - } - message.reference_count !== undefined && - (obj.reference_count = message.reference_count); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorHistoricalRewards { - const message = { - ...baseValidatorHistoricalRewards, - } as ValidatorHistoricalRewards; - message.cumulative_reward_ratio = []; - if ( - object.cumulative_reward_ratio !== undefined && - object.cumulative_reward_ratio !== null - ) { - for (const e of object.cumulative_reward_ratio) { - message.cumulative_reward_ratio.push(DecCoin.fromPartial(e)); - } - } - if ( - object.reference_count !== undefined && - object.reference_count !== null - ) { - message.reference_count = object.reference_count; - } else { - message.reference_count = 0; - } - return message; - }, -}; - -const baseValidatorCurrentRewards: object = { period: 0 }; - -export const ValidatorCurrentRewards = { - encode( - message: ValidatorCurrentRewards, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.rewards) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.period !== 0) { - writer.uint32(16).uint64(message.period); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorCurrentRewards { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorCurrentRewards, - } as ValidatorCurrentRewards; - message.rewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - case 2: - message.period = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorCurrentRewards { - const message = { - ...baseValidatorCurrentRewards, - } as ValidatorCurrentRewards; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromJSON(e)); - } - } - if (object.period !== undefined && object.period !== null) { - message.period = Number(object.period); - } else { - message.period = 0; - } - return message; - }, - - toJSON(message: ValidatorCurrentRewards): unknown { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.rewards = []; - } - message.period !== undefined && (obj.period = message.period); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorCurrentRewards { - const message = { - ...baseValidatorCurrentRewards, - } as ValidatorCurrentRewards; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromPartial(e)); - } - } - if (object.period !== undefined && object.period !== null) { - message.period = object.period; - } else { - message.period = 0; - } - return message; - }, -}; - -const baseValidatorAccumulatedCommission: object = {}; - -export const ValidatorAccumulatedCommission = { - encode( - message: ValidatorAccumulatedCommission, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.commission) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorAccumulatedCommission { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorAccumulatedCommission, - } as ValidatorAccumulatedCommission; - message.commission = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commission.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorAccumulatedCommission { - const message = { - ...baseValidatorAccumulatedCommission, - } as ValidatorAccumulatedCommission; - message.commission = []; - if (object.commission !== undefined && object.commission !== null) { - for (const e of object.commission) { - message.commission.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ValidatorAccumulatedCommission): unknown { - const obj: any = {}; - if (message.commission) { - obj.commission = message.commission.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.commission = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorAccumulatedCommission { - const message = { - ...baseValidatorAccumulatedCommission, - } as ValidatorAccumulatedCommission; - message.commission = []; - if (object.commission !== undefined && object.commission !== null) { - for (const e of object.commission) { - message.commission.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseValidatorOutstandingRewards: object = {}; - -export const ValidatorOutstandingRewards = { - encode( - message: ValidatorOutstandingRewards, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.rewards) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorOutstandingRewards { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorOutstandingRewards, - } as ValidatorOutstandingRewards; - message.rewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorOutstandingRewards { - const message = { - ...baseValidatorOutstandingRewards, - } as ValidatorOutstandingRewards; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ValidatorOutstandingRewards): unknown { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.rewards = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorOutstandingRewards { - const message = { - ...baseValidatorOutstandingRewards, - } as ValidatorOutstandingRewards; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseValidatorSlashEvent: object = { validator_period: 0, fraction: "" }; - -export const ValidatorSlashEvent = { - encode( - message: ValidatorSlashEvent, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_period !== 0) { - writer.uint32(8).uint64(message.validator_period); - } - if (message.fraction !== "") { - writer.uint32(18).string(message.fraction); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorSlashEvent { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSlashEvent } as ValidatorSlashEvent; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_period = longToNumber(reader.uint64() as Long); - break; - case 2: - message.fraction = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorSlashEvent { - const message = { ...baseValidatorSlashEvent } as ValidatorSlashEvent; - if ( - object.validator_period !== undefined && - object.validator_period !== null - ) { - message.validator_period = Number(object.validator_period); - } else { - message.validator_period = 0; - } - if (object.fraction !== undefined && object.fraction !== null) { - message.fraction = String(object.fraction); - } else { - message.fraction = ""; - } - return message; - }, - - toJSON(message: ValidatorSlashEvent): unknown { - const obj: any = {}; - message.validator_period !== undefined && - (obj.validator_period = message.validator_period); - message.fraction !== undefined && (obj.fraction = message.fraction); - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorSlashEvent { - const message = { ...baseValidatorSlashEvent } as ValidatorSlashEvent; - if ( - object.validator_period !== undefined && - object.validator_period !== null - ) { - message.validator_period = object.validator_period; - } else { - message.validator_period = 0; - } - if (object.fraction !== undefined && object.fraction !== null) { - message.fraction = object.fraction; - } else { - message.fraction = ""; - } - return message; - }, -}; - -const baseValidatorSlashEvents: object = {}; - -export const ValidatorSlashEvents = { - encode( - message: ValidatorSlashEvents, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.validator_slash_events) { - ValidatorSlashEvent.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorSlashEvents { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSlashEvents } as ValidatorSlashEvents; - message.validator_slash_events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_slash_events.push( - ValidatorSlashEvent.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorSlashEvents { - const message = { ...baseValidatorSlashEvents } as ValidatorSlashEvents; - message.validator_slash_events = []; - if ( - object.validator_slash_events !== undefined && - object.validator_slash_events !== null - ) { - for (const e of object.validator_slash_events) { - message.validator_slash_events.push(ValidatorSlashEvent.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ValidatorSlashEvents): unknown { - const obj: any = {}; - if (message.validator_slash_events) { - obj.validator_slash_events = message.validator_slash_events.map((e) => - e ? ValidatorSlashEvent.toJSON(e) : undefined - ); - } else { - obj.validator_slash_events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorSlashEvents { - const message = { ...baseValidatorSlashEvents } as ValidatorSlashEvents; - message.validator_slash_events = []; - if ( - object.validator_slash_events !== undefined && - object.validator_slash_events !== null - ) { - for (const e of object.validator_slash_events) { - message.validator_slash_events.push(ValidatorSlashEvent.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFeePool: object = {}; - -export const FeePool = { - encode(message: FeePool, writer: Writer = Writer.create()): Writer { - for (const v of message.community_pool) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FeePool { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFeePool } as FeePool; - message.community_pool = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.community_pool.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FeePool { - const message = { ...baseFeePool } as FeePool; - message.community_pool = []; - if (object.community_pool !== undefined && object.community_pool !== null) { - for (const e of object.community_pool) { - message.community_pool.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FeePool): unknown { - const obj: any = {}; - if (message.community_pool) { - obj.community_pool = message.community_pool.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.community_pool = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FeePool { - const message = { ...baseFeePool } as FeePool; - message.community_pool = []; - if (object.community_pool !== undefined && object.community_pool !== null) { - for (const e of object.community_pool) { - message.community_pool.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCommunityPoolSpendProposal: object = { - title: "", - description: "", - recipient: "", -}; - -export const CommunityPoolSpendProposal = { - encode( - message: CommunityPoolSpendProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.recipient !== "") { - writer.uint32(26).string(message.recipient); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): CommunityPoolSpendProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCommunityPoolSpendProposal, - } as CommunityPoolSpendProposal; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.recipient = reader.string(); - break; - case 4: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CommunityPoolSpendProposal { - const message = { - ...baseCommunityPoolSpendProposal, - } as CommunityPoolSpendProposal; - message.amount = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = String(object.recipient); - } else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: CommunityPoolSpendProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.recipient !== undefined && (obj.recipient = message.recipient); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.amount = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): CommunityPoolSpendProposal { - const message = { - ...baseCommunityPoolSpendProposal, - } as CommunityPoolSpendProposal; - message.amount = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = object.recipient; - } else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseDelegatorStartingInfo: object = { - previous_period: 0, - stake: "", - height: 0, -}; - -export const DelegatorStartingInfo = { - encode( - message: DelegatorStartingInfo, - writer: Writer = Writer.create() - ): Writer { - if (message.previous_period !== 0) { - writer.uint32(8).uint64(message.previous_period); - } - if (message.stake !== "") { - writer.uint32(18).string(message.stake); - } - if (message.height !== 0) { - writer.uint32(24).uint64(message.height); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DelegatorStartingInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegatorStartingInfo } as DelegatorStartingInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.previous_period = longToNumber(reader.uint64() as Long); - break; - case 2: - message.stake = reader.string(); - break; - case 3: - message.height = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DelegatorStartingInfo { - const message = { ...baseDelegatorStartingInfo } as DelegatorStartingInfo; - if ( - object.previous_period !== undefined && - object.previous_period !== null - ) { - message.previous_period = Number(object.previous_period); - } else { - message.previous_period = 0; - } - if (object.stake !== undefined && object.stake !== null) { - message.stake = String(object.stake); - } else { - message.stake = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - return message; - }, - - toJSON(message: DelegatorStartingInfo): unknown { - const obj: any = {}; - message.previous_period !== undefined && - (obj.previous_period = message.previous_period); - message.stake !== undefined && (obj.stake = message.stake); - message.height !== undefined && (obj.height = message.height); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DelegatorStartingInfo { - const message = { ...baseDelegatorStartingInfo } as DelegatorStartingInfo; - if ( - object.previous_period !== undefined && - object.previous_period !== null - ) { - message.previous_period = object.previous_period; - } else { - message.previous_period = 0; - } - if (object.stake !== undefined && object.stake !== null) { - message.stake = object.stake; - } else { - message.stake = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - return message; - }, -}; - -const baseDelegationDelegatorReward: object = { validator_address: "" }; - -export const DelegationDelegatorReward = { - encode( - message: DelegationDelegatorReward, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_address !== "") { - writer.uint32(10).string(message.validator_address); - } - for (const v of message.reward) { - DecCoin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DelegationDelegatorReward { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDelegationDelegatorReward, - } as DelegationDelegatorReward; - message.reward = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_address = reader.string(); - break; - case 2: - message.reward.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DelegationDelegatorReward { - const message = { - ...baseDelegationDelegatorReward, - } as DelegationDelegatorReward; - message.reward = []; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - if (object.reward !== undefined && object.reward !== null) { - for (const e of object.reward) { - message.reward.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: DelegationDelegatorReward): unknown { - const obj: any = {}; - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - if (message.reward) { - obj.reward = message.reward.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.reward = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): DelegationDelegatorReward { - const message = { - ...baseDelegationDelegatorReward, - } as DelegationDelegatorReward; - message.reward = []; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - if (object.reward !== undefined && object.reward !== null) { - for (const e of object.reward) { - message.reward.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCommunityPoolSpendProposalWithDeposit: object = { - title: "", - description: "", - recipient: "", - amount: "", - deposit: "", -}; - -export const CommunityPoolSpendProposalWithDeposit = { - encode( - message: CommunityPoolSpendProposalWithDeposit, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.recipient !== "") { - writer.uint32(26).string(message.recipient); - } - if (message.amount !== "") { - writer.uint32(34).string(message.amount); - } - if (message.deposit !== "") { - writer.uint32(42).string(message.deposit); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): CommunityPoolSpendProposalWithDeposit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCommunityPoolSpendProposalWithDeposit, - } as CommunityPoolSpendProposalWithDeposit; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.recipient = reader.string(); - break; - case 4: - message.amount = reader.string(); - break; - case 5: - message.deposit = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CommunityPoolSpendProposalWithDeposit { - const message = { - ...baseCommunityPoolSpendProposalWithDeposit, - } as CommunityPoolSpendProposalWithDeposit; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = String(object.recipient); - } else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = String(object.deposit); - } else { - message.deposit = ""; - } - return message; - }, - - toJSON(message: CommunityPoolSpendProposalWithDeposit): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.recipient !== undefined && (obj.recipient = message.recipient); - message.amount !== undefined && (obj.amount = message.amount); - message.deposit !== undefined && (obj.deposit = message.deposit); - return obj; - }, - - fromPartial( - object: DeepPartial - ): CommunityPoolSpendProposalWithDeposit { - const message = { - ...baseCommunityPoolSpendProposalWithDeposit, - } as CommunityPoolSpendProposalWithDeposit; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.recipient !== undefined && object.recipient !== null) { - message.recipient = object.recipient; - } else { - message.recipient = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = object.deposit; - } else { - message.deposit = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.d.ts deleted file mode 100644 index c044b6676e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.d.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; -import { ValidatorAccumulatedCommission, ValidatorHistoricalRewards, ValidatorCurrentRewards, DelegatorStartingInfo, ValidatorSlashEvent, Params, FeePool } from "../../../cosmos/distribution/v1beta1/distribution"; -export declare const protobufPackage = "cosmos.distribution.v1beta1"; -/** - * DelegatorWithdrawInfo is the address for where distributions rewards are - * withdrawn to by default this struct is only used at genesis to feed in - * default withdraw addresses. - */ -export interface DelegatorWithdrawInfo { - /** delegator_address is the address of the delegator. */ - delegatorAddress: string; - /** withdraw_address is the address to withdraw the delegation rewards to. */ - withdrawAddress: string; -} -/** ValidatorOutstandingRewardsRecord is used for import/export via genesis json. */ -export interface ValidatorOutstandingRewardsRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** outstanding_rewards represents the oustanding rewards of a validator. */ - outstandingRewards: DecCoin[]; -} -/** - * ValidatorAccumulatedCommissionRecord is used for import / export via genesis - * json. - */ -export interface ValidatorAccumulatedCommissionRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** accumulated is the accumulated commission of a validator. */ - accumulated: ValidatorAccumulatedCommission | undefined; -} -/** - * ValidatorHistoricalRewardsRecord is used for import / export via genesis - * json. - */ -export interface ValidatorHistoricalRewardsRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** period defines the period the historical rewards apply to. */ - period: number; - /** rewards defines the historical rewards of a validator. */ - rewards: ValidatorHistoricalRewards | undefined; -} -/** ValidatorCurrentRewardsRecord is used for import / export via genesis json. */ -export interface ValidatorCurrentRewardsRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** rewards defines the current rewards of a validator. */ - rewards: ValidatorCurrentRewards | undefined; -} -/** DelegatorStartingInfoRecord used for import / export via genesis json. */ -export interface DelegatorStartingInfoRecord { - /** delegator_address is the address of the delegator. */ - delegatorAddress: string; - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** starting_info defines the starting info of a delegator. */ - startingInfo: DelegatorStartingInfo | undefined; -} -/** ValidatorSlashEventRecord is used for import / export via genesis json. */ -export interface ValidatorSlashEventRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** height defines the block height at which the slash event occured. */ - height: number; - /** period is the period of the slash event. */ - period: number; - /** validator_slash_event describes the slash event. */ - validatorSlashEvent: ValidatorSlashEvent | undefined; -} -/** GenesisState defines the distribution module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of the module. */ - params: Params | undefined; - /** fee_pool defines the fee pool at genesis. */ - feePool: FeePool | undefined; - /** fee_pool defines the delegator withdraw infos at genesis. */ - delegatorWithdrawInfos: DelegatorWithdrawInfo[]; - /** fee_pool defines the previous proposer at genesis. */ - previousProposer: string; - /** fee_pool defines the outstanding rewards of all validators at genesis. */ - outstandingRewards: ValidatorOutstandingRewardsRecord[]; - /** fee_pool defines the accumulated commisions of all validators at genesis. */ - validatorAccumulatedCommissions: ValidatorAccumulatedCommissionRecord[]; - /** fee_pool defines the historical rewards of all validators at genesis. */ - validatorHistoricalRewards: ValidatorHistoricalRewardsRecord[]; - /** fee_pool defines the current rewards of all validators at genesis. */ - validatorCurrentRewards: ValidatorCurrentRewardsRecord[]; - /** fee_pool defines the delegator starting infos at genesis. */ - delegatorStartingInfos: DelegatorStartingInfoRecord[]; - /** fee_pool defines the validator slash events at genesis. */ - validatorSlashEvents: ValidatorSlashEventRecord[]; -} -export declare const DelegatorWithdrawInfo: { - encode(message: DelegatorWithdrawInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DelegatorWithdrawInfo; - fromJSON(object: any): DelegatorWithdrawInfo; - toJSON(message: DelegatorWithdrawInfo): unknown; - fromPartial(object: DeepPartial): DelegatorWithdrawInfo; -}; -export declare const ValidatorOutstandingRewardsRecord: { - encode(message: ValidatorOutstandingRewardsRecord, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorOutstandingRewardsRecord; - fromJSON(object: any): ValidatorOutstandingRewardsRecord; - toJSON(message: ValidatorOutstandingRewardsRecord): unknown; - fromPartial(object: DeepPartial): ValidatorOutstandingRewardsRecord; -}; -export declare const ValidatorAccumulatedCommissionRecord: { - encode(message: ValidatorAccumulatedCommissionRecord, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorAccumulatedCommissionRecord; - fromJSON(object: any): ValidatorAccumulatedCommissionRecord; - toJSON(message: ValidatorAccumulatedCommissionRecord): unknown; - fromPartial(object: DeepPartial): ValidatorAccumulatedCommissionRecord; -}; -export declare const ValidatorHistoricalRewardsRecord: { - encode(message: ValidatorHistoricalRewardsRecord, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorHistoricalRewardsRecord; - fromJSON(object: any): ValidatorHistoricalRewardsRecord; - toJSON(message: ValidatorHistoricalRewardsRecord): unknown; - fromPartial(object: DeepPartial): ValidatorHistoricalRewardsRecord; -}; -export declare const ValidatorCurrentRewardsRecord: { - encode(message: ValidatorCurrentRewardsRecord, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorCurrentRewardsRecord; - fromJSON(object: any): ValidatorCurrentRewardsRecord; - toJSON(message: ValidatorCurrentRewardsRecord): unknown; - fromPartial(object: DeepPartial): ValidatorCurrentRewardsRecord; -}; -export declare const DelegatorStartingInfoRecord: { - encode(message: DelegatorStartingInfoRecord, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DelegatorStartingInfoRecord; - fromJSON(object: any): DelegatorStartingInfoRecord; - toJSON(message: DelegatorStartingInfoRecord): unknown; - fromPartial(object: DeepPartial): DelegatorStartingInfoRecord; -}; -export declare const ValidatorSlashEventRecord: { - encode(message: ValidatorSlashEventRecord, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorSlashEventRecord; - fromJSON(object: any): ValidatorSlashEventRecord; - toJSON(message: ValidatorSlashEventRecord): unknown; - fromPartial(object: DeepPartial): ValidatorSlashEventRecord; -}; -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.js deleted file mode 100644 index 4559c05a2d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.js +++ /dev/null @@ -1,981 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; -import { ValidatorAccumulatedCommission, ValidatorHistoricalRewards, ValidatorCurrentRewards, DelegatorStartingInfo, ValidatorSlashEvent, Params, FeePool, } from "../../../cosmos/distribution/v1beta1/distribution"; -export const protobufPackage = "cosmos.distribution.v1beta1"; -const baseDelegatorWithdrawInfo = { - delegatorAddress: "", - withdrawAddress: "", -}; -export const DelegatorWithdrawInfo = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.withdrawAddress !== "") { - writer.uint32(18).string(message.withdrawAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegatorWithdrawInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.withdrawAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDelegatorWithdrawInfo }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.withdrawAddress !== undefined && - object.withdrawAddress !== null) { - message.withdrawAddress = String(object.withdrawAddress); - } - else { - message.withdrawAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.withdrawAddress !== undefined && - (obj.withdrawAddress = message.withdrawAddress); - return obj; - }, - fromPartial(object) { - const message = { ...baseDelegatorWithdrawInfo }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.withdrawAddress !== undefined && - object.withdrawAddress !== null) { - message.withdrawAddress = object.withdrawAddress; - } - else { - message.withdrawAddress = ""; - } - return message; - }, -}; -const baseValidatorOutstandingRewardsRecord = { validatorAddress: "" }; -export const ValidatorOutstandingRewardsRecord = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - for (const v of message.outstandingRewards) { - DecCoin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorOutstandingRewardsRecord, - }; - message.outstandingRewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.outstandingRewards.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorOutstandingRewardsRecord, - }; - message.outstandingRewards = []; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.outstandingRewards !== undefined && - object.outstandingRewards !== null) { - for (const e of object.outstandingRewards) { - message.outstandingRewards.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - if (message.outstandingRewards) { - obj.outstandingRewards = message.outstandingRewards.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.outstandingRewards = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorOutstandingRewardsRecord, - }; - message.outstandingRewards = []; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.outstandingRewards !== undefined && - object.outstandingRewards !== null) { - for (const e of object.outstandingRewards) { - message.outstandingRewards.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -const baseValidatorAccumulatedCommissionRecord = { - validatorAddress: "", -}; -export const ValidatorAccumulatedCommissionRecord = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.accumulated !== undefined) { - ValidatorAccumulatedCommission.encode(message.accumulated, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorAccumulatedCommissionRecord, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.accumulated = ValidatorAccumulatedCommission.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorAccumulatedCommissionRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.accumulated !== undefined && object.accumulated !== null) { - message.accumulated = ValidatorAccumulatedCommission.fromJSON(object.accumulated); - } - else { - message.accumulated = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.accumulated !== undefined && - (obj.accumulated = message.accumulated - ? ValidatorAccumulatedCommission.toJSON(message.accumulated) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorAccumulatedCommissionRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.accumulated !== undefined && object.accumulated !== null) { - message.accumulated = ValidatorAccumulatedCommission.fromPartial(object.accumulated); - } - else { - message.accumulated = undefined; - } - return message; - }, -}; -const baseValidatorHistoricalRewardsRecord = { - validatorAddress: "", - period: 0, -}; -export const ValidatorHistoricalRewardsRecord = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.period !== 0) { - writer.uint32(16).uint64(message.period); - } - if (message.rewards !== undefined) { - ValidatorHistoricalRewards.encode(message.rewards, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorHistoricalRewardsRecord, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.period = longToNumber(reader.uint64()); - break; - case 3: - message.rewards = ValidatorHistoricalRewards.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorHistoricalRewardsRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.period !== undefined && object.period !== null) { - message.period = Number(object.period); - } - else { - message.period = 0; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorHistoricalRewards.fromJSON(object.rewards); - } - else { - message.rewards = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.period !== undefined && (obj.period = message.period); - message.rewards !== undefined && - (obj.rewards = message.rewards - ? ValidatorHistoricalRewards.toJSON(message.rewards) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorHistoricalRewardsRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.period !== undefined && object.period !== null) { - message.period = object.period; - } - else { - message.period = 0; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorHistoricalRewards.fromPartial(object.rewards); - } - else { - message.rewards = undefined; - } - return message; - }, -}; -const baseValidatorCurrentRewardsRecord = { validatorAddress: "" }; -export const ValidatorCurrentRewardsRecord = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.rewards !== undefined) { - ValidatorCurrentRewards.encode(message.rewards, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorCurrentRewardsRecord, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.rewards = ValidatorCurrentRewards.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorCurrentRewardsRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorCurrentRewards.fromJSON(object.rewards); - } - else { - message.rewards = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.rewards !== undefined && - (obj.rewards = message.rewards - ? ValidatorCurrentRewards.toJSON(message.rewards) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorCurrentRewardsRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorCurrentRewards.fromPartial(object.rewards); - } - else { - message.rewards = undefined; - } - return message; - }, -}; -const baseDelegatorStartingInfoRecord = { - delegatorAddress: "", - validatorAddress: "", -}; -export const DelegatorStartingInfoRecord = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.startingInfo !== undefined) { - DelegatorStartingInfo.encode(message.startingInfo, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDelegatorStartingInfoRecord, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.startingInfo = DelegatorStartingInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDelegatorStartingInfoRecord, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.startingInfo !== undefined && object.startingInfo !== null) { - message.startingInfo = DelegatorStartingInfo.fromJSON(object.startingInfo); - } - else { - message.startingInfo = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.startingInfo !== undefined && - (obj.startingInfo = message.startingInfo - ? DelegatorStartingInfo.toJSON(message.startingInfo) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDelegatorStartingInfoRecord, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.startingInfo !== undefined && object.startingInfo !== null) { - message.startingInfo = DelegatorStartingInfo.fromPartial(object.startingInfo); - } - else { - message.startingInfo = undefined; - } - return message; - }, -}; -const baseValidatorSlashEventRecord = { - validatorAddress: "", - height: 0, - period: 0, -}; -export const ValidatorSlashEventRecord = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.height !== 0) { - writer.uint32(16).uint64(message.height); - } - if (message.period !== 0) { - writer.uint32(24).uint64(message.period); - } - if (message.validatorSlashEvent !== undefined) { - ValidatorSlashEvent.encode(message.validatorSlashEvent, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorSlashEventRecord, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.height = longToNumber(reader.uint64()); - break; - case 3: - message.period = longToNumber(reader.uint64()); - break; - case 4: - message.validatorSlashEvent = ValidatorSlashEvent.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseValidatorSlashEventRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.period !== undefined && object.period !== null) { - message.period = Number(object.period); - } - else { - message.period = 0; - } - if (object.validatorSlashEvent !== undefined && - object.validatorSlashEvent !== null) { - message.validatorSlashEvent = ValidatorSlashEvent.fromJSON(object.validatorSlashEvent); - } - else { - message.validatorSlashEvent = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.height !== undefined && (obj.height = message.height); - message.period !== undefined && (obj.period = message.period); - message.validatorSlashEvent !== undefined && - (obj.validatorSlashEvent = message.validatorSlashEvent - ? ValidatorSlashEvent.toJSON(message.validatorSlashEvent) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseValidatorSlashEventRecord, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.period !== undefined && object.period !== null) { - message.period = object.period; - } - else { - message.period = 0; - } - if (object.validatorSlashEvent !== undefined && - object.validatorSlashEvent !== null) { - message.validatorSlashEvent = ValidatorSlashEvent.fromPartial(object.validatorSlashEvent); - } - else { - message.validatorSlashEvent = undefined; - } - return message; - }, -}; -const baseGenesisState = { previousProposer: "" }; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - if (message.feePool !== undefined) { - FeePool.encode(message.feePool, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.delegatorWithdrawInfos) { - DelegatorWithdrawInfo.encode(v, writer.uint32(26).fork()).ldelim(); - } - if (message.previousProposer !== "") { - writer.uint32(34).string(message.previousProposer); - } - for (const v of message.outstandingRewards) { - ValidatorOutstandingRewardsRecord.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.validatorAccumulatedCommissions) { - ValidatorAccumulatedCommissionRecord.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.validatorHistoricalRewards) { - ValidatorHistoricalRewardsRecord.encode(v, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.validatorCurrentRewards) { - ValidatorCurrentRewardsRecord.encode(v, writer.uint32(66).fork()).ldelim(); - } - for (const v of message.delegatorStartingInfos) { - DelegatorStartingInfoRecord.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.validatorSlashEvents) { - ValidatorSlashEventRecord.encode(v, writer.uint32(82).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.delegatorWithdrawInfos = []; - message.outstandingRewards = []; - message.validatorAccumulatedCommissions = []; - message.validatorHistoricalRewards = []; - message.validatorCurrentRewards = []; - message.delegatorStartingInfos = []; - message.validatorSlashEvents = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.feePool = FeePool.decode(reader, reader.uint32()); - break; - case 3: - message.delegatorWithdrawInfos.push(DelegatorWithdrawInfo.decode(reader, reader.uint32())); - break; - case 4: - message.previousProposer = reader.string(); - break; - case 5: - message.outstandingRewards.push(ValidatorOutstandingRewardsRecord.decode(reader, reader.uint32())); - break; - case 6: - message.validatorAccumulatedCommissions.push(ValidatorAccumulatedCommissionRecord.decode(reader, reader.uint32())); - break; - case 7: - message.validatorHistoricalRewards.push(ValidatorHistoricalRewardsRecord.decode(reader, reader.uint32())); - break; - case 8: - message.validatorCurrentRewards.push(ValidatorCurrentRewardsRecord.decode(reader, reader.uint32())); - break; - case 9: - message.delegatorStartingInfos.push(DelegatorStartingInfoRecord.decode(reader, reader.uint32())); - break; - case 10: - message.validatorSlashEvents.push(ValidatorSlashEventRecord.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.delegatorWithdrawInfos = []; - message.outstandingRewards = []; - message.validatorAccumulatedCommissions = []; - message.validatorHistoricalRewards = []; - message.validatorCurrentRewards = []; - message.delegatorStartingInfos = []; - message.validatorSlashEvents = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - if (object.feePool !== undefined && object.feePool !== null) { - message.feePool = FeePool.fromJSON(object.feePool); - } - else { - message.feePool = undefined; - } - if (object.delegatorWithdrawInfos !== undefined && - object.delegatorWithdrawInfos !== null) { - for (const e of object.delegatorWithdrawInfos) { - message.delegatorWithdrawInfos.push(DelegatorWithdrawInfo.fromJSON(e)); - } - } - if (object.previousProposer !== undefined && - object.previousProposer !== null) { - message.previousProposer = String(object.previousProposer); - } - else { - message.previousProposer = ""; - } - if (object.outstandingRewards !== undefined && - object.outstandingRewards !== null) { - for (const e of object.outstandingRewards) { - message.outstandingRewards.push(ValidatorOutstandingRewardsRecord.fromJSON(e)); - } - } - if (object.validatorAccumulatedCommissions !== undefined && - object.validatorAccumulatedCommissions !== null) { - for (const e of object.validatorAccumulatedCommissions) { - message.validatorAccumulatedCommissions.push(ValidatorAccumulatedCommissionRecord.fromJSON(e)); - } - } - if (object.validatorHistoricalRewards !== undefined && - object.validatorHistoricalRewards !== null) { - for (const e of object.validatorHistoricalRewards) { - message.validatorHistoricalRewards.push(ValidatorHistoricalRewardsRecord.fromJSON(e)); - } - } - if (object.validatorCurrentRewards !== undefined && - object.validatorCurrentRewards !== null) { - for (const e of object.validatorCurrentRewards) { - message.validatorCurrentRewards.push(ValidatorCurrentRewardsRecord.fromJSON(e)); - } - } - if (object.delegatorStartingInfos !== undefined && - object.delegatorStartingInfos !== null) { - for (const e of object.delegatorStartingInfos) { - message.delegatorStartingInfos.push(DelegatorStartingInfoRecord.fromJSON(e)); - } - } - if (object.validatorSlashEvents !== undefined && - object.validatorSlashEvents !== null) { - for (const e of object.validatorSlashEvents) { - message.validatorSlashEvents.push(ValidatorSlashEventRecord.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.feePool !== undefined && - (obj.feePool = message.feePool - ? FeePool.toJSON(message.feePool) - : undefined); - if (message.delegatorWithdrawInfos) { - obj.delegatorWithdrawInfos = message.delegatorWithdrawInfos.map((e) => e ? DelegatorWithdrawInfo.toJSON(e) : undefined); - } - else { - obj.delegatorWithdrawInfos = []; - } - message.previousProposer !== undefined && - (obj.previousProposer = message.previousProposer); - if (message.outstandingRewards) { - obj.outstandingRewards = message.outstandingRewards.map((e) => e ? ValidatorOutstandingRewardsRecord.toJSON(e) : undefined); - } - else { - obj.outstandingRewards = []; - } - if (message.validatorAccumulatedCommissions) { - obj.validatorAccumulatedCommissions = message.validatorAccumulatedCommissions.map((e) => (e ? ValidatorAccumulatedCommissionRecord.toJSON(e) : undefined)); - } - else { - obj.validatorAccumulatedCommissions = []; - } - if (message.validatorHistoricalRewards) { - obj.validatorHistoricalRewards = message.validatorHistoricalRewards.map((e) => (e ? ValidatorHistoricalRewardsRecord.toJSON(e) : undefined)); - } - else { - obj.validatorHistoricalRewards = []; - } - if (message.validatorCurrentRewards) { - obj.validatorCurrentRewards = message.validatorCurrentRewards.map((e) => e ? ValidatorCurrentRewardsRecord.toJSON(e) : undefined); - } - else { - obj.validatorCurrentRewards = []; - } - if (message.delegatorStartingInfos) { - obj.delegatorStartingInfos = message.delegatorStartingInfos.map((e) => e ? DelegatorStartingInfoRecord.toJSON(e) : undefined); - } - else { - obj.delegatorStartingInfos = []; - } - if (message.validatorSlashEvents) { - obj.validatorSlashEvents = message.validatorSlashEvents.map((e) => e ? ValidatorSlashEventRecord.toJSON(e) : undefined); - } - else { - obj.validatorSlashEvents = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.delegatorWithdrawInfos = []; - message.outstandingRewards = []; - message.validatorAccumulatedCommissions = []; - message.validatorHistoricalRewards = []; - message.validatorCurrentRewards = []; - message.delegatorStartingInfos = []; - message.validatorSlashEvents = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - if (object.feePool !== undefined && object.feePool !== null) { - message.feePool = FeePool.fromPartial(object.feePool); - } - else { - message.feePool = undefined; - } - if (object.delegatorWithdrawInfos !== undefined && - object.delegatorWithdrawInfos !== null) { - for (const e of object.delegatorWithdrawInfos) { - message.delegatorWithdrawInfos.push(DelegatorWithdrawInfo.fromPartial(e)); - } - } - if (object.previousProposer !== undefined && - object.previousProposer !== null) { - message.previousProposer = object.previousProposer; - } - else { - message.previousProposer = ""; - } - if (object.outstandingRewards !== undefined && - object.outstandingRewards !== null) { - for (const e of object.outstandingRewards) { - message.outstandingRewards.push(ValidatorOutstandingRewardsRecord.fromPartial(e)); - } - } - if (object.validatorAccumulatedCommissions !== undefined && - object.validatorAccumulatedCommissions !== null) { - for (const e of object.validatorAccumulatedCommissions) { - message.validatorAccumulatedCommissions.push(ValidatorAccumulatedCommissionRecord.fromPartial(e)); - } - } - if (object.validatorHistoricalRewards !== undefined && - object.validatorHistoricalRewards !== null) { - for (const e of object.validatorHistoricalRewards) { - message.validatorHistoricalRewards.push(ValidatorHistoricalRewardsRecord.fromPartial(e)); - } - } - if (object.validatorCurrentRewards !== undefined && - object.validatorCurrentRewards !== null) { - for (const e of object.validatorCurrentRewards) { - message.validatorCurrentRewards.push(ValidatorCurrentRewardsRecord.fromPartial(e)); - } - } - if (object.delegatorStartingInfos !== undefined && - object.delegatorStartingInfos !== null) { - for (const e of object.delegatorStartingInfos) { - message.delegatorStartingInfos.push(DelegatorStartingInfoRecord.fromPartial(e)); - } - } - if (object.validatorSlashEvents !== undefined && - object.validatorSlashEvents !== null) { - for (const e of object.validatorSlashEvents) { - message.validatorSlashEvents.push(ValidatorSlashEventRecord.fromPartial(e)); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.ts deleted file mode 100644 index f8eb8741ab..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/genesis.ts +++ /dev/null @@ -1,1343 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; -import { - ValidatorAccumulatedCommission, - ValidatorHistoricalRewards, - ValidatorCurrentRewards, - DelegatorStartingInfo, - ValidatorSlashEvent, - Params, - FeePool, -} from "../../../cosmos/distribution/v1beta1/distribution"; - -export const protobufPackage = "cosmos.distribution.v1beta1"; - -/** - * DelegatorWithdrawInfo is the address for where distributions rewards are - * withdrawn to by default this struct is only used at genesis to feed in - * default withdraw addresses. - */ -export interface DelegatorWithdrawInfo { - /** delegator_address is the address of the delegator. */ - delegator_address: string; - /** withdraw_address is the address to withdraw the delegation rewards to. */ - withdraw_address: string; -} - -/** ValidatorOutstandingRewardsRecord is used for import/export via genesis json. */ -export interface ValidatorOutstandingRewardsRecord { - /** validator_address is the address of the validator. */ - validator_address: string; - /** outstanding_rewards represents the oustanding rewards of a validator. */ - outstanding_rewards: DecCoin[]; -} - -/** - * ValidatorAccumulatedCommissionRecord is used for import / export via genesis - * json. - */ -export interface ValidatorAccumulatedCommissionRecord { - /** validator_address is the address of the validator. */ - validator_address: string; - /** accumulated is the accumulated commission of a validator. */ - accumulated: ValidatorAccumulatedCommission | undefined; -} - -/** - * ValidatorHistoricalRewardsRecord is used for import / export via genesis - * json. - */ -export interface ValidatorHistoricalRewardsRecord { - /** validator_address is the address of the validator. */ - validator_address: string; - /** period defines the period the historical rewards apply to. */ - period: number; - /** rewards defines the historical rewards of a validator. */ - rewards: ValidatorHistoricalRewards | undefined; -} - -/** ValidatorCurrentRewardsRecord is used for import / export via genesis json. */ -export interface ValidatorCurrentRewardsRecord { - /** validator_address is the address of the validator. */ - validator_address: string; - /** rewards defines the current rewards of a validator. */ - rewards: ValidatorCurrentRewards | undefined; -} - -/** DelegatorStartingInfoRecord used for import / export via genesis json. */ -export interface DelegatorStartingInfoRecord { - /** delegator_address is the address of the delegator. */ - delegator_address: string; - /** validator_address is the address of the validator. */ - validator_address: string; - /** starting_info defines the starting info of a delegator. */ - starting_info: DelegatorStartingInfo | undefined; -} - -/** ValidatorSlashEventRecord is used for import / export via genesis json. */ -export interface ValidatorSlashEventRecord { - /** validator_address is the address of the validator. */ - validator_address: string; - /** height defines the block height at which the slash event occured. */ - height: number; - /** period is the period of the slash event. */ - period: number; - /** validator_slash_event describes the slash event. */ - validator_slash_event: ValidatorSlashEvent | undefined; -} - -/** GenesisState defines the distribution module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of the module. */ - params: Params | undefined; - /** fee_pool defines the fee pool at genesis. */ - fee_pool: FeePool | undefined; - /** fee_pool defines the delegator withdraw infos at genesis. */ - delegator_withdraw_infos: DelegatorWithdrawInfo[]; - /** fee_pool defines the previous proposer at genesis. */ - previous_proposer: string; - /** fee_pool defines the outstanding rewards of all validators at genesis. */ - outstanding_rewards: ValidatorOutstandingRewardsRecord[]; - /** fee_pool defines the accumulated commisions of all validators at genesis. */ - validator_accumulated_commissions: ValidatorAccumulatedCommissionRecord[]; - /** fee_pool defines the historical rewards of all validators at genesis. */ - validator_historical_rewards: ValidatorHistoricalRewardsRecord[]; - /** fee_pool defines the current rewards of all validators at genesis. */ - validator_current_rewards: ValidatorCurrentRewardsRecord[]; - /** fee_pool defines the delegator starting infos at genesis. */ - delegator_starting_infos: DelegatorStartingInfoRecord[]; - /** fee_pool defines the validator slash events at genesis. */ - validator_slash_events: ValidatorSlashEventRecord[]; -} - -const baseDelegatorWithdrawInfo: object = { - delegator_address: "", - withdraw_address: "", -}; - -export const DelegatorWithdrawInfo = { - encode( - message: DelegatorWithdrawInfo, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - if (message.withdraw_address !== "") { - writer.uint32(18).string(message.withdraw_address); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DelegatorWithdrawInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegatorWithdrawInfo } as DelegatorWithdrawInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - case 2: - message.withdraw_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DelegatorWithdrawInfo { - const message = { ...baseDelegatorWithdrawInfo } as DelegatorWithdrawInfo; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - if ( - object.withdraw_address !== undefined && - object.withdraw_address !== null - ) { - message.withdraw_address = String(object.withdraw_address); - } else { - message.withdraw_address = ""; - } - return message; - }, - - toJSON(message: DelegatorWithdrawInfo): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - message.withdraw_address !== undefined && - (obj.withdraw_address = message.withdraw_address); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DelegatorWithdrawInfo { - const message = { ...baseDelegatorWithdrawInfo } as DelegatorWithdrawInfo; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - if ( - object.withdraw_address !== undefined && - object.withdraw_address !== null - ) { - message.withdraw_address = object.withdraw_address; - } else { - message.withdraw_address = ""; - } - return message; - }, -}; - -const baseValidatorOutstandingRewardsRecord: object = { validator_address: "" }; - -export const ValidatorOutstandingRewardsRecord = { - encode( - message: ValidatorOutstandingRewardsRecord, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_address !== "") { - writer.uint32(10).string(message.validator_address); - } - for (const v of message.outstanding_rewards) { - DecCoin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorOutstandingRewardsRecord { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorOutstandingRewardsRecord, - } as ValidatorOutstandingRewardsRecord; - message.outstanding_rewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_address = reader.string(); - break; - case 2: - message.outstanding_rewards.push( - DecCoin.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorOutstandingRewardsRecord { - const message = { - ...baseValidatorOutstandingRewardsRecord, - } as ValidatorOutstandingRewardsRecord; - message.outstanding_rewards = []; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - if ( - object.outstanding_rewards !== undefined && - object.outstanding_rewards !== null - ) { - for (const e of object.outstanding_rewards) { - message.outstanding_rewards.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ValidatorOutstandingRewardsRecord): unknown { - const obj: any = {}; - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - if (message.outstanding_rewards) { - obj.outstanding_rewards = message.outstanding_rewards.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.outstanding_rewards = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorOutstandingRewardsRecord { - const message = { - ...baseValidatorOutstandingRewardsRecord, - } as ValidatorOutstandingRewardsRecord; - message.outstanding_rewards = []; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - if ( - object.outstanding_rewards !== undefined && - object.outstanding_rewards !== null - ) { - for (const e of object.outstanding_rewards) { - message.outstanding_rewards.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseValidatorAccumulatedCommissionRecord: object = { - validator_address: "", -}; - -export const ValidatorAccumulatedCommissionRecord = { - encode( - message: ValidatorAccumulatedCommissionRecord, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_address !== "") { - writer.uint32(10).string(message.validator_address); - } - if (message.accumulated !== undefined) { - ValidatorAccumulatedCommission.encode( - message.accumulated, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorAccumulatedCommissionRecord { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorAccumulatedCommissionRecord, - } as ValidatorAccumulatedCommissionRecord; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_address = reader.string(); - break; - case 2: - message.accumulated = ValidatorAccumulatedCommission.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorAccumulatedCommissionRecord { - const message = { - ...baseValidatorAccumulatedCommissionRecord, - } as ValidatorAccumulatedCommissionRecord; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - if (object.accumulated !== undefined && object.accumulated !== null) { - message.accumulated = ValidatorAccumulatedCommission.fromJSON( - object.accumulated - ); - } else { - message.accumulated = undefined; - } - return message; - }, - - toJSON(message: ValidatorAccumulatedCommissionRecord): unknown { - const obj: any = {}; - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - message.accumulated !== undefined && - (obj.accumulated = message.accumulated - ? ValidatorAccumulatedCommission.toJSON(message.accumulated) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorAccumulatedCommissionRecord { - const message = { - ...baseValidatorAccumulatedCommissionRecord, - } as ValidatorAccumulatedCommissionRecord; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - if (object.accumulated !== undefined && object.accumulated !== null) { - message.accumulated = ValidatorAccumulatedCommission.fromPartial( - object.accumulated - ); - } else { - message.accumulated = undefined; - } - return message; - }, -}; - -const baseValidatorHistoricalRewardsRecord: object = { - validator_address: "", - period: 0, -}; - -export const ValidatorHistoricalRewardsRecord = { - encode( - message: ValidatorHistoricalRewardsRecord, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_address !== "") { - writer.uint32(10).string(message.validator_address); - } - if (message.period !== 0) { - writer.uint32(16).uint64(message.period); - } - if (message.rewards !== undefined) { - ValidatorHistoricalRewards.encode( - message.rewards, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorHistoricalRewardsRecord { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorHistoricalRewardsRecord, - } as ValidatorHistoricalRewardsRecord; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_address = reader.string(); - break; - case 2: - message.period = longToNumber(reader.uint64() as Long); - break; - case 3: - message.rewards = ValidatorHistoricalRewards.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorHistoricalRewardsRecord { - const message = { - ...baseValidatorHistoricalRewardsRecord, - } as ValidatorHistoricalRewardsRecord; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - if (object.period !== undefined && object.period !== null) { - message.period = Number(object.period); - } else { - message.period = 0; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorHistoricalRewards.fromJSON(object.rewards); - } else { - message.rewards = undefined; - } - return message; - }, - - toJSON(message: ValidatorHistoricalRewardsRecord): unknown { - const obj: any = {}; - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - message.period !== undefined && (obj.period = message.period); - message.rewards !== undefined && - (obj.rewards = message.rewards - ? ValidatorHistoricalRewards.toJSON(message.rewards) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorHistoricalRewardsRecord { - const message = { - ...baseValidatorHistoricalRewardsRecord, - } as ValidatorHistoricalRewardsRecord; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - if (object.period !== undefined && object.period !== null) { - message.period = object.period; - } else { - message.period = 0; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorHistoricalRewards.fromPartial(object.rewards); - } else { - message.rewards = undefined; - } - return message; - }, -}; - -const baseValidatorCurrentRewardsRecord: object = { validator_address: "" }; - -export const ValidatorCurrentRewardsRecord = { - encode( - message: ValidatorCurrentRewardsRecord, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_address !== "") { - writer.uint32(10).string(message.validator_address); - } - if (message.rewards !== undefined) { - ValidatorCurrentRewards.encode( - message.rewards, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorCurrentRewardsRecord { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorCurrentRewardsRecord, - } as ValidatorCurrentRewardsRecord; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_address = reader.string(); - break; - case 2: - message.rewards = ValidatorCurrentRewards.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorCurrentRewardsRecord { - const message = { - ...baseValidatorCurrentRewardsRecord, - } as ValidatorCurrentRewardsRecord; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorCurrentRewards.fromJSON(object.rewards); - } else { - message.rewards = undefined; - } - return message; - }, - - toJSON(message: ValidatorCurrentRewardsRecord): unknown { - const obj: any = {}; - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - message.rewards !== undefined && - (obj.rewards = message.rewards - ? ValidatorCurrentRewards.toJSON(message.rewards) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorCurrentRewardsRecord { - const message = { - ...baseValidatorCurrentRewardsRecord, - } as ValidatorCurrentRewardsRecord; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorCurrentRewards.fromPartial(object.rewards); - } else { - message.rewards = undefined; - } - return message; - }, -}; - -const baseDelegatorStartingInfoRecord: object = { - delegator_address: "", - validator_address: "", -}; - -export const DelegatorStartingInfoRecord = { - encode( - message: DelegatorStartingInfoRecord, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - if (message.validator_address !== "") { - writer.uint32(18).string(message.validator_address); - } - if (message.starting_info !== undefined) { - DelegatorStartingInfo.encode( - message.starting_info, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DelegatorStartingInfoRecord { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDelegatorStartingInfoRecord, - } as DelegatorStartingInfoRecord; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - case 2: - message.validator_address = reader.string(); - break; - case 3: - message.starting_info = DelegatorStartingInfo.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DelegatorStartingInfoRecord { - const message = { - ...baseDelegatorStartingInfoRecord, - } as DelegatorStartingInfoRecord; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - if (object.starting_info !== undefined && object.starting_info !== null) { - message.starting_info = DelegatorStartingInfo.fromJSON( - object.starting_info - ); - } else { - message.starting_info = undefined; - } - return message; - }, - - toJSON(message: DelegatorStartingInfoRecord): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - message.starting_info !== undefined && - (obj.starting_info = message.starting_info - ? DelegatorStartingInfo.toJSON(message.starting_info) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DelegatorStartingInfoRecord { - const message = { - ...baseDelegatorStartingInfoRecord, - } as DelegatorStartingInfoRecord; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - if (object.starting_info !== undefined && object.starting_info !== null) { - message.starting_info = DelegatorStartingInfo.fromPartial( - object.starting_info - ); - } else { - message.starting_info = undefined; - } - return message; - }, -}; - -const baseValidatorSlashEventRecord: object = { - validator_address: "", - height: 0, - period: 0, -}; - -export const ValidatorSlashEventRecord = { - encode( - message: ValidatorSlashEventRecord, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_address !== "") { - writer.uint32(10).string(message.validator_address); - } - if (message.height !== 0) { - writer.uint32(16).uint64(message.height); - } - if (message.period !== 0) { - writer.uint32(24).uint64(message.period); - } - if (message.validator_slash_event !== undefined) { - ValidatorSlashEvent.encode( - message.validator_slash_event, - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ValidatorSlashEventRecord { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseValidatorSlashEventRecord, - } as ValidatorSlashEventRecord; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_address = reader.string(); - break; - case 2: - message.height = longToNumber(reader.uint64() as Long); - break; - case 3: - message.period = longToNumber(reader.uint64() as Long); - break; - case 4: - message.validator_slash_event = ValidatorSlashEvent.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorSlashEventRecord { - const message = { - ...baseValidatorSlashEventRecord, - } as ValidatorSlashEventRecord; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.period !== undefined && object.period !== null) { - message.period = Number(object.period); - } else { - message.period = 0; - } - if ( - object.validator_slash_event !== undefined && - object.validator_slash_event !== null - ) { - message.validator_slash_event = ValidatorSlashEvent.fromJSON( - object.validator_slash_event - ); - } else { - message.validator_slash_event = undefined; - } - return message; - }, - - toJSON(message: ValidatorSlashEventRecord): unknown { - const obj: any = {}; - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - message.height !== undefined && (obj.height = message.height); - message.period !== undefined && (obj.period = message.period); - message.validator_slash_event !== undefined && - (obj.validator_slash_event = message.validator_slash_event - ? ValidatorSlashEvent.toJSON(message.validator_slash_event) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorSlashEventRecord { - const message = { - ...baseValidatorSlashEventRecord, - } as ValidatorSlashEventRecord; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.period !== undefined && object.period !== null) { - message.period = object.period; - } else { - message.period = 0; - } - if ( - object.validator_slash_event !== undefined && - object.validator_slash_event !== null - ) { - message.validator_slash_event = ValidatorSlashEvent.fromPartial( - object.validator_slash_event - ); - } else { - message.validator_slash_event = undefined; - } - return message; - }, -}; - -const baseGenesisState: object = { previous_proposer: "" }; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - if (message.fee_pool !== undefined) { - FeePool.encode(message.fee_pool, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.delegator_withdraw_infos) { - DelegatorWithdrawInfo.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.previous_proposer !== "") { - writer.uint32(34).string(message.previous_proposer); - } - for (const v of message.outstanding_rewards) { - ValidatorOutstandingRewardsRecord.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.validator_accumulated_commissions) { - ValidatorAccumulatedCommissionRecord.encode( - v!, - writer.uint32(50).fork() - ).ldelim(); - } - for (const v of message.validator_historical_rewards) { - ValidatorHistoricalRewardsRecord.encode( - v!, - writer.uint32(58).fork() - ).ldelim(); - } - for (const v of message.validator_current_rewards) { - ValidatorCurrentRewardsRecord.encode( - v!, - writer.uint32(66).fork() - ).ldelim(); - } - for (const v of message.delegator_starting_infos) { - DelegatorStartingInfoRecord.encode(v!, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.validator_slash_events) { - ValidatorSlashEventRecord.encode(v!, writer.uint32(82).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.delegator_withdraw_infos = []; - message.outstanding_rewards = []; - message.validator_accumulated_commissions = []; - message.validator_historical_rewards = []; - message.validator_current_rewards = []; - message.delegator_starting_infos = []; - message.validator_slash_events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.fee_pool = FeePool.decode(reader, reader.uint32()); - break; - case 3: - message.delegator_withdraw_infos.push( - DelegatorWithdrawInfo.decode(reader, reader.uint32()) - ); - break; - case 4: - message.previous_proposer = reader.string(); - break; - case 5: - message.outstanding_rewards.push( - ValidatorOutstandingRewardsRecord.decode(reader, reader.uint32()) - ); - break; - case 6: - message.validator_accumulated_commissions.push( - ValidatorAccumulatedCommissionRecord.decode(reader, reader.uint32()) - ); - break; - case 7: - message.validator_historical_rewards.push( - ValidatorHistoricalRewardsRecord.decode(reader, reader.uint32()) - ); - break; - case 8: - message.validator_current_rewards.push( - ValidatorCurrentRewardsRecord.decode(reader, reader.uint32()) - ); - break; - case 9: - message.delegator_starting_infos.push( - DelegatorStartingInfoRecord.decode(reader, reader.uint32()) - ); - break; - case 10: - message.validator_slash_events.push( - ValidatorSlashEventRecord.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.delegator_withdraw_infos = []; - message.outstanding_rewards = []; - message.validator_accumulated_commissions = []; - message.validator_historical_rewards = []; - message.validator_current_rewards = []; - message.delegator_starting_infos = []; - message.validator_slash_events = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if (object.fee_pool !== undefined && object.fee_pool !== null) { - message.fee_pool = FeePool.fromJSON(object.fee_pool); - } else { - message.fee_pool = undefined; - } - if ( - object.delegator_withdraw_infos !== undefined && - object.delegator_withdraw_infos !== null - ) { - for (const e of object.delegator_withdraw_infos) { - message.delegator_withdraw_infos.push( - DelegatorWithdrawInfo.fromJSON(e) - ); - } - } - if ( - object.previous_proposer !== undefined && - object.previous_proposer !== null - ) { - message.previous_proposer = String(object.previous_proposer); - } else { - message.previous_proposer = ""; - } - if ( - object.outstanding_rewards !== undefined && - object.outstanding_rewards !== null - ) { - for (const e of object.outstanding_rewards) { - message.outstanding_rewards.push( - ValidatorOutstandingRewardsRecord.fromJSON(e) - ); - } - } - if ( - object.validator_accumulated_commissions !== undefined && - object.validator_accumulated_commissions !== null - ) { - for (const e of object.validator_accumulated_commissions) { - message.validator_accumulated_commissions.push( - ValidatorAccumulatedCommissionRecord.fromJSON(e) - ); - } - } - if ( - object.validator_historical_rewards !== undefined && - object.validator_historical_rewards !== null - ) { - for (const e of object.validator_historical_rewards) { - message.validator_historical_rewards.push( - ValidatorHistoricalRewardsRecord.fromJSON(e) - ); - } - } - if ( - object.validator_current_rewards !== undefined && - object.validator_current_rewards !== null - ) { - for (const e of object.validator_current_rewards) { - message.validator_current_rewards.push( - ValidatorCurrentRewardsRecord.fromJSON(e) - ); - } - } - if ( - object.delegator_starting_infos !== undefined && - object.delegator_starting_infos !== null - ) { - for (const e of object.delegator_starting_infos) { - message.delegator_starting_infos.push( - DelegatorStartingInfoRecord.fromJSON(e) - ); - } - } - if ( - object.validator_slash_events !== undefined && - object.validator_slash_events !== null - ) { - for (const e of object.validator_slash_events) { - message.validator_slash_events.push( - ValidatorSlashEventRecord.fromJSON(e) - ); - } - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.fee_pool !== undefined && - (obj.fee_pool = message.fee_pool - ? FeePool.toJSON(message.fee_pool) - : undefined); - if (message.delegator_withdraw_infos) { - obj.delegator_withdraw_infos = message.delegator_withdraw_infos.map((e) => - e ? DelegatorWithdrawInfo.toJSON(e) : undefined - ); - } else { - obj.delegator_withdraw_infos = []; - } - message.previous_proposer !== undefined && - (obj.previous_proposer = message.previous_proposer); - if (message.outstanding_rewards) { - obj.outstanding_rewards = message.outstanding_rewards.map((e) => - e ? ValidatorOutstandingRewardsRecord.toJSON(e) : undefined - ); - } else { - obj.outstanding_rewards = []; - } - if (message.validator_accumulated_commissions) { - obj.validator_accumulated_commissions = message.validator_accumulated_commissions.map( - (e) => (e ? ValidatorAccumulatedCommissionRecord.toJSON(e) : undefined) - ); - } else { - obj.validator_accumulated_commissions = []; - } - if (message.validator_historical_rewards) { - obj.validator_historical_rewards = message.validator_historical_rewards.map( - (e) => (e ? ValidatorHistoricalRewardsRecord.toJSON(e) : undefined) - ); - } else { - obj.validator_historical_rewards = []; - } - if (message.validator_current_rewards) { - obj.validator_current_rewards = message.validator_current_rewards.map( - (e) => (e ? ValidatorCurrentRewardsRecord.toJSON(e) : undefined) - ); - } else { - obj.validator_current_rewards = []; - } - if (message.delegator_starting_infos) { - obj.delegator_starting_infos = message.delegator_starting_infos.map((e) => - e ? DelegatorStartingInfoRecord.toJSON(e) : undefined - ); - } else { - obj.delegator_starting_infos = []; - } - if (message.validator_slash_events) { - obj.validator_slash_events = message.validator_slash_events.map((e) => - e ? ValidatorSlashEventRecord.toJSON(e) : undefined - ); - } else { - obj.validator_slash_events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.delegator_withdraw_infos = []; - message.outstanding_rewards = []; - message.validator_accumulated_commissions = []; - message.validator_historical_rewards = []; - message.validator_current_rewards = []; - message.delegator_starting_infos = []; - message.validator_slash_events = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if (object.fee_pool !== undefined && object.fee_pool !== null) { - message.fee_pool = FeePool.fromPartial(object.fee_pool); - } else { - message.fee_pool = undefined; - } - if ( - object.delegator_withdraw_infos !== undefined && - object.delegator_withdraw_infos !== null - ) { - for (const e of object.delegator_withdraw_infos) { - message.delegator_withdraw_infos.push( - DelegatorWithdrawInfo.fromPartial(e) - ); - } - } - if ( - object.previous_proposer !== undefined && - object.previous_proposer !== null - ) { - message.previous_proposer = object.previous_proposer; - } else { - message.previous_proposer = ""; - } - if ( - object.outstanding_rewards !== undefined && - object.outstanding_rewards !== null - ) { - for (const e of object.outstanding_rewards) { - message.outstanding_rewards.push( - ValidatorOutstandingRewardsRecord.fromPartial(e) - ); - } - } - if ( - object.validator_accumulated_commissions !== undefined && - object.validator_accumulated_commissions !== null - ) { - for (const e of object.validator_accumulated_commissions) { - message.validator_accumulated_commissions.push( - ValidatorAccumulatedCommissionRecord.fromPartial(e) - ); - } - } - if ( - object.validator_historical_rewards !== undefined && - object.validator_historical_rewards !== null - ) { - for (const e of object.validator_historical_rewards) { - message.validator_historical_rewards.push( - ValidatorHistoricalRewardsRecord.fromPartial(e) - ); - } - } - if ( - object.validator_current_rewards !== undefined && - object.validator_current_rewards !== null - ) { - for (const e of object.validator_current_rewards) { - message.validator_current_rewards.push( - ValidatorCurrentRewardsRecord.fromPartial(e) - ); - } - } - if ( - object.delegator_starting_infos !== undefined && - object.delegator_starting_infos !== null - ) { - for (const e of object.delegator_starting_infos) { - message.delegator_starting_infos.push( - DelegatorStartingInfoRecord.fromPartial(e) - ); - } - } - if ( - object.validator_slash_events !== undefined && - object.validator_slash_events !== null - ) { - for (const e of object.validator_slash_events) { - message.validator_slash_events.push( - ValidatorSlashEventRecord.fromPartial(e) - ); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.d.ts deleted file mode 100644 index a6bb2e39c7..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.d.ts +++ /dev/null @@ -1,321 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Params, ValidatorOutstandingRewards, ValidatorAccumulatedCommission, ValidatorSlashEvent, DelegationDelegatorReward } from "../../../cosmos/distribution/v1beta1/distribution"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.distribution.v1beta1"; -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -/** - * QueryValidatorOutstandingRewardsRequest is the request type for the - * Query/ValidatorOutstandingRewards RPC method. - */ -export interface QueryValidatorOutstandingRewardsRequest { - /** validator_address defines the validator address to query for. */ - validatorAddress: string; -} -/** - * QueryValidatorOutstandingRewardsResponse is the response type for the - * Query/ValidatorOutstandingRewards RPC method. - */ -export interface QueryValidatorOutstandingRewardsResponse { - rewards: ValidatorOutstandingRewards | undefined; -} -/** - * QueryValidatorCommissionRequest is the request type for the - * Query/ValidatorCommission RPC method - */ -export interface QueryValidatorCommissionRequest { - /** validator_address defines the validator address to query for. */ - validatorAddress: string; -} -/** - * QueryValidatorCommissionResponse is the response type for the - * Query/ValidatorCommission RPC method - */ -export interface QueryValidatorCommissionResponse { - /** commission defines the commision the validator received. */ - commission: ValidatorAccumulatedCommission | undefined; -} -/** - * QueryValidatorSlashesRequest is the request type for the - * Query/ValidatorSlashes RPC method - */ -export interface QueryValidatorSlashesRequest { - /** validator_address defines the validator address to query for. */ - validatorAddress: string; - /** starting_height defines the optional starting height to query the slashes. */ - startingHeight: number; - /** starting_height defines the optional ending height to query the slashes. */ - endingHeight: number; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryValidatorSlashesResponse is the response type for the - * Query/ValidatorSlashes RPC method. - */ -export interface QueryValidatorSlashesResponse { - /** slashes defines the slashes the validator received. */ - slashes: ValidatorSlashEvent[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryDelegationRewardsRequest is the request type for the - * Query/DelegationRewards RPC method. - */ -export interface QueryDelegationRewardsRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; - /** validator_address defines the validator address to query for. */ - validatorAddress: string; -} -/** - * QueryDelegationRewardsResponse is the response type for the - * Query/DelegationRewards RPC method. - */ -export interface QueryDelegationRewardsResponse { - /** rewards defines the rewards accrued by a delegation. */ - rewards: DecCoin[]; -} -/** - * QueryDelegationTotalRewardsRequest is the request type for the - * Query/DelegationTotalRewards RPC method. - */ -export interface QueryDelegationTotalRewardsRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; -} -/** - * QueryDelegationTotalRewardsResponse is the response type for the - * Query/DelegationTotalRewards RPC method. - */ -export interface QueryDelegationTotalRewardsResponse { - /** rewards defines all the rewards accrued by a delegator. */ - rewards: DelegationDelegatorReward[]; - /** total defines the sum of all the rewards. */ - total: DecCoin[]; -} -/** - * QueryDelegatorValidatorsRequest is the request type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; -} -/** - * QueryDelegatorValidatorsResponse is the response type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsResponse { - /** validators defines the validators a delegator is delegating for. */ - validators: string[]; -} -/** - * QueryDelegatorWithdrawAddressRequest is the request type for the - * Query/DelegatorWithdrawAddress RPC method. - */ -export interface QueryDelegatorWithdrawAddressRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; -} -/** - * QueryDelegatorWithdrawAddressResponse is the response type for the - * Query/DelegatorWithdrawAddress RPC method. - */ -export interface QueryDelegatorWithdrawAddressResponse { - /** withdraw_address defines the delegator address to query for. */ - withdrawAddress: string; -} -/** - * QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC - * method. - */ -export interface QueryCommunityPoolRequest { -} -/** - * QueryCommunityPoolResponse is the response type for the Query/CommunityPool - * RPC method. - */ -export interface QueryCommunityPoolResponse { - /** pool defines community pool's coins. */ - pool: DecCoin[]; -} -export declare const QueryParamsRequest: { - encode(_: QueryParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest; - fromJSON(_: any): QueryParamsRequest; - toJSON(_: QueryParamsRequest): unknown; - fromPartial(_: DeepPartial): QueryParamsRequest; -}; -export declare const QueryParamsResponse: { - encode(message: QueryParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse; - fromJSON(object: any): QueryParamsResponse; - toJSON(message: QueryParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryParamsResponse; -}; -export declare const QueryValidatorOutstandingRewardsRequest: { - encode(message: QueryValidatorOutstandingRewardsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorOutstandingRewardsRequest; - fromJSON(object: any): QueryValidatorOutstandingRewardsRequest; - toJSON(message: QueryValidatorOutstandingRewardsRequest): unknown; - fromPartial(object: DeepPartial): QueryValidatorOutstandingRewardsRequest; -}; -export declare const QueryValidatorOutstandingRewardsResponse: { - encode(message: QueryValidatorOutstandingRewardsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorOutstandingRewardsResponse; - fromJSON(object: any): QueryValidatorOutstandingRewardsResponse; - toJSON(message: QueryValidatorOutstandingRewardsResponse): unknown; - fromPartial(object: DeepPartial): QueryValidatorOutstandingRewardsResponse; -}; -export declare const QueryValidatorCommissionRequest: { - encode(message: QueryValidatorCommissionRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorCommissionRequest; - fromJSON(object: any): QueryValidatorCommissionRequest; - toJSON(message: QueryValidatorCommissionRequest): unknown; - fromPartial(object: DeepPartial): QueryValidatorCommissionRequest; -}; -export declare const QueryValidatorCommissionResponse: { - encode(message: QueryValidatorCommissionResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorCommissionResponse; - fromJSON(object: any): QueryValidatorCommissionResponse; - toJSON(message: QueryValidatorCommissionResponse): unknown; - fromPartial(object: DeepPartial): QueryValidatorCommissionResponse; -}; -export declare const QueryValidatorSlashesRequest: { - encode(message: QueryValidatorSlashesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorSlashesRequest; - fromJSON(object: any): QueryValidatorSlashesRequest; - toJSON(message: QueryValidatorSlashesRequest): unknown; - fromPartial(object: DeepPartial): QueryValidatorSlashesRequest; -}; -export declare const QueryValidatorSlashesResponse: { - encode(message: QueryValidatorSlashesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorSlashesResponse; - fromJSON(object: any): QueryValidatorSlashesResponse; - toJSON(message: QueryValidatorSlashesResponse): unknown; - fromPartial(object: DeepPartial): QueryValidatorSlashesResponse; -}; -export declare const QueryDelegationRewardsRequest: { - encode(message: QueryDelegationRewardsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegationRewardsRequest; - fromJSON(object: any): QueryDelegationRewardsRequest; - toJSON(message: QueryDelegationRewardsRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegationRewardsRequest; -}; -export declare const QueryDelegationRewardsResponse: { - encode(message: QueryDelegationRewardsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegationRewardsResponse; - fromJSON(object: any): QueryDelegationRewardsResponse; - toJSON(message: QueryDelegationRewardsResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegationRewardsResponse; -}; -export declare const QueryDelegationTotalRewardsRequest: { - encode(message: QueryDelegationTotalRewardsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegationTotalRewardsRequest; - fromJSON(object: any): QueryDelegationTotalRewardsRequest; - toJSON(message: QueryDelegationTotalRewardsRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegationTotalRewardsRequest; -}; -export declare const QueryDelegationTotalRewardsResponse: { - encode(message: QueryDelegationTotalRewardsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegationTotalRewardsResponse; - fromJSON(object: any): QueryDelegationTotalRewardsResponse; - toJSON(message: QueryDelegationTotalRewardsResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegationTotalRewardsResponse; -}; -export declare const QueryDelegatorValidatorsRequest: { - encode(message: QueryDelegatorValidatorsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorValidatorsRequest; - fromJSON(object: any): QueryDelegatorValidatorsRequest; - toJSON(message: QueryDelegatorValidatorsRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegatorValidatorsRequest; -}; -export declare const QueryDelegatorValidatorsResponse: { - encode(message: QueryDelegatorValidatorsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorValidatorsResponse; - fromJSON(object: any): QueryDelegatorValidatorsResponse; - toJSON(message: QueryDelegatorValidatorsResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegatorValidatorsResponse; -}; -export declare const QueryDelegatorWithdrawAddressRequest: { - encode(message: QueryDelegatorWithdrawAddressRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorWithdrawAddressRequest; - fromJSON(object: any): QueryDelegatorWithdrawAddressRequest; - toJSON(message: QueryDelegatorWithdrawAddressRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegatorWithdrawAddressRequest; -}; -export declare const QueryDelegatorWithdrawAddressResponse: { - encode(message: QueryDelegatorWithdrawAddressResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorWithdrawAddressResponse; - fromJSON(object: any): QueryDelegatorWithdrawAddressResponse; - toJSON(message: QueryDelegatorWithdrawAddressResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegatorWithdrawAddressResponse; -}; -export declare const QueryCommunityPoolRequest: { - encode(_: QueryCommunityPoolRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryCommunityPoolRequest; - fromJSON(_: any): QueryCommunityPoolRequest; - toJSON(_: QueryCommunityPoolRequest): unknown; - fromPartial(_: DeepPartial): QueryCommunityPoolRequest; -}; -export declare const QueryCommunityPoolResponse: { - encode(message: QueryCommunityPoolResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryCommunityPoolResponse; - fromJSON(object: any): QueryCommunityPoolResponse; - toJSON(message: QueryCommunityPoolResponse): unknown; - fromPartial(object: DeepPartial): QueryCommunityPoolResponse; -}; -/** Query defines the gRPC querier service for distribution module. */ -export interface Query { - /** Params queries params of the distribution module. */ - Params(request: QueryParamsRequest): Promise; - /** ValidatorOutstandingRewards queries rewards of a validator address. */ - ValidatorOutstandingRewards(request: QueryValidatorOutstandingRewardsRequest): Promise; - /** ValidatorCommission queries accumulated commission for a validator. */ - ValidatorCommission(request: QueryValidatorCommissionRequest): Promise; - /** ValidatorSlashes queries slash events of a validator. */ - ValidatorSlashes(request: QueryValidatorSlashesRequest): Promise; - /** DelegationRewards queries the total rewards accrued by a delegation. */ - DelegationRewards(request: QueryDelegationRewardsRequest): Promise; - /** - * DelegationTotalRewards queries the total rewards accrued by a each - * validator. - */ - DelegationTotalRewards(request: QueryDelegationTotalRewardsRequest): Promise; - /** DelegatorValidators queries the validators of a delegator. */ - DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; - /** DelegatorWithdrawAddress queries withdraw address of a delegator. */ - DelegatorWithdrawAddress(request: QueryDelegatorWithdrawAddressRequest): Promise; - /** CommunityPool queries the community pool coins. */ - CommunityPool(request: QueryCommunityPoolRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Params(request: QueryParamsRequest): Promise; - ValidatorOutstandingRewards(request: QueryValidatorOutstandingRewardsRequest): Promise; - ValidatorCommission(request: QueryValidatorCommissionRequest): Promise; - ValidatorSlashes(request: QueryValidatorSlashesRequest): Promise; - DelegationRewards(request: QueryDelegationRewardsRequest): Promise; - DelegationTotalRewards(request: QueryDelegationTotalRewardsRequest): Promise; - DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; - DelegatorWithdrawAddress(request: QueryDelegatorWithdrawAddressRequest): Promise; - CommunityPool(request: QueryCommunityPoolRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.js deleted file mode 100644 index 9d3f90a0b0..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.js +++ /dev/null @@ -1,1259 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Params, ValidatorOutstandingRewards, ValidatorAccumulatedCommission, ValidatorSlashEvent, DelegationDelegatorReward, } from "../../../cosmos/distribution/v1beta1/distribution"; -import { PageRequest, PageResponse, } from "../../../cosmos/base/query/v1beta1/pagination"; -import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.distribution.v1beta1"; -const baseQueryParamsRequest = {}; -export const QueryParamsRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, -}; -const baseQueryParamsResponse = {}; -export const QueryParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; -const baseQueryValidatorOutstandingRewardsRequest = { - validatorAddress: "", -}; -export const QueryValidatorOutstandingRewardsRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorOutstandingRewardsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorOutstandingRewardsRequest, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorOutstandingRewardsRequest, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - return message; - }, -}; -const baseQueryValidatorOutstandingRewardsResponse = {}; -export const QueryValidatorOutstandingRewardsResponse = { - encode(message, writer = Writer.create()) { - if (message.rewards !== undefined) { - ValidatorOutstandingRewards.encode(message.rewards, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorOutstandingRewardsResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards = ValidatorOutstandingRewards.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorOutstandingRewardsResponse, - }; - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorOutstandingRewards.fromJSON(object.rewards); - } - else { - message.rewards = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.rewards !== undefined && - (obj.rewards = message.rewards - ? ValidatorOutstandingRewards.toJSON(message.rewards) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorOutstandingRewardsResponse, - }; - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorOutstandingRewards.fromPartial(object.rewards); - } - else { - message.rewards = undefined; - } - return message; - }, -}; -const baseQueryValidatorCommissionRequest = { validatorAddress: "" }; -export const QueryValidatorCommissionRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorCommissionRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorCommissionRequest, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorCommissionRequest, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - return message; - }, -}; -const baseQueryValidatorCommissionResponse = {}; -export const QueryValidatorCommissionResponse = { - encode(message, writer = Writer.create()) { - if (message.commission !== undefined) { - ValidatorAccumulatedCommission.encode(message.commission, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorCommissionResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commission = ValidatorAccumulatedCommission.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorCommissionResponse, - }; - if (object.commission !== undefined && object.commission !== null) { - message.commission = ValidatorAccumulatedCommission.fromJSON(object.commission); - } - else { - message.commission = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.commission !== undefined && - (obj.commission = message.commission - ? ValidatorAccumulatedCommission.toJSON(message.commission) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorCommissionResponse, - }; - if (object.commission !== undefined && object.commission !== null) { - message.commission = ValidatorAccumulatedCommission.fromPartial(object.commission); - } - else { - message.commission = undefined; - } - return message; - }, -}; -const baseQueryValidatorSlashesRequest = { - validatorAddress: "", - startingHeight: 0, - endingHeight: 0, -}; -export const QueryValidatorSlashesRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.startingHeight !== 0) { - writer.uint32(16).uint64(message.startingHeight); - } - if (message.endingHeight !== 0) { - writer.uint32(24).uint64(message.endingHeight); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorSlashesRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.startingHeight = longToNumber(reader.uint64()); - break; - case 3: - message.endingHeight = longToNumber(reader.uint64()); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorSlashesRequest, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.startingHeight !== undefined && object.startingHeight !== null) { - message.startingHeight = Number(object.startingHeight); - } - else { - message.startingHeight = 0; - } - if (object.endingHeight !== undefined && object.endingHeight !== null) { - message.endingHeight = Number(object.endingHeight); - } - else { - message.endingHeight = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.startingHeight !== undefined && - (obj.startingHeight = message.startingHeight); - message.endingHeight !== undefined && - (obj.endingHeight = message.endingHeight); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorSlashesRequest, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.startingHeight !== undefined && object.startingHeight !== null) { - message.startingHeight = object.startingHeight; - } - else { - message.startingHeight = 0; - } - if (object.endingHeight !== undefined && object.endingHeight !== null) { - message.endingHeight = object.endingHeight; - } - else { - message.endingHeight = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryValidatorSlashesResponse = {}; -export const QueryValidatorSlashesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.slashes) { - ValidatorSlashEvent.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorSlashesResponse, - }; - message.slashes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.slashes.push(ValidatorSlashEvent.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorSlashesResponse, - }; - message.slashes = []; - if (object.slashes !== undefined && object.slashes !== null) { - for (const e of object.slashes) { - message.slashes.push(ValidatorSlashEvent.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.slashes) { - obj.slashes = message.slashes.map((e) => e ? ValidatorSlashEvent.toJSON(e) : undefined); - } - else { - obj.slashes = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorSlashesResponse, - }; - message.slashes = []; - if (object.slashes !== undefined && object.slashes !== null) { - for (const e of object.slashes) { - message.slashes.push(ValidatorSlashEvent.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegationRewardsRequest = { - delegatorAddress: "", - validatorAddress: "", -}; -export const QueryDelegationRewardsRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationRewardsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegationRewardsRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegationRewardsRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - return message; - }, -}; -const baseQueryDelegationRewardsResponse = {}; -export const QueryDelegationRewardsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.rewards) { - DecCoin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationRewardsResponse, - }; - message.rewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegationRewardsResponse, - }; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => e ? DecCoin.toJSON(e) : undefined); - } - else { - obj.rewards = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegationRewardsResponse, - }; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -const baseQueryDelegationTotalRewardsRequest = { delegatorAddress: "" }; -export const QueryDelegationTotalRewardsRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationTotalRewardsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegationTotalRewardsRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegationTotalRewardsRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - return message; - }, -}; -const baseQueryDelegationTotalRewardsResponse = {}; -export const QueryDelegationTotalRewardsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.rewards) { - DelegationDelegatorReward.encode(v, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.total) { - DecCoin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationTotalRewardsResponse, - }; - message.rewards = []; - message.total = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DelegationDelegatorReward.decode(reader, reader.uint32())); - break; - case 2: - message.total.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegationTotalRewardsResponse, - }; - message.rewards = []; - message.total = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DelegationDelegatorReward.fromJSON(e)); - } - } - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => e ? DelegationDelegatorReward.toJSON(e) : undefined); - } - else { - obj.rewards = []; - } - if (message.total) { - obj.total = message.total.map((e) => (e ? DecCoin.toJSON(e) : undefined)); - } - else { - obj.total = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegationTotalRewardsResponse, - }; - message.rewards = []; - message.total = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DelegationDelegatorReward.fromPartial(e)); - } - } - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -const baseQueryDelegatorValidatorsRequest = { delegatorAddress: "" }; -export const QueryDelegatorValidatorsRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorValidatorsRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorValidatorsRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - return message; - }, -}; -const baseQueryDelegatorValidatorsResponse = { validators: "" }; -export const QueryDelegatorValidatorsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.validators) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsResponse, - }; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorValidatorsResponse, - }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => e); - } - else { - obj.validators = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorValidatorsResponse, - }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(e); - } - } - return message; - }, -}; -const baseQueryDelegatorWithdrawAddressRequest = { - delegatorAddress: "", -}; -export const QueryDelegatorWithdrawAddressRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorWithdrawAddressRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorWithdrawAddressRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorWithdrawAddressRequest, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - return message; - }, -}; -const baseQueryDelegatorWithdrawAddressResponse = { - withdrawAddress: "", -}; -export const QueryDelegatorWithdrawAddressResponse = { - encode(message, writer = Writer.create()) { - if (message.withdrawAddress !== "") { - writer.uint32(10).string(message.withdrawAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorWithdrawAddressResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.withdrawAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorWithdrawAddressResponse, - }; - if (object.withdrawAddress !== undefined && - object.withdrawAddress !== null) { - message.withdrawAddress = String(object.withdrawAddress); - } - else { - message.withdrawAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.withdrawAddress !== undefined && - (obj.withdrawAddress = message.withdrawAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorWithdrawAddressResponse, - }; - if (object.withdrawAddress !== undefined && - object.withdrawAddress !== null) { - message.withdrawAddress = object.withdrawAddress; - } - else { - message.withdrawAddress = ""; - } - return message; - }, -}; -const baseQueryCommunityPoolRequest = {}; -export const QueryCommunityPoolRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryCommunityPoolRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseQueryCommunityPoolRequest, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseQueryCommunityPoolRequest, - }; - return message; - }, -}; -const baseQueryCommunityPoolResponse = {}; -export const QueryCommunityPoolResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.pool) { - DecCoin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryCommunityPoolResponse, - }; - message.pool = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pool.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryCommunityPoolResponse, - }; - message.pool = []; - if (object.pool !== undefined && object.pool !== null) { - for (const e of object.pool) { - message.pool.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.pool) { - obj.pool = message.pool.map((e) => (e ? DecCoin.toJSON(e) : undefined)); - } - else { - obj.pool = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryCommunityPoolResponse, - }; - message.pool = []; - if (object.pool !== undefined && object.pool !== null) { - for (const e of object.pool) { - message.pool.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Params(request) { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - ValidatorOutstandingRewards(request) { - const data = QueryValidatorOutstandingRewardsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "ValidatorOutstandingRewards", data); - return promise.then((data) => QueryValidatorOutstandingRewardsResponse.decode(new Reader(data))); - } - ValidatorCommission(request) { - const data = QueryValidatorCommissionRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "ValidatorCommission", data); - return promise.then((data) => QueryValidatorCommissionResponse.decode(new Reader(data))); - } - ValidatorSlashes(request) { - const data = QueryValidatorSlashesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "ValidatorSlashes", data); - return promise.then((data) => QueryValidatorSlashesResponse.decode(new Reader(data))); - } - DelegationRewards(request) { - const data = QueryDelegationRewardsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "DelegationRewards", data); - return promise.then((data) => QueryDelegationRewardsResponse.decode(new Reader(data))); - } - DelegationTotalRewards(request) { - const data = QueryDelegationTotalRewardsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "DelegationTotalRewards", data); - return promise.then((data) => QueryDelegationTotalRewardsResponse.decode(new Reader(data))); - } - DelegatorValidators(request) { - const data = QueryDelegatorValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "DelegatorValidators", data); - return promise.then((data) => QueryDelegatorValidatorsResponse.decode(new Reader(data))); - } - DelegatorWithdrawAddress(request) { - const data = QueryDelegatorWithdrawAddressRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "DelegatorWithdrawAddress", data); - return promise.then((data) => QueryDelegatorWithdrawAddressResponse.decode(new Reader(data))); - } - CommunityPool(request) { - const data = QueryCommunityPoolRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "CommunityPool", data); - return promise.then((data) => QueryCommunityPoolResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.ts deleted file mode 100644 index 9a66d13069..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/query.ts +++ /dev/null @@ -1,1845 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - Params, - ValidatorOutstandingRewards, - ValidatorAccumulatedCommission, - ValidatorSlashEvent, - DelegationDelegatorReward, -} from "../../../cosmos/distribution/v1beta1/distribution"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; -import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.distribution.v1beta1"; - -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} - -/** - * QueryValidatorOutstandingRewardsRequest is the request type for the - * Query/ValidatorOutstandingRewards RPC method. - */ -export interface QueryValidatorOutstandingRewardsRequest { - /** validator_address defines the validator address to query for. */ - validator_address: string; -} - -/** - * QueryValidatorOutstandingRewardsResponse is the response type for the - * Query/ValidatorOutstandingRewards RPC method. - */ -export interface QueryValidatorOutstandingRewardsResponse { - rewards: ValidatorOutstandingRewards | undefined; -} - -/** - * QueryValidatorCommissionRequest is the request type for the - * Query/ValidatorCommission RPC method - */ -export interface QueryValidatorCommissionRequest { - /** validator_address defines the validator address to query for. */ - validator_address: string; -} - -/** - * QueryValidatorCommissionResponse is the response type for the - * Query/ValidatorCommission RPC method - */ -export interface QueryValidatorCommissionResponse { - /** commission defines the commision the validator received. */ - commission: ValidatorAccumulatedCommission | undefined; -} - -/** - * QueryValidatorSlashesRequest is the request type for the - * Query/ValidatorSlashes RPC method - */ -export interface QueryValidatorSlashesRequest { - /** validator_address defines the validator address to query for. */ - validator_address: string; - /** starting_height defines the optional starting height to query the slashes. */ - starting_height: number; - /** starting_height defines the optional ending height to query the slashes. */ - ending_height: number; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryValidatorSlashesResponse is the response type for the - * Query/ValidatorSlashes RPC method. - */ -export interface QueryValidatorSlashesResponse { - /** slashes defines the slashes the validator received. */ - slashes: ValidatorSlashEvent[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryDelegationRewardsRequest is the request type for the - * Query/DelegationRewards RPC method. - */ -export interface QueryDelegationRewardsRequest { - /** delegator_address defines the delegator address to query for. */ - delegator_address: string; - /** validator_address defines the validator address to query for. */ - validator_address: string; -} - -/** - * QueryDelegationRewardsResponse is the response type for the - * Query/DelegationRewards RPC method. - */ -export interface QueryDelegationRewardsResponse { - /** rewards defines the rewards accrued by a delegation. */ - rewards: DecCoin[]; -} - -/** - * QueryDelegationTotalRewardsRequest is the request type for the - * Query/DelegationTotalRewards RPC method. - */ -export interface QueryDelegationTotalRewardsRequest { - /** delegator_address defines the delegator address to query for. */ - delegator_address: string; -} - -/** - * QueryDelegationTotalRewardsResponse is the response type for the - * Query/DelegationTotalRewards RPC method. - */ -export interface QueryDelegationTotalRewardsResponse { - /** rewards defines all the rewards accrued by a delegator. */ - rewards: DelegationDelegatorReward[]; - /** total defines the sum of all the rewards. */ - total: DecCoin[]; -} - -/** - * QueryDelegatorValidatorsRequest is the request type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsRequest { - /** delegator_address defines the delegator address to query for. */ - delegator_address: string; -} - -/** - * QueryDelegatorValidatorsResponse is the response type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsResponse { - /** validators defines the validators a delegator is delegating for. */ - validators: string[]; -} - -/** - * QueryDelegatorWithdrawAddressRequest is the request type for the - * Query/DelegatorWithdrawAddress RPC method. - */ -export interface QueryDelegatorWithdrawAddressRequest { - /** delegator_address defines the delegator address to query for. */ - delegator_address: string; -} - -/** - * QueryDelegatorWithdrawAddressResponse is the response type for the - * Query/DelegatorWithdrawAddress RPC method. - */ -export interface QueryDelegatorWithdrawAddressResponse { - /** withdraw_address defines the delegator address to query for. */ - withdraw_address: string; -} - -/** - * QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC - * method. - */ -export interface QueryCommunityPoolRequest {} - -/** - * QueryCommunityPoolResponse is the response type for the Query/CommunityPool - * RPC method. - */ -export interface QueryCommunityPoolResponse { - /** pool defines community pool's coins. */ - pool: DecCoin[]; -} - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -const baseQueryValidatorOutstandingRewardsRequest: object = { - validator_address: "", -}; - -export const QueryValidatorOutstandingRewardsRequest = { - encode( - message: QueryValidatorOutstandingRewardsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_address !== "") { - writer.uint32(10).string(message.validator_address); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorOutstandingRewardsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorOutstandingRewardsRequest, - } as QueryValidatorOutstandingRewardsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorOutstandingRewardsRequest { - const message = { - ...baseQueryValidatorOutstandingRewardsRequest, - } as QueryValidatorOutstandingRewardsRequest; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - return message; - }, - - toJSON(message: QueryValidatorOutstandingRewardsRequest): unknown { - const obj: any = {}; - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorOutstandingRewardsRequest { - const message = { - ...baseQueryValidatorOutstandingRewardsRequest, - } as QueryValidatorOutstandingRewardsRequest; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - return message; - }, -}; - -const baseQueryValidatorOutstandingRewardsResponse: object = {}; - -export const QueryValidatorOutstandingRewardsResponse = { - encode( - message: QueryValidatorOutstandingRewardsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.rewards !== undefined) { - ValidatorOutstandingRewards.encode( - message.rewards, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorOutstandingRewardsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorOutstandingRewardsResponse, - } as QueryValidatorOutstandingRewardsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards = ValidatorOutstandingRewards.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorOutstandingRewardsResponse { - const message = { - ...baseQueryValidatorOutstandingRewardsResponse, - } as QueryValidatorOutstandingRewardsResponse; - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorOutstandingRewards.fromJSON(object.rewards); - } else { - message.rewards = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorOutstandingRewardsResponse): unknown { - const obj: any = {}; - message.rewards !== undefined && - (obj.rewards = message.rewards - ? ValidatorOutstandingRewards.toJSON(message.rewards) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorOutstandingRewardsResponse { - const message = { - ...baseQueryValidatorOutstandingRewardsResponse, - } as QueryValidatorOutstandingRewardsResponse; - if (object.rewards !== undefined && object.rewards !== null) { - message.rewards = ValidatorOutstandingRewards.fromPartial(object.rewards); - } else { - message.rewards = undefined; - } - return message; - }, -}; - -const baseQueryValidatorCommissionRequest: object = { validator_address: "" }; - -export const QueryValidatorCommissionRequest = { - encode( - message: QueryValidatorCommissionRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_address !== "") { - writer.uint32(10).string(message.validator_address); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorCommissionRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorCommissionRequest, - } as QueryValidatorCommissionRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorCommissionRequest { - const message = { - ...baseQueryValidatorCommissionRequest, - } as QueryValidatorCommissionRequest; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - return message; - }, - - toJSON(message: QueryValidatorCommissionRequest): unknown { - const obj: any = {}; - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorCommissionRequest { - const message = { - ...baseQueryValidatorCommissionRequest, - } as QueryValidatorCommissionRequest; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - return message; - }, -}; - -const baseQueryValidatorCommissionResponse: object = {}; - -export const QueryValidatorCommissionResponse = { - encode( - message: QueryValidatorCommissionResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.commission !== undefined) { - ValidatorAccumulatedCommission.encode( - message.commission, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorCommissionResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorCommissionResponse, - } as QueryValidatorCommissionResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commission = ValidatorAccumulatedCommission.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorCommissionResponse { - const message = { - ...baseQueryValidatorCommissionResponse, - } as QueryValidatorCommissionResponse; - if (object.commission !== undefined && object.commission !== null) { - message.commission = ValidatorAccumulatedCommission.fromJSON( - object.commission - ); - } else { - message.commission = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorCommissionResponse): unknown { - const obj: any = {}; - message.commission !== undefined && - (obj.commission = message.commission - ? ValidatorAccumulatedCommission.toJSON(message.commission) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorCommissionResponse { - const message = { - ...baseQueryValidatorCommissionResponse, - } as QueryValidatorCommissionResponse; - if (object.commission !== undefined && object.commission !== null) { - message.commission = ValidatorAccumulatedCommission.fromPartial( - object.commission - ); - } else { - message.commission = undefined; - } - return message; - }, -}; - -const baseQueryValidatorSlashesRequest: object = { - validator_address: "", - starting_height: 0, - ending_height: 0, -}; - -export const QueryValidatorSlashesRequest = { - encode( - message: QueryValidatorSlashesRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_address !== "") { - writer.uint32(10).string(message.validator_address); - } - if (message.starting_height !== 0) { - writer.uint32(16).uint64(message.starting_height); - } - if (message.ending_height !== 0) { - writer.uint32(24).uint64(message.ending_height); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorSlashesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorSlashesRequest, - } as QueryValidatorSlashesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_address = reader.string(); - break; - case 2: - message.starting_height = longToNumber(reader.uint64() as Long); - break; - case 3: - message.ending_height = longToNumber(reader.uint64() as Long); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorSlashesRequest { - const message = { - ...baseQueryValidatorSlashesRequest, - } as QueryValidatorSlashesRequest; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - if ( - object.starting_height !== undefined && - object.starting_height !== null - ) { - message.starting_height = Number(object.starting_height); - } else { - message.starting_height = 0; - } - if (object.ending_height !== undefined && object.ending_height !== null) { - message.ending_height = Number(object.ending_height); - } else { - message.ending_height = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorSlashesRequest): unknown { - const obj: any = {}; - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - message.starting_height !== undefined && - (obj.starting_height = message.starting_height); - message.ending_height !== undefined && - (obj.ending_height = message.ending_height); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorSlashesRequest { - const message = { - ...baseQueryValidatorSlashesRequest, - } as QueryValidatorSlashesRequest; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - if ( - object.starting_height !== undefined && - object.starting_height !== null - ) { - message.starting_height = object.starting_height; - } else { - message.starting_height = 0; - } - if (object.ending_height !== undefined && object.ending_height !== null) { - message.ending_height = object.ending_height; - } else { - message.ending_height = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryValidatorSlashesResponse: object = {}; - -export const QueryValidatorSlashesResponse = { - encode( - message: QueryValidatorSlashesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.slashes) { - ValidatorSlashEvent.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorSlashesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorSlashesResponse, - } as QueryValidatorSlashesResponse; - message.slashes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.slashes.push( - ValidatorSlashEvent.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorSlashesResponse { - const message = { - ...baseQueryValidatorSlashesResponse, - } as QueryValidatorSlashesResponse; - message.slashes = []; - if (object.slashes !== undefined && object.slashes !== null) { - for (const e of object.slashes) { - message.slashes.push(ValidatorSlashEvent.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorSlashesResponse): unknown { - const obj: any = {}; - if (message.slashes) { - obj.slashes = message.slashes.map((e) => - e ? ValidatorSlashEvent.toJSON(e) : undefined - ); - } else { - obj.slashes = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorSlashesResponse { - const message = { - ...baseQueryValidatorSlashesResponse, - } as QueryValidatorSlashesResponse; - message.slashes = []; - if (object.slashes !== undefined && object.slashes !== null) { - for (const e of object.slashes) { - message.slashes.push(ValidatorSlashEvent.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegationRewardsRequest: object = { - delegator_address: "", - validator_address: "", -}; - -export const QueryDelegationRewardsRequest = { - encode( - message: QueryDelegationRewardsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - if (message.validator_address !== "") { - writer.uint32(18).string(message.validator_address); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegationRewardsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationRewardsRequest, - } as QueryDelegationRewardsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - case 2: - message.validator_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegationRewardsRequest { - const message = { - ...baseQueryDelegationRewardsRequest, - } as QueryDelegationRewardsRequest; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - return message; - }, - - toJSON(message: QueryDelegationRewardsRequest): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegationRewardsRequest { - const message = { - ...baseQueryDelegationRewardsRequest, - } as QueryDelegationRewardsRequest; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - return message; - }, -}; - -const baseQueryDelegationRewardsResponse: object = {}; - -export const QueryDelegationRewardsResponse = { - encode( - message: QueryDelegationRewardsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.rewards) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegationRewardsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationRewardsResponse, - } as QueryDelegationRewardsResponse; - message.rewards = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegationRewardsResponse { - const message = { - ...baseQueryDelegationRewardsResponse, - } as QueryDelegationRewardsResponse; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryDelegationRewardsResponse): unknown { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => - e ? DecCoin.toJSON(e) : undefined - ); - } else { - obj.rewards = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegationRewardsResponse { - const message = { - ...baseQueryDelegationRewardsResponse, - } as QueryDelegationRewardsResponse; - message.rewards = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseQueryDelegationTotalRewardsRequest: object = { - delegator_address: "", -}; - -export const QueryDelegationTotalRewardsRequest = { - encode( - message: QueryDelegationTotalRewardsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegationTotalRewardsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationTotalRewardsRequest, - } as QueryDelegationTotalRewardsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegationTotalRewardsRequest { - const message = { - ...baseQueryDelegationTotalRewardsRequest, - } as QueryDelegationTotalRewardsRequest; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - return message; - }, - - toJSON(message: QueryDelegationTotalRewardsRequest): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegationTotalRewardsRequest { - const message = { - ...baseQueryDelegationTotalRewardsRequest, - } as QueryDelegationTotalRewardsRequest; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - return message; - }, -}; - -const baseQueryDelegationTotalRewardsResponse: object = {}; - -export const QueryDelegationTotalRewardsResponse = { - encode( - message: QueryDelegationTotalRewardsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.rewards) { - DelegationDelegatorReward.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.total) { - DecCoin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegationTotalRewardsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationTotalRewardsResponse, - } as QueryDelegationTotalRewardsResponse; - message.rewards = []; - message.total = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push( - DelegationDelegatorReward.decode(reader, reader.uint32()) - ); - break; - case 2: - message.total.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegationTotalRewardsResponse { - const message = { - ...baseQueryDelegationTotalRewardsResponse, - } as QueryDelegationTotalRewardsResponse; - message.rewards = []; - message.total = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DelegationDelegatorReward.fromJSON(e)); - } - } - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryDelegationTotalRewardsResponse): unknown { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map((e) => - e ? DelegationDelegatorReward.toJSON(e) : undefined - ); - } else { - obj.rewards = []; - } - if (message.total) { - obj.total = message.total.map((e) => (e ? DecCoin.toJSON(e) : undefined)); - } else { - obj.total = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegationTotalRewardsResponse { - const message = { - ...baseQueryDelegationTotalRewardsResponse, - } as QueryDelegationTotalRewardsResponse; - message.rewards = []; - message.total = []; - if (object.rewards !== undefined && object.rewards !== null) { - for (const e of object.rewards) { - message.rewards.push(DelegationDelegatorReward.fromPartial(e)); - } - } - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseQueryDelegatorValidatorsRequest: object = { delegator_address: "" }; - -export const QueryDelegatorValidatorsRequest = { - encode( - message: QueryDelegatorValidatorsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorValidatorsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsRequest, - } as QueryDelegatorValidatorsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorValidatorsRequest { - const message = { - ...baseQueryDelegatorValidatorsRequest, - } as QueryDelegatorValidatorsRequest; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - return message; - }, - - toJSON(message: QueryDelegatorValidatorsRequest): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorValidatorsRequest { - const message = { - ...baseQueryDelegatorValidatorsRequest, - } as QueryDelegatorValidatorsRequest; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - return message; - }, -}; - -const baseQueryDelegatorValidatorsResponse: object = { validators: "" }; - -export const QueryDelegatorValidatorsResponse = { - encode( - message: QueryDelegatorValidatorsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.validators) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorValidatorsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsResponse, - } as QueryDelegatorValidatorsResponse; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorValidatorsResponse { - const message = { - ...baseQueryDelegatorValidatorsResponse, - } as QueryDelegatorValidatorsResponse; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(String(e)); - } - } - return message; - }, - - toJSON(message: QueryDelegatorValidatorsResponse): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => e); - } else { - obj.validators = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorValidatorsResponse { - const message = { - ...baseQueryDelegatorValidatorsResponse, - } as QueryDelegatorValidatorsResponse; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(e); - } - } - return message; - }, -}; - -const baseQueryDelegatorWithdrawAddressRequest: object = { - delegator_address: "", -}; - -export const QueryDelegatorWithdrawAddressRequest = { - encode( - message: QueryDelegatorWithdrawAddressRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorWithdrawAddressRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorWithdrawAddressRequest, - } as QueryDelegatorWithdrawAddressRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorWithdrawAddressRequest { - const message = { - ...baseQueryDelegatorWithdrawAddressRequest, - } as QueryDelegatorWithdrawAddressRequest; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - return message; - }, - - toJSON(message: QueryDelegatorWithdrawAddressRequest): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorWithdrawAddressRequest { - const message = { - ...baseQueryDelegatorWithdrawAddressRequest, - } as QueryDelegatorWithdrawAddressRequest; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - return message; - }, -}; - -const baseQueryDelegatorWithdrawAddressResponse: object = { - withdraw_address: "", -}; - -export const QueryDelegatorWithdrawAddressResponse = { - encode( - message: QueryDelegatorWithdrawAddressResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.withdraw_address !== "") { - writer.uint32(10).string(message.withdraw_address); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorWithdrawAddressResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorWithdrawAddressResponse, - } as QueryDelegatorWithdrawAddressResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.withdraw_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorWithdrawAddressResponse { - const message = { - ...baseQueryDelegatorWithdrawAddressResponse, - } as QueryDelegatorWithdrawAddressResponse; - if ( - object.withdraw_address !== undefined && - object.withdraw_address !== null - ) { - message.withdraw_address = String(object.withdraw_address); - } else { - message.withdraw_address = ""; - } - return message; - }, - - toJSON(message: QueryDelegatorWithdrawAddressResponse): unknown { - const obj: any = {}; - message.withdraw_address !== undefined && - (obj.withdraw_address = message.withdraw_address); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorWithdrawAddressResponse { - const message = { - ...baseQueryDelegatorWithdrawAddressResponse, - } as QueryDelegatorWithdrawAddressResponse; - if ( - object.withdraw_address !== undefined && - object.withdraw_address !== null - ) { - message.withdraw_address = object.withdraw_address; - } else { - message.withdraw_address = ""; - } - return message; - }, -}; - -const baseQueryCommunityPoolRequest: object = {}; - -export const QueryCommunityPoolRequest = { - encode( - _: QueryCommunityPoolRequest, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryCommunityPoolRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryCommunityPoolRequest, - } as QueryCommunityPoolRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryCommunityPoolRequest { - const message = { - ...baseQueryCommunityPoolRequest, - } as QueryCommunityPoolRequest; - return message; - }, - - toJSON(_: QueryCommunityPoolRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): QueryCommunityPoolRequest { - const message = { - ...baseQueryCommunityPoolRequest, - } as QueryCommunityPoolRequest; - return message; - }, -}; - -const baseQueryCommunityPoolResponse: object = {}; - -export const QueryCommunityPoolResponse = { - encode( - message: QueryCommunityPoolResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.pool) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryCommunityPoolResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryCommunityPoolResponse, - } as QueryCommunityPoolResponse; - message.pool = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pool.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryCommunityPoolResponse { - const message = { - ...baseQueryCommunityPoolResponse, - } as QueryCommunityPoolResponse; - message.pool = []; - if (object.pool !== undefined && object.pool !== null) { - for (const e of object.pool) { - message.pool.push(DecCoin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryCommunityPoolResponse): unknown { - const obj: any = {}; - if (message.pool) { - obj.pool = message.pool.map((e) => (e ? DecCoin.toJSON(e) : undefined)); - } else { - obj.pool = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryCommunityPoolResponse { - const message = { - ...baseQueryCommunityPoolResponse, - } as QueryCommunityPoolResponse; - message.pool = []; - if (object.pool !== undefined && object.pool !== null) { - for (const e of object.pool) { - message.pool.push(DecCoin.fromPartial(e)); - } - } - return message; - }, -}; - -/** Query defines the gRPC querier service for distribution module. */ -export interface Query { - /** Params queries params of the distribution module. */ - Params(request: QueryParamsRequest): Promise; - /** ValidatorOutstandingRewards queries rewards of a validator address. */ - ValidatorOutstandingRewards( - request: QueryValidatorOutstandingRewardsRequest - ): Promise; - /** ValidatorCommission queries accumulated commission for a validator. */ - ValidatorCommission( - request: QueryValidatorCommissionRequest - ): Promise; - /** ValidatorSlashes queries slash events of a validator. */ - ValidatorSlashes( - request: QueryValidatorSlashesRequest - ): Promise; - /** DelegationRewards queries the total rewards accrued by a delegation. */ - DelegationRewards( - request: QueryDelegationRewardsRequest - ): Promise; - /** - * DelegationTotalRewards queries the total rewards accrued by a each - * validator. - */ - DelegationTotalRewards( - request: QueryDelegationTotalRewardsRequest - ): Promise; - /** DelegatorValidators queries the validators of a delegator. */ - DelegatorValidators( - request: QueryDelegatorValidatorsRequest - ): Promise; - /** DelegatorWithdrawAddress queries withdraw address of a delegator. */ - DelegatorWithdrawAddress( - request: QueryDelegatorWithdrawAddressRequest - ): Promise; - /** CommunityPool queries the community pool coins. */ - CommunityPool( - request: QueryCommunityPoolRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - - ValidatorOutstandingRewards( - request: QueryValidatorOutstandingRewardsRequest - ): Promise { - const data = QueryValidatorOutstandingRewardsRequest.encode( - request - ).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "ValidatorOutstandingRewards", - data - ); - return promise.then((data) => - QueryValidatorOutstandingRewardsResponse.decode(new Reader(data)) - ); - } - - ValidatorCommission( - request: QueryValidatorCommissionRequest - ): Promise { - const data = QueryValidatorCommissionRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "ValidatorCommission", - data - ); - return promise.then((data) => - QueryValidatorCommissionResponse.decode(new Reader(data)) - ); - } - - ValidatorSlashes( - request: QueryValidatorSlashesRequest - ): Promise { - const data = QueryValidatorSlashesRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "ValidatorSlashes", - data - ); - return promise.then((data) => - QueryValidatorSlashesResponse.decode(new Reader(data)) - ); - } - - DelegationRewards( - request: QueryDelegationRewardsRequest - ): Promise { - const data = QueryDelegationRewardsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "DelegationRewards", - data - ); - return promise.then((data) => - QueryDelegationRewardsResponse.decode(new Reader(data)) - ); - } - - DelegationTotalRewards( - request: QueryDelegationTotalRewardsRequest - ): Promise { - const data = QueryDelegationTotalRewardsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "DelegationTotalRewards", - data - ); - return promise.then((data) => - QueryDelegationTotalRewardsResponse.decode(new Reader(data)) - ); - } - - DelegatorValidators( - request: QueryDelegatorValidatorsRequest - ): Promise { - const data = QueryDelegatorValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "DelegatorValidators", - data - ); - return promise.then((data) => - QueryDelegatorValidatorsResponse.decode(new Reader(data)) - ); - } - - DelegatorWithdrawAddress( - request: QueryDelegatorWithdrawAddressRequest - ): Promise { - const data = QueryDelegatorWithdrawAddressRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "DelegatorWithdrawAddress", - data - ); - return promise.then((data) => - QueryDelegatorWithdrawAddressResponse.decode(new Reader(data)) - ); - } - - CommunityPool( - request: QueryCommunityPoolRequest - ): Promise { - const data = QueryCommunityPoolRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Query", - "CommunityPool", - data - ); - return promise.then((data) => - QueryCommunityPoolResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.d.ts deleted file mode 100644 index 68440c7413..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.distribution.v1beta1"; -/** - * MsgSetWithdrawAddress sets the withdraw address for - * a delegator (or validator self-delegation). - */ -export interface MsgSetWithdrawAddress { - delegatorAddress: string; - withdrawAddress: string; -} -/** MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. */ -export interface MsgSetWithdrawAddressResponse { -} -/** - * MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator - * from a single validator. - */ -export interface MsgWithdrawDelegatorReward { - delegatorAddress: string; - validatorAddress: string; -} -/** MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. */ -export interface MsgWithdrawDelegatorRewardResponse { -} -/** - * MsgWithdrawValidatorCommission withdraws the full commission to the validator - * address. - */ -export interface MsgWithdrawValidatorCommission { - validatorAddress: string; -} -/** MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. */ -export interface MsgWithdrawValidatorCommissionResponse { -} -/** - * MsgFundCommunityPool allows an account to directly - * fund the community pool. - */ -export interface MsgFundCommunityPool { - amount: Coin[]; - depositor: string; -} -/** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */ -export interface MsgFundCommunityPoolResponse { -} -export declare const MsgSetWithdrawAddress: { - encode(message: MsgSetWithdrawAddress, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSetWithdrawAddress; - fromJSON(object: any): MsgSetWithdrawAddress; - toJSON(message: MsgSetWithdrawAddress): unknown; - fromPartial(object: DeepPartial): MsgSetWithdrawAddress; -}; -export declare const MsgSetWithdrawAddressResponse: { - encode(_: MsgSetWithdrawAddressResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSetWithdrawAddressResponse; - fromJSON(_: any): MsgSetWithdrawAddressResponse; - toJSON(_: MsgSetWithdrawAddressResponse): unknown; - fromPartial(_: DeepPartial): MsgSetWithdrawAddressResponse; -}; -export declare const MsgWithdrawDelegatorReward: { - encode(message: MsgWithdrawDelegatorReward, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgWithdrawDelegatorReward; - fromJSON(object: any): MsgWithdrawDelegatorReward; - toJSON(message: MsgWithdrawDelegatorReward): unknown; - fromPartial(object: DeepPartial): MsgWithdrawDelegatorReward; -}; -export declare const MsgWithdrawDelegatorRewardResponse: { - encode(_: MsgWithdrawDelegatorRewardResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgWithdrawDelegatorRewardResponse; - fromJSON(_: any): MsgWithdrawDelegatorRewardResponse; - toJSON(_: MsgWithdrawDelegatorRewardResponse): unknown; - fromPartial(_: DeepPartial): MsgWithdrawDelegatorRewardResponse; -}; -export declare const MsgWithdrawValidatorCommission: { - encode(message: MsgWithdrawValidatorCommission, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgWithdrawValidatorCommission; - fromJSON(object: any): MsgWithdrawValidatorCommission; - toJSON(message: MsgWithdrawValidatorCommission): unknown; - fromPartial(object: DeepPartial): MsgWithdrawValidatorCommission; -}; -export declare const MsgWithdrawValidatorCommissionResponse: { - encode(_: MsgWithdrawValidatorCommissionResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgWithdrawValidatorCommissionResponse; - fromJSON(_: any): MsgWithdrawValidatorCommissionResponse; - toJSON(_: MsgWithdrawValidatorCommissionResponse): unknown; - fromPartial(_: DeepPartial): MsgWithdrawValidatorCommissionResponse; -}; -export declare const MsgFundCommunityPool: { - encode(message: MsgFundCommunityPool, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgFundCommunityPool; - fromJSON(object: any): MsgFundCommunityPool; - toJSON(message: MsgFundCommunityPool): unknown; - fromPartial(object: DeepPartial): MsgFundCommunityPool; -}; -export declare const MsgFundCommunityPoolResponse: { - encode(_: MsgFundCommunityPoolResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgFundCommunityPoolResponse; - fromJSON(_: any): MsgFundCommunityPoolResponse; - toJSON(_: MsgFundCommunityPoolResponse): unknown; - fromPartial(_: DeepPartial): MsgFundCommunityPoolResponse; -}; -/** Msg defines the distribution Msg service. */ -export interface Msg { - /** - * SetWithdrawAddress defines a method to change the withdraw address - * for a delegator (or validator self-delegation). - */ - SetWithdrawAddress(request: MsgSetWithdrawAddress): Promise; - /** - * WithdrawDelegatorReward defines a method to withdraw rewards of delegator - * from a single validator. - */ - WithdrawDelegatorReward(request: MsgWithdrawDelegatorReward): Promise; - /** - * WithdrawValidatorCommission defines a method to withdraw the - * full commission to the validator address. - */ - WithdrawValidatorCommission(request: MsgWithdrawValidatorCommission): Promise; - /** - * FundCommunityPool defines a method to allow an account to directly - * fund the community pool. - */ - FundCommunityPool(request: MsgFundCommunityPool): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - SetWithdrawAddress(request: MsgSetWithdrawAddress): Promise; - WithdrawDelegatorReward(request: MsgWithdrawDelegatorReward): Promise; - WithdrawValidatorCommission(request: MsgWithdrawValidatorCommission): Promise; - FundCommunityPool(request: MsgFundCommunityPool): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.js deleted file mode 100644 index 0ab165b7c9..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.js +++ /dev/null @@ -1,481 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.distribution.v1beta1"; -const baseMsgSetWithdrawAddress = { - delegatorAddress: "", - withdrawAddress: "", -}; -export const MsgSetWithdrawAddress = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.withdrawAddress !== "") { - writer.uint32(18).string(message.withdrawAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSetWithdrawAddress }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.withdrawAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgSetWithdrawAddress }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.withdrawAddress !== undefined && - object.withdrawAddress !== null) { - message.withdrawAddress = String(object.withdrawAddress); - } - else { - message.withdrawAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.withdrawAddress !== undefined && - (obj.withdrawAddress = message.withdrawAddress); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgSetWithdrawAddress }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.withdrawAddress !== undefined && - object.withdrawAddress !== null) { - message.withdrawAddress = object.withdrawAddress; - } - else { - message.withdrawAddress = ""; - } - return message; - }, -}; -const baseMsgSetWithdrawAddressResponse = {}; -export const MsgSetWithdrawAddressResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgSetWithdrawAddressResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgSetWithdrawAddressResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgSetWithdrawAddressResponse, - }; - return message; - }, -}; -const baseMsgWithdrawDelegatorReward = { - delegatorAddress: "", - validatorAddress: "", -}; -export const MsgWithdrawDelegatorReward = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawDelegatorReward, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgWithdrawDelegatorReward, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgWithdrawDelegatorReward, - }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - return message; - }, -}; -const baseMsgWithdrawDelegatorRewardResponse = {}; -export const MsgWithdrawDelegatorRewardResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawDelegatorRewardResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgWithdrawDelegatorRewardResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgWithdrawDelegatorRewardResponse, - }; - return message; - }, -}; -const baseMsgWithdrawValidatorCommission = { validatorAddress: "" }; -export const MsgWithdrawValidatorCommission = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawValidatorCommission, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgWithdrawValidatorCommission, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgWithdrawValidatorCommission, - }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - return message; - }, -}; -const baseMsgWithdrawValidatorCommissionResponse = {}; -export const MsgWithdrawValidatorCommissionResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawValidatorCommissionResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgWithdrawValidatorCommissionResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgWithdrawValidatorCommissionResponse, - }; - return message; - }, -}; -const baseMsgFundCommunityPool = { depositor: "" }; -export const MsgFundCommunityPool = { - encode(message, writer = Writer.create()) { - for (const v of message.amount) { - Coin.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgFundCommunityPool }; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.depositor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgFundCommunityPool }; - message.amount = []; - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } - else { - message.depositor = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.amount = []; - } - message.depositor !== undefined && (obj.depositor = message.depositor); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgFundCommunityPool }; - message.amount = []; - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } - else { - message.depositor = ""; - } - return message; - }, -}; -const baseMsgFundCommunityPoolResponse = {}; -export const MsgFundCommunityPoolResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgFundCommunityPoolResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgFundCommunityPoolResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgFundCommunityPoolResponse, - }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - SetWithdrawAddress(request) { - const data = MsgSetWithdrawAddress.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Msg", "SetWithdrawAddress", data); - return promise.then((data) => MsgSetWithdrawAddressResponse.decode(new Reader(data))); - } - WithdrawDelegatorReward(request) { - const data = MsgWithdrawDelegatorReward.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Msg", "WithdrawDelegatorReward", data); - return promise.then((data) => MsgWithdrawDelegatorRewardResponse.decode(new Reader(data))); - } - WithdrawValidatorCommission(request) { - const data = MsgWithdrawValidatorCommission.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Msg", "WithdrawValidatorCommission", data); - return promise.then((data) => MsgWithdrawValidatorCommissionResponse.decode(new Reader(data))); - } - FundCommunityPool(request) { - const data = MsgFundCommunityPool.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Msg", "FundCommunityPool", data); - return promise.then((data) => MsgFundCommunityPoolResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.ts deleted file mode 100644 index a983e05d5e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/cosmos/distribution/v1beta1/tx.ts +++ /dev/null @@ -1,728 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.distribution.v1beta1"; - -/** - * MsgSetWithdrawAddress sets the withdraw address for - * a delegator (or validator self-delegation). - */ -export interface MsgSetWithdrawAddress { - delegator_address: string; - withdraw_address: string; -} - -/** MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. */ -export interface MsgSetWithdrawAddressResponse {} - -/** - * MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator - * from a single validator. - */ -export interface MsgWithdrawDelegatorReward { - delegator_address: string; - validator_address: string; -} - -/** MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. */ -export interface MsgWithdrawDelegatorRewardResponse {} - -/** - * MsgWithdrawValidatorCommission withdraws the full commission to the validator - * address. - */ -export interface MsgWithdrawValidatorCommission { - validator_address: string; -} - -/** MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. */ -export interface MsgWithdrawValidatorCommissionResponse {} - -/** - * MsgFundCommunityPool allows an account to directly - * fund the community pool. - */ -export interface MsgFundCommunityPool { - amount: Coin[]; - depositor: string; -} - -/** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */ -export interface MsgFundCommunityPoolResponse {} - -const baseMsgSetWithdrawAddress: object = { - delegator_address: "", - withdraw_address: "", -}; - -export const MsgSetWithdrawAddress = { - encode( - message: MsgSetWithdrawAddress, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - if (message.withdraw_address !== "") { - writer.uint32(18).string(message.withdraw_address); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgSetWithdrawAddress { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSetWithdrawAddress } as MsgSetWithdrawAddress; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - case 2: - message.withdraw_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgSetWithdrawAddress { - const message = { ...baseMsgSetWithdrawAddress } as MsgSetWithdrawAddress; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - if ( - object.withdraw_address !== undefined && - object.withdraw_address !== null - ) { - message.withdraw_address = String(object.withdraw_address); - } else { - message.withdraw_address = ""; - } - return message; - }, - - toJSON(message: MsgSetWithdrawAddress): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - message.withdraw_address !== undefined && - (obj.withdraw_address = message.withdraw_address); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgSetWithdrawAddress { - const message = { ...baseMsgSetWithdrawAddress } as MsgSetWithdrawAddress; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - if ( - object.withdraw_address !== undefined && - object.withdraw_address !== null - ) { - message.withdraw_address = object.withdraw_address; - } else { - message.withdraw_address = ""; - } - return message; - }, -}; - -const baseMsgSetWithdrawAddressResponse: object = {}; - -export const MsgSetWithdrawAddressResponse = { - encode( - _: MsgSetWithdrawAddressResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgSetWithdrawAddressResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgSetWithdrawAddressResponse, - } as MsgSetWithdrawAddressResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgSetWithdrawAddressResponse { - const message = { - ...baseMsgSetWithdrawAddressResponse, - } as MsgSetWithdrawAddressResponse; - return message; - }, - - toJSON(_: MsgSetWithdrawAddressResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgSetWithdrawAddressResponse { - const message = { - ...baseMsgSetWithdrawAddressResponse, - } as MsgSetWithdrawAddressResponse; - return message; - }, -}; - -const baseMsgWithdrawDelegatorReward: object = { - delegator_address: "", - validator_address: "", -}; - -export const MsgWithdrawDelegatorReward = { - encode( - message: MsgWithdrawDelegatorReward, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - if (message.validator_address !== "") { - writer.uint32(18).string(message.validator_address); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgWithdrawDelegatorReward { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawDelegatorReward, - } as MsgWithdrawDelegatorReward; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - case 2: - message.validator_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgWithdrawDelegatorReward { - const message = { - ...baseMsgWithdrawDelegatorReward, - } as MsgWithdrawDelegatorReward; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - return message; - }, - - toJSON(message: MsgWithdrawDelegatorReward): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgWithdrawDelegatorReward { - const message = { - ...baseMsgWithdrawDelegatorReward, - } as MsgWithdrawDelegatorReward; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - return message; - }, -}; - -const baseMsgWithdrawDelegatorRewardResponse: object = {}; - -export const MsgWithdrawDelegatorRewardResponse = { - encode( - _: MsgWithdrawDelegatorRewardResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgWithdrawDelegatorRewardResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawDelegatorRewardResponse, - } as MsgWithdrawDelegatorRewardResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgWithdrawDelegatorRewardResponse { - const message = { - ...baseMsgWithdrawDelegatorRewardResponse, - } as MsgWithdrawDelegatorRewardResponse; - return message; - }, - - toJSON(_: MsgWithdrawDelegatorRewardResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgWithdrawDelegatorRewardResponse { - const message = { - ...baseMsgWithdrawDelegatorRewardResponse, - } as MsgWithdrawDelegatorRewardResponse; - return message; - }, -}; - -const baseMsgWithdrawValidatorCommission: object = { validator_address: "" }; - -export const MsgWithdrawValidatorCommission = { - encode( - message: MsgWithdrawValidatorCommission, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_address !== "") { - writer.uint32(10).string(message.validator_address); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgWithdrawValidatorCommission { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawValidatorCommission, - } as MsgWithdrawValidatorCommission; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgWithdrawValidatorCommission { - const message = { - ...baseMsgWithdrawValidatorCommission, - } as MsgWithdrawValidatorCommission; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - return message; - }, - - toJSON(message: MsgWithdrawValidatorCommission): unknown { - const obj: any = {}; - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgWithdrawValidatorCommission { - const message = { - ...baseMsgWithdrawValidatorCommission, - } as MsgWithdrawValidatorCommission; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - return message; - }, -}; - -const baseMsgWithdrawValidatorCommissionResponse: object = {}; - -export const MsgWithdrawValidatorCommissionResponse = { - encode( - _: MsgWithdrawValidatorCommissionResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgWithdrawValidatorCommissionResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgWithdrawValidatorCommissionResponse, - } as MsgWithdrawValidatorCommissionResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgWithdrawValidatorCommissionResponse { - const message = { - ...baseMsgWithdrawValidatorCommissionResponse, - } as MsgWithdrawValidatorCommissionResponse; - return message; - }, - - toJSON(_: MsgWithdrawValidatorCommissionResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgWithdrawValidatorCommissionResponse { - const message = { - ...baseMsgWithdrawValidatorCommissionResponse, - } as MsgWithdrawValidatorCommissionResponse; - return message; - }, -}; - -const baseMsgFundCommunityPool: object = { depositor: "" }; - -export const MsgFundCommunityPool = { - encode( - message: MsgFundCommunityPool, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgFundCommunityPool { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgFundCommunityPool } as MsgFundCommunityPool; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.depositor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgFundCommunityPool { - const message = { ...baseMsgFundCommunityPool } as MsgFundCommunityPool; - message.amount = []; - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } else { - message.depositor = ""; - } - return message; - }, - - toJSON(message: MsgFundCommunityPool): unknown { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.amount = []; - } - message.depositor !== undefined && (obj.depositor = message.depositor); - return obj; - }, - - fromPartial(object: DeepPartial): MsgFundCommunityPool { - const message = { ...baseMsgFundCommunityPool } as MsgFundCommunityPool; - message.amount = []; - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } else { - message.depositor = ""; - } - return message; - }, -}; - -const baseMsgFundCommunityPoolResponse: object = {}; - -export const MsgFundCommunityPoolResponse = { - encode( - _: MsgFundCommunityPoolResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgFundCommunityPoolResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgFundCommunityPoolResponse, - } as MsgFundCommunityPoolResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgFundCommunityPoolResponse { - const message = { - ...baseMsgFundCommunityPoolResponse, - } as MsgFundCommunityPoolResponse; - return message; - }, - - toJSON(_: MsgFundCommunityPoolResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgFundCommunityPoolResponse { - const message = { - ...baseMsgFundCommunityPoolResponse, - } as MsgFundCommunityPoolResponse; - return message; - }, -}; - -/** Msg defines the distribution Msg service. */ -export interface Msg { - /** - * SetWithdrawAddress defines a method to change the withdraw address - * for a delegator (or validator self-delegation). - */ - SetWithdrawAddress( - request: MsgSetWithdrawAddress - ): Promise; - /** - * WithdrawDelegatorReward defines a method to withdraw rewards of delegator - * from a single validator. - */ - WithdrawDelegatorReward( - request: MsgWithdrawDelegatorReward - ): Promise; - /** - * WithdrawValidatorCommission defines a method to withdraw the - * full commission to the validator address. - */ - WithdrawValidatorCommission( - request: MsgWithdrawValidatorCommission - ): Promise; - /** - * FundCommunityPool defines a method to allow an account to directly - * fund the community pool. - */ - FundCommunityPool( - request: MsgFundCommunityPool - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - SetWithdrawAddress( - request: MsgSetWithdrawAddress - ): Promise { - const data = MsgSetWithdrawAddress.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Msg", - "SetWithdrawAddress", - data - ); - return promise.then((data) => - MsgSetWithdrawAddressResponse.decode(new Reader(data)) - ); - } - - WithdrawDelegatorReward( - request: MsgWithdrawDelegatorReward - ): Promise { - const data = MsgWithdrawDelegatorReward.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Msg", - "WithdrawDelegatorReward", - data - ); - return promise.then((data) => - MsgWithdrawDelegatorRewardResponse.decode(new Reader(data)) - ); - } - - WithdrawValidatorCommission( - request: MsgWithdrawValidatorCommission - ): Promise { - const data = MsgWithdrawValidatorCommission.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Msg", - "WithdrawValidatorCommission", - data - ); - return promise.then((data) => - MsgWithdrawValidatorCommissionResponse.decode(new Reader(data)) - ); - } - - FundCommunityPool( - request: MsgFundCommunityPool - ): Promise { - const data = MsgFundCommunityPool.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.distribution.v1beta1.Msg", - "FundCommunityPool", - data - ); - return promise.then((data) => - MsgFundCommunityPoolResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30bdc6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0776..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.js deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7fb6d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b699..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index a3076569af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,1022 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 252725808b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4144 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } - else { - message.proto3Optional = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } - else { - message.proto3Optional = false; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/package.json b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/package.json deleted file mode 100755 index b0638974b8..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmos-distribution-v1beta1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmos.distribution.v1beta1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/cosmos-sdk/x/distribution/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.d.ts deleted file mode 100644 index 718485e588..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Equivocation } from "./module/types/cosmos/evidence/v1beta1/evidence"; -export { Equivocation }; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.js deleted file mode 100644 index efd8fe534a..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.js +++ /dev/null @@ -1,178 +0,0 @@ -import { txClient, queryClient, MissingWalletError, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { Equivocation } from "./module/types/cosmos/evidence/v1beta1/evidence"; -export { Equivocation }; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Evidence: {}, - AllEvidence: {}, - _Structure: { - Equivocation: getStructure(Equivocation.fromPartial({})), - }, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getEvidence: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Evidence[JSON.stringify(params)] ?? {}; - }, - getAllEvidence: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.AllEvidence[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.evidence.v1beta1 initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - async QueryEvidence({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryEvidence(key.evidence_hash)).data; - commit('QUERY', { query: 'Evidence', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryEvidence', payload: { options: { all }, params: { ...key }, query } }); - return getters['getEvidence']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryEvidence', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryAllEvidence({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryAllEvidence(query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryAllEvidence({ ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'AllEvidence', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryAllEvidence', payload: { options: { all }, params: { ...key }, query } }); - return getters['getAllEvidence']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryAllEvidence', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async sendMsgSubmitEvidence({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgSubmitEvidence(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgSubmitEvidence:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSubmitEvidence:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async MsgSubmitEvidence({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgSubmitEvidence(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgSubmitEvidence:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSubmitEvidence:Create', 'Could not create message: ' + e.message); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.ts deleted file mode 100755 index df306a8454..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.ts +++ /dev/null @@ -1,202 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { Equivocation } from "./module/types/cosmos/evidence/v1beta1/evidence" - - -export { Equivocation }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Evidence: {}, - AllEvidence: {}, - - _Structure: { - Equivocation: getStructure(Equivocation.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getEvidence: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Evidence[JSON.stringify(params)] ?? {} - }, - getAllEvidence: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.AllEvidence[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.evidence.v1beta1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryEvidence({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryEvidence( key.evidence_hash)).data - - - commit('QUERY', { query: 'Evidence', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryEvidence', payload: { options: { all }, params: {...key},query }}) - return getters['getEvidence']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryEvidence API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryAllEvidence({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryAllEvidence(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryAllEvidence({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'AllEvidence', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAllEvidence', payload: { options: { all }, params: {...key},query }}) - return getters['getAllEvidence']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryAllEvidence API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - async sendMsgSubmitEvidence({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSubmitEvidence(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgSubmitEvidence:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgSubmitEvidence:Send Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgSubmitEvidence({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSubmitEvidence(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgSubmitEvidence:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgSubmitEvidence:Create Could not create message: ' + e.message) - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.d.ts deleted file mode 100644 index 417d2a75c3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgSubmitEvidence } from "./types/cosmos/evidence/v1beta1/tx"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; - msgSubmitEvidence: (data: MsgSubmitEvidence) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.js deleted file mode 100644 index 24c159cc20..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.js +++ /dev/null @@ -1,34 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgSubmitEvidence } from "./types/cosmos/evidence/v1beta1/tx"; -const types = [ - ["/cosmos.evidence.v1beta1.MsgSubmitEvidence", MsgSubmitEvidence], -]; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - msgSubmitEvidence: (data) => ({ typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidence", value: MsgSubmitEvidence.fromPartial(data) }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.ts deleted file mode 100755 index 7f205a182e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.ts +++ /dev/null @@ -1,60 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgSubmitEvidence } from "./types/cosmos/evidence/v1beta1/tx"; - - -const types = [ - ["/cosmos.evidence.v1beta1.MsgSubmitEvidence", MsgSubmitEvidence], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgSubmitEvidence: (data: MsgSubmitEvidence): EncodeObject => ({ typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidence", value: MsgSubmitEvidence.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.d.ts deleted file mode 100644 index 153259fe0e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,289 +0,0 @@ -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** - * MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. - */ -export interface V1Beta1MsgSubmitEvidenceResponse { - /** - * hash defines the hash of the evidence. - * @format byte - */ - hash?: string; -} -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - /** - * 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. - * @format uint64 - */ - offset?: string; - /** - * 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. - * @format uint64 - */ - limit?: string; - /** - * 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. - */ - countTotal?: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse?: boolean; -} -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -/** -* QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC -method. -*/ -export interface V1Beta1QueryAllEvidenceResponse { - /** evidence returns all evidences. */ - evidence?: ProtobufAny[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * QueryEvidenceResponse is the response type for the Query/Evidence RPC method. - */ -export interface V1Beta1QueryEvidenceResponse { - /** evidence returns the requested evidence. */ - evidence?: ProtobufAny; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/evidence/v1beta1/evidence.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryAllEvidence - * @summary AllEvidence queries all evidence. - * @request GET:/cosmos/evidence/v1beta1/evidence - */ - queryAllEvidence: (query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryEvidence - * @summary Evidence queries evidence based on evidence hash. - * @request GET:/cosmos/evidence/v1beta1/evidence/{evidenceHash} - */ - queryEvidence: (evidenceHash: string, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.js deleted file mode 100644 index 86a86b5480..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.js +++ /dev/null @@ -1,169 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/evidence/v1beta1/evidence.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryAllEvidence - * @summary AllEvidence queries all evidence. - * @request GET:/cosmos/evidence/v1beta1/evidence - */ - this.queryAllEvidence = (query, params = {}) => this.request({ - path: `/cosmos/evidence/v1beta1/evidence`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryEvidence - * @summary Evidence queries evidence based on evidence hash. - * @request GET:/cosmos/evidence/v1beta1/evidence/{evidenceHash} - */ - this.queryEvidence = (evidenceHash, params = {}) => this.request({ - path: `/cosmos/evidence/v1beta1/evidence/${evidenceHash}`, - method: "GET", - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.ts deleted file mode 100644 index 16ee77f3c7..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/rest.ts +++ /dev/null @@ -1,467 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** - * MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. - */ -export interface V1Beta1MsgSubmitEvidenceResponse { - /** - * hash defines the hash of the evidence. - * @format byte - */ - hash?: string; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - 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; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -/** -* QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC -method. -*/ -export interface V1Beta1QueryAllEvidenceResponse { - /** evidence returns all evidences. */ - evidence?: ProtobufAny[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryEvidenceResponse is the response type for the Query/Evidence RPC method. - */ -export interface V1Beta1QueryEvidenceResponse { - /** evidence returns the requested evidence. */ - evidence?: ProtobufAny; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/evidence/v1beta1/evidence.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryAllEvidence - * @summary AllEvidence queries all evidence. - * @request GET:/cosmos/evidence/v1beta1/evidence - */ - queryAllEvidence = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/evidence/v1beta1/evidence`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryEvidence - * @summary Evidence queries evidence based on evidence hash. - * @request GET:/cosmos/evidence/v1beta1/evidence/{evidence_hash} - */ - queryEvidence = (evidence_hash: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/evidence/v1beta1/evidence/${evidence_hash}`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index 767d2c358f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - countTotal: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; -} -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index b5f5ced3d6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,242 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { - offset: 0, - limit: 0, - countTotal: false, - reverse: false, -}; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } - else { - message.reverse = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - message.reverse !== undefined && (obj.reverse = message.reverse); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } - else { - message.reverse = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 9c87ac0c9c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - 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; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { - offset: 0, - limit: 0, - count_total: false, - reverse: false, -}; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } else { - message.reverse = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - 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; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } else { - message.reverse = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.d.ts deleted file mode 100644 index 6a8c752de8..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.evidence.v1beta1"; -/** - * Equivocation implements the Evidence interface and defines evidence of double - * signing misbehavior. - */ -export interface Equivocation { - height: number; - time: Date | undefined; - power: number; - consensusAddress: string; -} -export declare const Equivocation: { - encode(message: Equivocation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Equivocation; - fromJSON(object: any): Equivocation; - toJSON(message: Equivocation): unknown; - fromPartial(object: DeepPartial): Equivocation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.js deleted file mode 100644 index fdb566d9bf..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.js +++ /dev/null @@ -1,160 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.evidence.v1beta1"; -const baseEquivocation = { height: 0, power: 0, consensusAddress: "" }; -export const Equivocation = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(18).fork()).ldelim(); - } - if (message.power !== 0) { - writer.uint32(24).int64(message.power); - } - if (message.consensusAddress !== "") { - writer.uint32(34).string(message.consensusAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEquivocation }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64()); - break; - case 2: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.power = longToNumber(reader.int64()); - break; - case 4: - message.consensusAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEquivocation }; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } - else { - message.time = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } - else { - message.power = 0; - } - if (object.consensusAddress !== undefined && - object.consensusAddress !== null) { - message.consensusAddress = String(object.consensusAddress); - } - else { - message.consensusAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.power !== undefined && (obj.power = message.power); - message.consensusAddress !== undefined && - (obj.consensusAddress = message.consensusAddress); - return obj; - }, - fromPartial(object) { - const message = { ...baseEquivocation }; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } - else { - message.time = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } - else { - message.power = 0; - } - if (object.consensusAddress !== undefined && - object.consensusAddress !== null) { - message.consensusAddress = object.consensusAddress; - } - else { - message.consensusAddress = ""; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.ts deleted file mode 100644 index de5ff29756..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.evidence.v1beta1"; - -/** - * Equivocation implements the Evidence interface and defines evidence of double - * signing misbehavior. - */ -export interface Equivocation { - height: number; - time: Date | undefined; - power: number; - consensus_address: string; -} - -const baseEquivocation: object = { height: 0, power: 0, consensus_address: "" }; - -export const Equivocation = { - encode(message: Equivocation, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(18).fork() - ).ldelim(); - } - if (message.power !== 0) { - writer.uint32(24).int64(message.power); - } - if (message.consensus_address !== "") { - writer.uint32(34).string(message.consensus_address); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Equivocation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEquivocation } as Equivocation; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 3: - message.power = longToNumber(reader.int64() as Long); - break; - case 4: - message.consensus_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Equivocation { - const message = { ...baseEquivocation } as Equivocation; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } else { - message.power = 0; - } - if ( - object.consensus_address !== undefined && - object.consensus_address !== null - ) { - message.consensus_address = String(object.consensus_address); - } else { - message.consensus_address = ""; - } - return message; - }, - - toJSON(message: Equivocation): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.power !== undefined && (obj.power = message.power); - message.consensus_address !== undefined && - (obj.consensus_address = message.consensus_address); - return obj; - }, - - fromPartial(object: DeepPartial): Equivocation { - const message = { ...baseEquivocation } as Equivocation; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } else { - message.power = 0; - } - if ( - object.consensus_address !== undefined && - object.consensus_address !== null - ) { - message.consensus_address = object.consensus_address; - } else { - message.consensus_address = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.d.ts deleted file mode 100644 index 941d6d3404..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Any } from "../../../google/protobuf/any"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.evidence.v1beta1"; -/** GenesisState defines the evidence module's genesis state. */ -export interface GenesisState { - /** evidence defines all the evidence at genesis. */ - evidence: Any[]; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.js deleted file mode 100644 index 7dd4f5aab1..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.js +++ /dev/null @@ -1,61 +0,0 @@ -/* eslint-disable */ -import { Any } from "../../../google/protobuf/any"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.evidence.v1beta1"; -const baseGenesisState = {}; -export const GenesisState = { - encode(message, writer = Writer.create()) { - for (const v of message.evidence) { - Any.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.evidence = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.evidence) { - obj.evidence = message.evidence.map((e) => e ? Any.toJSON(e) : undefined); - } - else { - obj.evidence = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromPartial(e)); - } - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.ts deleted file mode 100644 index 2b659101df..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* eslint-disable */ -import { Any } from "../../../google/protobuf/any"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.evidence.v1beta1"; - -/** GenesisState defines the evidence module's genesis state. */ -export interface GenesisState { - /** evidence defines all the evidence at genesis. */ - evidence: Any[]; -} - -const baseGenesisState: object = {}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - for (const v of message.evidence) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.evidence = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.evidence) { - obj.evidence = message.evidence.map((e) => - e ? Any.toJSON(e) : undefined - ); - } else { - obj.evidence = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromPartial(e)); - } - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.d.ts deleted file mode 100644 index 94a93dcd9c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -export declare const protobufPackage = "cosmos.evidence.v1beta1"; -/** QueryEvidenceRequest is the request type for the Query/Evidence RPC method. */ -export interface QueryEvidenceRequest { - /** evidence_hash defines the hash of the requested evidence. */ - evidenceHash: Uint8Array; -} -/** QueryEvidenceResponse is the response type for the Query/Evidence RPC method. */ -export interface QueryEvidenceResponse { - /** evidence returns the requested evidence. */ - evidence: Any | undefined; -} -/** - * QueryEvidenceRequest is the request type for the Query/AllEvidence RPC - * method. - */ -export interface QueryAllEvidenceRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC - * method. - */ -export interface QueryAllEvidenceResponse { - /** evidence returns all evidences. */ - evidence: Any[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export declare const QueryEvidenceRequest: { - encode(message: QueryEvidenceRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryEvidenceRequest; - fromJSON(object: any): QueryEvidenceRequest; - toJSON(message: QueryEvidenceRequest): unknown; - fromPartial(object: DeepPartial): QueryEvidenceRequest; -}; -export declare const QueryEvidenceResponse: { - encode(message: QueryEvidenceResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryEvidenceResponse; - fromJSON(object: any): QueryEvidenceResponse; - toJSON(message: QueryEvidenceResponse): unknown; - fromPartial(object: DeepPartial): QueryEvidenceResponse; -}; -export declare const QueryAllEvidenceRequest: { - encode(message: QueryAllEvidenceRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllEvidenceRequest; - fromJSON(object: any): QueryAllEvidenceRequest; - toJSON(message: QueryAllEvidenceRequest): unknown; - fromPartial(object: DeepPartial): QueryAllEvidenceRequest; -}; -export declare const QueryAllEvidenceResponse: { - encode(message: QueryAllEvidenceResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllEvidenceResponse; - fromJSON(object: any): QueryAllEvidenceResponse; - toJSON(message: QueryAllEvidenceResponse): unknown; - fromPartial(object: DeepPartial): QueryAllEvidenceResponse; -}; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Evidence queries evidence based on evidence hash. */ - Evidence(request: QueryEvidenceRequest): Promise; - /** AllEvidence queries all evidence. */ - AllEvidence(request: QueryAllEvidenceRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Evidence(request: QueryEvidenceRequest): Promise; - AllEvidence(request: QueryAllEvidenceRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.js deleted file mode 100644 index 6050a1eb89..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.js +++ /dev/null @@ -1,300 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -import { PageRequest, PageResponse, } from "../../../cosmos/base/query/v1beta1/pagination"; -export const protobufPackage = "cosmos.evidence.v1beta1"; -const baseQueryEvidenceRequest = {}; -export const QueryEvidenceRequest = { - encode(message, writer = Writer.create()) { - if (message.evidenceHash.length !== 0) { - writer.uint32(10).bytes(message.evidenceHash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryEvidenceRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidenceHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryEvidenceRequest }; - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = bytesFromBase64(object.evidenceHash); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.evidenceHash !== undefined && - (obj.evidenceHash = base64FromBytes(message.evidenceHash !== undefined - ? message.evidenceHash - : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryEvidenceRequest }; - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = object.evidenceHash; - } - else { - message.evidenceHash = new Uint8Array(); - } - return message; - }, -}; -const baseQueryEvidenceResponse = {}; -export const QueryEvidenceResponse = { - encode(message, writer = Writer.create()) { - if (message.evidence !== undefined) { - Any.encode(message.evidence, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryEvidenceResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryEvidenceResponse }; - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromJSON(object.evidence); - } - else { - message.evidence = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.evidence !== undefined && - (obj.evidence = message.evidence - ? Any.toJSON(message.evidence) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryEvidenceResponse }; - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromPartial(object.evidence); - } - else { - message.evidence = undefined; - } - return message; - }, -}; -const baseQueryAllEvidenceRequest = {}; -export const QueryAllEvidenceRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllEvidenceRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAllEvidenceRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAllEvidenceRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryAllEvidenceResponse = {}; -export const QueryAllEvidenceResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.evidence) { - Any.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllEvidenceResponse, - }; - message.evidence = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAllEvidenceResponse, - }; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.evidence) { - obj.evidence = message.evidence.map((e) => e ? Any.toJSON(e) : undefined); - } - else { - obj.evidence = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAllEvidenceResponse, - }; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Evidence(request) { - const data = QueryEvidenceRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.evidence.v1beta1.Query", "Evidence", data); - return promise.then((data) => QueryEvidenceResponse.decode(new Reader(data))); - } - AllEvidence(request) { - const data = QueryAllEvidenceRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.evidence.v1beta1.Query", "AllEvidence", data); - return promise.then((data) => QueryAllEvidenceResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.ts deleted file mode 100644 index c29d4b55ed..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/query.ts +++ /dev/null @@ -1,429 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; - -export const protobufPackage = "cosmos.evidence.v1beta1"; - -/** QueryEvidenceRequest is the request type for the Query/Evidence RPC method. */ -export interface QueryEvidenceRequest { - /** evidence_hash defines the hash of the requested evidence. */ - evidence_hash: Uint8Array; -} - -/** QueryEvidenceResponse is the response type for the Query/Evidence RPC method. */ -export interface QueryEvidenceResponse { - /** evidence returns the requested evidence. */ - evidence: Any | undefined; -} - -/** - * QueryEvidenceRequest is the request type for the Query/AllEvidence RPC - * method. - */ -export interface QueryAllEvidenceRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC - * method. - */ -export interface QueryAllEvidenceResponse { - /** evidence returns all evidences. */ - evidence: Any[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -const baseQueryEvidenceRequest: object = {}; - -export const QueryEvidenceRequest = { - encode( - message: QueryEvidenceRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.evidence_hash.length !== 0) { - writer.uint32(10).bytes(message.evidence_hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryEvidenceRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryEvidenceRequest } as QueryEvidenceRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence_hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryEvidenceRequest { - const message = { ...baseQueryEvidenceRequest } as QueryEvidenceRequest; - if (object.evidence_hash !== undefined && object.evidence_hash !== null) { - message.evidence_hash = bytesFromBase64(object.evidence_hash); - } - return message; - }, - - toJSON(message: QueryEvidenceRequest): unknown { - const obj: any = {}; - message.evidence_hash !== undefined && - (obj.evidence_hash = base64FromBytes( - message.evidence_hash !== undefined - ? message.evidence_hash - : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): QueryEvidenceRequest { - const message = { ...baseQueryEvidenceRequest } as QueryEvidenceRequest; - if (object.evidence_hash !== undefined && object.evidence_hash !== null) { - message.evidence_hash = object.evidence_hash; - } else { - message.evidence_hash = new Uint8Array(); - } - return message; - }, -}; - -const baseQueryEvidenceResponse: object = {}; - -export const QueryEvidenceResponse = { - encode( - message: QueryEvidenceResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.evidence !== undefined) { - Any.encode(message.evidence, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryEvidenceResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryEvidenceResponse } as QueryEvidenceResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryEvidenceResponse { - const message = { ...baseQueryEvidenceResponse } as QueryEvidenceResponse; - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromJSON(object.evidence); - } else { - message.evidence = undefined; - } - return message; - }, - - toJSON(message: QueryEvidenceResponse): unknown { - const obj: any = {}; - message.evidence !== undefined && - (obj.evidence = message.evidence - ? Any.toJSON(message.evidence) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryEvidenceResponse { - const message = { ...baseQueryEvidenceResponse } as QueryEvidenceResponse; - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromPartial(object.evidence); - } else { - message.evidence = undefined; - } - return message; - }, -}; - -const baseQueryAllEvidenceRequest: object = {}; - -export const QueryAllEvidenceRequest = { - encode( - message: QueryAllEvidenceRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryAllEvidenceRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllEvidenceRequest, - } as QueryAllEvidenceRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllEvidenceRequest { - const message = { - ...baseQueryAllEvidenceRequest, - } as QueryAllEvidenceRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllEvidenceRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllEvidenceRequest { - const message = { - ...baseQueryAllEvidenceRequest, - } as QueryAllEvidenceRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryAllEvidenceResponse: object = {}; - -export const QueryAllEvidenceResponse = { - encode( - message: QueryAllEvidenceResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.evidence) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAllEvidenceResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllEvidenceResponse, - } as QueryAllEvidenceResponse; - message.evidence = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllEvidenceResponse { - const message = { - ...baseQueryAllEvidenceResponse, - } as QueryAllEvidenceResponse; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllEvidenceResponse): unknown { - const obj: any = {}; - if (message.evidence) { - obj.evidence = message.evidence.map((e) => - e ? Any.toJSON(e) : undefined - ); - } else { - obj.evidence = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllEvidenceResponse { - const message = { - ...baseQueryAllEvidenceResponse, - } as QueryAllEvidenceResponse; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Any.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -/** Query defines the gRPC querier service. */ -export interface Query { - /** Evidence queries evidence based on evidence hash. */ - Evidence(request: QueryEvidenceRequest): Promise; - /** AllEvidence queries all evidence. */ - AllEvidence( - request: QueryAllEvidenceRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Evidence(request: QueryEvidenceRequest): Promise { - const data = QueryEvidenceRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.evidence.v1beta1.Query", - "Evidence", - data - ); - return promise.then((data) => - QueryEvidenceResponse.decode(new Reader(data)) - ); - } - - AllEvidence( - request: QueryAllEvidenceRequest - ): Promise { - const data = QueryAllEvidenceRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.evidence.v1beta1.Query", - "AllEvidence", - data - ); - return promise.then((data) => - QueryAllEvidenceResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.d.ts deleted file mode 100644 index 6de885df04..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -export declare const protobufPackage = "cosmos.evidence.v1beta1"; -/** - * MsgSubmitEvidence represents a message that supports submitting arbitrary - * Evidence of misbehavior such as equivocation or counterfactual signing. - */ -export interface MsgSubmitEvidence { - submitter: string; - evidence: Any | undefined; -} -/** MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. */ -export interface MsgSubmitEvidenceResponse { - /** hash defines the hash of the evidence. */ - hash: Uint8Array; -} -export declare const MsgSubmitEvidence: { - encode(message: MsgSubmitEvidence, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSubmitEvidence; - fromJSON(object: any): MsgSubmitEvidence; - toJSON(message: MsgSubmitEvidence): unknown; - fromPartial(object: DeepPartial): MsgSubmitEvidence; -}; -export declare const MsgSubmitEvidenceResponse: { - encode(message: MsgSubmitEvidenceResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSubmitEvidenceResponse; - fromJSON(object: any): MsgSubmitEvidenceResponse; - toJSON(message: MsgSubmitEvidenceResponse): unknown; - fromPartial(object: DeepPartial): MsgSubmitEvidenceResponse; -}; -/** Msg defines the evidence Msg service. */ -export interface Msg { - /** - * SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or - * counterfactual signing. - */ - SubmitEvidence(request: MsgSubmitEvidence): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - SubmitEvidence(request: MsgSubmitEvidence): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.js deleted file mode 100644 index e0ba7f91db..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.js +++ /dev/null @@ -1,172 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -export const protobufPackage = "cosmos.evidence.v1beta1"; -const baseMsgSubmitEvidence = { submitter: "" }; -export const MsgSubmitEvidence = { - encode(message, writer = Writer.create()) { - if (message.submitter !== "") { - writer.uint32(10).string(message.submitter); - } - if (message.evidence !== undefined) { - Any.encode(message.evidence, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSubmitEvidence }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.submitter = reader.string(); - break; - case 2: - message.evidence = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgSubmitEvidence }; - if (object.submitter !== undefined && object.submitter !== null) { - message.submitter = String(object.submitter); - } - else { - message.submitter = ""; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromJSON(object.evidence); - } - else { - message.evidence = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.submitter !== undefined && (obj.submitter = message.submitter); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? Any.toJSON(message.evidence) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgSubmitEvidence }; - if (object.submitter !== undefined && object.submitter !== null) { - message.submitter = object.submitter; - } - else { - message.submitter = ""; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromPartial(object.evidence); - } - else { - message.evidence = undefined; - } - return message; - }, -}; -const baseMsgSubmitEvidenceResponse = {}; -export const MsgSubmitEvidenceResponse = { - encode(message, writer = Writer.create()) { - if (message.hash.length !== 0) { - writer.uint32(34).bytes(message.hash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgSubmitEvidenceResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgSubmitEvidenceResponse, - }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgSubmitEvidenceResponse, - }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = new Uint8Array(); - } - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - SubmitEvidence(request) { - const data = MsgSubmitEvidence.encode(request).finish(); - const promise = this.rpc.request("cosmos.evidence.v1beta1.Msg", "SubmitEvidence", data); - return promise.then((data) => MsgSubmitEvidenceResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.ts deleted file mode 100644 index 51a891b9dd..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/tx.ts +++ /dev/null @@ -1,248 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; - -export const protobufPackage = "cosmos.evidence.v1beta1"; - -/** - * MsgSubmitEvidence represents a message that supports submitting arbitrary - * Evidence of misbehavior such as equivocation or counterfactual signing. - */ -export interface MsgSubmitEvidence { - submitter: string; - evidence: Any | undefined; -} - -/** MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. */ -export interface MsgSubmitEvidenceResponse { - /** hash defines the hash of the evidence. */ - hash: Uint8Array; -} - -const baseMsgSubmitEvidence: object = { submitter: "" }; - -export const MsgSubmitEvidence = { - encode(message: MsgSubmitEvidence, writer: Writer = Writer.create()): Writer { - if (message.submitter !== "") { - writer.uint32(10).string(message.submitter); - } - if (message.evidence !== undefined) { - Any.encode(message.evidence, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgSubmitEvidence { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSubmitEvidence } as MsgSubmitEvidence; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.submitter = reader.string(); - break; - case 2: - message.evidence = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgSubmitEvidence { - const message = { ...baseMsgSubmitEvidence } as MsgSubmitEvidence; - if (object.submitter !== undefined && object.submitter !== null) { - message.submitter = String(object.submitter); - } else { - message.submitter = ""; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromJSON(object.evidence); - } else { - message.evidence = undefined; - } - return message; - }, - - toJSON(message: MsgSubmitEvidence): unknown { - const obj: any = {}; - message.submitter !== undefined && (obj.submitter = message.submitter); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? Any.toJSON(message.evidence) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgSubmitEvidence { - const message = { ...baseMsgSubmitEvidence } as MsgSubmitEvidence; - if (object.submitter !== undefined && object.submitter !== null) { - message.submitter = object.submitter; - } else { - message.submitter = ""; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = Any.fromPartial(object.evidence); - } else { - message.evidence = undefined; - } - return message; - }, -}; - -const baseMsgSubmitEvidenceResponse: object = {}; - -export const MsgSubmitEvidenceResponse = { - encode( - message: MsgSubmitEvidenceResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.hash.length !== 0) { - writer.uint32(34).bytes(message.hash); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgSubmitEvidenceResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgSubmitEvidenceResponse, - } as MsgSubmitEvidenceResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgSubmitEvidenceResponse { - const message = { - ...baseMsgSubmitEvidenceResponse, - } as MsgSubmitEvidenceResponse; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - - toJSON(message: MsgSubmitEvidenceResponse): unknown { - const obj: any = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgSubmitEvidenceResponse { - const message = { - ...baseMsgSubmitEvidenceResponse, - } as MsgSubmitEvidenceResponse; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - return message; - }, -}; - -/** Msg defines the evidence Msg service. */ -export interface Msg { - /** - * SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or - * counterfactual signing. - */ - SubmitEvidence( - request: MsgSubmitEvidence - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - SubmitEvidence( - request: MsgSubmitEvidence - ): Promise { - const data = MsgSubmitEvidence.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.evidence.v1beta1.Msg", - "SubmitEvidence", - data - ); - return promise.then((data) => - MsgSubmitEvidenceResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.d.ts deleted file mode 100644 index ac37814871..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.js deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30bdc6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0776..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.js deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7fb6d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b699..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index bb088caa2a..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809039..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.ts deleted file mode 100644 index 233eae465d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - type_url: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { type_url: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.type_url !== "") { - writer.uint32(10).string(message.type_url); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = String(object.type_url); - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.type_url !== undefined && (obj.type_url = message.type_url); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = object.type_url; - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index a3076569af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,1022 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 252725808b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4144 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } - else { - message.proto3Optional = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } - else { - message.proto3Optional = false; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.d.ts deleted file mode 100644 index 0c9db0bc0d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} -export declare const Timestamp: { - encode(message: Timestamp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Timestamp; - fromJSON(object: any): Timestamp; - toJSON(message: Timestamp): unknown; - fromPartial(object: DeepPartial): Timestamp; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.js deleted file mode 100644 index 37b4119aef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseTimestamp = { seconds: 0, nanos: 0 }; -export const Timestamp = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 11864afc86..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/package.json b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/package.json deleted file mode 100755 index a4387486e3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmos-evidence-v1beta1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmos.evidence.v1beta1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/cosmos-sdk/x/evidence/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/index.d.ts deleted file mode 100644 index f6430f618f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { BasicAllowance } from "./module/types/cosmos/feegrant/v1beta1/feegrant"; -import { PeriodicAllowance } from "./module/types/cosmos/feegrant/v1beta1/feegrant"; -import { AllowedMsgAllowance } from "./module/types/cosmos/feegrant/v1beta1/feegrant"; -import { Grant } from "./module/types/cosmos/feegrant/v1beta1/feegrant"; -export { BasicAllowance, PeriodicAllowance, AllowedMsgAllowance, Grant }; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/index.js deleted file mode 100644 index 16344e2b7b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/index.js +++ /dev/null @@ -1,216 +0,0 @@ -import { txClient, queryClient, MissingWalletError, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { BasicAllowance } from "./module/types/cosmos/feegrant/v1beta1/feegrant"; -import { PeriodicAllowance } from "./module/types/cosmos/feegrant/v1beta1/feegrant"; -import { AllowedMsgAllowance } from "./module/types/cosmos/feegrant/v1beta1/feegrant"; -import { Grant } from "./module/types/cosmos/feegrant/v1beta1/feegrant"; -export { BasicAllowance, PeriodicAllowance, AllowedMsgAllowance, Grant }; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Allowance: {}, - Allowances: {}, - _Structure: { - BasicAllowance: getStructure(BasicAllowance.fromPartial({})), - PeriodicAllowance: getStructure(PeriodicAllowance.fromPartial({})), - AllowedMsgAllowance: getStructure(AllowedMsgAllowance.fromPartial({})), - Grant: getStructure(Grant.fromPartial({})), - }, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getAllowance: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Allowance[JSON.stringify(params)] ?? {}; - }, - getAllowances: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Allowances[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.feegrant.v1beta1 initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - async QueryAllowance({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryAllowance(key.granter, key.grantee)).data; - commit('QUERY', { query: 'Allowance', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryAllowance', payload: { options: { all }, params: { ...key }, query } }); - return getters['getAllowance']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryAllowance', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryAllowances({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryAllowances(key.grantee, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryAllowances(key.grantee, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Allowances', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryAllowances', payload: { options: { all }, params: { ...key }, query } }); - return getters['getAllowances']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryAllowances', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async sendMsgRevokeAllowance({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgRevokeAllowance(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgRevokeAllowance:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgRevokeAllowance:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgGrantAllowance({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgGrantAllowance(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgGrantAllowance:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgGrantAllowance:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async MsgRevokeAllowance({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgRevokeAllowance(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgRevokeAllowance:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgRevokeAllowance:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgGrantAllowance({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgGrantAllowance(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgGrantAllowance:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgGrantAllowance:Create', 'Could not create message: ' + e.message); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/index.ts deleted file mode 100755 index 809f792913..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/index.ts +++ /dev/null @@ -1,236 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { BasicAllowance } from "./module/types/cosmos/feegrant/v1beta1/feegrant" -import { PeriodicAllowance } from "./module/types/cosmos/feegrant/v1beta1/feegrant" -import { AllowedMsgAllowance } from "./module/types/cosmos/feegrant/v1beta1/feegrant" -import { Grant } from "./module/types/cosmos/feegrant/v1beta1/feegrant" - - -export { BasicAllowance, PeriodicAllowance, AllowedMsgAllowance, Grant }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Allowance: {}, - Allowances: {}, - - _Structure: { - BasicAllowance: getStructure(BasicAllowance.fromPartial({})), - PeriodicAllowance: getStructure(PeriodicAllowance.fromPartial({})), - AllowedMsgAllowance: getStructure(AllowedMsgAllowance.fromPartial({})), - Grant: getStructure(Grant.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getAllowance: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Allowance[JSON.stringify(params)] ?? {} - }, - getAllowances: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Allowances[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.feegrant.v1beta1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryAllowance({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryAllowance( key.granter, key.grantee)).data - - - commit('QUERY', { query: 'Allowance', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAllowance', payload: { options: { all }, params: {...key},query }}) - return getters['getAllowance']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryAllowance API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryAllowances({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryAllowances( key.grantee, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryAllowances( key.grantee, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Allowances', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAllowances', payload: { options: { all }, params: {...key},query }}) - return getters['getAllowances']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryAllowances API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - async sendMsgGrantAllowance({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgGrantAllowance(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgGrantAllowance:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgGrantAllowance:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgRevokeAllowance({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgRevokeAllowance(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgRevokeAllowance:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgRevokeAllowance:Send Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgGrantAllowance({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgGrantAllowance(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgGrantAllowance:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgGrantAllowance:Create Could not create message: ' + e.message) - } - } - }, - async MsgRevokeAllowance({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgRevokeAllowance(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgRevokeAllowance:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgRevokeAllowance:Create Could not create message: ' + e.message) - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/index.d.ts deleted file mode 100644 index dc60c417c5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgRevokeAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; -import { MsgGrantAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; - msgRevokeAllowance: (data: MsgRevokeAllowance) => EncodeObject; - msgGrantAllowance: (data: MsgGrantAllowance) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/index.js deleted file mode 100644 index 9402088b4a..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/index.js +++ /dev/null @@ -1,37 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgRevokeAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; -import { MsgGrantAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; -const types = [ - ["/cosmos.feegrant.v1beta1.MsgRevokeAllowance", MsgRevokeAllowance], - ["/cosmos.feegrant.v1beta1.MsgGrantAllowance", MsgGrantAllowance], -]; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - msgRevokeAllowance: (data) => ({ typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", value: MsgRevokeAllowance.fromPartial(data) }), - msgGrantAllowance: (data) => ({ typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", value: MsgGrantAllowance.fromPartial(data) }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/index.ts deleted file mode 100755 index 6ed3b6593c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/index.ts +++ /dev/null @@ -1,63 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgGrantAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; -import { MsgRevokeAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; - - -const types = [ - ["/cosmos.feegrant.v1beta1.MsgGrantAllowance", MsgGrantAllowance], - ["/cosmos.feegrant.v1beta1.MsgRevokeAllowance", MsgRevokeAllowance], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgGrantAllowance: (data: MsgGrantAllowance): EncodeObject => ({ typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", value: MsgGrantAllowance.fromPartial( data ) }), - msgRevokeAllowance: (data: MsgRevokeAllowance): EncodeObject => ({ typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", value: MsgRevokeAllowance.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/rest.d.ts deleted file mode 100644 index 8087c640bf..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,294 +0,0 @@ -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -export interface V1Beta1Grant { - /** granter is the address of the user granting an allowance of their funds. */ - granter?: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee?: string; - /** allowance can be any of basic and filtered fee allowance. */ - allowance?: ProtobufAny; -} -/** - * MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. - */ -export declare type V1Beta1MsgGrantAllowanceResponse = object; -/** - * MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. - */ -export declare type V1Beta1MsgRevokeAllowanceResponse = object; -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - /** - * 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. - * @format uint64 - */ - offset?: string; - /** - * 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. - * @format uint64 - */ - limit?: string; - /** - * 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. - */ - countTotal?: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse?: boolean; -} -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -/** - * QueryAllowanceResponse is the response type for the Query/Allowance RPC method. - */ -export interface V1Beta1QueryAllowanceResponse { - /** allowance is a allowance granted for grantee by granter. */ - allowance?: V1Beta1Grant; -} -/** - * QueryAllowancesResponse is the response type for the Query/Allowances RPC method. - */ -export interface V1Beta1QueryAllowancesResponse { - /** allowances are allowance's granted for grantee by granter. */ - allowances?: V1Beta1Grant[]; - /** pagination defines an pagination for the response. */ - pagination?: V1Beta1PageResponse; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/feegrant/v1beta1/feegrant.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryAllowance - * @summary Allowance returns fee granted to the grantee by the granter. - * @request GET:/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee} - */ - queryAllowance: (granter: string, grantee: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryAllowances - * @summary Allowances returns all the grants for address. - * @request GET:/cosmos/feegrant/v1beta1/allowances/{grantee} - */ - queryAllowances: (grantee: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/rest.js deleted file mode 100644 index f5808e8c76..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/rest.js +++ /dev/null @@ -1,169 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/feegrant/v1beta1/feegrant.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryAllowance - * @summary Allowance returns fee granted to the grantee by the granter. - * @request GET:/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee} - */ - this.queryAllowance = (granter, grantee, params = {}) => this.request({ - path: `/cosmos/feegrant/v1beta1/allowance/${granter}/${grantee}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryAllowances - * @summary Allowances returns all the grants for address. - * @request GET:/cosmos/feegrant/v1beta1/allowances/{grantee} - */ - this.queryAllowances = (grantee, query, params = {}) => this.request({ - path: `/cosmos/feegrant/v1beta1/allowances/${grantee}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/rest.ts deleted file mode 100644 index 954246a3ac..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/rest.ts +++ /dev/null @@ -1,477 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -export interface V1Beta1Grant { - /** granter is the address of the user granting an allowance of their funds. */ - granter?: string; - - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee?: string; - - /** allowance can be any of basic and filtered fee allowance. */ - allowance?: ProtobufAny; -} - -/** - * MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. - */ -export type V1Beta1MsgGrantAllowanceResponse = object; - -/** - * MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. - */ -export type V1Beta1MsgRevokeAllowanceResponse = object; - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - 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; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -/** - * QueryAllowanceResponse is the response type for the Query/Allowance RPC method. - */ -export interface V1Beta1QueryAllowanceResponse { - /** allowance is a allowance granted for grantee by granter. */ - allowance?: V1Beta1Grant; -} - -/** - * QueryAllowancesResponse is the response type for the Query/Allowances RPC method. - */ -export interface V1Beta1QueryAllowancesResponse { - /** allowances are allowance's granted for grantee by granter. */ - allowances?: V1Beta1Grant[]; - - /** pagination defines an pagination for the response. */ - pagination?: V1Beta1PageResponse; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/feegrant/v1beta1/feegrant.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryAllowance - * @summary Allowance returns fee granted to the grantee by the granter. - * @request GET:/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee} - */ - queryAllowance = (granter: string, grantee: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/feegrant/v1beta1/allowance/${granter}/${grantee}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryAllowances - * @summary Allowances returns all the grants for address. - * @request GET:/cosmos/feegrant/v1beta1/allowances/{grantee} - */ - queryAllowances = ( - grantee: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/feegrant/v1beta1/allowances/${grantee}`, - method: "GET", - query: query, - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index 767d2c358f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - countTotal: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; -} -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index b5f5ced3d6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,242 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { - offset: 0, - limit: 0, - countTotal: false, - reverse: false, -}; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } - else { - message.reverse = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - message.reverse !== undefined && (obj.reverse = message.reverse); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } - else { - message.reverse = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 9c87ac0c9c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - 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; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { - offset: 0, - limit: 0, - count_total: false, - reverse: false, -}; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } else { - message.reverse = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - 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; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } else { - message.reverse = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac6a3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb30cd..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98406..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/feegrant.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/feegrant.d.ts deleted file mode 100644 index 4c75c337a5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/feegrant.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Duration } from "../../../google/protobuf/duration"; -import { Any } from "../../../google/protobuf/any"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.feegrant.v1beta1"; -/** Since: cosmos-sdk 0.43 */ -/** - * BasicAllowance implements Allowance with a one-time grant of tokens - * that optionally expires. The grantee can use up to SpendLimit to cover fees. - */ -export interface BasicAllowance { - /** - * spend_limit specifies the maximum amount of tokens that can be spent - * by this allowance and will be updated as tokens are spent. If it is - * empty, there is no spend limit and any amount of coins can be spent. - */ - spendLimit: Coin[]; - /** expiration specifies an optional time when this allowance expires */ - expiration: Date | undefined; -} -/** - * PeriodicAllowance extends Allowance to allow for both a maximum cap, - * as well as a limit per time period. - */ -export interface PeriodicAllowance { - /** basic specifies a struct of `BasicAllowance` */ - basic: BasicAllowance | undefined; - /** - * period specifies the time duration in which period_spend_limit coins can - * be spent before that allowance is reset - */ - period: Duration | undefined; - /** - * period_spend_limit specifies the maximum number of coins that can be spent - * in the period - */ - periodSpendLimit: Coin[]; - /** period_can_spend is the number of coins left to be spent before the period_reset time */ - periodCanSpend: Coin[]; - /** - * period_reset is the time at which this period resets and a new one begins, - * it is calculated from the start time of the first transaction after the - * last period ended - */ - periodReset: Date | undefined; -} -/** AllowedMsgAllowance creates allowance only for specified message types. */ -export interface AllowedMsgAllowance { - /** allowance can be any of basic and filtered fee allowance. */ - allowance: Any | undefined; - /** allowed_messages are the messages for which the grantee has the access. */ - allowedMessages: string[]; -} -/** Grant is stored in the KVStore to record a grant with full context */ -export interface Grant { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; - /** allowance can be any of basic and filtered fee allowance. */ - allowance: Any | undefined; -} -export declare const BasicAllowance: { - encode(message: BasicAllowance, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BasicAllowance; - fromJSON(object: any): BasicAllowance; - toJSON(message: BasicAllowance): unknown; - fromPartial(object: DeepPartial): BasicAllowance; -}; -export declare const PeriodicAllowance: { - encode(message: PeriodicAllowance, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PeriodicAllowance; - fromJSON(object: any): PeriodicAllowance; - toJSON(message: PeriodicAllowance): unknown; - fromPartial(object: DeepPartial): PeriodicAllowance; -}; -export declare const AllowedMsgAllowance: { - encode(message: AllowedMsgAllowance, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): AllowedMsgAllowance; - fromJSON(object: any): AllowedMsgAllowance; - toJSON(message: AllowedMsgAllowance): unknown; - fromPartial(object: DeepPartial): AllowedMsgAllowance; -}; -export declare const Grant: { - encode(message: Grant, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Grant; - fromJSON(object: any): Grant; - toJSON(message: Grant): unknown; - fromPartial(object: DeepPartial): Grant; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/feegrant.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/feegrant.js deleted file mode 100644 index b717e6da87..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/feegrant.js +++ /dev/null @@ -1,432 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Duration } from "../../../google/protobuf/duration"; -import { Any } from "../../../google/protobuf/any"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.feegrant.v1beta1"; -const baseBasicAllowance = {}; -export const BasicAllowance = { - encode(message, writer = Writer.create()) { - for (const v of message.spendLimit) { - Coin.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.expiration !== undefined) { - Timestamp.encode(toTimestamp(message.expiration), writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBasicAllowance }; - message.spendLimit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.spendLimit.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBasicAllowance }; - message.spendLimit = []; - if (object.spendLimit !== undefined && object.spendLimit !== null) { - for (const e of object.spendLimit) { - message.spendLimit.push(Coin.fromJSON(e)); - } - } - if (object.expiration !== undefined && object.expiration !== null) { - message.expiration = fromJsonTimestamp(object.expiration); - } - else { - message.expiration = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.spendLimit) { - obj.spendLimit = message.spendLimit.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.spendLimit = []; - } - message.expiration !== undefined && - (obj.expiration = - message.expiration !== undefined - ? message.expiration.toISOString() - : null); - return obj; - }, - fromPartial(object) { - const message = { ...baseBasicAllowance }; - message.spendLimit = []; - if (object.spendLimit !== undefined && object.spendLimit !== null) { - for (const e of object.spendLimit) { - message.spendLimit.push(Coin.fromPartial(e)); - } - } - if (object.expiration !== undefined && object.expiration !== null) { - message.expiration = object.expiration; - } - else { - message.expiration = undefined; - } - return message; - }, -}; -const basePeriodicAllowance = {}; -export const PeriodicAllowance = { - encode(message, writer = Writer.create()) { - if (message.basic !== undefined) { - BasicAllowance.encode(message.basic, writer.uint32(10).fork()).ldelim(); - } - if (message.period !== undefined) { - Duration.encode(message.period, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.periodSpendLimit) { - Coin.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.periodCanSpend) { - Coin.encode(v, writer.uint32(34).fork()).ldelim(); - } - if (message.periodReset !== undefined) { - Timestamp.encode(toTimestamp(message.periodReset), writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePeriodicAllowance }; - message.periodSpendLimit = []; - message.periodCanSpend = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.basic = BasicAllowance.decode(reader, reader.uint32()); - break; - case 2: - message.period = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.periodSpendLimit.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.periodCanSpend.push(Coin.decode(reader, reader.uint32())); - break; - case 5: - message.periodReset = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePeriodicAllowance }; - message.periodSpendLimit = []; - message.periodCanSpend = []; - if (object.basic !== undefined && object.basic !== null) { - message.basic = BasicAllowance.fromJSON(object.basic); - } - else { - message.basic = undefined; - } - if (object.period !== undefined && object.period !== null) { - message.period = Duration.fromJSON(object.period); - } - else { - message.period = undefined; - } - if (object.periodSpendLimit !== undefined && - object.periodSpendLimit !== null) { - for (const e of object.periodSpendLimit) { - message.periodSpendLimit.push(Coin.fromJSON(e)); - } - } - if (object.periodCanSpend !== undefined && object.periodCanSpend !== null) { - for (const e of object.periodCanSpend) { - message.periodCanSpend.push(Coin.fromJSON(e)); - } - } - if (object.periodReset !== undefined && object.periodReset !== null) { - message.periodReset = fromJsonTimestamp(object.periodReset); - } - else { - message.periodReset = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.basic !== undefined && - (obj.basic = message.basic - ? BasicAllowance.toJSON(message.basic) - : undefined); - message.period !== undefined && - (obj.period = message.period - ? Duration.toJSON(message.period) - : undefined); - if (message.periodSpendLimit) { - obj.periodSpendLimit = message.periodSpendLimit.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.periodSpendLimit = []; - } - if (message.periodCanSpend) { - obj.periodCanSpend = message.periodCanSpend.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.periodCanSpend = []; - } - message.periodReset !== undefined && - (obj.periodReset = - message.periodReset !== undefined - ? message.periodReset.toISOString() - : null); - return obj; - }, - fromPartial(object) { - const message = { ...basePeriodicAllowance }; - message.periodSpendLimit = []; - message.periodCanSpend = []; - if (object.basic !== undefined && object.basic !== null) { - message.basic = BasicAllowance.fromPartial(object.basic); - } - else { - message.basic = undefined; - } - if (object.period !== undefined && object.period !== null) { - message.period = Duration.fromPartial(object.period); - } - else { - message.period = undefined; - } - if (object.periodSpendLimit !== undefined && - object.periodSpendLimit !== null) { - for (const e of object.periodSpendLimit) { - message.periodSpendLimit.push(Coin.fromPartial(e)); - } - } - if (object.periodCanSpend !== undefined && object.periodCanSpend !== null) { - for (const e of object.periodCanSpend) { - message.periodCanSpend.push(Coin.fromPartial(e)); - } - } - if (object.periodReset !== undefined && object.periodReset !== null) { - message.periodReset = object.periodReset; - } - else { - message.periodReset = undefined; - } - return message; - }, -}; -const baseAllowedMsgAllowance = { allowedMessages: "" }; -export const AllowedMsgAllowance = { - encode(message, writer = Writer.create()) { - if (message.allowance !== undefined) { - Any.encode(message.allowance, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.allowedMessages) { - writer.uint32(18).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAllowedMsgAllowance }; - message.allowedMessages = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowance = Any.decode(reader, reader.uint32()); - break; - case 2: - message.allowedMessages.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAllowedMsgAllowance }; - message.allowedMessages = []; - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Any.fromJSON(object.allowance); - } - else { - message.allowance = undefined; - } - if (object.allowedMessages !== undefined && - object.allowedMessages !== null) { - for (const e of object.allowedMessages) { - message.allowedMessages.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowance !== undefined && - (obj.allowance = message.allowance - ? Any.toJSON(message.allowance) - : undefined); - if (message.allowedMessages) { - obj.allowedMessages = message.allowedMessages.map((e) => e); - } - else { - obj.allowedMessages = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseAllowedMsgAllowance }; - message.allowedMessages = []; - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Any.fromPartial(object.allowance); - } - else { - message.allowance = undefined; - } - if (object.allowedMessages !== undefined && - object.allowedMessages !== null) { - for (const e of object.allowedMessages) { - message.allowedMessages.push(e); - } - } - return message; - }, -}; -const baseGrant = { granter: "", grantee: "" }; -export const Grant = { - encode(message, writer = Writer.create()) { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.allowance !== undefined) { - Any.encode(message.allowance, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGrant }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.allowance = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGrant }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } - else { - message.grantee = ""; - } - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Any.fromJSON(object.allowance); - } - else { - message.allowance = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.allowance !== undefined && - (obj.allowance = message.allowance - ? Any.toJSON(message.allowance) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseGrant }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } - else { - message.grantee = ""; - } - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Any.fromPartial(object.allowance); - } - else { - message.allowance = undefined; - } - return message; - }, -}; -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/feegrant.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/feegrant.ts deleted file mode 100644 index 8c84ab1609..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/feegrant.ts +++ /dev/null @@ -1,544 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Duration } from "../../../google/protobuf/duration"; -import { Any } from "../../../google/protobuf/any"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.feegrant.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - -/** - * BasicAllowance implements Allowance with a one-time grant of tokens - * that optionally expires. The grantee can use up to SpendLimit to cover fees. - */ -export interface BasicAllowance { - /** - * spend_limit specifies the maximum amount of tokens that can be spent - * by this allowance and will be updated as tokens are spent. If it is - * empty, there is no spend limit and any amount of coins can be spent. - */ - spend_limit: Coin[]; - /** expiration specifies an optional time when this allowance expires */ - expiration: Date | undefined; -} - -/** - * PeriodicAllowance extends Allowance to allow for both a maximum cap, - * as well as a limit per time period. - */ -export interface PeriodicAllowance { - /** basic specifies a struct of `BasicAllowance` */ - basic: BasicAllowance | undefined; - /** - * period specifies the time duration in which period_spend_limit coins can - * be spent before that allowance is reset - */ - period: Duration | undefined; - /** - * period_spend_limit specifies the maximum number of coins that can be spent - * in the period - */ - period_spend_limit: Coin[]; - /** period_can_spend is the number of coins left to be spent before the period_reset time */ - period_can_spend: Coin[]; - /** - * period_reset is the time at which this period resets and a new one begins, - * it is calculated from the start time of the first transaction after the - * last period ended - */ - period_reset: Date | undefined; -} - -/** AllowedMsgAllowance creates allowance only for specified message types. */ -export interface AllowedMsgAllowance { - /** allowance can be any of basic and filtered fee allowance. */ - allowance: Any | undefined; - /** allowed_messages are the messages for which the grantee has the access. */ - allowed_messages: string[]; -} - -/** Grant is stored in the KVStore to record a grant with full context */ -export interface Grant { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; - /** allowance can be any of basic and filtered fee allowance. */ - allowance: Any | undefined; -} - -const baseBasicAllowance: object = {}; - -export const BasicAllowance = { - encode(message: BasicAllowance, writer: Writer = Writer.create()): Writer { - for (const v of message.spend_limit) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.expiration !== undefined) { - Timestamp.encode( - toTimestamp(message.expiration), - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BasicAllowance { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBasicAllowance } as BasicAllowance; - message.spend_limit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.spend_limit.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.expiration = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BasicAllowance { - const message = { ...baseBasicAllowance } as BasicAllowance; - message.spend_limit = []; - if (object.spend_limit !== undefined && object.spend_limit !== null) { - for (const e of object.spend_limit) { - message.spend_limit.push(Coin.fromJSON(e)); - } - } - if (object.expiration !== undefined && object.expiration !== null) { - message.expiration = fromJsonTimestamp(object.expiration); - } else { - message.expiration = undefined; - } - return message; - }, - - toJSON(message: BasicAllowance): unknown { - const obj: any = {}; - if (message.spend_limit) { - obj.spend_limit = message.spend_limit.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.spend_limit = []; - } - message.expiration !== undefined && - (obj.expiration = - message.expiration !== undefined - ? message.expiration.toISOString() - : null); - return obj; - }, - - fromPartial(object: DeepPartial): BasicAllowance { - const message = { ...baseBasicAllowance } as BasicAllowance; - message.spend_limit = []; - if (object.spend_limit !== undefined && object.spend_limit !== null) { - for (const e of object.spend_limit) { - message.spend_limit.push(Coin.fromPartial(e)); - } - } - if (object.expiration !== undefined && object.expiration !== null) { - message.expiration = object.expiration; - } else { - message.expiration = undefined; - } - return message; - }, -}; - -const basePeriodicAllowance: object = {}; - -export const PeriodicAllowance = { - encode(message: PeriodicAllowance, writer: Writer = Writer.create()): Writer { - if (message.basic !== undefined) { - BasicAllowance.encode(message.basic, writer.uint32(10).fork()).ldelim(); - } - if (message.period !== undefined) { - Duration.encode(message.period, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.period_spend_limit) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.period_can_spend) { - Coin.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.period_reset !== undefined) { - Timestamp.encode( - toTimestamp(message.period_reset), - writer.uint32(42).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PeriodicAllowance { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePeriodicAllowance } as PeriodicAllowance; - message.period_spend_limit = []; - message.period_can_spend = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.basic = BasicAllowance.decode(reader, reader.uint32()); - break; - case 2: - message.period = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.period_spend_limit.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.period_can_spend.push(Coin.decode(reader, reader.uint32())); - break; - case 5: - message.period_reset = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PeriodicAllowance { - const message = { ...basePeriodicAllowance } as PeriodicAllowance; - message.period_spend_limit = []; - message.period_can_spend = []; - if (object.basic !== undefined && object.basic !== null) { - message.basic = BasicAllowance.fromJSON(object.basic); - } else { - message.basic = undefined; - } - if (object.period !== undefined && object.period !== null) { - message.period = Duration.fromJSON(object.period); - } else { - message.period = undefined; - } - if ( - object.period_spend_limit !== undefined && - object.period_spend_limit !== null - ) { - for (const e of object.period_spend_limit) { - message.period_spend_limit.push(Coin.fromJSON(e)); - } - } - if ( - object.period_can_spend !== undefined && - object.period_can_spend !== null - ) { - for (const e of object.period_can_spend) { - message.period_can_spend.push(Coin.fromJSON(e)); - } - } - if (object.period_reset !== undefined && object.period_reset !== null) { - message.period_reset = fromJsonTimestamp(object.period_reset); - } else { - message.period_reset = undefined; - } - return message; - }, - - toJSON(message: PeriodicAllowance): unknown { - const obj: any = {}; - message.basic !== undefined && - (obj.basic = message.basic - ? BasicAllowance.toJSON(message.basic) - : undefined); - message.period !== undefined && - (obj.period = message.period - ? Duration.toJSON(message.period) - : undefined); - if (message.period_spend_limit) { - obj.period_spend_limit = message.period_spend_limit.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.period_spend_limit = []; - } - if (message.period_can_spend) { - obj.period_can_spend = message.period_can_spend.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.period_can_spend = []; - } - message.period_reset !== undefined && - (obj.period_reset = - message.period_reset !== undefined - ? message.period_reset.toISOString() - : null); - return obj; - }, - - fromPartial(object: DeepPartial): PeriodicAllowance { - const message = { ...basePeriodicAllowance } as PeriodicAllowance; - message.period_spend_limit = []; - message.period_can_spend = []; - if (object.basic !== undefined && object.basic !== null) { - message.basic = BasicAllowance.fromPartial(object.basic); - } else { - message.basic = undefined; - } - if (object.period !== undefined && object.period !== null) { - message.period = Duration.fromPartial(object.period); - } else { - message.period = undefined; - } - if ( - object.period_spend_limit !== undefined && - object.period_spend_limit !== null - ) { - for (const e of object.period_spend_limit) { - message.period_spend_limit.push(Coin.fromPartial(e)); - } - } - if ( - object.period_can_spend !== undefined && - object.period_can_spend !== null - ) { - for (const e of object.period_can_spend) { - message.period_can_spend.push(Coin.fromPartial(e)); - } - } - if (object.period_reset !== undefined && object.period_reset !== null) { - message.period_reset = object.period_reset; - } else { - message.period_reset = undefined; - } - return message; - }, -}; - -const baseAllowedMsgAllowance: object = { allowed_messages: "" }; - -export const AllowedMsgAllowance = { - encode( - message: AllowedMsgAllowance, - writer: Writer = Writer.create() - ): Writer { - if (message.allowance !== undefined) { - Any.encode(message.allowance, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.allowed_messages) { - writer.uint32(18).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): AllowedMsgAllowance { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAllowedMsgAllowance } as AllowedMsgAllowance; - message.allowed_messages = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowance = Any.decode(reader, reader.uint32()); - break; - case 2: - message.allowed_messages.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): AllowedMsgAllowance { - const message = { ...baseAllowedMsgAllowance } as AllowedMsgAllowance; - message.allowed_messages = []; - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Any.fromJSON(object.allowance); - } else { - message.allowance = undefined; - } - if ( - object.allowed_messages !== undefined && - object.allowed_messages !== null - ) { - for (const e of object.allowed_messages) { - message.allowed_messages.push(String(e)); - } - } - return message; - }, - - toJSON(message: AllowedMsgAllowance): unknown { - const obj: any = {}; - message.allowance !== undefined && - (obj.allowance = message.allowance - ? Any.toJSON(message.allowance) - : undefined); - if (message.allowed_messages) { - obj.allowed_messages = message.allowed_messages.map((e) => e); - } else { - obj.allowed_messages = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): AllowedMsgAllowance { - const message = { ...baseAllowedMsgAllowance } as AllowedMsgAllowance; - message.allowed_messages = []; - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Any.fromPartial(object.allowance); - } else { - message.allowance = undefined; - } - if ( - object.allowed_messages !== undefined && - object.allowed_messages !== null - ) { - for (const e of object.allowed_messages) { - message.allowed_messages.push(e); - } - } - return message; - }, -}; - -const baseGrant: object = { granter: "", grantee: "" }; - -export const Grant = { - encode(message: Grant, writer: Writer = Writer.create()): Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.allowance !== undefined) { - Any.encode(message.allowance, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Grant { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGrant } as Grant; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.allowance = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Grant { - const message = { ...baseGrant } as Grant; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } else { - message.grantee = ""; - } - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Any.fromJSON(object.allowance); - } else { - message.allowance = undefined; - } - return message; - }, - - toJSON(message: Grant): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.allowance !== undefined && - (obj.allowance = message.allowance - ? Any.toJSON(message.allowance) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Grant { - const message = { ...baseGrant } as Grant; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } else { - message.grantee = ""; - } - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Any.fromPartial(object.allowance); - } else { - message.allowance = undefined; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/genesis.d.ts deleted file mode 100644 index e4b2a064e3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/genesis.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Grant } from "../../../cosmos/feegrant/v1beta1/feegrant"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.feegrant.v1beta1"; -/** Since: cosmos-sdk 0.43 */ -/** GenesisState contains a set of fee allowances, persisted from the store */ -export interface GenesisState { - allowances: Grant[]; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/genesis.js deleted file mode 100644 index 826a709165..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/genesis.js +++ /dev/null @@ -1,61 +0,0 @@ -/* eslint-disable */ -import { Grant } from "../../../cosmos/feegrant/v1beta1/feegrant"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.feegrant.v1beta1"; -const baseGenesisState = {}; -export const GenesisState = { - encode(message, writer = Writer.create()) { - for (const v of message.allowances) { - Grant.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.allowances = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowances.push(Grant.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.allowances = []; - if (object.allowances !== undefined && object.allowances !== null) { - for (const e of object.allowances) { - message.allowances.push(Grant.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.allowances) { - obj.allowances = message.allowances.map((e) => e ? Grant.toJSON(e) : undefined); - } - else { - obj.allowances = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.allowances = []; - if (object.allowances !== undefined && object.allowances !== null) { - for (const e of object.allowances) { - message.allowances.push(Grant.fromPartial(e)); - } - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/genesis.ts deleted file mode 100644 index 3b9371b88c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/genesis.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* eslint-disable */ -import { Grant } from "../../../cosmos/feegrant/v1beta1/feegrant"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.feegrant.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - -/** GenesisState contains a set of fee allowances, persisted from the store */ -export interface GenesisState { - allowances: Grant[]; -} - -const baseGenesisState: object = {}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - for (const v of message.allowances) { - Grant.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.allowances = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowances.push(Grant.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.allowances = []; - if (object.allowances !== undefined && object.allowances !== null) { - for (const e of object.allowances) { - message.allowances.push(Grant.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.allowances) { - obj.allowances = message.allowances.map((e) => - e ? Grant.toJSON(e) : undefined - ); - } else { - obj.allowances = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.allowances = []; - if (object.allowances !== undefined && object.allowances !== null) { - for (const e of object.allowances) { - message.allowances.push(Grant.fromPartial(e)); - } - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/query.d.ts deleted file mode 100644 index b9feed9bba..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/query.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Grant } from "../../../cosmos/feegrant/v1beta1/feegrant"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -export declare const protobufPackage = "cosmos.feegrant.v1beta1"; -/** Since: cosmos-sdk 0.43 */ -/** QueryAllowanceRequest is the request type for the Query/Allowance RPC method. */ -export interface QueryAllowanceRequest { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; -} -/** QueryAllowanceResponse is the response type for the Query/Allowance RPC method. */ -export interface QueryAllowanceResponse { - /** allowance is a allowance granted for grantee by granter. */ - allowance: Grant | undefined; -} -/** QueryAllowancesRequest is the request type for the Query/Allowances RPC method. */ -export interface QueryAllowancesRequest { - grantee: string; - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} -/** QueryAllowancesResponse is the response type for the Query/Allowances RPC method. */ -export interface QueryAllowancesResponse { - /** allowances are allowance's granted for grantee by granter. */ - allowances: Grant[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} -export declare const QueryAllowanceRequest: { - encode(message: QueryAllowanceRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllowanceRequest; - fromJSON(object: any): QueryAllowanceRequest; - toJSON(message: QueryAllowanceRequest): unknown; - fromPartial(object: DeepPartial): QueryAllowanceRequest; -}; -export declare const QueryAllowanceResponse: { - encode(message: QueryAllowanceResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllowanceResponse; - fromJSON(object: any): QueryAllowanceResponse; - toJSON(message: QueryAllowanceResponse): unknown; - fromPartial(object: DeepPartial): QueryAllowanceResponse; -}; -export declare const QueryAllowancesRequest: { - encode(message: QueryAllowancesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllowancesRequest; - fromJSON(object: any): QueryAllowancesRequest; - toJSON(message: QueryAllowancesRequest): unknown; - fromPartial(object: DeepPartial): QueryAllowancesRequest; -}; -export declare const QueryAllowancesResponse: { - encode(message: QueryAllowancesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllowancesResponse; - fromJSON(object: any): QueryAllowancesResponse; - toJSON(message: QueryAllowancesResponse): unknown; - fromPartial(object: DeepPartial): QueryAllowancesResponse; -}; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Allowance returns fee granted to the grantee by the granter. */ - Allowance(request: QueryAllowanceRequest): Promise; - /** Allowances returns all the grants for address. */ - Allowances(request: QueryAllowancesRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Allowance(request: QueryAllowanceRequest): Promise; - Allowances(request: QueryAllowancesRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/query.js deleted file mode 100644 index b96932f3fa..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/query.js +++ /dev/null @@ -1,302 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Grant } from "../../../cosmos/feegrant/v1beta1/feegrant"; -import { PageRequest, PageResponse, } from "../../../cosmos/base/query/v1beta1/pagination"; -export const protobufPackage = "cosmos.feegrant.v1beta1"; -const baseQueryAllowanceRequest = { granter: "", grantee: "" }; -export const QueryAllowanceRequest = { - encode(message, writer = Writer.create()) { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAllowanceRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryAllowanceRequest }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } - else { - message.grantee = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryAllowanceRequest }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } - else { - message.grantee = ""; - } - return message; - }, -}; -const baseQueryAllowanceResponse = {}; -export const QueryAllowanceResponse = { - encode(message, writer = Writer.create()) { - if (message.allowance !== undefined) { - Grant.encode(message.allowance, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAllowanceResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowance = Grant.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryAllowanceResponse }; - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Grant.fromJSON(object.allowance); - } - else { - message.allowance = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowance !== undefined && - (obj.allowance = message.allowance - ? Grant.toJSON(message.allowance) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryAllowanceResponse }; - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Grant.fromPartial(object.allowance); - } - else { - message.allowance = undefined; - } - return message; - }, -}; -const baseQueryAllowancesRequest = { grantee: "" }; -export const QueryAllowancesRequest = { - encode(message, writer = Writer.create()) { - if (message.grantee !== "") { - writer.uint32(10).string(message.grantee); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAllowancesRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grantee = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryAllowancesRequest }; - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } - else { - message.grantee = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.grantee !== undefined && (obj.grantee = message.grantee); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryAllowancesRequest }; - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } - else { - message.grantee = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryAllowancesResponse = {}; -export const QueryAllowancesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.allowances) { - Grant.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllowancesResponse, - }; - message.allowances = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowances.push(Grant.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAllowancesResponse, - }; - message.allowances = []; - if (object.allowances !== undefined && object.allowances !== null) { - for (const e of object.allowances) { - message.allowances.push(Grant.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.allowances) { - obj.allowances = message.allowances.map((e) => e ? Grant.toJSON(e) : undefined); - } - else { - obj.allowances = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAllowancesResponse, - }; - message.allowances = []; - if (object.allowances !== undefined && object.allowances !== null) { - for (const e of object.allowances) { - message.allowances.push(Grant.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Allowance(request) { - const data = QueryAllowanceRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.feegrant.v1beta1.Query", "Allowance", data); - return promise.then((data) => QueryAllowanceResponse.decode(new Reader(data))); - } - Allowances(request) { - const data = QueryAllowancesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.feegrant.v1beta1.Query", "Allowances", data); - return promise.then((data) => QueryAllowancesResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/query.ts deleted file mode 100644 index bebb0b1819..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/query.ts +++ /dev/null @@ -1,417 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Grant } from "../../../cosmos/feegrant/v1beta1/feegrant"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; - -export const protobufPackage = "cosmos.feegrant.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - -/** QueryAllowanceRequest is the request type for the Query/Allowance RPC method. */ -export interface QueryAllowanceRequest { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; -} - -/** QueryAllowanceResponse is the response type for the Query/Allowance RPC method. */ -export interface QueryAllowanceResponse { - /** allowance is a allowance granted for grantee by granter. */ - allowance: Grant | undefined; -} - -/** QueryAllowancesRequest is the request type for the Query/Allowances RPC method. */ -export interface QueryAllowancesRequest { - grantee: string; - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** QueryAllowancesResponse is the response type for the Query/Allowances RPC method. */ -export interface QueryAllowancesResponse { - /** allowances are allowance's granted for grantee by granter. */ - allowances: Grant[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} - -const baseQueryAllowanceRequest: object = { granter: "", grantee: "" }; - -export const QueryAllowanceRequest = { - encode( - message: QueryAllowanceRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryAllowanceRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAllowanceRequest } as QueryAllowanceRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllowanceRequest { - const message = { ...baseQueryAllowanceRequest } as QueryAllowanceRequest; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } else { - message.grantee = ""; - } - return message; - }, - - toJSON(message: QueryAllowanceRequest): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllowanceRequest { - const message = { ...baseQueryAllowanceRequest } as QueryAllowanceRequest; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } else { - message.grantee = ""; - } - return message; - }, -}; - -const baseQueryAllowanceResponse: object = {}; - -export const QueryAllowanceResponse = { - encode( - message: QueryAllowanceResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.allowance !== undefined) { - Grant.encode(message.allowance, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryAllowanceResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAllowanceResponse } as QueryAllowanceResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowance = Grant.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllowanceResponse { - const message = { ...baseQueryAllowanceResponse } as QueryAllowanceResponse; - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Grant.fromJSON(object.allowance); - } else { - message.allowance = undefined; - } - return message; - }, - - toJSON(message: QueryAllowanceResponse): unknown { - const obj: any = {}; - message.allowance !== undefined && - (obj.allowance = message.allowance - ? Grant.toJSON(message.allowance) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllowanceResponse { - const message = { ...baseQueryAllowanceResponse } as QueryAllowanceResponse; - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Grant.fromPartial(object.allowance); - } else { - message.allowance = undefined; - } - return message; - }, -}; - -const baseQueryAllowancesRequest: object = { grantee: "" }; - -export const QueryAllowancesRequest = { - encode( - message: QueryAllowancesRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.grantee !== "") { - writer.uint32(10).string(message.grantee); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryAllowancesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAllowancesRequest } as QueryAllowancesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grantee = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllowancesRequest { - const message = { ...baseQueryAllowancesRequest } as QueryAllowancesRequest; - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } else { - message.grantee = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllowancesRequest): unknown { - const obj: any = {}; - message.grantee !== undefined && (obj.grantee = message.grantee); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllowancesRequest { - const message = { ...baseQueryAllowancesRequest } as QueryAllowancesRequest; - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } else { - message.grantee = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryAllowancesResponse: object = {}; - -export const QueryAllowancesResponse = { - encode( - message: QueryAllowancesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.allowances) { - Grant.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryAllowancesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllowancesResponse, - } as QueryAllowancesResponse; - message.allowances = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowances.push(Grant.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllowancesResponse { - const message = { - ...baseQueryAllowancesResponse, - } as QueryAllowancesResponse; - message.allowances = []; - if (object.allowances !== undefined && object.allowances !== null) { - for (const e of object.allowances) { - message.allowances.push(Grant.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllowancesResponse): unknown { - const obj: any = {}; - if (message.allowances) { - obj.allowances = message.allowances.map((e) => - e ? Grant.toJSON(e) : undefined - ); - } else { - obj.allowances = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllowancesResponse { - const message = { - ...baseQueryAllowancesResponse, - } as QueryAllowancesResponse; - message.allowances = []; - if (object.allowances !== undefined && object.allowances !== null) { - for (const e of object.allowances) { - message.allowances.push(Grant.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -/** Query defines the gRPC querier service. */ -export interface Query { - /** Allowance returns fee granted to the grantee by the granter. */ - Allowance(request: QueryAllowanceRequest): Promise; - /** Allowances returns all the grants for address. */ - Allowances(request: QueryAllowancesRequest): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Allowance(request: QueryAllowanceRequest): Promise { - const data = QueryAllowanceRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.feegrant.v1beta1.Query", - "Allowance", - data - ); - return promise.then((data) => - QueryAllowanceResponse.decode(new Reader(data)) - ); - } - - Allowances( - request: QueryAllowancesRequest - ): Promise { - const data = QueryAllowancesRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.feegrant.v1beta1.Query", - "Allowances", - data - ); - return promise.then((data) => - QueryAllowancesResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/tx.d.ts deleted file mode 100644 index a051ea7b2e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/tx.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -export declare const protobufPackage = "cosmos.feegrant.v1beta1"; -/** Since: cosmos-sdk 0.43 */ -/** - * MsgGrantAllowance adds permission for Grantee to spend up to Allowance - * of fees from the account of Granter. - */ -export interface MsgGrantAllowance { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; - /** allowance can be any of basic and filtered fee allowance. */ - allowance: Any | undefined; -} -/** MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. */ -export interface MsgGrantAllowanceResponse { -} -/** MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. */ -export interface MsgRevokeAllowance { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; -} -/** MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. */ -export interface MsgRevokeAllowanceResponse { -} -export declare const MsgGrantAllowance: { - encode(message: MsgGrantAllowance, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgGrantAllowance; - fromJSON(object: any): MsgGrantAllowance; - toJSON(message: MsgGrantAllowance): unknown; - fromPartial(object: DeepPartial): MsgGrantAllowance; -}; -export declare const MsgGrantAllowanceResponse: { - encode(_: MsgGrantAllowanceResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgGrantAllowanceResponse; - fromJSON(_: any): MsgGrantAllowanceResponse; - toJSON(_: MsgGrantAllowanceResponse): unknown; - fromPartial(_: DeepPartial): MsgGrantAllowanceResponse; -}; -export declare const MsgRevokeAllowance: { - encode(message: MsgRevokeAllowance, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgRevokeAllowance; - fromJSON(object: any): MsgRevokeAllowance; - toJSON(message: MsgRevokeAllowance): unknown; - fromPartial(object: DeepPartial): MsgRevokeAllowance; -}; -export declare const MsgRevokeAllowanceResponse: { - encode(_: MsgRevokeAllowanceResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgRevokeAllowanceResponse; - fromJSON(_: any): MsgRevokeAllowanceResponse; - toJSON(_: MsgRevokeAllowanceResponse): unknown; - fromPartial(_: DeepPartial): MsgRevokeAllowanceResponse; -}; -/** Msg defines the feegrant msg service. */ -export interface Msg { - /** - * GrantAllowance grants fee allowance to the grantee on the granter's - * account with the provided expiration time. - */ - GrantAllowance(request: MsgGrantAllowance): Promise; - /** - * RevokeAllowance revokes any fee allowance of granter's account that - * has been granted to the grantee. - */ - RevokeAllowance(request: MsgRevokeAllowance): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - GrantAllowance(request: MsgGrantAllowance): Promise; - RevokeAllowance(request: MsgRevokeAllowance): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/tx.js deleted file mode 100644 index fe10fca5e2..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/tx.js +++ /dev/null @@ -1,257 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -export const protobufPackage = "cosmos.feegrant.v1beta1"; -const baseMsgGrantAllowance = { granter: "", grantee: "" }; -export const MsgGrantAllowance = { - encode(message, writer = Writer.create()) { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.allowance !== undefined) { - Any.encode(message.allowance, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgGrantAllowance }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.allowance = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgGrantAllowance }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } - else { - message.grantee = ""; - } - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Any.fromJSON(object.allowance); - } - else { - message.allowance = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.allowance !== undefined && - (obj.allowance = message.allowance - ? Any.toJSON(message.allowance) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgGrantAllowance }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } - else { - message.grantee = ""; - } - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Any.fromPartial(object.allowance); - } - else { - message.allowance = undefined; - } - return message; - }, -}; -const baseMsgGrantAllowanceResponse = {}; -export const MsgGrantAllowanceResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgGrantAllowanceResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgGrantAllowanceResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgGrantAllowanceResponse, - }; - return message; - }, -}; -const baseMsgRevokeAllowance = { granter: "", grantee: "" }; -export const MsgRevokeAllowance = { - encode(message, writer = Writer.create()) { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgRevokeAllowance }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgRevokeAllowance }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } - else { - message.grantee = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgRevokeAllowance }; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } - else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } - else { - message.grantee = ""; - } - return message; - }, -}; -const baseMsgRevokeAllowanceResponse = {}; -export const MsgRevokeAllowanceResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgRevokeAllowanceResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgRevokeAllowanceResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgRevokeAllowanceResponse, - }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - GrantAllowance(request) { - const data = MsgGrantAllowance.encode(request).finish(); - const promise = this.rpc.request("cosmos.feegrant.v1beta1.Msg", "GrantAllowance", data); - return promise.then((data) => MsgGrantAllowanceResponse.decode(new Reader(data))); - } - RevokeAllowance(request) { - const data = MsgRevokeAllowance.encode(request).finish(); - const promise = this.rpc.request("cosmos.feegrant.v1beta1.Msg", "RevokeAllowance", data); - return promise.then((data) => MsgRevokeAllowanceResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/tx.ts deleted file mode 100644 index 1206a2bf0c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/tx.ts +++ /dev/null @@ -1,376 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; - -export const protobufPackage = "cosmos.feegrant.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - -/** - * MsgGrantAllowance adds permission for Grantee to spend up to Allowance - * of fees from the account of Granter. - */ -export interface MsgGrantAllowance { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; - /** allowance can be any of basic and filtered fee allowance. */ - allowance: Any | undefined; -} - -/** MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. */ -export interface MsgGrantAllowanceResponse {} - -/** MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. */ -export interface MsgRevokeAllowance { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; -} - -/** MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. */ -export interface MsgRevokeAllowanceResponse {} - -const baseMsgGrantAllowance: object = { granter: "", grantee: "" }; - -export const MsgGrantAllowance = { - encode(message: MsgGrantAllowance, writer: Writer = Writer.create()): Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.allowance !== undefined) { - Any.encode(message.allowance, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgGrantAllowance { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgGrantAllowance } as MsgGrantAllowance; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.allowance = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgGrantAllowance { - const message = { ...baseMsgGrantAllowance } as MsgGrantAllowance; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } else { - message.grantee = ""; - } - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Any.fromJSON(object.allowance); - } else { - message.allowance = undefined; - } - return message; - }, - - toJSON(message: MsgGrantAllowance): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.allowance !== undefined && - (obj.allowance = message.allowance - ? Any.toJSON(message.allowance) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgGrantAllowance { - const message = { ...baseMsgGrantAllowance } as MsgGrantAllowance; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } else { - message.grantee = ""; - } - if (object.allowance !== undefined && object.allowance !== null) { - message.allowance = Any.fromPartial(object.allowance); - } else { - message.allowance = undefined; - } - return message; - }, -}; - -const baseMsgGrantAllowanceResponse: object = {}; - -export const MsgGrantAllowanceResponse = { - encode( - _: MsgGrantAllowanceResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgGrantAllowanceResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgGrantAllowanceResponse, - } as MsgGrantAllowanceResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgGrantAllowanceResponse { - const message = { - ...baseMsgGrantAllowanceResponse, - } as MsgGrantAllowanceResponse; - return message; - }, - - toJSON(_: MsgGrantAllowanceResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgGrantAllowanceResponse { - const message = { - ...baseMsgGrantAllowanceResponse, - } as MsgGrantAllowanceResponse; - return message; - }, -}; - -const baseMsgRevokeAllowance: object = { granter: "", grantee: "" }; - -export const MsgRevokeAllowance = { - encode( - message: MsgRevokeAllowance, - writer: Writer = Writer.create() - ): Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgRevokeAllowance { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgRevokeAllowance } as MsgRevokeAllowance; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgRevokeAllowance { - const message = { ...baseMsgRevokeAllowance } as MsgRevokeAllowance; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } else { - message.grantee = ""; - } - return message; - }, - - toJSON(message: MsgRevokeAllowance): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - return obj; - }, - - fromPartial(object: DeepPartial): MsgRevokeAllowance { - const message = { ...baseMsgRevokeAllowance } as MsgRevokeAllowance; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } else { - message.grantee = ""; - } - return message; - }, -}; - -const baseMsgRevokeAllowanceResponse: object = {}; - -export const MsgRevokeAllowanceResponse = { - encode( - _: MsgRevokeAllowanceResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgRevokeAllowanceResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgRevokeAllowanceResponse, - } as MsgRevokeAllowanceResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgRevokeAllowanceResponse { - const message = { - ...baseMsgRevokeAllowanceResponse, - } as MsgRevokeAllowanceResponse; - return message; - }, - - toJSON(_: MsgRevokeAllowanceResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgRevokeAllowanceResponse { - const message = { - ...baseMsgRevokeAllowanceResponse, - } as MsgRevokeAllowanceResponse; - return message; - }, -}; - -/** Msg defines the feegrant msg service. */ -export interface Msg { - /** - * GrantAllowance grants fee allowance to the grantee on the granter's - * account with the provided expiration time. - */ - GrantAllowance( - request: MsgGrantAllowance - ): Promise; - /** - * RevokeAllowance revokes any fee allowance of granter's account that - * has been granted to the grantee. - */ - RevokeAllowance( - request: MsgRevokeAllowance - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - GrantAllowance( - request: MsgGrantAllowance - ): Promise { - const data = MsgGrantAllowance.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.feegrant.v1beta1.Msg", - "GrantAllowance", - data - ); - return promise.then((data) => - MsgGrantAllowanceResponse.decode(new Reader(data)) - ); - } - - RevokeAllowance( - request: MsgRevokeAllowance - ): Promise { - const data = MsgRevokeAllowance.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.feegrant.v1beta1.Msg", - "RevokeAllowance", - data - ); - return promise.then((data) => - MsgRevokeAllowanceResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos_proto/cosmos.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos_proto/cosmos.d.ts deleted file mode 100644 index ac37814871..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos_proto/cosmos.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos_proto/cosmos.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos_proto/cosmos.js deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos_proto/cosmos.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30bdc6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0776..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/annotations.js deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7fb6d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b699..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index bb088caa2a..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809039..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/any.ts deleted file mode 100644 index 233eae465d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - type_url: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { type_url: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.type_url !== "") { - writer.uint32(10).string(message.type_url); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = String(object.type_url); - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.type_url !== undefined && (obj.type_url = message.type_url); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = object.type_url; - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index a3076569af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,1022 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 252725808b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4144 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } - else { - message.proto3Optional = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } - else { - message.proto3Optional = false; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/duration.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/duration.d.ts deleted file mode 100644 index 3493f63277..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/duration.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (duration.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} -export declare const Duration: { - encode(message: Duration, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Duration; - fromJSON(object: any): Duration; - toJSON(message: Duration): unknown; - fromPartial(object: DeepPartial): Duration; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/duration.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/duration.js deleted file mode 100644 index ea556facef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/duration.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseDuration = { seconds: 0, nanos: 0 }; -export const Duration = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/duration.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/duration.ts deleted file mode 100644 index fffd5b14ef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/duration.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (duration.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} - -const baseDuration: object = { seconds: 0, nanos: 0 }; - -export const Duration = { - encode(message: Duration, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Duration { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration } as Duration; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Duration): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/timestamp.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/timestamp.d.ts deleted file mode 100644 index 0c9db0bc0d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/timestamp.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} -export declare const Timestamp: { - encode(message: Timestamp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Timestamp; - fromJSON(object: any): Timestamp; - toJSON(message: Timestamp): unknown; - fromPartial(object: DeepPartial): Timestamp; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/timestamp.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/timestamp.js deleted file mode 100644 index 37b4119aef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/timestamp.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseTimestamp = { seconds: 0, nanos: 0 }; -export const Timestamp = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 11864afc86..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/package.json b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/package.json deleted file mode 100755 index 02c3cd3e39..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmos-feegrant-v1beta1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmos.feegrant.v1beta1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/cosmos-sdk/x/feegrant", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.d.ts deleted file mode 100644 index 2070c04794..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { WeightedVoteOption } from "./module/types/cosmos/gov/v1beta1/gov"; -import { TextProposal } from "./module/types/cosmos/gov/v1beta1/gov"; -import { Deposit } from "./module/types/cosmos/gov/v1beta1/gov"; -import { Proposal } from "./module/types/cosmos/gov/v1beta1/gov"; -import { TallyResult } from "./module/types/cosmos/gov/v1beta1/gov"; -import { Vote } from "./module/types/cosmos/gov/v1beta1/gov"; -import { DepositParams } from "./module/types/cosmos/gov/v1beta1/gov"; -import { VotingParams } from "./module/types/cosmos/gov/v1beta1/gov"; -import { TallyParams } from "./module/types/cosmos/gov/v1beta1/gov"; -export { WeightedVoteOption, TextProposal, Deposit, Proposal, TallyResult, Vote, DepositParams, VotingParams, TallyParams }; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.js deleted file mode 100644 index b1c62d1084..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.js +++ /dev/null @@ -1,424 +0,0 @@ -import { txClient, queryClient, MissingWalletError, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { WeightedVoteOption } from "./module/types/cosmos/gov/v1beta1/gov"; -import { TextProposal } from "./module/types/cosmos/gov/v1beta1/gov"; -import { Deposit } from "./module/types/cosmos/gov/v1beta1/gov"; -import { Proposal } from "./module/types/cosmos/gov/v1beta1/gov"; -import { TallyResult } from "./module/types/cosmos/gov/v1beta1/gov"; -import { Vote } from "./module/types/cosmos/gov/v1beta1/gov"; -import { DepositParams } from "./module/types/cosmos/gov/v1beta1/gov"; -import { VotingParams } from "./module/types/cosmos/gov/v1beta1/gov"; -import { TallyParams } from "./module/types/cosmos/gov/v1beta1/gov"; -export { WeightedVoteOption, TextProposal, Deposit, Proposal, TallyResult, Vote, DepositParams, VotingParams, TallyParams }; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Proposal: {}, - Proposals: {}, - Vote: {}, - Votes: {}, - Params: {}, - Deposit: {}, - Deposits: {}, - TallyResult: {}, - _Structure: { - WeightedVoteOption: getStructure(WeightedVoteOption.fromPartial({})), - TextProposal: getStructure(TextProposal.fromPartial({})), - Deposit: getStructure(Deposit.fromPartial({})), - Proposal: getStructure(Proposal.fromPartial({})), - TallyResult: getStructure(TallyResult.fromPartial({})), - Vote: getStructure(Vote.fromPartial({})), - DepositParams: getStructure(DepositParams.fromPartial({})), - VotingParams: getStructure(VotingParams.fromPartial({})), - TallyParams: getStructure(TallyParams.fromPartial({})), - }, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getProposal: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Proposal[JSON.stringify(params)] ?? {}; - }, - getProposals: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Proposals[JSON.stringify(params)] ?? {}; - }, - getVote: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Vote[JSON.stringify(params)] ?? {}; - }, - getVotes: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Votes[JSON.stringify(params)] ?? {}; - }, - getParams: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Params[JSON.stringify(params)] ?? {}; - }, - getDeposit: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Deposit[JSON.stringify(params)] ?? {}; - }, - getDeposits: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Deposits[JSON.stringify(params)] ?? {}; - }, - getTallyResult: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.TallyResult[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.gov.v1beta1 initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - async QueryProposal({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryProposal(key.proposal_id)).data; - commit('QUERY', { query: 'Proposal', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryProposal', payload: { options: { all }, params: { ...key }, query } }); - return getters['getProposal']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryProposal', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryProposals({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryProposals(query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryProposals({ ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Proposals', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryProposals', payload: { options: { all }, params: { ...key }, query } }); - return getters['getProposals']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryProposals', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryVote({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryVote(key.proposal_id, key.voter)).data; - commit('QUERY', { query: 'Vote', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryVote', payload: { options: { all }, params: { ...key }, query } }); - return getters['getVote']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryVote', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryVotes({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryVotes(key.proposal_id, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryVotes(key.proposal_id, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Votes', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryVotes', payload: { options: { all }, params: { ...key }, query } }); - return getters['getVotes']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryVotes', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryParams(key.params_type)).data; - commit('QUERY', { query: 'Params', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDeposit({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDeposit(key.proposal_id, key.depositor)).data; - commit('QUERY', { query: 'Deposit', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDeposit', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDeposit']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDeposit', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDeposits({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDeposits(key.proposal_id, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryDeposits(key.proposal_id, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Deposits', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDeposits', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDeposits']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDeposits', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryTallyResult({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryTallyResult(key.proposal_id)).data; - commit('QUERY', { query: 'TallyResult', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryTallyResult', payload: { options: { all }, params: { ...key }, query } }); - return getters['getTallyResult']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryTallyResult', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async sendMsgVote({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgVote(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgVote:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgVote:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgDeposit({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgDeposit(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgDeposit:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgDeposit:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgSubmitProposal({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgSubmitProposal(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgSubmitProposal:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSubmitProposal:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgVoteWeighted({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgVoteWeighted(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgVoteWeighted:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgVoteWeighted:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async MsgVote({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgVote(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgVote:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgVote:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgDeposit({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgDeposit(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgDeposit:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgDeposit:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgSubmitProposal({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgSubmitProposal(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgSubmitProposal:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgSubmitProposal:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgVoteWeighted({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgVoteWeighted(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgVoteWeighted:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgVoteWeighted:Create', 'Could not create message: ' + e.message); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.ts deleted file mode 100755 index 68559b7b95..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.ts +++ /dev/null @@ -1,484 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { WeightedVoteOption } from "./module/types/cosmos/gov/v1beta1/gov" -import { TextProposal } from "./module/types/cosmos/gov/v1beta1/gov" -import { Deposit } from "./module/types/cosmos/gov/v1beta1/gov" -import { Proposal } from "./module/types/cosmos/gov/v1beta1/gov" -import { TallyResult } from "./module/types/cosmos/gov/v1beta1/gov" -import { Vote } from "./module/types/cosmos/gov/v1beta1/gov" -import { DepositParams } from "./module/types/cosmos/gov/v1beta1/gov" -import { VotingParams } from "./module/types/cosmos/gov/v1beta1/gov" -import { TallyParams } from "./module/types/cosmos/gov/v1beta1/gov" - - -export { WeightedVoteOption, TextProposal, Deposit, Proposal, TallyResult, Vote, DepositParams, VotingParams, TallyParams }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Proposal: {}, - Proposals: {}, - Vote: {}, - Votes: {}, - Params: {}, - Deposit: {}, - Deposits: {}, - TallyResult: {}, - - _Structure: { - WeightedVoteOption: getStructure(WeightedVoteOption.fromPartial({})), - TextProposal: getStructure(TextProposal.fromPartial({})), - Deposit: getStructure(Deposit.fromPartial({})), - Proposal: getStructure(Proposal.fromPartial({})), - TallyResult: getStructure(TallyResult.fromPartial({})), - Vote: getStructure(Vote.fromPartial({})), - DepositParams: getStructure(DepositParams.fromPartial({})), - VotingParams: getStructure(VotingParams.fromPartial({})), - TallyParams: getStructure(TallyParams.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getProposal: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Proposal[JSON.stringify(params)] ?? {} - }, - getProposals: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Proposals[JSON.stringify(params)] ?? {} - }, - getVote: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Vote[JSON.stringify(params)] ?? {} - }, - getVotes: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Votes[JSON.stringify(params)] ?? {} - }, - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - getDeposit: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Deposit[JSON.stringify(params)] ?? {} - }, - getDeposits: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Deposits[JSON.stringify(params)] ?? {} - }, - getTallyResult: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.TallyResult[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.gov.v1beta1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryProposal({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryProposal( key.proposal_id)).data - - - commit('QUERY', { query: 'Proposal', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryProposal', payload: { options: { all }, params: {...key},query }}) - return getters['getProposal']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryProposal API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryProposals({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryProposals(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryProposals({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Proposals', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryProposals', payload: { options: { all }, params: {...key},query }}) - return getters['getProposals']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryProposals API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryVote({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryVote( key.proposal_id, key.voter)).data - - - commit('QUERY', { query: 'Vote', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryVote', payload: { options: { all }, params: {...key},query }}) - return getters['getVote']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryVote API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryVotes({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryVotes( key.proposal_id, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryVotes( key.proposal_id, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Votes', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryVotes', payload: { options: { all }, params: {...key},query }}) - return getters['getVotes']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryVotes API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams( key.params_type)).data - - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDeposit({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDeposit( key.proposal_id, key.depositor)).data - - - commit('QUERY', { query: 'Deposit', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDeposit', payload: { options: { all }, params: {...key},query }}) - return getters['getDeposit']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDeposit API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDeposits({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDeposits( key.proposal_id, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryDeposits( key.proposal_id, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Deposits', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDeposits', payload: { options: { all }, params: {...key},query }}) - return getters['getDeposits']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDeposits API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryTallyResult({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryTallyResult( key.proposal_id)).data - - - commit('QUERY', { query: 'TallyResult', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryTallyResult', payload: { options: { all }, params: {...key},query }}) - return getters['getTallyResult']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryTallyResult API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - async sendMsgVoteWeighted({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgVoteWeighted(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgVoteWeighted:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgVoteWeighted:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgSubmitProposal({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSubmitProposal(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgSubmitProposal:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgSubmitProposal:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgDeposit({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgDeposit(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgDeposit:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgDeposit:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgVote({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgVote(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgVote:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgVote:Send Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgVoteWeighted({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgVoteWeighted(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgVoteWeighted:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgVoteWeighted:Create Could not create message: ' + e.message) - } - } - }, - async MsgSubmitProposal({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSubmitProposal(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgSubmitProposal:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgSubmitProposal:Create Could not create message: ' + e.message) - } - } - }, - async MsgDeposit({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgDeposit(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgDeposit:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgDeposit:Create Could not create message: ' + e.message) - } - } - }, - async MsgVote({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgVote(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgVote:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgVote:Create Could not create message: ' + e.message) - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.d.ts deleted file mode 100644 index aaacd42f05..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgVote } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; - msgVote: (data: MsgVote) => EncodeObject; - msgDeposit: (data: MsgDeposit) => EncodeObject; - msgSubmitProposal: (data: MsgSubmitProposal) => EncodeObject; - msgVoteWeighted: (data: MsgVoteWeighted) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.js deleted file mode 100644 index 7252464d7c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.js +++ /dev/null @@ -1,43 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgVote } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx"; -const types = [ - ["/cosmos.gov.v1beta1.MsgVote", MsgVote], - ["/cosmos.gov.v1beta1.MsgDeposit", MsgDeposit], - ["/cosmos.gov.v1beta1.MsgSubmitProposal", MsgSubmitProposal], - ["/cosmos.gov.v1beta1.MsgVoteWeighted", MsgVoteWeighted], -]; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - msgVote: (data) => ({ typeUrl: "/cosmos.gov.v1beta1.MsgVote", value: MsgVote.fromPartial(data) }), - msgDeposit: (data) => ({ typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", value: MsgDeposit.fromPartial(data) }), - msgSubmitProposal: (data) => ({ typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial(data) }), - msgVoteWeighted: (data) => ({ typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial(data) }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.ts deleted file mode 100755 index 0b62f59a99..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.ts +++ /dev/null @@ -1,69 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgVote } from "./types/cosmos/gov/v1beta1/tx"; - - -const types = [ - ["/cosmos.gov.v1beta1.MsgVoteWeighted", MsgVoteWeighted], - ["/cosmos.gov.v1beta1.MsgSubmitProposal", MsgSubmitProposal], - ["/cosmos.gov.v1beta1.MsgDeposit", MsgDeposit], - ["/cosmos.gov.v1beta1.MsgVote", MsgVote], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgVoteWeighted: (data: MsgVoteWeighted): EncodeObject => ({ typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( data ) }), - msgSubmitProposal: (data: MsgSubmitProposal): EncodeObject => ({ typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( data ) }), - msgDeposit: (data: MsgDeposit): EncodeObject => ({ typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", value: MsgDeposit.fromPartial( data ) }), - msgVote: (data: MsgVote): EncodeObject => ({ typeUrl: "/cosmos.gov.v1beta1.MsgVote", value: MsgVote.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.d.ts deleted file mode 100644 index 4343728da4..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,679 +0,0 @@ -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} -/** -* Deposit defines an amount deposited by an account address to an active -proposal. -*/ -export interface V1Beta1Deposit { - /** @format uint64 */ - proposalId?: string; - depositor?: string; - amount?: V1Beta1Coin[]; -} -/** - * DepositParams defines the params for deposits on governance proposals. - */ -export interface V1Beta1DepositParams { - /** Minimum deposit for a proposal to enter voting period. */ - minDeposit?: V1Beta1Coin[]; - /** - * Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - * months. - */ - maxDepositPeriod?: string; -} -/** - * MsgDepositResponse defines the Msg/Deposit response type. - */ -export declare type V1Beta1MsgDepositResponse = object; -/** - * MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. - */ -export interface V1Beta1MsgSubmitProposalResponse { - /** @format uint64 */ - proposalId?: string; -} -/** - * MsgVoteResponse defines the Msg/Vote response type. - */ -export declare type V1Beta1MsgVoteResponse = object; -/** -* MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. - -Since: cosmos-sdk 0.43 -*/ -export declare type V1Beta1MsgVoteWeightedResponse = object; -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - /** - * 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. - * @format uint64 - */ - offset?: string; - /** - * 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. - * @format uint64 - */ - limit?: string; - /** - * 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. - */ - countTotal?: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse?: boolean; -} -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -/** - * Proposal defines the core field members of a governance proposal. - */ -export interface V1Beta1Proposal { - /** @format uint64 */ - proposalId?: string; - /** - * `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" - * } - */ - content?: ProtobufAny; - /** - * 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. - */ - status?: V1Beta1ProposalStatus; - /** TallyResult defines a standard tally for a governance proposal. */ - finalTallyResult?: V1Beta1TallyResult; - /** @format date-time */ - submitTime?: string; - /** @format date-time */ - depositEndTime?: string; - totalDeposit?: V1Beta1Coin[]; - /** @format date-time */ - votingStartTime?: string; - /** @format date-time */ - votingEndTime?: string; -} -/** -* 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. -*/ -export declare enum V1Beta1ProposalStatus { - PROPOSAL_STATUS_UNSPECIFIED = "PROPOSAL_STATUS_UNSPECIFIED", - PROPOSAL_STATUS_DEPOSIT_PERIOD = "PROPOSAL_STATUS_DEPOSIT_PERIOD", - PROPOSAL_STATUS_VOTING_PERIOD = "PROPOSAL_STATUS_VOTING_PERIOD", - PROPOSAL_STATUS_PASSED = "PROPOSAL_STATUS_PASSED", - PROPOSAL_STATUS_REJECTED = "PROPOSAL_STATUS_REJECTED", - PROPOSAL_STATUS_FAILED = "PROPOSAL_STATUS_FAILED" -} -/** - * QueryDepositResponse is the response type for the Query/Deposit RPC method. - */ -export interface V1Beta1QueryDepositResponse { - /** deposit defines the requested deposit. */ - deposit?: V1Beta1Deposit; -} -/** - * QueryDepositsResponse is the response type for the Query/Deposits RPC method. - */ -export interface V1Beta1QueryDepositsResponse { - deposits?: V1Beta1Deposit[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1Beta1QueryParamsResponse { - /** voting_params defines the parameters related to voting. */ - votingParams?: V1Beta1VotingParams; - /** deposit_params defines the parameters related to deposit. */ - depositParams?: V1Beta1DepositParams; - /** tally_params defines the parameters related to tally. */ - tallyParams?: V1Beta1TallyParams; -} -/** - * QueryProposalResponse is the response type for the Query/Proposal RPC method. - */ -export interface V1Beta1QueryProposalResponse { - /** Proposal defines the core field members of a governance proposal. */ - proposal?: V1Beta1Proposal; -} -/** -* QueryProposalsResponse is the response type for the Query/Proposals RPC -method. -*/ -export interface V1Beta1QueryProposalsResponse { - proposals?: V1Beta1Proposal[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * QueryTallyResultResponse is the response type for the Query/Tally RPC method. - */ -export interface V1Beta1QueryTallyResultResponse { - /** tally defines the requested tally. */ - tally?: V1Beta1TallyResult; -} -/** - * QueryVoteResponse is the response type for the Query/Vote RPC method. - */ -export interface V1Beta1QueryVoteResponse { - /** vote defined the queried vote. */ - vote?: V1Beta1Vote; -} -/** - * QueryVotesResponse is the response type for the Query/Votes RPC method. - */ -export interface V1Beta1QueryVotesResponse { - /** votes defined the queried votes. */ - votes?: V1Beta1Vote[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * TallyParams defines the params for tallying votes on governance proposals. - */ -export interface V1Beta1TallyParams { - /** - * Minimum percentage of total stake needed to vote for a result to be - * considered valid. - * @format byte - */ - quorum?: string; - /** - * Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - * @format byte - */ - threshold?: string; - /** - * Minimum value of Veto votes to Total votes ratio for proposal to be - * vetoed. Default value: 1/3. - * @format byte - */ - vetoThreshold?: string; -} -/** - * TallyResult defines a standard tally for a governance proposal. - */ -export interface V1Beta1TallyResult { - yes?: string; - abstain?: string; - no?: string; - noWithVeto?: string; -} -/** -* Vote defines a vote on a governance proposal. -A Vote consists of a proposal ID, the voter, and the vote option. -*/ -export interface V1Beta1Vote { - /** @format uint64 */ - proposalId?: string; - voter?: string; - /** - * 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. - */ - option?: V1Beta1VoteOption; - options?: V1Beta1WeightedVoteOption[]; -} -/** -* 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. -*/ -export declare enum V1Beta1VoteOption { - VOTE_OPTION_UNSPECIFIED = "VOTE_OPTION_UNSPECIFIED", - VOTE_OPTION_YES = "VOTE_OPTION_YES", - VOTE_OPTION_ABSTAIN = "VOTE_OPTION_ABSTAIN", - VOTE_OPTION_NO = "VOTE_OPTION_NO", - VOTE_OPTION_NO_WITH_VETO = "VOTE_OPTION_NO_WITH_VETO" -} -/** - * VotingParams defines the params for voting on governance proposals. - */ -export interface V1Beta1VotingParams { - /** Length of the voting period. */ - votingPeriod?: string; -} -/** -* WeightedVoteOption defines a unit of vote for vote split. - -Since: cosmos-sdk 0.43 -*/ -export interface V1Beta1WeightedVoteOption { - /** - * 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. - */ - option?: V1Beta1VoteOption; - weight?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/gov/v1beta1/genesis.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters of the gov module. - * @request GET:/cosmos/gov/v1beta1/params/{paramsType} - */ - queryParams: (paramsType: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryProposals - * @summary Proposals queries all proposals based on given status. - * @request GET:/cosmos/gov/v1beta1/proposals - */ - queryProposals: (query?: { - proposalStatus?: "PROPOSAL_STATUS_UNSPECIFIED" | "PROPOSAL_STATUS_DEPOSIT_PERIOD" | "PROPOSAL_STATUS_VOTING_PERIOD" | "PROPOSAL_STATUS_PASSED" | "PROPOSAL_STATUS_REJECTED" | "PROPOSAL_STATUS_FAILED"; - voter?: string; - depositor?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryProposal - * @summary Proposal queries proposal details based on ProposalID. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId} - */ - queryProposal: (proposalId: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDeposits - * @summary Deposits queries all deposits of a single proposal. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/deposits - */ - queryDeposits: (proposalId: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDeposit - * @summary Deposit queries single deposit information based proposalID, depositAddr. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/deposits/{depositor} - */ - queryDeposit: (proposalId: string, depositor: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryTallyResult - * @summary TallyResult queries the tally of a proposal vote. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/tally - */ - queryTallyResult: (proposalId: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryVotes - * @summary Votes queries votes of a given proposal. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/votes - */ - queryVotes: (proposalId: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryVote - * @summary Vote queries voted information based on proposalID, voterAddr. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/votes/{voter} - */ - queryVote: (proposalId: string, voter: string, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.js deleted file mode 100644 index 1bf6484301..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.js +++ /dev/null @@ -1,296 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -/** -* 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. -*/ -export var V1Beta1ProposalStatus; -(function (V1Beta1ProposalStatus) { - V1Beta1ProposalStatus["PROPOSAL_STATUS_UNSPECIFIED"] = "PROPOSAL_STATUS_UNSPECIFIED"; - V1Beta1ProposalStatus["PROPOSAL_STATUS_DEPOSIT_PERIOD"] = "PROPOSAL_STATUS_DEPOSIT_PERIOD"; - V1Beta1ProposalStatus["PROPOSAL_STATUS_VOTING_PERIOD"] = "PROPOSAL_STATUS_VOTING_PERIOD"; - V1Beta1ProposalStatus["PROPOSAL_STATUS_PASSED"] = "PROPOSAL_STATUS_PASSED"; - V1Beta1ProposalStatus["PROPOSAL_STATUS_REJECTED"] = "PROPOSAL_STATUS_REJECTED"; - V1Beta1ProposalStatus["PROPOSAL_STATUS_FAILED"] = "PROPOSAL_STATUS_FAILED"; -})(V1Beta1ProposalStatus || (V1Beta1ProposalStatus = {})); -/** -* 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. -*/ -export var V1Beta1VoteOption; -(function (V1Beta1VoteOption) { - V1Beta1VoteOption["VOTE_OPTION_UNSPECIFIED"] = "VOTE_OPTION_UNSPECIFIED"; - V1Beta1VoteOption["VOTE_OPTION_YES"] = "VOTE_OPTION_YES"; - V1Beta1VoteOption["VOTE_OPTION_ABSTAIN"] = "VOTE_OPTION_ABSTAIN"; - V1Beta1VoteOption["VOTE_OPTION_NO"] = "VOTE_OPTION_NO"; - V1Beta1VoteOption["VOTE_OPTION_NO_WITH_VETO"] = "VOTE_OPTION_NO_WITH_VETO"; -})(V1Beta1VoteOption || (V1Beta1VoteOption = {})); -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/gov/v1beta1/genesis.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters of the gov module. - * @request GET:/cosmos/gov/v1beta1/params/{paramsType} - */ - this.queryParams = (paramsType, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/params/${paramsType}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryProposals - * @summary Proposals queries all proposals based on given status. - * @request GET:/cosmos/gov/v1beta1/proposals - */ - this.queryProposals = (query, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/proposals`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryProposal - * @summary Proposal queries proposal details based on ProposalID. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId} - */ - this.queryProposal = (proposalId, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDeposits - * @summary Deposits queries all deposits of a single proposal. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/deposits - */ - this.queryDeposits = (proposalId, query, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/deposits`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDeposit - * @summary Deposit queries single deposit information based proposalID, depositAddr. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/deposits/{depositor} - */ - this.queryDeposit = (proposalId, depositor, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/deposits/${depositor}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryTallyResult - * @summary TallyResult queries the tally of a proposal vote. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/tally - */ - this.queryTallyResult = (proposalId, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/tally`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryVotes - * @summary Votes queries votes of a given proposal. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/votes - */ - this.queryVotes = (proposalId, query, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/votes`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryVote - * @summary Vote queries voted information based on proposalID, voterAddr. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposalId}/votes/{voter} - */ - this.queryVote = (proposalId, voter, params = {}) => this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/votes/${voter}`, - method: "GET", - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.ts deleted file mode 100644 index d13cb4ec16..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/rest.ts +++ /dev/null @@ -1,950 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** -* Deposit defines an amount deposited by an account address to an active -proposal. -*/ -export interface V1Beta1Deposit { - /** @format uint64 */ - proposal_id?: string; - depositor?: string; - amount?: V1Beta1Coin[]; -} - -/** - * DepositParams defines the params for deposits on governance proposals. - */ -export interface V1Beta1DepositParams { - /** Minimum deposit for a proposal to enter voting period. */ - min_deposit?: V1Beta1Coin[]; - - /** - * Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - * months. - */ - max_deposit_period?: string; -} - -/** - * MsgDepositResponse defines the Msg/Deposit response type. - */ -export type V1Beta1MsgDepositResponse = object; - -/** - * MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. - */ -export interface V1Beta1MsgSubmitProposalResponse { - /** @format uint64 */ - proposal_id?: string; -} - -/** - * MsgVoteResponse defines the Msg/Vote response type. - */ -export type V1Beta1MsgVoteResponse = object; - -/** -* MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. - -Since: cosmos-sdk 0.43 -*/ -export type V1Beta1MsgVoteWeightedResponse = object; - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - 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; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -/** - * Proposal defines the core field members of a governance proposal. - */ -export interface V1Beta1Proposal { - /** @format uint64 */ - proposal_id?: string; - - /** - * `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" - * } - */ - content?: ProtobufAny; - - /** - * 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. - */ - status?: V1Beta1ProposalStatus; - - /** TallyResult defines a standard tally for a governance proposal. */ - final_tally_result?: V1Beta1TallyResult; - - /** @format date-time */ - submit_time?: string; - - /** @format date-time */ - deposit_end_time?: string; - total_deposit?: V1Beta1Coin[]; - - /** @format date-time */ - voting_start_time?: string; - - /** @format date-time */ - voting_end_time?: string; -} - -/** -* 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. -*/ -export enum V1Beta1ProposalStatus { - PROPOSAL_STATUS_UNSPECIFIED = "PROPOSAL_STATUS_UNSPECIFIED", - PROPOSAL_STATUS_DEPOSIT_PERIOD = "PROPOSAL_STATUS_DEPOSIT_PERIOD", - PROPOSAL_STATUS_VOTING_PERIOD = "PROPOSAL_STATUS_VOTING_PERIOD", - PROPOSAL_STATUS_PASSED = "PROPOSAL_STATUS_PASSED", - PROPOSAL_STATUS_REJECTED = "PROPOSAL_STATUS_REJECTED", - PROPOSAL_STATUS_FAILED = "PROPOSAL_STATUS_FAILED", -} - -/** - * QueryDepositResponse is the response type for the Query/Deposit RPC method. - */ -export interface V1Beta1QueryDepositResponse { - /** deposit defines the requested deposit. */ - deposit?: V1Beta1Deposit; -} - -/** - * QueryDepositsResponse is the response type for the Query/Deposits RPC method. - */ -export interface V1Beta1QueryDepositsResponse { - deposits?: V1Beta1Deposit[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1Beta1QueryParamsResponse { - /** voting_params defines the parameters related to voting. */ - voting_params?: V1Beta1VotingParams; - - /** deposit_params defines the parameters related to deposit. */ - deposit_params?: V1Beta1DepositParams; - - /** tally_params defines the parameters related to tally. */ - tally_params?: V1Beta1TallyParams; -} - -/** - * QueryProposalResponse is the response type for the Query/Proposal RPC method. - */ -export interface V1Beta1QueryProposalResponse { - /** Proposal defines the core field members of a governance proposal. */ - proposal?: V1Beta1Proposal; -} - -/** -* QueryProposalsResponse is the response type for the Query/Proposals RPC -method. -*/ -export interface V1Beta1QueryProposalsResponse { - proposals?: V1Beta1Proposal[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryTallyResultResponse is the response type for the Query/Tally RPC method. - */ -export interface V1Beta1QueryTallyResultResponse { - /** tally defines the requested tally. */ - tally?: V1Beta1TallyResult; -} - -/** - * QueryVoteResponse is the response type for the Query/Vote RPC method. - */ -export interface V1Beta1QueryVoteResponse { - /** vote defined the queried vote. */ - vote?: V1Beta1Vote; -} - -/** - * QueryVotesResponse is the response type for the Query/Votes RPC method. - */ -export interface V1Beta1QueryVotesResponse { - /** votes defined the queried votes. */ - votes?: V1Beta1Vote[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * TallyParams defines the params for tallying votes on governance proposals. - */ -export interface V1Beta1TallyParams { - /** - * Minimum percentage of total stake needed to vote for a result to be - * considered valid. - * @format byte - */ - quorum?: string; - - /** - * Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - * @format byte - */ - threshold?: string; - - /** - * Minimum value of Veto votes to Total votes ratio for proposal to be - * vetoed. Default value: 1/3. - * @format byte - */ - veto_threshold?: string; -} - -/** - * TallyResult defines a standard tally for a governance proposal. - */ -export interface V1Beta1TallyResult { - yes?: string; - abstain?: string; - no?: string; - no_with_veto?: string; -} - -/** -* Vote defines a vote on a governance proposal. -A Vote consists of a proposal ID, the voter, and the vote option. -*/ -export interface V1Beta1Vote { - /** @format uint64 */ - proposal_id?: string; - voter?: string; - - /** - * 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. - */ - option?: V1Beta1VoteOption; - options?: V1Beta1WeightedVoteOption[]; -} - -/** -* 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. -*/ -export enum V1Beta1VoteOption { - VOTE_OPTION_UNSPECIFIED = "VOTE_OPTION_UNSPECIFIED", - VOTE_OPTION_YES = "VOTE_OPTION_YES", - VOTE_OPTION_ABSTAIN = "VOTE_OPTION_ABSTAIN", - VOTE_OPTION_NO = "VOTE_OPTION_NO", - VOTE_OPTION_NO_WITH_VETO = "VOTE_OPTION_NO_WITH_VETO", -} - -/** - * VotingParams defines the params for voting on governance proposals. - */ -export interface V1Beta1VotingParams { - /** Length of the voting period. */ - voting_period?: string; -} - -/** -* WeightedVoteOption defines a unit of vote for vote split. - -Since: cosmos-sdk 0.43 -*/ -export interface V1Beta1WeightedVoteOption { - /** - * 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. - */ - option?: V1Beta1VoteOption; - weight?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/gov/v1beta1/genesis.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters of the gov module. - * @request GET:/cosmos/gov/v1beta1/params/{params_type} - */ - queryParams = (params_type: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/gov/v1beta1/params/${params_type}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryProposals - * @summary Proposals queries all proposals based on given status. - * @request GET:/cosmos/gov/v1beta1/proposals - */ - queryProposals = ( - query?: { - proposal_status?: - | "PROPOSAL_STATUS_UNSPECIFIED" - | "PROPOSAL_STATUS_DEPOSIT_PERIOD" - | "PROPOSAL_STATUS_VOTING_PERIOD" - | "PROPOSAL_STATUS_PASSED" - | "PROPOSAL_STATUS_REJECTED" - | "PROPOSAL_STATUS_FAILED"; - voter?: string; - depositor?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/gov/v1beta1/proposals`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryProposal - * @summary Proposal queries proposal details based on ProposalID. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id} - */ - queryProposal = (proposal_id: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposal_id}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDeposits - * @summary Deposits queries all deposits of a single proposal. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits - */ - queryDeposits = ( - proposal_id: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposal_id}/deposits`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDeposit - * @summary Deposit queries single deposit information based proposalID, depositAddr. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor} - */ - queryDeposit = (proposal_id: string, depositor: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposal_id}/deposits/${depositor}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryTallyResult - * @summary TallyResult queries the tally of a proposal vote. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/tally - */ - queryTallyResult = (proposal_id: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposal_id}/tally`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryVotes - * @summary Votes queries votes of a given proposal. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/votes - */ - queryVotes = ( - proposal_id: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposal_id}/votes`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryVote - * @summary Vote queries voted information based on proposalID, voterAddr. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter} - */ - queryVote = (proposal_id: string, voter: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/gov/v1beta1/proposals/${proposal_id}/votes/${voter}`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index 767d2c358f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - countTotal: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; -} -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index b5f5ced3d6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,242 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { - offset: 0, - limit: 0, - countTotal: false, - reverse: false, -}; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } - else { - message.reverse = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - message.reverse !== undefined && (obj.reverse = message.reverse); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } - else { - message.reverse = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 9c87ac0c9c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - 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; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { - offset: 0, - limit: 0, - count_total: false, - reverse: false, -}; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } else { - message.reverse = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - 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; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } else { - message.reverse = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac6a3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb30cd..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98406..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.d.ts deleted file mode 100644 index 9822eb2cc4..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Deposit, Vote, Proposal, DepositParams, VotingParams, TallyParams } from "../../../cosmos/gov/v1beta1/gov"; -export declare const protobufPackage = "cosmos.gov.v1beta1"; -/** GenesisState defines the gov module's genesis state. */ -export interface GenesisState { - /** starting_proposal_id is the ID of the starting proposal. */ - startingProposalId: number; - /** deposits defines all the deposits present at genesis. */ - deposits: Deposit[]; - /** votes defines all the votes present at genesis. */ - votes: Vote[]; - /** proposals defines all the proposals present at genesis. */ - proposals: Proposal[]; - /** params defines all the paramaters of related to deposit. */ - depositParams: DepositParams | undefined; - /** params defines all the paramaters of related to voting. */ - votingParams: VotingParams | undefined; - /** params defines all the paramaters of related to tally. */ - tallyParams: TallyParams | undefined; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.js deleted file mode 100644 index 23741d22e1..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.js +++ /dev/null @@ -1,221 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Deposit, Vote, Proposal, DepositParams, VotingParams, TallyParams, } from "../../../cosmos/gov/v1beta1/gov"; -export const protobufPackage = "cosmos.gov.v1beta1"; -const baseGenesisState = { startingProposalId: 0 }; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.startingProposalId !== 0) { - writer.uint32(8).uint64(message.startingProposalId); - } - for (const v of message.deposits) { - Deposit.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.votes) { - Vote.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.proposals) { - Proposal.encode(v, writer.uint32(34).fork()).ldelim(); - } - if (message.depositParams !== undefined) { - DepositParams.encode(message.depositParams, writer.uint32(42).fork()).ldelim(); - } - if (message.votingParams !== undefined) { - VotingParams.encode(message.votingParams, writer.uint32(50).fork()).ldelim(); - } - if (message.tallyParams !== undefined) { - TallyParams.encode(message.tallyParams, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.deposits = []; - message.votes = []; - message.proposals = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.startingProposalId = longToNumber(reader.uint64()); - break; - case 2: - message.deposits.push(Deposit.decode(reader, reader.uint32())); - break; - case 3: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - case 4: - message.proposals.push(Proposal.decode(reader, reader.uint32())); - break; - case 5: - message.depositParams = DepositParams.decode(reader, reader.uint32()); - break; - case 6: - message.votingParams = VotingParams.decode(reader, reader.uint32()); - break; - case 7: - message.tallyParams = TallyParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.deposits = []; - message.votes = []; - message.proposals = []; - if (object.startingProposalId !== undefined && - object.startingProposalId !== null) { - message.startingProposalId = Number(object.startingProposalId); - } - else { - message.startingProposalId = 0; - } - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromJSON(e)); - } - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromJSON(e)); - } - } - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromJSON(e)); - } - } - if (object.depositParams !== undefined && object.depositParams !== null) { - message.depositParams = DepositParams.fromJSON(object.depositParams); - } - else { - message.depositParams = undefined; - } - if (object.votingParams !== undefined && object.votingParams !== null) { - message.votingParams = VotingParams.fromJSON(object.votingParams); - } - else { - message.votingParams = undefined; - } - if (object.tallyParams !== undefined && object.tallyParams !== null) { - message.tallyParams = TallyParams.fromJSON(object.tallyParams); - } - else { - message.tallyParams = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.startingProposalId !== undefined && - (obj.startingProposalId = message.startingProposalId); - if (message.deposits) { - obj.deposits = message.deposits.map((e) => e ? Deposit.toJSON(e) : undefined); - } - else { - obj.deposits = []; - } - if (message.votes) { - obj.votes = message.votes.map((e) => (e ? Vote.toJSON(e) : undefined)); - } - else { - obj.votes = []; - } - if (message.proposals) { - obj.proposals = message.proposals.map((e) => e ? Proposal.toJSON(e) : undefined); - } - else { - obj.proposals = []; - } - message.depositParams !== undefined && - (obj.depositParams = message.depositParams - ? DepositParams.toJSON(message.depositParams) - : undefined); - message.votingParams !== undefined && - (obj.votingParams = message.votingParams - ? VotingParams.toJSON(message.votingParams) - : undefined); - message.tallyParams !== undefined && - (obj.tallyParams = message.tallyParams - ? TallyParams.toJSON(message.tallyParams) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.deposits = []; - message.votes = []; - message.proposals = []; - if (object.startingProposalId !== undefined && - object.startingProposalId !== null) { - message.startingProposalId = object.startingProposalId; - } - else { - message.startingProposalId = 0; - } - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromPartial(e)); - } - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromPartial(e)); - } - } - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromPartial(e)); - } - } - if (object.depositParams !== undefined && object.depositParams !== null) { - message.depositParams = DepositParams.fromPartial(object.depositParams); - } - else { - message.depositParams = undefined; - } - if (object.votingParams !== undefined && object.votingParams !== null) { - message.votingParams = VotingParams.fromPartial(object.votingParams); - } - else { - message.votingParams = undefined; - } - if (object.tallyParams !== undefined && object.tallyParams !== null) { - message.tallyParams = TallyParams.fromPartial(object.tallyParams); - } - else { - message.tallyParams = undefined; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.ts deleted file mode 100644 index 22a4738d6f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.ts +++ /dev/null @@ -1,274 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { - Deposit, - Vote, - Proposal, - DepositParams, - VotingParams, - TallyParams, -} from "../../../cosmos/gov/v1beta1/gov"; - -export const protobufPackage = "cosmos.gov.v1beta1"; - -/** GenesisState defines the gov module's genesis state. */ -export interface GenesisState { - /** starting_proposal_id is the ID of the starting proposal. */ - starting_proposal_id: number; - /** deposits defines all the deposits present at genesis. */ - deposits: Deposit[]; - /** votes defines all the votes present at genesis. */ - votes: Vote[]; - /** proposals defines all the proposals present at genesis. */ - proposals: Proposal[]; - /** params defines all the paramaters of related to deposit. */ - deposit_params: DepositParams | undefined; - /** params defines all the paramaters of related to voting. */ - voting_params: VotingParams | undefined; - /** params defines all the paramaters of related to tally. */ - tally_params: TallyParams | undefined; -} - -const baseGenesisState: object = { starting_proposal_id: 0 }; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.starting_proposal_id !== 0) { - writer.uint32(8).uint64(message.starting_proposal_id); - } - for (const v of message.deposits) { - Deposit.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.votes) { - Vote.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.proposals) { - Proposal.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.deposit_params !== undefined) { - DepositParams.encode( - message.deposit_params, - writer.uint32(42).fork() - ).ldelim(); - } - if (message.voting_params !== undefined) { - VotingParams.encode( - message.voting_params, - writer.uint32(50).fork() - ).ldelim(); - } - if (message.tally_params !== undefined) { - TallyParams.encode( - message.tally_params, - writer.uint32(58).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.deposits = []; - message.votes = []; - message.proposals = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.starting_proposal_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.deposits.push(Deposit.decode(reader, reader.uint32())); - break; - case 3: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - case 4: - message.proposals.push(Proposal.decode(reader, reader.uint32())); - break; - case 5: - message.deposit_params = DepositParams.decode( - reader, - reader.uint32() - ); - break; - case 6: - message.voting_params = VotingParams.decode(reader, reader.uint32()); - break; - case 7: - message.tally_params = TallyParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.deposits = []; - message.votes = []; - message.proposals = []; - if ( - object.starting_proposal_id !== undefined && - object.starting_proposal_id !== null - ) { - message.starting_proposal_id = Number(object.starting_proposal_id); - } else { - message.starting_proposal_id = 0; - } - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromJSON(e)); - } - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromJSON(e)); - } - } - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromJSON(e)); - } - } - if (object.deposit_params !== undefined && object.deposit_params !== null) { - message.deposit_params = DepositParams.fromJSON(object.deposit_params); - } else { - message.deposit_params = undefined; - } - if (object.voting_params !== undefined && object.voting_params !== null) { - message.voting_params = VotingParams.fromJSON(object.voting_params); - } else { - message.voting_params = undefined; - } - if (object.tally_params !== undefined && object.tally_params !== null) { - message.tally_params = TallyParams.fromJSON(object.tally_params); - } else { - message.tally_params = undefined; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.starting_proposal_id !== undefined && - (obj.starting_proposal_id = message.starting_proposal_id); - if (message.deposits) { - obj.deposits = message.deposits.map((e) => - e ? Deposit.toJSON(e) : undefined - ); - } else { - obj.deposits = []; - } - if (message.votes) { - obj.votes = message.votes.map((e) => (e ? Vote.toJSON(e) : undefined)); - } else { - obj.votes = []; - } - if (message.proposals) { - obj.proposals = message.proposals.map((e) => - e ? Proposal.toJSON(e) : undefined - ); - } else { - obj.proposals = []; - } - message.deposit_params !== undefined && - (obj.deposit_params = message.deposit_params - ? DepositParams.toJSON(message.deposit_params) - : undefined); - message.voting_params !== undefined && - (obj.voting_params = message.voting_params - ? VotingParams.toJSON(message.voting_params) - : undefined); - message.tally_params !== undefined && - (obj.tally_params = message.tally_params - ? TallyParams.toJSON(message.tally_params) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.deposits = []; - message.votes = []; - message.proposals = []; - if ( - object.starting_proposal_id !== undefined && - object.starting_proposal_id !== null - ) { - message.starting_proposal_id = object.starting_proposal_id; - } else { - message.starting_proposal_id = 0; - } - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromPartial(e)); - } - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromPartial(e)); - } - } - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromPartial(e)); - } - } - if (object.deposit_params !== undefined && object.deposit_params !== null) { - message.deposit_params = DepositParams.fromPartial(object.deposit_params); - } else { - message.deposit_params = undefined; - } - if (object.voting_params !== undefined && object.voting_params !== null) { - message.voting_params = VotingParams.fromPartial(object.voting_params); - } else { - message.voting_params = undefined; - } - if (object.tally_params !== undefined && object.tally_params !== null) { - message.tally_params = TallyParams.fromPartial(object.tally_params); - } else { - message.tally_params = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.d.ts deleted file mode 100644 index a7c55189b2..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.d.ts +++ /dev/null @@ -1,215 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Any } from "../../../google/protobuf/any"; -import { Duration } from "../../../google/protobuf/duration"; -export declare const protobufPackage = "cosmos.gov.v1beta1"; -/** VoteOption enumerates the valid vote options for a given governance proposal. */ -export declare enum VoteOption { - /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */ - VOTE_OPTION_UNSPECIFIED = 0, - /** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */ - VOTE_OPTION_YES = 1, - /** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */ - VOTE_OPTION_ABSTAIN = 2, - /** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */ - VOTE_OPTION_NO = 3, - /** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */ - VOTE_OPTION_NO_WITH_VETO = 4, - UNRECOGNIZED = -1 -} -export declare function voteOptionFromJSON(object: any): VoteOption; -export declare function voteOptionToJSON(object: VoteOption): string; -/** ProposalStatus enumerates the valid statuses of a proposal. */ -export declare enum ProposalStatus { - /** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. */ - PROPOSAL_STATUS_UNSPECIFIED = 0, - /** - * PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - * period. - */ - PROPOSAL_STATUS_DEPOSIT_PERIOD = 1, - /** - * PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - * period. - */ - PROPOSAL_STATUS_VOTING_PERIOD = 2, - /** - * PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - * passed. - */ - PROPOSAL_STATUS_PASSED = 3, - /** - * PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - * been rejected. - */ - PROPOSAL_STATUS_REJECTED = 4, - /** - * PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - * failed. - */ - PROPOSAL_STATUS_FAILED = 5, - UNRECOGNIZED = -1 -} -export declare function proposalStatusFromJSON(object: any): ProposalStatus; -export declare function proposalStatusToJSON(object: ProposalStatus): string; -/** - * WeightedVoteOption defines a unit of vote for vote split. - * - * Since: cosmos-sdk 0.43 - */ -export interface WeightedVoteOption { - option: VoteOption; - weight: string; -} -/** - * TextProposal defines a standard text proposal whose changes need to be - * manually updated in case of approval. - */ -export interface TextProposal { - title: string; - description: string; -} -/** - * Deposit defines an amount deposited by an account address to an active - * proposal. - */ -export interface Deposit { - proposalId: number; - depositor: string; - amount: Coin[]; -} -/** Proposal defines the core field members of a governance proposal. */ -export interface Proposal { - proposalId: number; - content: Any | undefined; - status: ProposalStatus; - finalTallyResult: TallyResult | undefined; - submitTime: Date | undefined; - depositEndTime: Date | undefined; - totalDeposit: Coin[]; - votingStartTime: Date | undefined; - votingEndTime: Date | undefined; -} -/** TallyResult defines a standard tally for a governance proposal. */ -export interface TallyResult { - yes: string; - abstain: string; - no: string; - noWithVeto: string; -} -/** - * Vote defines a vote on a governance proposal. - * A Vote consists of a proposal ID, the voter, and the vote option. - */ -export interface Vote { - proposalId: number; - voter: string; - /** - * 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. - * - * @deprecated - */ - option: VoteOption; - /** Since: cosmos-sdk 0.43 */ - options: WeightedVoteOption[]; -} -/** DepositParams defines the params for deposits on governance proposals. */ -export interface DepositParams { - /** Minimum deposit for a proposal to enter voting period. */ - minDeposit: Coin[]; - /** - * Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - * months. - */ - maxDepositPeriod: Duration | undefined; -} -/** VotingParams defines the params for voting on governance proposals. */ -export interface VotingParams { - /** Length of the voting period. */ - votingPeriod: Duration | undefined; -} -/** TallyParams defines the params for tallying votes on governance proposals. */ -export interface TallyParams { - /** - * Minimum percentage of total stake needed to vote for a result to be - * considered valid. - */ - quorum: Uint8Array; - /** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */ - threshold: Uint8Array; - /** - * Minimum value of Veto votes to Total votes ratio for proposal to be - * vetoed. Default value: 1/3. - */ - vetoThreshold: Uint8Array; -} -export declare const WeightedVoteOption: { - encode(message: WeightedVoteOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): WeightedVoteOption; - fromJSON(object: any): WeightedVoteOption; - toJSON(message: WeightedVoteOption): unknown; - fromPartial(object: DeepPartial): WeightedVoteOption; -}; -export declare const TextProposal: { - encode(message: TextProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TextProposal; - fromJSON(object: any): TextProposal; - toJSON(message: TextProposal): unknown; - fromPartial(object: DeepPartial): TextProposal; -}; -export declare const Deposit: { - encode(message: Deposit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Deposit; - fromJSON(object: any): Deposit; - toJSON(message: Deposit): unknown; - fromPartial(object: DeepPartial): Deposit; -}; -export declare const Proposal: { - encode(message: Proposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Proposal; - fromJSON(object: any): Proposal; - toJSON(message: Proposal): unknown; - fromPartial(object: DeepPartial): Proposal; -}; -export declare const TallyResult: { - encode(message: TallyResult, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TallyResult; - fromJSON(object: any): TallyResult; - toJSON(message: TallyResult): unknown; - fromPartial(object: DeepPartial): TallyResult; -}; -export declare const Vote: { - encode(message: Vote, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Vote; - fromJSON(object: any): Vote; - toJSON(message: Vote): unknown; - fromPartial(object: DeepPartial): Vote; -}; -export declare const DepositParams: { - encode(message: DepositParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DepositParams; - fromJSON(object: any): DepositParams; - toJSON(message: DepositParams): unknown; - fromPartial(object: DeepPartial): DepositParams; -}; -export declare const VotingParams: { - encode(message: VotingParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): VotingParams; - fromJSON(object: any): VotingParams; - toJSON(message: VotingParams): unknown; - fromPartial(object: DeepPartial): VotingParams; -}; -export declare const TallyParams: { - encode(message: TallyParams, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TallyParams; - fromJSON(object: any): TallyParams; - toJSON(message: TallyParams): unknown; - fromPartial(object: DeepPartial): TallyParams; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.js deleted file mode 100644 index 6625204e67..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.js +++ /dev/null @@ -1,1118 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Any } from "../../../google/protobuf/any"; -import { Duration } from "../../../google/protobuf/duration"; -export const protobufPackage = "cosmos.gov.v1beta1"; -/** VoteOption enumerates the valid vote options for a given governance proposal. */ -export var VoteOption; -(function (VoteOption) { - /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */ - VoteOption[VoteOption["VOTE_OPTION_UNSPECIFIED"] = 0] = "VOTE_OPTION_UNSPECIFIED"; - /** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */ - VoteOption[VoteOption["VOTE_OPTION_YES"] = 1] = "VOTE_OPTION_YES"; - /** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */ - VoteOption[VoteOption["VOTE_OPTION_ABSTAIN"] = 2] = "VOTE_OPTION_ABSTAIN"; - /** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */ - VoteOption[VoteOption["VOTE_OPTION_NO"] = 3] = "VOTE_OPTION_NO"; - /** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */ - VoteOption[VoteOption["VOTE_OPTION_NO_WITH_VETO"] = 4] = "VOTE_OPTION_NO_WITH_VETO"; - VoteOption[VoteOption["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(VoteOption || (VoteOption = {})); -export function voteOptionFromJSON(object) { - switch (object) { - case 0: - case "VOTE_OPTION_UNSPECIFIED": - return VoteOption.VOTE_OPTION_UNSPECIFIED; - case 1: - case "VOTE_OPTION_YES": - return VoteOption.VOTE_OPTION_YES; - case 2: - case "VOTE_OPTION_ABSTAIN": - return VoteOption.VOTE_OPTION_ABSTAIN; - case 3: - case "VOTE_OPTION_NO": - return VoteOption.VOTE_OPTION_NO; - case 4: - case "VOTE_OPTION_NO_WITH_VETO": - return VoteOption.VOTE_OPTION_NO_WITH_VETO; - case -1: - case "UNRECOGNIZED": - default: - return VoteOption.UNRECOGNIZED; - } -} -export function voteOptionToJSON(object) { - switch (object) { - case VoteOption.VOTE_OPTION_UNSPECIFIED: - return "VOTE_OPTION_UNSPECIFIED"; - case VoteOption.VOTE_OPTION_YES: - return "VOTE_OPTION_YES"; - case VoteOption.VOTE_OPTION_ABSTAIN: - return "VOTE_OPTION_ABSTAIN"; - case VoteOption.VOTE_OPTION_NO: - return "VOTE_OPTION_NO"; - case VoteOption.VOTE_OPTION_NO_WITH_VETO: - return "VOTE_OPTION_NO_WITH_VETO"; - default: - return "UNKNOWN"; - } -} -/** ProposalStatus enumerates the valid statuses of a proposal. */ -export var ProposalStatus; -(function (ProposalStatus) { - /** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. */ - ProposalStatus[ProposalStatus["PROPOSAL_STATUS_UNSPECIFIED"] = 0] = "PROPOSAL_STATUS_UNSPECIFIED"; - /** - * PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - * period. - */ - ProposalStatus[ProposalStatus["PROPOSAL_STATUS_DEPOSIT_PERIOD"] = 1] = "PROPOSAL_STATUS_DEPOSIT_PERIOD"; - /** - * PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - * period. - */ - ProposalStatus[ProposalStatus["PROPOSAL_STATUS_VOTING_PERIOD"] = 2] = "PROPOSAL_STATUS_VOTING_PERIOD"; - /** - * PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - * passed. - */ - ProposalStatus[ProposalStatus["PROPOSAL_STATUS_PASSED"] = 3] = "PROPOSAL_STATUS_PASSED"; - /** - * PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - * been rejected. - */ - ProposalStatus[ProposalStatus["PROPOSAL_STATUS_REJECTED"] = 4] = "PROPOSAL_STATUS_REJECTED"; - /** - * PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - * failed. - */ - ProposalStatus[ProposalStatus["PROPOSAL_STATUS_FAILED"] = 5] = "PROPOSAL_STATUS_FAILED"; - ProposalStatus[ProposalStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(ProposalStatus || (ProposalStatus = {})); -export function proposalStatusFromJSON(object) { - switch (object) { - case 0: - case "PROPOSAL_STATUS_UNSPECIFIED": - return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED; - case 1: - case "PROPOSAL_STATUS_DEPOSIT_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD; - case 2: - case "PROPOSAL_STATUS_VOTING_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD; - case 3: - case "PROPOSAL_STATUS_PASSED": - return ProposalStatus.PROPOSAL_STATUS_PASSED; - case 4: - case "PROPOSAL_STATUS_REJECTED": - return ProposalStatus.PROPOSAL_STATUS_REJECTED; - case 5: - case "PROPOSAL_STATUS_FAILED": - return ProposalStatus.PROPOSAL_STATUS_FAILED; - case -1: - case "UNRECOGNIZED": - default: - return ProposalStatus.UNRECOGNIZED; - } -} -export function proposalStatusToJSON(object) { - switch (object) { - case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED: - return "PROPOSAL_STATUS_UNSPECIFIED"; - case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD: - return "PROPOSAL_STATUS_DEPOSIT_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD: - return "PROPOSAL_STATUS_VOTING_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_PASSED: - return "PROPOSAL_STATUS_PASSED"; - case ProposalStatus.PROPOSAL_STATUS_REJECTED: - return "PROPOSAL_STATUS_REJECTED"; - case ProposalStatus.PROPOSAL_STATUS_FAILED: - return "PROPOSAL_STATUS_FAILED"; - default: - return "UNKNOWN"; - } -} -const baseWeightedVoteOption = { option: 0, weight: "" }; -export const WeightedVoteOption = { - encode(message, writer = Writer.create()) { - if (message.option !== 0) { - writer.uint32(8).int32(message.option); - } - if (message.weight !== "") { - writer.uint32(18).string(message.weight); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseWeightedVoteOption }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.option = reader.int32(); - break; - case 2: - message.weight = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseWeightedVoteOption }; - if (object.option !== undefined && object.option !== null) { - message.option = voteOptionFromJSON(object.option); - } - else { - message.option = 0; - } - if (object.weight !== undefined && object.weight !== null) { - message.weight = String(object.weight); - } - else { - message.weight = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.option !== undefined && - (obj.option = voteOptionToJSON(message.option)); - message.weight !== undefined && (obj.weight = message.weight); - return obj; - }, - fromPartial(object) { - const message = { ...baseWeightedVoteOption }; - if (object.option !== undefined && object.option !== null) { - message.option = object.option; - } - else { - message.option = 0; - } - if (object.weight !== undefined && object.weight !== null) { - message.weight = object.weight; - } - else { - message.weight = ""; - } - return message; - }, -}; -const baseTextProposal = { title: "", description: "" }; -export const TextProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTextProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTextProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - return obj; - }, - fromPartial(object) { - const message = { ...baseTextProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - return message; - }, -}; -const baseDeposit = { proposalId: 0, depositor: "" }; -export const Deposit = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - for (const v of message.amount) { - Coin.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDeposit }; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDeposit }; - message.amount = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } - else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.depositor !== undefined && (obj.depositor = message.depositor); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.amount = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDeposit }; - message.amount = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } - else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseProposal = { proposalId: 0, status: 0 }; -export const Proposal = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.content !== undefined) { - Any.encode(message.content, writer.uint32(18).fork()).ldelim(); - } - if (message.status !== 0) { - writer.uint32(24).int32(message.status); - } - if (message.finalTallyResult !== undefined) { - TallyResult.encode(message.finalTallyResult, writer.uint32(34).fork()).ldelim(); - } - if (message.submitTime !== undefined) { - Timestamp.encode(toTimestamp(message.submitTime), writer.uint32(42).fork()).ldelim(); - } - if (message.depositEndTime !== undefined) { - Timestamp.encode(toTimestamp(message.depositEndTime), writer.uint32(50).fork()).ldelim(); - } - for (const v of message.totalDeposit) { - Coin.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.votingStartTime !== undefined) { - Timestamp.encode(toTimestamp(message.votingStartTime), writer.uint32(66).fork()).ldelim(); - } - if (message.votingEndTime !== undefined) { - Timestamp.encode(toTimestamp(message.votingEndTime), writer.uint32(74).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProposal }; - message.totalDeposit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.content = Any.decode(reader, reader.uint32()); - break; - case 3: - message.status = reader.int32(); - break; - case 4: - message.finalTallyResult = TallyResult.decode(reader, reader.uint32()); - break; - case 5: - message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.depositEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.totalDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 8: - message.votingStartTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 9: - message.votingEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProposal }; - message.totalDeposit = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromJSON(object.content); - } - else { - message.content = undefined; - } - if (object.status !== undefined && object.status !== null) { - message.status = proposalStatusFromJSON(object.status); - } - else { - message.status = 0; - } - if (object.finalTallyResult !== undefined && - object.finalTallyResult !== null) { - message.finalTallyResult = TallyResult.fromJSON(object.finalTallyResult); - } - else { - message.finalTallyResult = undefined; - } - if (object.submitTime !== undefined && object.submitTime !== null) { - message.submitTime = fromJsonTimestamp(object.submitTime); - } - else { - message.submitTime = undefined; - } - if (object.depositEndTime !== undefined && object.depositEndTime !== null) { - message.depositEndTime = fromJsonTimestamp(object.depositEndTime); - } - else { - message.depositEndTime = undefined; - } - if (object.totalDeposit !== undefined && object.totalDeposit !== null) { - for (const e of object.totalDeposit) { - message.totalDeposit.push(Coin.fromJSON(e)); - } - } - if (object.votingStartTime !== undefined && - object.votingStartTime !== null) { - message.votingStartTime = fromJsonTimestamp(object.votingStartTime); - } - else { - message.votingStartTime = undefined; - } - if (object.votingEndTime !== undefined && object.votingEndTime !== null) { - message.votingEndTime = fromJsonTimestamp(object.votingEndTime); - } - else { - message.votingEndTime = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.content !== undefined && - (obj.content = message.content ? Any.toJSON(message.content) : undefined); - message.status !== undefined && - (obj.status = proposalStatusToJSON(message.status)); - message.finalTallyResult !== undefined && - (obj.finalTallyResult = message.finalTallyResult - ? TallyResult.toJSON(message.finalTallyResult) - : undefined); - message.submitTime !== undefined && - (obj.submitTime = - message.submitTime !== undefined - ? message.submitTime.toISOString() - : null); - message.depositEndTime !== undefined && - (obj.depositEndTime = - message.depositEndTime !== undefined - ? message.depositEndTime.toISOString() - : null); - if (message.totalDeposit) { - obj.totalDeposit = message.totalDeposit.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.totalDeposit = []; - } - message.votingStartTime !== undefined && - (obj.votingStartTime = - message.votingStartTime !== undefined - ? message.votingStartTime.toISOString() - : null); - message.votingEndTime !== undefined && - (obj.votingEndTime = - message.votingEndTime !== undefined - ? message.votingEndTime.toISOString() - : null); - return obj; - }, - fromPartial(object) { - const message = { ...baseProposal }; - message.totalDeposit = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromPartial(object.content); - } - else { - message.content = undefined; - } - if (object.status !== undefined && object.status !== null) { - message.status = object.status; - } - else { - message.status = 0; - } - if (object.finalTallyResult !== undefined && - object.finalTallyResult !== null) { - message.finalTallyResult = TallyResult.fromPartial(object.finalTallyResult); - } - else { - message.finalTallyResult = undefined; - } - if (object.submitTime !== undefined && object.submitTime !== null) { - message.submitTime = object.submitTime; - } - else { - message.submitTime = undefined; - } - if (object.depositEndTime !== undefined && object.depositEndTime !== null) { - message.depositEndTime = object.depositEndTime; - } - else { - message.depositEndTime = undefined; - } - if (object.totalDeposit !== undefined && object.totalDeposit !== null) { - for (const e of object.totalDeposit) { - message.totalDeposit.push(Coin.fromPartial(e)); - } - } - if (object.votingStartTime !== undefined && - object.votingStartTime !== null) { - message.votingStartTime = object.votingStartTime; - } - else { - message.votingStartTime = undefined; - } - if (object.votingEndTime !== undefined && object.votingEndTime !== null) { - message.votingEndTime = object.votingEndTime; - } - else { - message.votingEndTime = undefined; - } - return message; - }, -}; -const baseTallyResult = { - yes: "", - abstain: "", - no: "", - noWithVeto: "", -}; -export const TallyResult = { - encode(message, writer = Writer.create()) { - if (message.yes !== "") { - writer.uint32(10).string(message.yes); - } - if (message.abstain !== "") { - writer.uint32(18).string(message.abstain); - } - if (message.no !== "") { - writer.uint32(26).string(message.no); - } - if (message.noWithVeto !== "") { - writer.uint32(34).string(message.noWithVeto); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTallyResult }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.yes = reader.string(); - break; - case 2: - message.abstain = reader.string(); - break; - case 3: - message.no = reader.string(); - break; - case 4: - message.noWithVeto = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTallyResult }; - if (object.yes !== undefined && object.yes !== null) { - message.yes = String(object.yes); - } - else { - message.yes = ""; - } - if (object.abstain !== undefined && object.abstain !== null) { - message.abstain = String(object.abstain); - } - else { - message.abstain = ""; - } - if (object.no !== undefined && object.no !== null) { - message.no = String(object.no); - } - else { - message.no = ""; - } - if (object.noWithVeto !== undefined && object.noWithVeto !== null) { - message.noWithVeto = String(object.noWithVeto); - } - else { - message.noWithVeto = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.yes !== undefined && (obj.yes = message.yes); - message.abstain !== undefined && (obj.abstain = message.abstain); - message.no !== undefined && (obj.no = message.no); - message.noWithVeto !== undefined && (obj.noWithVeto = message.noWithVeto); - return obj; - }, - fromPartial(object) { - const message = { ...baseTallyResult }; - if (object.yes !== undefined && object.yes !== null) { - message.yes = object.yes; - } - else { - message.yes = ""; - } - if (object.abstain !== undefined && object.abstain !== null) { - message.abstain = object.abstain; - } - else { - message.abstain = ""; - } - if (object.no !== undefined && object.no !== null) { - message.no = object.no; - } - else { - message.no = ""; - } - if (object.noWithVeto !== undefined && object.noWithVeto !== null) { - message.noWithVeto = object.noWithVeto; - } - else { - message.noWithVeto = ""; - } - return message; - }, -}; -const baseVote = { proposalId: 0, voter: "", option: 0 }; -export const Vote = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.option !== 0) { - writer.uint32(24).int32(message.option); - } - for (const v of message.options) { - WeightedVoteOption.encode(v, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVote }; - message.options = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = reader.int32(); - break; - case 4: - message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseVote }; - message.options = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } - else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = voteOptionFromJSON(object.option); - } - else { - message.option = 0; - } - if (object.options !== undefined && object.options !== null) { - for (const e of object.options) { - message.options.push(WeightedVoteOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.voter !== undefined && (obj.voter = message.voter); - message.option !== undefined && - (obj.option = voteOptionToJSON(message.option)); - if (message.options) { - obj.options = message.options.map((e) => e ? WeightedVoteOption.toJSON(e) : undefined); - } - else { - obj.options = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseVote }; - message.options = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } - else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = object.option; - } - else { - message.option = 0; - } - if (object.options !== undefined && object.options !== null) { - for (const e of object.options) { - message.options.push(WeightedVoteOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseDepositParams = {}; -export const DepositParams = { - encode(message, writer = Writer.create()) { - for (const v of message.minDeposit) { - Coin.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.maxDepositPeriod !== undefined) { - Duration.encode(message.maxDepositPeriod, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDepositParams }; - message.minDeposit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.minDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.maxDepositPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDepositParams }; - message.minDeposit = []; - if (object.minDeposit !== undefined && object.minDeposit !== null) { - for (const e of object.minDeposit) { - message.minDeposit.push(Coin.fromJSON(e)); - } - } - if (object.maxDepositPeriod !== undefined && - object.maxDepositPeriod !== null) { - message.maxDepositPeriod = Duration.fromJSON(object.maxDepositPeriod); - } - else { - message.maxDepositPeriod = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.minDeposit) { - obj.minDeposit = message.minDeposit.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.minDeposit = []; - } - message.maxDepositPeriod !== undefined && - (obj.maxDepositPeriod = message.maxDepositPeriod - ? Duration.toJSON(message.maxDepositPeriod) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseDepositParams }; - message.minDeposit = []; - if (object.minDeposit !== undefined && object.minDeposit !== null) { - for (const e of object.minDeposit) { - message.minDeposit.push(Coin.fromPartial(e)); - } - } - if (object.maxDepositPeriod !== undefined && - object.maxDepositPeriod !== null) { - message.maxDepositPeriod = Duration.fromPartial(object.maxDepositPeriod); - } - else { - message.maxDepositPeriod = undefined; - } - return message; - }, -}; -const baseVotingParams = {}; -export const VotingParams = { - encode(message, writer = Writer.create()) { - if (message.votingPeriod !== undefined) { - Duration.encode(message.votingPeriod, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVotingParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votingPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseVotingParams }; - if (object.votingPeriod !== undefined && object.votingPeriod !== null) { - message.votingPeriod = Duration.fromJSON(object.votingPeriod); - } - else { - message.votingPeriod = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.votingPeriod !== undefined && - (obj.votingPeriod = message.votingPeriod - ? Duration.toJSON(message.votingPeriod) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseVotingParams }; - if (object.votingPeriod !== undefined && object.votingPeriod !== null) { - message.votingPeriod = Duration.fromPartial(object.votingPeriod); - } - else { - message.votingPeriod = undefined; - } - return message; - }, -}; -const baseTallyParams = {}; -export const TallyParams = { - encode(message, writer = Writer.create()) { - if (message.quorum.length !== 0) { - writer.uint32(10).bytes(message.quorum); - } - if (message.threshold.length !== 0) { - writer.uint32(18).bytes(message.threshold); - } - if (message.vetoThreshold.length !== 0) { - writer.uint32(26).bytes(message.vetoThreshold); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTallyParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quorum = reader.bytes(); - break; - case 2: - message.threshold = reader.bytes(); - break; - case 3: - message.vetoThreshold = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTallyParams }; - if (object.quorum !== undefined && object.quorum !== null) { - message.quorum = bytesFromBase64(object.quorum); - } - if (object.threshold !== undefined && object.threshold !== null) { - message.threshold = bytesFromBase64(object.threshold); - } - if (object.vetoThreshold !== undefined && object.vetoThreshold !== null) { - message.vetoThreshold = bytesFromBase64(object.vetoThreshold); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.quorum !== undefined && - (obj.quorum = base64FromBytes(message.quorum !== undefined ? message.quorum : new Uint8Array())); - message.threshold !== undefined && - (obj.threshold = base64FromBytes(message.threshold !== undefined ? message.threshold : new Uint8Array())); - message.vetoThreshold !== undefined && - (obj.vetoThreshold = base64FromBytes(message.vetoThreshold !== undefined - ? message.vetoThreshold - : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseTallyParams }; - if (object.quorum !== undefined && object.quorum !== null) { - message.quorum = object.quorum; - } - else { - message.quorum = new Uint8Array(); - } - if (object.threshold !== undefined && object.threshold !== null) { - message.threshold = object.threshold; - } - else { - message.threshold = new Uint8Array(); - } - if (object.vetoThreshold !== undefined && object.vetoThreshold !== null) { - message.vetoThreshold = object.vetoThreshold; - } - else { - message.vetoThreshold = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.ts deleted file mode 100644 index 71ffdf31db..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/gov.ts +++ /dev/null @@ -1,1323 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Any } from "../../../google/protobuf/any"; -import { Duration } from "../../../google/protobuf/duration"; - -export const protobufPackage = "cosmos.gov.v1beta1"; - -/** VoteOption enumerates the valid vote options for a given governance proposal. */ -export enum VoteOption { - /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */ - VOTE_OPTION_UNSPECIFIED = 0, - /** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */ - VOTE_OPTION_YES = 1, - /** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */ - VOTE_OPTION_ABSTAIN = 2, - /** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */ - VOTE_OPTION_NO = 3, - /** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */ - VOTE_OPTION_NO_WITH_VETO = 4, - UNRECOGNIZED = -1, -} - -export function voteOptionFromJSON(object: any): VoteOption { - switch (object) { - case 0: - case "VOTE_OPTION_UNSPECIFIED": - return VoteOption.VOTE_OPTION_UNSPECIFIED; - case 1: - case "VOTE_OPTION_YES": - return VoteOption.VOTE_OPTION_YES; - case 2: - case "VOTE_OPTION_ABSTAIN": - return VoteOption.VOTE_OPTION_ABSTAIN; - case 3: - case "VOTE_OPTION_NO": - return VoteOption.VOTE_OPTION_NO; - case 4: - case "VOTE_OPTION_NO_WITH_VETO": - return VoteOption.VOTE_OPTION_NO_WITH_VETO; - case -1: - case "UNRECOGNIZED": - default: - return VoteOption.UNRECOGNIZED; - } -} - -export function voteOptionToJSON(object: VoteOption): string { - switch (object) { - case VoteOption.VOTE_OPTION_UNSPECIFIED: - return "VOTE_OPTION_UNSPECIFIED"; - case VoteOption.VOTE_OPTION_YES: - return "VOTE_OPTION_YES"; - case VoteOption.VOTE_OPTION_ABSTAIN: - return "VOTE_OPTION_ABSTAIN"; - case VoteOption.VOTE_OPTION_NO: - return "VOTE_OPTION_NO"; - case VoteOption.VOTE_OPTION_NO_WITH_VETO: - return "VOTE_OPTION_NO_WITH_VETO"; - default: - return "UNKNOWN"; - } -} - -/** ProposalStatus enumerates the valid statuses of a proposal. */ -export enum ProposalStatus { - /** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. */ - PROPOSAL_STATUS_UNSPECIFIED = 0, - /** - * PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - * period. - */ - PROPOSAL_STATUS_DEPOSIT_PERIOD = 1, - /** - * PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - * period. - */ - PROPOSAL_STATUS_VOTING_PERIOD = 2, - /** - * PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - * passed. - */ - PROPOSAL_STATUS_PASSED = 3, - /** - * PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - * been rejected. - */ - PROPOSAL_STATUS_REJECTED = 4, - /** - * PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - * failed. - */ - PROPOSAL_STATUS_FAILED = 5, - UNRECOGNIZED = -1, -} - -export function proposalStatusFromJSON(object: any): ProposalStatus { - switch (object) { - case 0: - case "PROPOSAL_STATUS_UNSPECIFIED": - return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED; - case 1: - case "PROPOSAL_STATUS_DEPOSIT_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD; - case 2: - case "PROPOSAL_STATUS_VOTING_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD; - case 3: - case "PROPOSAL_STATUS_PASSED": - return ProposalStatus.PROPOSAL_STATUS_PASSED; - case 4: - case "PROPOSAL_STATUS_REJECTED": - return ProposalStatus.PROPOSAL_STATUS_REJECTED; - case 5: - case "PROPOSAL_STATUS_FAILED": - return ProposalStatus.PROPOSAL_STATUS_FAILED; - case -1: - case "UNRECOGNIZED": - default: - return ProposalStatus.UNRECOGNIZED; - } -} - -export function proposalStatusToJSON(object: ProposalStatus): string { - switch (object) { - case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED: - return "PROPOSAL_STATUS_UNSPECIFIED"; - case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD: - return "PROPOSAL_STATUS_DEPOSIT_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD: - return "PROPOSAL_STATUS_VOTING_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_PASSED: - return "PROPOSAL_STATUS_PASSED"; - case ProposalStatus.PROPOSAL_STATUS_REJECTED: - return "PROPOSAL_STATUS_REJECTED"; - case ProposalStatus.PROPOSAL_STATUS_FAILED: - return "PROPOSAL_STATUS_FAILED"; - default: - return "UNKNOWN"; - } -} - -/** - * WeightedVoteOption defines a unit of vote for vote split. - * - * Since: cosmos-sdk 0.43 - */ -export interface WeightedVoteOption { - option: VoteOption; - weight: string; -} - -/** - * TextProposal defines a standard text proposal whose changes need to be - * manually updated in case of approval. - */ -export interface TextProposal { - title: string; - description: string; -} - -/** - * Deposit defines an amount deposited by an account address to an active - * proposal. - */ -export interface Deposit { - proposal_id: number; - depositor: string; - amount: Coin[]; -} - -/** Proposal defines the core field members of a governance proposal. */ -export interface Proposal { - proposal_id: number; - content: Any | undefined; - status: ProposalStatus; - final_tally_result: TallyResult | undefined; - submit_time: Date | undefined; - deposit_end_time: Date | undefined; - total_deposit: Coin[]; - voting_start_time: Date | undefined; - voting_end_time: Date | undefined; -} - -/** TallyResult defines a standard tally for a governance proposal. */ -export interface TallyResult { - yes: string; - abstain: string; - no: string; - no_with_veto: string; -} - -/** - * Vote defines a vote on a governance proposal. - * A Vote consists of a proposal ID, the voter, and the vote option. - */ -export interface Vote { - proposal_id: number; - voter: string; - /** - * 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. - * - * @deprecated - */ - option: VoteOption; - /** Since: cosmos-sdk 0.43 */ - options: WeightedVoteOption[]; -} - -/** DepositParams defines the params for deposits on governance proposals. */ -export interface DepositParams { - /** Minimum deposit for a proposal to enter voting period. */ - min_deposit: Coin[]; - /** - * Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - * months. - */ - max_deposit_period: Duration | undefined; -} - -/** VotingParams defines the params for voting on governance proposals. */ -export interface VotingParams { - /** Length of the voting period. */ - voting_period: Duration | undefined; -} - -/** TallyParams defines the params for tallying votes on governance proposals. */ -export interface TallyParams { - /** - * Minimum percentage of total stake needed to vote for a result to be - * considered valid. - */ - quorum: Uint8Array; - /** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */ - threshold: Uint8Array; - /** - * Minimum value of Veto votes to Total votes ratio for proposal to be - * vetoed. Default value: 1/3. - */ - veto_threshold: Uint8Array; -} - -const baseWeightedVoteOption: object = { option: 0, weight: "" }; - -export const WeightedVoteOption = { - encode( - message: WeightedVoteOption, - writer: Writer = Writer.create() - ): Writer { - if (message.option !== 0) { - writer.uint32(8).int32(message.option); - } - if (message.weight !== "") { - writer.uint32(18).string(message.weight); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): WeightedVoteOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseWeightedVoteOption } as WeightedVoteOption; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.option = reader.int32() as any; - break; - case 2: - message.weight = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): WeightedVoteOption { - const message = { ...baseWeightedVoteOption } as WeightedVoteOption; - if (object.option !== undefined && object.option !== null) { - message.option = voteOptionFromJSON(object.option); - } else { - message.option = 0; - } - if (object.weight !== undefined && object.weight !== null) { - message.weight = String(object.weight); - } else { - message.weight = ""; - } - return message; - }, - - toJSON(message: WeightedVoteOption): unknown { - const obj: any = {}; - message.option !== undefined && - (obj.option = voteOptionToJSON(message.option)); - message.weight !== undefined && (obj.weight = message.weight); - return obj; - }, - - fromPartial(object: DeepPartial): WeightedVoteOption { - const message = { ...baseWeightedVoteOption } as WeightedVoteOption; - if (object.option !== undefined && object.option !== null) { - message.option = object.option; - } else { - message.option = 0; - } - if (object.weight !== undefined && object.weight !== null) { - message.weight = object.weight; - } else { - message.weight = ""; - } - return message; - }, -}; - -const baseTextProposal: object = { title: "", description: "" }; - -export const TextProposal = { - encode(message: TextProposal, writer: Writer = Writer.create()): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TextProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTextProposal } as TextProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TextProposal { - const message = { ...baseTextProposal } as TextProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - return message; - }, - - toJSON(message: TextProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - return obj; - }, - - fromPartial(object: DeepPartial): TextProposal { - const message = { ...baseTextProposal } as TextProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - return message; - }, -}; - -const baseDeposit: object = { proposal_id: 0, depositor: "" }; - -export const Deposit = { - encode(message: Deposit, writer: Writer = Writer.create()): Writer { - if (message.proposal_id !== 0) { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Deposit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDeposit } as Deposit; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Deposit { - const message = { ...baseDeposit } as Deposit; - message.amount = []; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = Number(object.proposal_id); - } else { - message.proposal_id = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Deposit): unknown { - const obj: any = {}; - message.proposal_id !== undefined && - (obj.proposal_id = message.proposal_id); - message.depositor !== undefined && (obj.depositor = message.depositor); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.amount = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Deposit { - const message = { ...baseDeposit } as Deposit; - message.amount = []; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = object.proposal_id; - } else { - message.proposal_id = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseProposal: object = { proposal_id: 0, status: 0 }; - -export const Proposal = { - encode(message: Proposal, writer: Writer = Writer.create()): Writer { - if (message.proposal_id !== 0) { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.content !== undefined) { - Any.encode(message.content, writer.uint32(18).fork()).ldelim(); - } - if (message.status !== 0) { - writer.uint32(24).int32(message.status); - } - if (message.final_tally_result !== undefined) { - TallyResult.encode( - message.final_tally_result, - writer.uint32(34).fork() - ).ldelim(); - } - if (message.submit_time !== undefined) { - Timestamp.encode( - toTimestamp(message.submit_time), - writer.uint32(42).fork() - ).ldelim(); - } - if (message.deposit_end_time !== undefined) { - Timestamp.encode( - toTimestamp(message.deposit_end_time), - writer.uint32(50).fork() - ).ldelim(); - } - for (const v of message.total_deposit) { - Coin.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.voting_start_time !== undefined) { - Timestamp.encode( - toTimestamp(message.voting_start_time), - writer.uint32(66).fork() - ).ldelim(); - } - if (message.voting_end_time !== undefined) { - Timestamp.encode( - toTimestamp(message.voting_end_time), - writer.uint32(74).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Proposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProposal } as Proposal; - message.total_deposit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.content = Any.decode(reader, reader.uint32()); - break; - case 3: - message.status = reader.int32() as any; - break; - case 4: - message.final_tally_result = TallyResult.decode( - reader, - reader.uint32() - ); - break; - case 5: - message.submit_time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 6: - message.deposit_end_time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 7: - message.total_deposit.push(Coin.decode(reader, reader.uint32())); - break; - case 8: - message.voting_start_time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 9: - message.voting_end_time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Proposal { - const message = { ...baseProposal } as Proposal; - message.total_deposit = []; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = Number(object.proposal_id); - } else { - message.proposal_id = 0; - } - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromJSON(object.content); - } else { - message.content = undefined; - } - if (object.status !== undefined && object.status !== null) { - message.status = proposalStatusFromJSON(object.status); - } else { - message.status = 0; - } - if ( - object.final_tally_result !== undefined && - object.final_tally_result !== null - ) { - message.final_tally_result = TallyResult.fromJSON( - object.final_tally_result - ); - } else { - message.final_tally_result = undefined; - } - if (object.submit_time !== undefined && object.submit_time !== null) { - message.submit_time = fromJsonTimestamp(object.submit_time); - } else { - message.submit_time = undefined; - } - if ( - object.deposit_end_time !== undefined && - object.deposit_end_time !== null - ) { - message.deposit_end_time = fromJsonTimestamp(object.deposit_end_time); - } else { - message.deposit_end_time = undefined; - } - if (object.total_deposit !== undefined && object.total_deposit !== null) { - for (const e of object.total_deposit) { - message.total_deposit.push(Coin.fromJSON(e)); - } - } - if ( - object.voting_start_time !== undefined && - object.voting_start_time !== null - ) { - message.voting_start_time = fromJsonTimestamp(object.voting_start_time); - } else { - message.voting_start_time = undefined; - } - if ( - object.voting_end_time !== undefined && - object.voting_end_time !== null - ) { - message.voting_end_time = fromJsonTimestamp(object.voting_end_time); - } else { - message.voting_end_time = undefined; - } - return message; - }, - - toJSON(message: Proposal): unknown { - const obj: any = {}; - message.proposal_id !== undefined && - (obj.proposal_id = message.proposal_id); - message.content !== undefined && - (obj.content = message.content ? Any.toJSON(message.content) : undefined); - message.status !== undefined && - (obj.status = proposalStatusToJSON(message.status)); - message.final_tally_result !== undefined && - (obj.final_tally_result = message.final_tally_result - ? TallyResult.toJSON(message.final_tally_result) - : undefined); - message.submit_time !== undefined && - (obj.submit_time = - message.submit_time !== undefined - ? message.submit_time.toISOString() - : null); - message.deposit_end_time !== undefined && - (obj.deposit_end_time = - message.deposit_end_time !== undefined - ? message.deposit_end_time.toISOString() - : null); - if (message.total_deposit) { - obj.total_deposit = message.total_deposit.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.total_deposit = []; - } - message.voting_start_time !== undefined && - (obj.voting_start_time = - message.voting_start_time !== undefined - ? message.voting_start_time.toISOString() - : null); - message.voting_end_time !== undefined && - (obj.voting_end_time = - message.voting_end_time !== undefined - ? message.voting_end_time.toISOString() - : null); - return obj; - }, - - fromPartial(object: DeepPartial): Proposal { - const message = { ...baseProposal } as Proposal; - message.total_deposit = []; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = object.proposal_id; - } else { - message.proposal_id = 0; - } - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromPartial(object.content); - } else { - message.content = undefined; - } - if (object.status !== undefined && object.status !== null) { - message.status = object.status; - } else { - message.status = 0; - } - if ( - object.final_tally_result !== undefined && - object.final_tally_result !== null - ) { - message.final_tally_result = TallyResult.fromPartial( - object.final_tally_result - ); - } else { - message.final_tally_result = undefined; - } - if (object.submit_time !== undefined && object.submit_time !== null) { - message.submit_time = object.submit_time; - } else { - message.submit_time = undefined; - } - if ( - object.deposit_end_time !== undefined && - object.deposit_end_time !== null - ) { - message.deposit_end_time = object.deposit_end_time; - } else { - message.deposit_end_time = undefined; - } - if (object.total_deposit !== undefined && object.total_deposit !== null) { - for (const e of object.total_deposit) { - message.total_deposit.push(Coin.fromPartial(e)); - } - } - if ( - object.voting_start_time !== undefined && - object.voting_start_time !== null - ) { - message.voting_start_time = object.voting_start_time; - } else { - message.voting_start_time = undefined; - } - if ( - object.voting_end_time !== undefined && - object.voting_end_time !== null - ) { - message.voting_end_time = object.voting_end_time; - } else { - message.voting_end_time = undefined; - } - return message; - }, -}; - -const baseTallyResult: object = { - yes: "", - abstain: "", - no: "", - no_with_veto: "", -}; - -export const TallyResult = { - encode(message: TallyResult, writer: Writer = Writer.create()): Writer { - if (message.yes !== "") { - writer.uint32(10).string(message.yes); - } - if (message.abstain !== "") { - writer.uint32(18).string(message.abstain); - } - if (message.no !== "") { - writer.uint32(26).string(message.no); - } - if (message.no_with_veto !== "") { - writer.uint32(34).string(message.no_with_veto); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TallyResult { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTallyResult } as TallyResult; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.yes = reader.string(); - break; - case 2: - message.abstain = reader.string(); - break; - case 3: - message.no = reader.string(); - break; - case 4: - message.no_with_veto = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TallyResult { - const message = { ...baseTallyResult } as TallyResult; - if (object.yes !== undefined && object.yes !== null) { - message.yes = String(object.yes); - } else { - message.yes = ""; - } - if (object.abstain !== undefined && object.abstain !== null) { - message.abstain = String(object.abstain); - } else { - message.abstain = ""; - } - if (object.no !== undefined && object.no !== null) { - message.no = String(object.no); - } else { - message.no = ""; - } - if (object.no_with_veto !== undefined && object.no_with_veto !== null) { - message.no_with_veto = String(object.no_with_veto); - } else { - message.no_with_veto = ""; - } - return message; - }, - - toJSON(message: TallyResult): unknown { - const obj: any = {}; - message.yes !== undefined && (obj.yes = message.yes); - message.abstain !== undefined && (obj.abstain = message.abstain); - message.no !== undefined && (obj.no = message.no); - message.no_with_veto !== undefined && - (obj.no_with_veto = message.no_with_veto); - return obj; - }, - - fromPartial(object: DeepPartial): TallyResult { - const message = { ...baseTallyResult } as TallyResult; - if (object.yes !== undefined && object.yes !== null) { - message.yes = object.yes; - } else { - message.yes = ""; - } - if (object.abstain !== undefined && object.abstain !== null) { - message.abstain = object.abstain; - } else { - message.abstain = ""; - } - if (object.no !== undefined && object.no !== null) { - message.no = object.no; - } else { - message.no = ""; - } - if (object.no_with_veto !== undefined && object.no_with_veto !== null) { - message.no_with_veto = object.no_with_veto; - } else { - message.no_with_veto = ""; - } - return message; - }, -}; - -const baseVote: object = { proposal_id: 0, voter: "", option: 0 }; - -export const Vote = { - encode(message: Vote, writer: Writer = Writer.create()): Writer { - if (message.proposal_id !== 0) { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.option !== 0) { - writer.uint32(24).int32(message.option); - } - for (const v of message.options) { - WeightedVoteOption.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Vote { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVote } as Vote; - message.options = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = reader.int32() as any; - break; - case 4: - message.options.push( - WeightedVoteOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Vote { - const message = { ...baseVote } as Vote; - message.options = []; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = Number(object.proposal_id); - } else { - message.proposal_id = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = voteOptionFromJSON(object.option); - } else { - message.option = 0; - } - if (object.options !== undefined && object.options !== null) { - for (const e of object.options) { - message.options.push(WeightedVoteOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Vote): unknown { - const obj: any = {}; - message.proposal_id !== undefined && - (obj.proposal_id = message.proposal_id); - message.voter !== undefined && (obj.voter = message.voter); - message.option !== undefined && - (obj.option = voteOptionToJSON(message.option)); - if (message.options) { - obj.options = message.options.map((e) => - e ? WeightedVoteOption.toJSON(e) : undefined - ); - } else { - obj.options = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Vote { - const message = { ...baseVote } as Vote; - message.options = []; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = object.proposal_id; - } else { - message.proposal_id = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = object.option; - } else { - message.option = 0; - } - if (object.options !== undefined && object.options !== null) { - for (const e of object.options) { - message.options.push(WeightedVoteOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseDepositParams: object = {}; - -export const DepositParams = { - encode(message: DepositParams, writer: Writer = Writer.create()): Writer { - for (const v of message.min_deposit) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.max_deposit_period !== undefined) { - Duration.encode( - message.max_deposit_period, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DepositParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDepositParams } as DepositParams; - message.min_deposit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.min_deposit.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.max_deposit_period = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DepositParams { - const message = { ...baseDepositParams } as DepositParams; - message.min_deposit = []; - if (object.min_deposit !== undefined && object.min_deposit !== null) { - for (const e of object.min_deposit) { - message.min_deposit.push(Coin.fromJSON(e)); - } - } - if ( - object.max_deposit_period !== undefined && - object.max_deposit_period !== null - ) { - message.max_deposit_period = Duration.fromJSON(object.max_deposit_period); - } else { - message.max_deposit_period = undefined; - } - return message; - }, - - toJSON(message: DepositParams): unknown { - const obj: any = {}; - if (message.min_deposit) { - obj.min_deposit = message.min_deposit.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.min_deposit = []; - } - message.max_deposit_period !== undefined && - (obj.max_deposit_period = message.max_deposit_period - ? Duration.toJSON(message.max_deposit_period) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): DepositParams { - const message = { ...baseDepositParams } as DepositParams; - message.min_deposit = []; - if (object.min_deposit !== undefined && object.min_deposit !== null) { - for (const e of object.min_deposit) { - message.min_deposit.push(Coin.fromPartial(e)); - } - } - if ( - object.max_deposit_period !== undefined && - object.max_deposit_period !== null - ) { - message.max_deposit_period = Duration.fromPartial( - object.max_deposit_period - ); - } else { - message.max_deposit_period = undefined; - } - return message; - }, -}; - -const baseVotingParams: object = {}; - -export const VotingParams = { - encode(message: VotingParams, writer: Writer = Writer.create()): Writer { - if (message.voting_period !== undefined) { - Duration.encode(message.voting_period, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): VotingParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVotingParams } as VotingParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.voting_period = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): VotingParams { - const message = { ...baseVotingParams } as VotingParams; - if (object.voting_period !== undefined && object.voting_period !== null) { - message.voting_period = Duration.fromJSON(object.voting_period); - } else { - message.voting_period = undefined; - } - return message; - }, - - toJSON(message: VotingParams): unknown { - const obj: any = {}; - message.voting_period !== undefined && - (obj.voting_period = message.voting_period - ? Duration.toJSON(message.voting_period) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): VotingParams { - const message = { ...baseVotingParams } as VotingParams; - if (object.voting_period !== undefined && object.voting_period !== null) { - message.voting_period = Duration.fromPartial(object.voting_period); - } else { - message.voting_period = undefined; - } - return message; - }, -}; - -const baseTallyParams: object = {}; - -export const TallyParams = { - encode(message: TallyParams, writer: Writer = Writer.create()): Writer { - if (message.quorum.length !== 0) { - writer.uint32(10).bytes(message.quorum); - } - if (message.threshold.length !== 0) { - writer.uint32(18).bytes(message.threshold); - } - if (message.veto_threshold.length !== 0) { - writer.uint32(26).bytes(message.veto_threshold); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TallyParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTallyParams } as TallyParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quorum = reader.bytes(); - break; - case 2: - message.threshold = reader.bytes(); - break; - case 3: - message.veto_threshold = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TallyParams { - const message = { ...baseTallyParams } as TallyParams; - if (object.quorum !== undefined && object.quorum !== null) { - message.quorum = bytesFromBase64(object.quorum); - } - if (object.threshold !== undefined && object.threshold !== null) { - message.threshold = bytesFromBase64(object.threshold); - } - if (object.veto_threshold !== undefined && object.veto_threshold !== null) { - message.veto_threshold = bytesFromBase64(object.veto_threshold); - } - return message; - }, - - toJSON(message: TallyParams): unknown { - const obj: any = {}; - message.quorum !== undefined && - (obj.quorum = base64FromBytes( - message.quorum !== undefined ? message.quorum : new Uint8Array() - )); - message.threshold !== undefined && - (obj.threshold = base64FromBytes( - message.threshold !== undefined ? message.threshold : new Uint8Array() - )); - message.veto_threshold !== undefined && - (obj.veto_threshold = base64FromBytes( - message.veto_threshold !== undefined - ? message.veto_threshold - : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): TallyParams { - const message = { ...baseTallyParams } as TallyParams; - if (object.quorum !== undefined && object.quorum !== null) { - message.quorum = object.quorum; - } else { - message.quorum = new Uint8Array(); - } - if (object.threshold !== undefined && object.threshold !== null) { - message.threshold = object.threshold; - } else { - message.threshold = new Uint8Array(); - } - if (object.veto_threshold !== undefined && object.veto_threshold !== null) { - message.veto_threshold = object.veto_threshold; - } else { - message.veto_threshold = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.d.ts deleted file mode 100644 index fc28e14c3a..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.d.ts +++ /dev/null @@ -1,262 +0,0 @@ -import { ProposalStatus, Proposal, Vote, VotingParams, DepositParams, TallyParams, Deposit, TallyResult } from "../../../cosmos/gov/v1beta1/gov"; -import { Reader, Writer } from "protobufjs/minimal"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -export declare const protobufPackage = "cosmos.gov.v1beta1"; -/** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ -export interface QueryProposalRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; -} -/** QueryProposalResponse is the response type for the Query/Proposal RPC method. */ -export interface QueryProposalResponse { - proposal: Proposal | undefined; -} -/** QueryProposalsRequest is the request type for the Query/Proposals RPC method. */ -export interface QueryProposalsRequest { - /** proposal_status defines the status of the proposals. */ - proposalStatus: ProposalStatus; - /** voter defines the voter address for the proposals. */ - voter: string; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryProposalsResponse is the response type for the Query/Proposals RPC - * method. - */ -export interface QueryProposalsResponse { - proposals: Proposal[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** QueryVoteRequest is the request type for the Query/Vote RPC method. */ -export interface QueryVoteRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; - /** voter defines the oter address for the proposals. */ - voter: string; -} -/** QueryVoteResponse is the response type for the Query/Vote RPC method. */ -export interface QueryVoteResponse { - /** vote defined the queried vote. */ - vote: Vote | undefined; -} -/** QueryVotesRequest is the request type for the Query/Votes RPC method. */ -export interface QueryVotesRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** QueryVotesResponse is the response type for the Query/Votes RPC method. */ -export interface QueryVotesResponse { - /** votes defined the queried votes. */ - votes: Vote[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { - /** - * params_type defines which parameters to query for, can be one of "voting", - * "tallying" or "deposit". - */ - paramsType: string; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** voting_params defines the parameters related to voting. */ - votingParams: VotingParams | undefined; - /** deposit_params defines the parameters related to deposit. */ - depositParams: DepositParams | undefined; - /** tally_params defines the parameters related to tally. */ - tallyParams: TallyParams | undefined; -} -/** QueryDepositRequest is the request type for the Query/Deposit RPC method. */ -export interface QueryDepositRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; -} -/** QueryDepositResponse is the response type for the Query/Deposit RPC method. */ -export interface QueryDepositResponse { - /** deposit defines the requested deposit. */ - deposit: Deposit | undefined; -} -/** QueryDepositsRequest is the request type for the Query/Deposits RPC method. */ -export interface QueryDepositsRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** QueryDepositsResponse is the response type for the Query/Deposits RPC method. */ -export interface QueryDepositsResponse { - deposits: Deposit[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** QueryTallyResultRequest is the request type for the Query/Tally RPC method. */ -export interface QueryTallyResultRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: number; -} -/** QueryTallyResultResponse is the response type for the Query/Tally RPC method. */ -export interface QueryTallyResultResponse { - /** tally defines the requested tally. */ - tally: TallyResult | undefined; -} -export declare const QueryProposalRequest: { - encode(message: QueryProposalRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryProposalRequest; - fromJSON(object: any): QueryProposalRequest; - toJSON(message: QueryProposalRequest): unknown; - fromPartial(object: DeepPartial): QueryProposalRequest; -}; -export declare const QueryProposalResponse: { - encode(message: QueryProposalResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryProposalResponse; - fromJSON(object: any): QueryProposalResponse; - toJSON(message: QueryProposalResponse): unknown; - fromPartial(object: DeepPartial): QueryProposalResponse; -}; -export declare const QueryProposalsRequest: { - encode(message: QueryProposalsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryProposalsRequest; - fromJSON(object: any): QueryProposalsRequest; - toJSON(message: QueryProposalsRequest): unknown; - fromPartial(object: DeepPartial): QueryProposalsRequest; -}; -export declare const QueryProposalsResponse: { - encode(message: QueryProposalsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryProposalsResponse; - fromJSON(object: any): QueryProposalsResponse; - toJSON(message: QueryProposalsResponse): unknown; - fromPartial(object: DeepPartial): QueryProposalsResponse; -}; -export declare const QueryVoteRequest: { - encode(message: QueryVoteRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryVoteRequest; - fromJSON(object: any): QueryVoteRequest; - toJSON(message: QueryVoteRequest): unknown; - fromPartial(object: DeepPartial): QueryVoteRequest; -}; -export declare const QueryVoteResponse: { - encode(message: QueryVoteResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryVoteResponse; - fromJSON(object: any): QueryVoteResponse; - toJSON(message: QueryVoteResponse): unknown; - fromPartial(object: DeepPartial): QueryVoteResponse; -}; -export declare const QueryVotesRequest: { - encode(message: QueryVotesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryVotesRequest; - fromJSON(object: any): QueryVotesRequest; - toJSON(message: QueryVotesRequest): unknown; - fromPartial(object: DeepPartial): QueryVotesRequest; -}; -export declare const QueryVotesResponse: { - encode(message: QueryVotesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryVotesResponse; - fromJSON(object: any): QueryVotesResponse; - toJSON(message: QueryVotesResponse): unknown; - fromPartial(object: DeepPartial): QueryVotesResponse; -}; -export declare const QueryParamsRequest: { - encode(message: QueryParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest; - fromJSON(object: any): QueryParamsRequest; - toJSON(message: QueryParamsRequest): unknown; - fromPartial(object: DeepPartial): QueryParamsRequest; -}; -export declare const QueryParamsResponse: { - encode(message: QueryParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse; - fromJSON(object: any): QueryParamsResponse; - toJSON(message: QueryParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryParamsResponse; -}; -export declare const QueryDepositRequest: { - encode(message: QueryDepositRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDepositRequest; - fromJSON(object: any): QueryDepositRequest; - toJSON(message: QueryDepositRequest): unknown; - fromPartial(object: DeepPartial): QueryDepositRequest; -}; -export declare const QueryDepositResponse: { - encode(message: QueryDepositResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDepositResponse; - fromJSON(object: any): QueryDepositResponse; - toJSON(message: QueryDepositResponse): unknown; - fromPartial(object: DeepPartial): QueryDepositResponse; -}; -export declare const QueryDepositsRequest: { - encode(message: QueryDepositsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDepositsRequest; - fromJSON(object: any): QueryDepositsRequest; - toJSON(message: QueryDepositsRequest): unknown; - fromPartial(object: DeepPartial): QueryDepositsRequest; -}; -export declare const QueryDepositsResponse: { - encode(message: QueryDepositsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDepositsResponse; - fromJSON(object: any): QueryDepositsResponse; - toJSON(message: QueryDepositsResponse): unknown; - fromPartial(object: DeepPartial): QueryDepositsResponse; -}; -export declare const QueryTallyResultRequest: { - encode(message: QueryTallyResultRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryTallyResultRequest; - fromJSON(object: any): QueryTallyResultRequest; - toJSON(message: QueryTallyResultRequest): unknown; - fromPartial(object: DeepPartial): QueryTallyResultRequest; -}; -export declare const QueryTallyResultResponse: { - encode(message: QueryTallyResultResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryTallyResultResponse; - fromJSON(object: any): QueryTallyResultResponse; - toJSON(message: QueryTallyResultResponse): unknown; - fromPartial(object: DeepPartial): QueryTallyResultResponse; -}; -/** Query defines the gRPC querier service for gov module */ -export interface Query { - /** Proposal queries proposal details based on ProposalID. */ - Proposal(request: QueryProposalRequest): Promise; - /** Proposals queries all proposals based on given status. */ - Proposals(request: QueryProposalsRequest): Promise; - /** Vote queries voted information based on proposalID, voterAddr. */ - Vote(request: QueryVoteRequest): Promise; - /** Votes queries votes of a given proposal. */ - Votes(request: QueryVotesRequest): Promise; - /** Params queries all parameters of the gov module. */ - Params(request: QueryParamsRequest): Promise; - /** Deposit queries single deposit information based proposalID, depositAddr. */ - Deposit(request: QueryDepositRequest): Promise; - /** Deposits queries all deposits of a single proposal. */ - Deposits(request: QueryDepositsRequest): Promise; - /** TallyResult queries the tally of a proposal vote. */ - TallyResult(request: QueryTallyResultRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Proposal(request: QueryProposalRequest): Promise; - Proposals(request: QueryProposalsRequest): Promise; - Vote(request: QueryVoteRequest): Promise; - Votes(request: QueryVotesRequest): Promise; - Params(request: QueryParamsRequest): Promise; - Deposit(request: QueryDepositRequest): Promise; - Deposits(request: QueryDepositsRequest): Promise; - TallyResult(request: QueryTallyResultRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.js deleted file mode 100644 index d216a23882..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.js +++ /dev/null @@ -1,1188 +0,0 @@ -/* eslint-disable */ -import { Proposal, Vote, VotingParams, DepositParams, TallyParams, Deposit, TallyResult, proposalStatusFromJSON, proposalStatusToJSON, } from "../../../cosmos/gov/v1beta1/gov"; -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { PageRequest, PageResponse, } from "../../../cosmos/base/query/v1beta1/pagination"; -export const protobufPackage = "cosmos.gov.v1beta1"; -const baseQueryProposalRequest = { proposalId: 0 }; -export const QueryProposalRequest = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryProposalRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryProposalRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - return message; - }, -}; -const baseQueryProposalResponse = {}; -export const QueryProposalResponse = { - encode(message, writer = Writer.create()) { - if (message.proposal !== undefined) { - Proposal.encode(message.proposal, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal = Proposal.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryProposalResponse }; - if (object.proposal !== undefined && object.proposal !== null) { - message.proposal = Proposal.fromJSON(object.proposal); - } - else { - message.proposal = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposal !== undefined && - (obj.proposal = message.proposal - ? Proposal.toJSON(message.proposal) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryProposalResponse }; - if (object.proposal !== undefined && object.proposal !== null) { - message.proposal = Proposal.fromPartial(object.proposal); - } - else { - message.proposal = undefined; - } - return message; - }, -}; -const baseQueryProposalsRequest = { - proposalStatus: 0, - voter: "", - depositor: "", -}; -export const QueryProposalsRequest = { - encode(message, writer = Writer.create()) { - if (message.proposalStatus !== 0) { - writer.uint32(8).int32(message.proposalStatus); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.depositor !== "") { - writer.uint32(26).string(message.depositor); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalStatus = reader.int32(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.depositor = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryProposalsRequest }; - if (object.proposalStatus !== undefined && object.proposalStatus !== null) { - message.proposalStatus = proposalStatusFromJSON(object.proposalStatus); - } - else { - message.proposalStatus = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } - else { - message.voter = ""; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } - else { - message.depositor = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalStatus !== undefined && - (obj.proposalStatus = proposalStatusToJSON(message.proposalStatus)); - message.voter !== undefined && (obj.voter = message.voter); - message.depositor !== undefined && (obj.depositor = message.depositor); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryProposalsRequest }; - if (object.proposalStatus !== undefined && object.proposalStatus !== null) { - message.proposalStatus = object.proposalStatus; - } - else { - message.proposalStatus = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } - else { - message.voter = ""; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } - else { - message.depositor = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryProposalsResponse = {}; -export const QueryProposalsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.proposals) { - Proposal.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalsResponse }; - message.proposals = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposals.push(Proposal.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryProposalsResponse }; - message.proposals = []; - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.proposals) { - obj.proposals = message.proposals.map((e) => e ? Proposal.toJSON(e) : undefined); - } - else { - obj.proposals = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryProposalsResponse }; - message.proposals = []; - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryVoteRequest = { proposalId: 0, voter: "" }; -export const QueryVoteRequest = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVoteRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.voter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryVoteRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } - else { - message.voter = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.voter !== undefined && (obj.voter = message.voter); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryVoteRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } - else { - message.voter = ""; - } - return message; - }, -}; -const baseQueryVoteResponse = {}; -export const QueryVoteResponse = { - encode(message, writer = Writer.create()) { - if (message.vote !== undefined) { - Vote.encode(message.vote, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVoteResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.vote = Vote.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryVoteResponse }; - if (object.vote !== undefined && object.vote !== null) { - message.vote = Vote.fromJSON(object.vote); - } - else { - message.vote = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.vote !== undefined && - (obj.vote = message.vote ? Vote.toJSON(message.vote) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryVoteResponse }; - if (object.vote !== undefined && object.vote !== null) { - message.vote = Vote.fromPartial(object.vote); - } - else { - message.vote = undefined; - } - return message; - }, -}; -const baseQueryVotesRequest = { proposalId: 0 }; -export const QueryVotesRequest = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVotesRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryVotesRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryVotesRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryVotesResponse = {}; -export const QueryVotesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.votes) { - Vote.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVotesResponse }; - message.votes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryVotesResponse }; - message.votes = []; - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.votes) { - obj.votes = message.votes.map((e) => (e ? Vote.toJSON(e) : undefined)); - } - else { - obj.votes = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryVotesResponse }; - message.votes = []; - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryParamsRequest = { paramsType: "" }; -export const QueryParamsRequest = { - encode(message, writer = Writer.create()) { - if (message.paramsType !== "") { - writer.uint32(10).string(message.paramsType); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.paramsType = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsRequest }; - if (object.paramsType !== undefined && object.paramsType !== null) { - message.paramsType = String(object.paramsType); - } - else { - message.paramsType = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.paramsType !== undefined && (obj.paramsType = message.paramsType); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsRequest }; - if (object.paramsType !== undefined && object.paramsType !== null) { - message.paramsType = object.paramsType; - } - else { - message.paramsType = ""; - } - return message; - }, -}; -const baseQueryParamsResponse = {}; -export const QueryParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.votingParams !== undefined) { - VotingParams.encode(message.votingParams, writer.uint32(10).fork()).ldelim(); - } - if (message.depositParams !== undefined) { - DepositParams.encode(message.depositParams, writer.uint32(18).fork()).ldelim(); - } - if (message.tallyParams !== undefined) { - TallyParams.encode(message.tallyParams, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votingParams = VotingParams.decode(reader, reader.uint32()); - break; - case 2: - message.depositParams = DepositParams.decode(reader, reader.uint32()); - break; - case 3: - message.tallyParams = TallyParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsResponse }; - if (object.votingParams !== undefined && object.votingParams !== null) { - message.votingParams = VotingParams.fromJSON(object.votingParams); - } - else { - message.votingParams = undefined; - } - if (object.depositParams !== undefined && object.depositParams !== null) { - message.depositParams = DepositParams.fromJSON(object.depositParams); - } - else { - message.depositParams = undefined; - } - if (object.tallyParams !== undefined && object.tallyParams !== null) { - message.tallyParams = TallyParams.fromJSON(object.tallyParams); - } - else { - message.tallyParams = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.votingParams !== undefined && - (obj.votingParams = message.votingParams - ? VotingParams.toJSON(message.votingParams) - : undefined); - message.depositParams !== undefined && - (obj.depositParams = message.depositParams - ? DepositParams.toJSON(message.depositParams) - : undefined); - message.tallyParams !== undefined && - (obj.tallyParams = message.tallyParams - ? TallyParams.toJSON(message.tallyParams) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsResponse }; - if (object.votingParams !== undefined && object.votingParams !== null) { - message.votingParams = VotingParams.fromPartial(object.votingParams); - } - else { - message.votingParams = undefined; - } - if (object.depositParams !== undefined && object.depositParams !== null) { - message.depositParams = DepositParams.fromPartial(object.depositParams); - } - else { - message.depositParams = undefined; - } - if (object.tallyParams !== undefined && object.tallyParams !== null) { - message.tallyParams = TallyParams.fromPartial(object.tallyParams); - } - else { - message.tallyParams = undefined; - } - return message; - }, -}; -const baseQueryDepositRequest = { proposalId: 0, depositor: "" }; -export const QueryDepositRequest = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.depositor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryDepositRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } - else { - message.depositor = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.depositor !== undefined && (obj.depositor = message.depositor); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryDepositRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } - else { - message.depositor = ""; - } - return message; - }, -}; -const baseQueryDepositResponse = {}; -export const QueryDepositResponse = { - encode(message, writer = Writer.create()) { - if (message.deposit !== undefined) { - Deposit.encode(message.deposit, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deposit = Deposit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryDepositResponse }; - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = Deposit.fromJSON(object.deposit); - } - else { - message.deposit = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deposit !== undefined && - (obj.deposit = message.deposit - ? Deposit.toJSON(message.deposit) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryDepositResponse }; - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = Deposit.fromPartial(object.deposit); - } - else { - message.deposit = undefined; - } - return message; - }, -}; -const baseQueryDepositsRequest = { proposalId: 0 }; -export const QueryDepositsRequest = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryDepositsRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryDepositsRequest }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDepositsResponse = {}; -export const QueryDepositsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.deposits) { - Deposit.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositsResponse }; - message.deposits = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deposits.push(Deposit.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryDepositsResponse }; - message.deposits = []; - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.deposits) { - obj.deposits = message.deposits.map((e) => e ? Deposit.toJSON(e) : undefined); - } - else { - obj.deposits = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryDepositsResponse }; - message.deposits = []; - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryTallyResultRequest = { proposalId: 0 }; -export const QueryTallyResultRequest = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTallyResultRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryTallyResultRequest, - }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryTallyResultRequest, - }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - return message; - }, -}; -const baseQueryTallyResultResponse = {}; -export const QueryTallyResultResponse = { - encode(message, writer = Writer.create()) { - if (message.tally !== undefined) { - TallyResult.encode(message.tally, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTallyResultResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tally = TallyResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryTallyResultResponse, - }; - if (object.tally !== undefined && object.tally !== null) { - message.tally = TallyResult.fromJSON(object.tally); - } - else { - message.tally = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.tally !== undefined && - (obj.tally = message.tally - ? TallyResult.toJSON(message.tally) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryTallyResultResponse, - }; - if (object.tally !== undefined && object.tally !== null) { - message.tally = TallyResult.fromPartial(object.tally); - } - else { - message.tally = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Proposal(request) { - const data = QueryProposalRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Proposal", data); - return promise.then((data) => QueryProposalResponse.decode(new Reader(data))); - } - Proposals(request) { - const data = QueryProposalsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Proposals", data); - return promise.then((data) => QueryProposalsResponse.decode(new Reader(data))); - } - Vote(request) { - const data = QueryVoteRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Vote", data); - return promise.then((data) => QueryVoteResponse.decode(new Reader(data))); - } - Votes(request) { - const data = QueryVotesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Votes", data); - return promise.then((data) => QueryVotesResponse.decode(new Reader(data))); - } - Params(request) { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - Deposit(request) { - const data = QueryDepositRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Deposit", data); - return promise.then((data) => QueryDepositResponse.decode(new Reader(data))); - } - Deposits(request) { - const data = QueryDepositsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Deposits", data); - return promise.then((data) => QueryDepositsResponse.decode(new Reader(data))); - } - TallyResult(request) { - const data = QueryTallyResultRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "TallyResult", data); - return promise.then((data) => QueryTallyResultResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.ts deleted file mode 100644 index a00320a23a..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/query.ts +++ /dev/null @@ -1,1548 +0,0 @@ -/* eslint-disable */ -import { - ProposalStatus, - Proposal, - Vote, - VotingParams, - DepositParams, - TallyParams, - Deposit, - TallyResult, - proposalStatusFromJSON, - proposalStatusToJSON, -} from "../../../cosmos/gov/v1beta1/gov"; -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; - -export const protobufPackage = "cosmos.gov.v1beta1"; - -/** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ -export interface QueryProposalRequest { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: number; -} - -/** QueryProposalResponse is the response type for the Query/Proposal RPC method. */ -export interface QueryProposalResponse { - proposal: Proposal | undefined; -} - -/** QueryProposalsRequest is the request type for the Query/Proposals RPC method. */ -export interface QueryProposalsRequest { - /** proposal_status defines the status of the proposals. */ - proposal_status: ProposalStatus; - /** voter defines the voter address for the proposals. */ - voter: string; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryProposalsResponse is the response type for the Query/Proposals RPC - * method. - */ -export interface QueryProposalsResponse { - proposals: Proposal[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryVoteRequest is the request type for the Query/Vote RPC method. */ -export interface QueryVoteRequest { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: number; - /** voter defines the oter address for the proposals. */ - voter: string; -} - -/** QueryVoteResponse is the response type for the Query/Vote RPC method. */ -export interface QueryVoteResponse { - /** vote defined the queried vote. */ - vote: Vote | undefined; -} - -/** QueryVotesRequest is the request type for the Query/Votes RPC method. */ -export interface QueryVotesRequest { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: number; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** QueryVotesResponse is the response type for the Query/Votes RPC method. */ -export interface QueryVotesResponse { - /** votes defined the queried votes. */ - votes: Vote[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { - /** - * params_type defines which parameters to query for, can be one of "voting", - * "tallying" or "deposit". - */ - params_type: string; -} - -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** voting_params defines the parameters related to voting. */ - voting_params: VotingParams | undefined; - /** deposit_params defines the parameters related to deposit. */ - deposit_params: DepositParams | undefined; - /** tally_params defines the parameters related to tally. */ - tally_params: TallyParams | undefined; -} - -/** QueryDepositRequest is the request type for the Query/Deposit RPC method. */ -export interface QueryDepositRequest { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: number; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; -} - -/** QueryDepositResponse is the response type for the Query/Deposit RPC method. */ -export interface QueryDepositResponse { - /** deposit defines the requested deposit. */ - deposit: Deposit | undefined; -} - -/** QueryDepositsRequest is the request type for the Query/Deposits RPC method. */ -export interface QueryDepositsRequest { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: number; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** QueryDepositsResponse is the response type for the Query/Deposits RPC method. */ -export interface QueryDepositsResponse { - deposits: Deposit[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryTallyResultRequest is the request type for the Query/Tally RPC method. */ -export interface QueryTallyResultRequest { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: number; -} - -/** QueryTallyResultResponse is the response type for the Query/Tally RPC method. */ -export interface QueryTallyResultResponse { - /** tally defines the requested tally. */ - tally: TallyResult | undefined; -} - -const baseQueryProposalRequest: object = { proposal_id: 0 }; - -export const QueryProposalRequest = { - encode( - message: QueryProposalRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.proposal_id !== 0) { - writer.uint32(8).uint64(message.proposal_id); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryProposalRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalRequest } as QueryProposalRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryProposalRequest { - const message = { ...baseQueryProposalRequest } as QueryProposalRequest; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = Number(object.proposal_id); - } else { - message.proposal_id = 0; - } - return message; - }, - - toJSON(message: QueryProposalRequest): unknown { - const obj: any = {}; - message.proposal_id !== undefined && - (obj.proposal_id = message.proposal_id); - return obj; - }, - - fromPartial(object: DeepPartial): QueryProposalRequest { - const message = { ...baseQueryProposalRequest } as QueryProposalRequest; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = object.proposal_id; - } else { - message.proposal_id = 0; - } - return message; - }, -}; - -const baseQueryProposalResponse: object = {}; - -export const QueryProposalResponse = { - encode( - message: QueryProposalResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.proposal !== undefined) { - Proposal.encode(message.proposal, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryProposalResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalResponse } as QueryProposalResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal = Proposal.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryProposalResponse { - const message = { ...baseQueryProposalResponse } as QueryProposalResponse; - if (object.proposal !== undefined && object.proposal !== null) { - message.proposal = Proposal.fromJSON(object.proposal); - } else { - message.proposal = undefined; - } - return message; - }, - - toJSON(message: QueryProposalResponse): unknown { - const obj: any = {}; - message.proposal !== undefined && - (obj.proposal = message.proposal - ? Proposal.toJSON(message.proposal) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryProposalResponse { - const message = { ...baseQueryProposalResponse } as QueryProposalResponse; - if (object.proposal !== undefined && object.proposal !== null) { - message.proposal = Proposal.fromPartial(object.proposal); - } else { - message.proposal = undefined; - } - return message; - }, -}; - -const baseQueryProposalsRequest: object = { - proposal_status: 0, - voter: "", - depositor: "", -}; - -export const QueryProposalsRequest = { - encode( - message: QueryProposalsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.proposal_status !== 0) { - writer.uint32(8).int32(message.proposal_status); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.depositor !== "") { - writer.uint32(26).string(message.depositor); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryProposalsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalsRequest } as QueryProposalsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_status = reader.int32() as any; - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.depositor = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryProposalsRequest { - const message = { ...baseQueryProposalsRequest } as QueryProposalsRequest; - if ( - object.proposal_status !== undefined && - object.proposal_status !== null - ) { - message.proposal_status = proposalStatusFromJSON(object.proposal_status); - } else { - message.proposal_status = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } else { - message.voter = ""; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } else { - message.depositor = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryProposalsRequest): unknown { - const obj: any = {}; - message.proposal_status !== undefined && - (obj.proposal_status = proposalStatusToJSON(message.proposal_status)); - message.voter !== undefined && (obj.voter = message.voter); - message.depositor !== undefined && (obj.depositor = message.depositor); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryProposalsRequest { - const message = { ...baseQueryProposalsRequest } as QueryProposalsRequest; - if ( - object.proposal_status !== undefined && - object.proposal_status !== null - ) { - message.proposal_status = object.proposal_status; - } else { - message.proposal_status = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } else { - message.voter = ""; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } else { - message.depositor = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryProposalsResponse: object = {}; - -export const QueryProposalsResponse = { - encode( - message: QueryProposalsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.proposals) { - Proposal.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryProposalsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryProposalsResponse } as QueryProposalsResponse; - message.proposals = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposals.push(Proposal.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryProposalsResponse { - const message = { ...baseQueryProposalsResponse } as QueryProposalsResponse; - message.proposals = []; - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryProposalsResponse): unknown { - const obj: any = {}; - if (message.proposals) { - obj.proposals = message.proposals.map((e) => - e ? Proposal.toJSON(e) : undefined - ); - } else { - obj.proposals = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryProposalsResponse { - const message = { ...baseQueryProposalsResponse } as QueryProposalsResponse; - message.proposals = []; - if (object.proposals !== undefined && object.proposals !== null) { - for (const e of object.proposals) { - message.proposals.push(Proposal.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryVoteRequest: object = { proposal_id: 0, voter: "" }; - -export const QueryVoteRequest = { - encode(message: QueryVoteRequest, writer: Writer = Writer.create()): Writer { - if (message.proposal_id !== 0) { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryVoteRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVoteRequest } as QueryVoteRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.voter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryVoteRequest { - const message = { ...baseQueryVoteRequest } as QueryVoteRequest; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = Number(object.proposal_id); - } else { - message.proposal_id = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } else { - message.voter = ""; - } - return message; - }, - - toJSON(message: QueryVoteRequest): unknown { - const obj: any = {}; - message.proposal_id !== undefined && - (obj.proposal_id = message.proposal_id); - message.voter !== undefined && (obj.voter = message.voter); - return obj; - }, - - fromPartial(object: DeepPartial): QueryVoteRequest { - const message = { ...baseQueryVoteRequest } as QueryVoteRequest; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = object.proposal_id; - } else { - message.proposal_id = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } else { - message.voter = ""; - } - return message; - }, -}; - -const baseQueryVoteResponse: object = {}; - -export const QueryVoteResponse = { - encode(message: QueryVoteResponse, writer: Writer = Writer.create()): Writer { - if (message.vote !== undefined) { - Vote.encode(message.vote, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryVoteResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVoteResponse } as QueryVoteResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.vote = Vote.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryVoteResponse { - const message = { ...baseQueryVoteResponse } as QueryVoteResponse; - if (object.vote !== undefined && object.vote !== null) { - message.vote = Vote.fromJSON(object.vote); - } else { - message.vote = undefined; - } - return message; - }, - - toJSON(message: QueryVoteResponse): unknown { - const obj: any = {}; - message.vote !== undefined && - (obj.vote = message.vote ? Vote.toJSON(message.vote) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryVoteResponse { - const message = { ...baseQueryVoteResponse } as QueryVoteResponse; - if (object.vote !== undefined && object.vote !== null) { - message.vote = Vote.fromPartial(object.vote); - } else { - message.vote = undefined; - } - return message; - }, -}; - -const baseQueryVotesRequest: object = { proposal_id: 0 }; - -export const QueryVotesRequest = { - encode(message: QueryVotesRequest, writer: Writer = Writer.create()): Writer { - if (message.proposal_id !== 0) { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryVotesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVotesRequest } as QueryVotesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryVotesRequest { - const message = { ...baseQueryVotesRequest } as QueryVotesRequest; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = Number(object.proposal_id); - } else { - message.proposal_id = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryVotesRequest): unknown { - const obj: any = {}; - message.proposal_id !== undefined && - (obj.proposal_id = message.proposal_id); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryVotesRequest { - const message = { ...baseQueryVotesRequest } as QueryVotesRequest; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = object.proposal_id; - } else { - message.proposal_id = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryVotesResponse: object = {}; - -export const QueryVotesResponse = { - encode( - message: QueryVotesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.votes) { - Vote.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryVotesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryVotesResponse } as QueryVotesResponse; - message.votes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryVotesResponse { - const message = { ...baseQueryVotesResponse } as QueryVotesResponse; - message.votes = []; - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryVotesResponse): unknown { - const obj: any = {}; - if (message.votes) { - obj.votes = message.votes.map((e) => (e ? Vote.toJSON(e) : undefined)); - } else { - obj.votes = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryVotesResponse { - const message = { ...baseQueryVotesResponse } as QueryVotesResponse; - message.votes = []; - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(Vote.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryParamsRequest: object = { params_type: "" }; - -export const QueryParamsRequest = { - encode( - message: QueryParamsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.params_type !== "") { - writer.uint32(10).string(message.params_type); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params_type = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - if (object.params_type !== undefined && object.params_type !== null) { - message.params_type = String(object.params_type); - } else { - message.params_type = ""; - } - return message; - }, - - toJSON(message: QueryParamsRequest): unknown { - const obj: any = {}; - message.params_type !== undefined && - (obj.params_type = message.params_type); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - if (object.params_type !== undefined && object.params_type !== null) { - message.params_type = object.params_type; - } else { - message.params_type = ""; - } - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.voting_params !== undefined) { - VotingParams.encode( - message.voting_params, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.deposit_params !== undefined) { - DepositParams.encode( - message.deposit_params, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.tally_params !== undefined) { - TallyParams.encode( - message.tally_params, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.voting_params = VotingParams.decode(reader, reader.uint32()); - break; - case 2: - message.deposit_params = DepositParams.decode( - reader, - reader.uint32() - ); - break; - case 3: - message.tally_params = TallyParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.voting_params !== undefined && object.voting_params !== null) { - message.voting_params = VotingParams.fromJSON(object.voting_params); - } else { - message.voting_params = undefined; - } - if (object.deposit_params !== undefined && object.deposit_params !== null) { - message.deposit_params = DepositParams.fromJSON(object.deposit_params); - } else { - message.deposit_params = undefined; - } - if (object.tally_params !== undefined && object.tally_params !== null) { - message.tally_params = TallyParams.fromJSON(object.tally_params); - } else { - message.tally_params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.voting_params !== undefined && - (obj.voting_params = message.voting_params - ? VotingParams.toJSON(message.voting_params) - : undefined); - message.deposit_params !== undefined && - (obj.deposit_params = message.deposit_params - ? DepositParams.toJSON(message.deposit_params) - : undefined); - message.tally_params !== undefined && - (obj.tally_params = message.tally_params - ? TallyParams.toJSON(message.tally_params) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.voting_params !== undefined && object.voting_params !== null) { - message.voting_params = VotingParams.fromPartial(object.voting_params); - } else { - message.voting_params = undefined; - } - if (object.deposit_params !== undefined && object.deposit_params !== null) { - message.deposit_params = DepositParams.fromPartial(object.deposit_params); - } else { - message.deposit_params = undefined; - } - if (object.tally_params !== undefined && object.tally_params !== null) { - message.tally_params = TallyParams.fromPartial(object.tally_params); - } else { - message.tally_params = undefined; - } - return message; - }, -}; - -const baseQueryDepositRequest: object = { proposal_id: 0, depositor: "" }; - -export const QueryDepositRequest = { - encode( - message: QueryDepositRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.proposal_id !== 0) { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDepositRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositRequest } as QueryDepositRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.depositor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDepositRequest { - const message = { ...baseQueryDepositRequest } as QueryDepositRequest; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = Number(object.proposal_id); - } else { - message.proposal_id = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } else { - message.depositor = ""; - } - return message; - }, - - toJSON(message: QueryDepositRequest): unknown { - const obj: any = {}; - message.proposal_id !== undefined && - (obj.proposal_id = message.proposal_id); - message.depositor !== undefined && (obj.depositor = message.depositor); - return obj; - }, - - fromPartial(object: DeepPartial): QueryDepositRequest { - const message = { ...baseQueryDepositRequest } as QueryDepositRequest; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = object.proposal_id; - } else { - message.proposal_id = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } else { - message.depositor = ""; - } - return message; - }, -}; - -const baseQueryDepositResponse: object = {}; - -export const QueryDepositResponse = { - encode( - message: QueryDepositResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.deposit !== undefined) { - Deposit.encode(message.deposit, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDepositResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositResponse } as QueryDepositResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deposit = Deposit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDepositResponse { - const message = { ...baseQueryDepositResponse } as QueryDepositResponse; - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = Deposit.fromJSON(object.deposit); - } else { - message.deposit = undefined; - } - return message; - }, - - toJSON(message: QueryDepositResponse): unknown { - const obj: any = {}; - message.deposit !== undefined && - (obj.deposit = message.deposit - ? Deposit.toJSON(message.deposit) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryDepositResponse { - const message = { ...baseQueryDepositResponse } as QueryDepositResponse; - if (object.deposit !== undefined && object.deposit !== null) { - message.deposit = Deposit.fromPartial(object.deposit); - } else { - message.deposit = undefined; - } - return message; - }, -}; - -const baseQueryDepositsRequest: object = { proposal_id: 0 }; - -export const QueryDepositsRequest = { - encode( - message: QueryDepositsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.proposal_id !== 0) { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDepositsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositsRequest } as QueryDepositsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDepositsRequest { - const message = { ...baseQueryDepositsRequest } as QueryDepositsRequest; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = Number(object.proposal_id); - } else { - message.proposal_id = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDepositsRequest): unknown { - const obj: any = {}; - message.proposal_id !== undefined && - (obj.proposal_id = message.proposal_id); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryDepositsRequest { - const message = { ...baseQueryDepositsRequest } as QueryDepositsRequest; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = object.proposal_id; - } else { - message.proposal_id = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDepositsResponse: object = {}; - -export const QueryDepositsResponse = { - encode( - message: QueryDepositsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.deposits) { - Deposit.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDepositsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDepositsResponse } as QueryDepositsResponse; - message.deposits = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deposits.push(Deposit.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDepositsResponse { - const message = { ...baseQueryDepositsResponse } as QueryDepositsResponse; - message.deposits = []; - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDepositsResponse): unknown { - const obj: any = {}; - if (message.deposits) { - obj.deposits = message.deposits.map((e) => - e ? Deposit.toJSON(e) : undefined - ); - } else { - obj.deposits = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDepositsResponse { - const message = { ...baseQueryDepositsResponse } as QueryDepositsResponse; - message.deposits = []; - if (object.deposits !== undefined && object.deposits !== null) { - for (const e of object.deposits) { - message.deposits.push(Deposit.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryTallyResultRequest: object = { proposal_id: 0 }; - -export const QueryTallyResultRequest = { - encode( - message: QueryTallyResultRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.proposal_id !== 0) { - writer.uint32(8).uint64(message.proposal_id); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryTallyResultRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTallyResultRequest, - } as QueryTallyResultRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryTallyResultRequest { - const message = { - ...baseQueryTallyResultRequest, - } as QueryTallyResultRequest; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = Number(object.proposal_id); - } else { - message.proposal_id = 0; - } - return message; - }, - - toJSON(message: QueryTallyResultRequest): unknown { - const obj: any = {}; - message.proposal_id !== undefined && - (obj.proposal_id = message.proposal_id); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryTallyResultRequest { - const message = { - ...baseQueryTallyResultRequest, - } as QueryTallyResultRequest; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = object.proposal_id; - } else { - message.proposal_id = 0; - } - return message; - }, -}; - -const baseQueryTallyResultResponse: object = {}; - -export const QueryTallyResultResponse = { - encode( - message: QueryTallyResultResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.tally !== undefined) { - TallyResult.encode(message.tally, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryTallyResultResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryTallyResultResponse, - } as QueryTallyResultResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tally = TallyResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryTallyResultResponse { - const message = { - ...baseQueryTallyResultResponse, - } as QueryTallyResultResponse; - if (object.tally !== undefined && object.tally !== null) { - message.tally = TallyResult.fromJSON(object.tally); - } else { - message.tally = undefined; - } - return message; - }, - - toJSON(message: QueryTallyResultResponse): unknown { - const obj: any = {}; - message.tally !== undefined && - (obj.tally = message.tally - ? TallyResult.toJSON(message.tally) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryTallyResultResponse { - const message = { - ...baseQueryTallyResultResponse, - } as QueryTallyResultResponse; - if (object.tally !== undefined && object.tally !== null) { - message.tally = TallyResult.fromPartial(object.tally); - } else { - message.tally = undefined; - } - return message; - }, -}; - -/** Query defines the gRPC querier service for gov module */ -export interface Query { - /** Proposal queries proposal details based on ProposalID. */ - Proposal(request: QueryProposalRequest): Promise; - /** Proposals queries all proposals based on given status. */ - Proposals(request: QueryProposalsRequest): Promise; - /** Vote queries voted information based on proposalID, voterAddr. */ - Vote(request: QueryVoteRequest): Promise; - /** Votes queries votes of a given proposal. */ - Votes(request: QueryVotesRequest): Promise; - /** Params queries all parameters of the gov module. */ - Params(request: QueryParamsRequest): Promise; - /** Deposit queries single deposit information based proposalID, depositAddr. */ - Deposit(request: QueryDepositRequest): Promise; - /** Deposits queries all deposits of a single proposal. */ - Deposits(request: QueryDepositsRequest): Promise; - /** TallyResult queries the tally of a proposal vote. */ - TallyResult( - request: QueryTallyResultRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Proposal(request: QueryProposalRequest): Promise { - const data = QueryProposalRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.gov.v1beta1.Query", - "Proposal", - data - ); - return promise.then((data) => - QueryProposalResponse.decode(new Reader(data)) - ); - } - - Proposals(request: QueryProposalsRequest): Promise { - const data = QueryProposalsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.gov.v1beta1.Query", - "Proposals", - data - ); - return promise.then((data) => - QueryProposalsResponse.decode(new Reader(data)) - ); - } - - Vote(request: QueryVoteRequest): Promise { - const data = QueryVoteRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Vote", data); - return promise.then((data) => QueryVoteResponse.decode(new Reader(data))); - } - - Votes(request: QueryVotesRequest): Promise { - const data = QueryVotesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Votes", data); - return promise.then((data) => QueryVotesResponse.decode(new Reader(data))); - } - - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.gov.v1beta1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - - Deposit(request: QueryDepositRequest): Promise { - const data = QueryDepositRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.gov.v1beta1.Query", - "Deposit", - data - ); - return promise.then((data) => - QueryDepositResponse.decode(new Reader(data)) - ); - } - - Deposits(request: QueryDepositsRequest): Promise { - const data = QueryDepositsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.gov.v1beta1.Query", - "Deposits", - data - ); - return promise.then((data) => - QueryDepositsResponse.decode(new Reader(data)) - ); - } - - TallyResult( - request: QueryTallyResultRequest - ): Promise { - const data = QueryTallyResultRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.gov.v1beta1.Query", - "TallyResult", - data - ); - return promise.then((data) => - QueryTallyResultResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.d.ts deleted file mode 100644 index d1ee87213d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.d.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { VoteOption, WeightedVoteOption } from "../../../cosmos/gov/v1beta1/gov"; -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.gov.v1beta1"; -/** - * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary - * proposal Content. - */ -export interface MsgSubmitProposal { - content: Any | undefined; - initialDeposit: Coin[]; - proposer: string; -} -/** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ -export interface MsgSubmitProposalResponse { - proposalId: number; -} -/** MsgVote defines a message to cast a vote. */ -export interface MsgVote { - proposalId: number; - voter: string; - option: VoteOption; -} -/** MsgVoteResponse defines the Msg/Vote response type. */ -export interface MsgVoteResponse { -} -/** - * MsgVoteWeighted defines a message to cast a vote. - * - * Since: cosmos-sdk 0.43 - */ -export interface MsgVoteWeighted { - proposalId: number; - voter: string; - options: WeightedVoteOption[]; -} -/** - * MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. - * - * Since: cosmos-sdk 0.43 - */ -export interface MsgVoteWeightedResponse { -} -/** MsgDeposit defines a message to submit a deposit to an existing proposal. */ -export interface MsgDeposit { - proposalId: number; - depositor: string; - amount: Coin[]; -} -/** MsgDepositResponse defines the Msg/Deposit response type. */ -export interface MsgDepositResponse { -} -export declare const MsgSubmitProposal: { - encode(message: MsgSubmitProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSubmitProposal; - fromJSON(object: any): MsgSubmitProposal; - toJSON(message: MsgSubmitProposal): unknown; - fromPartial(object: DeepPartial): MsgSubmitProposal; -}; -export declare const MsgSubmitProposalResponse: { - encode(message: MsgSubmitProposalResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgSubmitProposalResponse; - fromJSON(object: any): MsgSubmitProposalResponse; - toJSON(message: MsgSubmitProposalResponse): unknown; - fromPartial(object: DeepPartial): MsgSubmitProposalResponse; -}; -export declare const MsgVote: { - encode(message: MsgVote, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgVote; - fromJSON(object: any): MsgVote; - toJSON(message: MsgVote): unknown; - fromPartial(object: DeepPartial): MsgVote; -}; -export declare const MsgVoteResponse: { - encode(_: MsgVoteResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgVoteResponse; - fromJSON(_: any): MsgVoteResponse; - toJSON(_: MsgVoteResponse): unknown; - fromPartial(_: DeepPartial): MsgVoteResponse; -}; -export declare const MsgVoteWeighted: { - encode(message: MsgVoteWeighted, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgVoteWeighted; - fromJSON(object: any): MsgVoteWeighted; - toJSON(message: MsgVoteWeighted): unknown; - fromPartial(object: DeepPartial): MsgVoteWeighted; -}; -export declare const MsgVoteWeightedResponse: { - encode(_: MsgVoteWeightedResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgVoteWeightedResponse; - fromJSON(_: any): MsgVoteWeightedResponse; - toJSON(_: MsgVoteWeightedResponse): unknown; - fromPartial(_: DeepPartial): MsgVoteWeightedResponse; -}; -export declare const MsgDeposit: { - encode(message: MsgDeposit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgDeposit; - fromJSON(object: any): MsgDeposit; - toJSON(message: MsgDeposit): unknown; - fromPartial(object: DeepPartial): MsgDeposit; -}; -export declare const MsgDepositResponse: { - encode(_: MsgDepositResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgDepositResponse; - fromJSON(_: any): MsgDepositResponse; - toJSON(_: MsgDepositResponse): unknown; - fromPartial(_: DeepPartial): MsgDepositResponse; -}; -/** Msg defines the bank Msg service. */ -export interface Msg { - /** SubmitProposal defines a method to create new proposal given a content. */ - SubmitProposal(request: MsgSubmitProposal): Promise; - /** Vote defines a method to add a vote on a specific proposal. */ - Vote(request: MsgVote): Promise; - /** - * VoteWeighted defines a method to add a weighted vote on a specific proposal. - * - * Since: cosmos-sdk 0.43 - */ - VoteWeighted(request: MsgVoteWeighted): Promise; - /** Deposit defines a method to add deposit on a specific proposal. */ - Deposit(request: MsgDeposit): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - SubmitProposal(request: MsgSubmitProposal): Promise; - Vote(request: MsgVote): Promise; - VoteWeighted(request: MsgVoteWeighted): Promise; - Deposit(request: MsgDeposit): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.js deleted file mode 100644 index a5345f4183..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.js +++ /dev/null @@ -1,588 +0,0 @@ -/* eslint-disable */ -import { WeightedVoteOption, voteOptionFromJSON, voteOptionToJSON, } from "../../../cosmos/gov/v1beta1/gov"; -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Any } from "../../../google/protobuf/any"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.gov.v1beta1"; -const baseMsgSubmitProposal = { proposer: "" }; -export const MsgSubmitProposal = { - encode(message, writer = Writer.create()) { - if (message.content !== undefined) { - Any.encode(message.content, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.initialDeposit) { - Coin.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.proposer !== "") { - writer.uint32(26).string(message.proposer); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSubmitProposal }; - message.initialDeposit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.content = Any.decode(reader, reader.uint32()); - break; - case 2: - message.initialDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.proposer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgSubmitProposal }; - message.initialDeposit = []; - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromJSON(object.content); - } - else { - message.content = undefined; - } - if (object.initialDeposit !== undefined && object.initialDeposit !== null) { - for (const e of object.initialDeposit) { - message.initialDeposit.push(Coin.fromJSON(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = String(object.proposer); - } - else { - message.proposer = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.content !== undefined && - (obj.content = message.content ? Any.toJSON(message.content) : undefined); - if (message.initialDeposit) { - obj.initialDeposit = message.initialDeposit.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.initialDeposit = []; - } - message.proposer !== undefined && (obj.proposer = message.proposer); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgSubmitProposal }; - message.initialDeposit = []; - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromPartial(object.content); - } - else { - message.content = undefined; - } - if (object.initialDeposit !== undefined && object.initialDeposit !== null) { - for (const e of object.initialDeposit) { - message.initialDeposit.push(Coin.fromPartial(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = object.proposer; - } - else { - message.proposer = ""; - } - return message; - }, -}; -const baseMsgSubmitProposalResponse = { proposalId: 0 }; -export const MsgSubmitProposalResponse = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgSubmitProposalResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgSubmitProposalResponse, - }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgSubmitProposalResponse, - }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - return message; - }, -}; -const baseMsgVote = { proposalId: 0, voter: "", option: 0 }; -export const MsgVote = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.option !== 0) { - writer.uint32(24).int32(message.option); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgVote }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgVote }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } - else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = voteOptionFromJSON(object.option); - } - else { - message.option = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.voter !== undefined && (obj.voter = message.voter); - message.option !== undefined && - (obj.option = voteOptionToJSON(message.option)); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgVote }; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } - else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = object.option; - } - else { - message.option = 0; - } - return message; - }, -}; -const baseMsgVoteResponse = {}; -export const MsgVoteResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgVoteResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgVoteResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgVoteResponse }; - return message; - }, -}; -const baseMsgVoteWeighted = { proposalId: 0, voter: "" }; -export const MsgVoteWeighted = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - for (const v of message.options) { - WeightedVoteOption.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgVoteWeighted }; - message.options = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgVoteWeighted }; - message.options = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } - else { - message.voter = ""; - } - if (object.options !== undefined && object.options !== null) { - for (const e of object.options) { - message.options.push(WeightedVoteOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.voter !== undefined && (obj.voter = message.voter); - if (message.options) { - obj.options = message.options.map((e) => e ? WeightedVoteOption.toJSON(e) : undefined); - } - else { - obj.options = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgVoteWeighted }; - message.options = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } - else { - message.voter = ""; - } - if (object.options !== undefined && object.options !== null) { - for (const e of object.options) { - message.options.push(WeightedVoteOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMsgVoteWeightedResponse = {}; -export const MsgVoteWeightedResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgVoteWeightedResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgVoteWeightedResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgVoteWeightedResponse, - }; - return message; - }, -}; -const baseMsgDeposit = { proposalId: 0, depositor: "" }; -export const MsgDeposit = { - encode(message, writer = Writer.create()) { - if (message.proposalId !== 0) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - for (const v of message.amount) { - Coin.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDeposit }; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = longToNumber(reader.uint64()); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgDeposit }; - message.amount = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = Number(object.proposalId); - } - else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } - else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.proposalId !== undefined && (obj.proposalId = message.proposalId); - message.depositor !== undefined && (obj.depositor = message.depositor); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.amount = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgDeposit }; - message.amount = []; - if (object.proposalId !== undefined && object.proposalId !== null) { - message.proposalId = object.proposalId; - } - else { - message.proposalId = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } - else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseMsgDepositResponse = {}; -export const MsgDepositResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDepositResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgDepositResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgDepositResponse }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - SubmitProposal(request) { - const data = MsgSubmitProposal.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "SubmitProposal", data); - return promise.then((data) => MsgSubmitProposalResponse.decode(new Reader(data))); - } - Vote(request) { - const data = MsgVote.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "Vote", data); - return promise.then((data) => MsgVoteResponse.decode(new Reader(data))); - } - VoteWeighted(request) { - const data = MsgVoteWeighted.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "VoteWeighted", data); - return promise.then((data) => MsgVoteWeightedResponse.decode(new Reader(data))); - } - Deposit(request) { - const data = MsgDeposit.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "Deposit", data); - return promise.then((data) => MsgDepositResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.ts deleted file mode 100644 index 8f79b2a1f4..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/tx.ts +++ /dev/null @@ -1,755 +0,0 @@ -/* eslint-disable */ -import { - VoteOption, - WeightedVoteOption, - voteOptionFromJSON, - voteOptionToJSON, -} from "../../../cosmos/gov/v1beta1/gov"; -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Any } from "../../../google/protobuf/any"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.gov.v1beta1"; - -/** - * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary - * proposal Content. - */ -export interface MsgSubmitProposal { - content: Any | undefined; - initial_deposit: Coin[]; - proposer: string; -} - -/** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ -export interface MsgSubmitProposalResponse { - proposal_id: number; -} - -/** MsgVote defines a message to cast a vote. */ -export interface MsgVote { - proposal_id: number; - voter: string; - option: VoteOption; -} - -/** MsgVoteResponse defines the Msg/Vote response type. */ -export interface MsgVoteResponse {} - -/** - * MsgVoteWeighted defines a message to cast a vote. - * - * Since: cosmos-sdk 0.43 - */ -export interface MsgVoteWeighted { - proposal_id: number; - voter: string; - options: WeightedVoteOption[]; -} - -/** - * MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. - * - * Since: cosmos-sdk 0.43 - */ -export interface MsgVoteWeightedResponse {} - -/** MsgDeposit defines a message to submit a deposit to an existing proposal. */ -export interface MsgDeposit { - proposal_id: number; - depositor: string; - amount: Coin[]; -} - -/** MsgDepositResponse defines the Msg/Deposit response type. */ -export interface MsgDepositResponse {} - -const baseMsgSubmitProposal: object = { proposer: "" }; - -export const MsgSubmitProposal = { - encode(message: MsgSubmitProposal, writer: Writer = Writer.create()): Writer { - if (message.content !== undefined) { - Any.encode(message.content, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.initial_deposit) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.proposer !== "") { - writer.uint32(26).string(message.proposer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgSubmitProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSubmitProposal } as MsgSubmitProposal; - message.initial_deposit = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.content = Any.decode(reader, reader.uint32()); - break; - case 2: - message.initial_deposit.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.proposer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgSubmitProposal { - const message = { ...baseMsgSubmitProposal } as MsgSubmitProposal; - message.initial_deposit = []; - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromJSON(object.content); - } else { - message.content = undefined; - } - if ( - object.initial_deposit !== undefined && - object.initial_deposit !== null - ) { - for (const e of object.initial_deposit) { - message.initial_deposit.push(Coin.fromJSON(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = String(object.proposer); - } else { - message.proposer = ""; - } - return message; - }, - - toJSON(message: MsgSubmitProposal): unknown { - const obj: any = {}; - message.content !== undefined && - (obj.content = message.content ? Any.toJSON(message.content) : undefined); - if (message.initial_deposit) { - obj.initial_deposit = message.initial_deposit.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.initial_deposit = []; - } - message.proposer !== undefined && (obj.proposer = message.proposer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgSubmitProposal { - const message = { ...baseMsgSubmitProposal } as MsgSubmitProposal; - message.initial_deposit = []; - if (object.content !== undefined && object.content !== null) { - message.content = Any.fromPartial(object.content); - } else { - message.content = undefined; - } - if ( - object.initial_deposit !== undefined && - object.initial_deposit !== null - ) { - for (const e of object.initial_deposit) { - message.initial_deposit.push(Coin.fromPartial(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = object.proposer; - } else { - message.proposer = ""; - } - return message; - }, -}; - -const baseMsgSubmitProposalResponse: object = { proposal_id: 0 }; - -export const MsgSubmitProposalResponse = { - encode( - message: MsgSubmitProposalResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.proposal_id !== 0) { - writer.uint32(8).uint64(message.proposal_id); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgSubmitProposalResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgSubmitProposalResponse, - } as MsgSubmitProposalResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgSubmitProposalResponse { - const message = { - ...baseMsgSubmitProposalResponse, - } as MsgSubmitProposalResponse; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = Number(object.proposal_id); - } else { - message.proposal_id = 0; - } - return message; - }, - - toJSON(message: MsgSubmitProposalResponse): unknown { - const obj: any = {}; - message.proposal_id !== undefined && - (obj.proposal_id = message.proposal_id); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgSubmitProposalResponse { - const message = { - ...baseMsgSubmitProposalResponse, - } as MsgSubmitProposalResponse; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = object.proposal_id; - } else { - message.proposal_id = 0; - } - return message; - }, -}; - -const baseMsgVote: object = { proposal_id: 0, voter: "", option: 0 }; - -export const MsgVote = { - encode(message: MsgVote, writer: Writer = Writer.create()): Writer { - if (message.proposal_id !== 0) { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.option !== 0) { - writer.uint32(24).int32(message.option); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgVote { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgVote } as MsgVote; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgVote { - const message = { ...baseMsgVote } as MsgVote; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = Number(object.proposal_id); - } else { - message.proposal_id = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = voteOptionFromJSON(object.option); - } else { - message.option = 0; - } - return message; - }, - - toJSON(message: MsgVote): unknown { - const obj: any = {}; - message.proposal_id !== undefined && - (obj.proposal_id = message.proposal_id); - message.voter !== undefined && (obj.voter = message.voter); - message.option !== undefined && - (obj.option = voteOptionToJSON(message.option)); - return obj; - }, - - fromPartial(object: DeepPartial): MsgVote { - const message = { ...baseMsgVote } as MsgVote; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = object.proposal_id; - } else { - message.proposal_id = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } else { - message.voter = ""; - } - if (object.option !== undefined && object.option !== null) { - message.option = object.option; - } else { - message.option = 0; - } - return message; - }, -}; - -const baseMsgVoteResponse: object = {}; - -export const MsgVoteResponse = { - encode(_: MsgVoteResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgVoteResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgVoteResponse } as MsgVoteResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgVoteResponse { - const message = { ...baseMsgVoteResponse } as MsgVoteResponse; - return message; - }, - - toJSON(_: MsgVoteResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgVoteResponse { - const message = { ...baseMsgVoteResponse } as MsgVoteResponse; - return message; - }, -}; - -const baseMsgVoteWeighted: object = { proposal_id: 0, voter: "" }; - -export const MsgVoteWeighted = { - encode(message: MsgVoteWeighted, writer: Writer = Writer.create()): Writer { - if (message.proposal_id !== 0) { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - for (const v of message.options) { - WeightedVoteOption.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgVoteWeighted { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgVoteWeighted } as MsgVoteWeighted; - message.options = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.options.push( - WeightedVoteOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgVoteWeighted { - const message = { ...baseMsgVoteWeighted } as MsgVoteWeighted; - message.options = []; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = Number(object.proposal_id); - } else { - message.proposal_id = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } else { - message.voter = ""; - } - if (object.options !== undefined && object.options !== null) { - for (const e of object.options) { - message.options.push(WeightedVoteOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MsgVoteWeighted): unknown { - const obj: any = {}; - message.proposal_id !== undefined && - (obj.proposal_id = message.proposal_id); - message.voter !== undefined && (obj.voter = message.voter); - if (message.options) { - obj.options = message.options.map((e) => - e ? WeightedVoteOption.toJSON(e) : undefined - ); - } else { - obj.options = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MsgVoteWeighted { - const message = { ...baseMsgVoteWeighted } as MsgVoteWeighted; - message.options = []; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = object.proposal_id; - } else { - message.proposal_id = 0; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } else { - message.voter = ""; - } - if (object.options !== undefined && object.options !== null) { - for (const e of object.options) { - message.options.push(WeightedVoteOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMsgVoteWeightedResponse: object = {}; - -export const MsgVoteWeightedResponse = { - encode(_: MsgVoteWeightedResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgVoteWeightedResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgVoteWeightedResponse, - } as MsgVoteWeightedResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgVoteWeightedResponse { - const message = { - ...baseMsgVoteWeightedResponse, - } as MsgVoteWeightedResponse; - return message; - }, - - toJSON(_: MsgVoteWeightedResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgVoteWeightedResponse { - const message = { - ...baseMsgVoteWeightedResponse, - } as MsgVoteWeightedResponse; - return message; - }, -}; - -const baseMsgDeposit: object = { proposal_id: 0, depositor: "" }; - -export const MsgDeposit = { - encode(message: MsgDeposit, writer: Writer = Writer.create()): Writer { - if (message.proposal_id !== 0) { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgDeposit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDeposit } as MsgDeposit; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgDeposit { - const message = { ...baseMsgDeposit } as MsgDeposit; - message.amount = []; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = Number(object.proposal_id); - } else { - message.proposal_id = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = String(object.depositor); - } else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MsgDeposit): unknown { - const obj: any = {}; - message.proposal_id !== undefined && - (obj.proposal_id = message.proposal_id); - message.depositor !== undefined && (obj.depositor = message.depositor); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.amount = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MsgDeposit { - const message = { ...baseMsgDeposit } as MsgDeposit; - message.amount = []; - if (object.proposal_id !== undefined && object.proposal_id !== null) { - message.proposal_id = object.proposal_id; - } else { - message.proposal_id = 0; - } - if (object.depositor !== undefined && object.depositor !== null) { - message.depositor = object.depositor; - } else { - message.depositor = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMsgDepositResponse: object = {}; - -export const MsgDepositResponse = { - encode(_: MsgDepositResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgDepositResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDepositResponse } as MsgDepositResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgDepositResponse { - const message = { ...baseMsgDepositResponse } as MsgDepositResponse; - return message; - }, - - toJSON(_: MsgDepositResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgDepositResponse { - const message = { ...baseMsgDepositResponse } as MsgDepositResponse; - return message; - }, -}; - -/** Msg defines the bank Msg service. */ -export interface Msg { - /** SubmitProposal defines a method to create new proposal given a content. */ - SubmitProposal( - request: MsgSubmitProposal - ): Promise; - /** Vote defines a method to add a vote on a specific proposal. */ - Vote(request: MsgVote): Promise; - /** - * VoteWeighted defines a method to add a weighted vote on a specific proposal. - * - * Since: cosmos-sdk 0.43 - */ - VoteWeighted(request: MsgVoteWeighted): Promise; - /** Deposit defines a method to add deposit on a specific proposal. */ - Deposit(request: MsgDeposit): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - SubmitProposal( - request: MsgSubmitProposal - ): Promise { - const data = MsgSubmitProposal.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.gov.v1beta1.Msg", - "SubmitProposal", - data - ); - return promise.then((data) => - MsgSubmitProposalResponse.decode(new Reader(data)) - ); - } - - Vote(request: MsgVote): Promise { - const data = MsgVote.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "Vote", data); - return promise.then((data) => MsgVoteResponse.decode(new Reader(data))); - } - - VoteWeighted(request: MsgVoteWeighted): Promise { - const data = MsgVoteWeighted.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.gov.v1beta1.Msg", - "VoteWeighted", - data - ); - return promise.then((data) => - MsgVoteWeightedResponse.decode(new Reader(data)) - ); - } - - Deposit(request: MsgDeposit): Promise { - const data = MsgDeposit.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "Deposit", data); - return promise.then((data) => MsgDepositResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.d.ts deleted file mode 100644 index ac37814871..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.js deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30bdc6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0776..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.js deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7fb6d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b699..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index bb088caa2a..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809039..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.ts deleted file mode 100644 index 233eae465d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - type_url: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { type_url: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.type_url !== "") { - writer.uint32(10).string(message.type_url); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = String(object.type_url); - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.type_url !== undefined && (obj.type_url = message.type_url); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = object.type_url; - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index a3076569af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,1022 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 252725808b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4144 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } - else { - message.proto3Optional = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } - else { - message.proto3Optional = false; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.d.ts deleted file mode 100644 index 3493f63277..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (duration.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} -export declare const Duration: { - encode(message: Duration, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Duration; - fromJSON(object: any): Duration; - toJSON(message: Duration): unknown; - fromPartial(object: DeepPartial): Duration; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.js deleted file mode 100644 index ea556facef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseDuration = { seconds: 0, nanos: 0 }; -export const Duration = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.ts deleted file mode 100644 index fffd5b14ef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/duration.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (duration.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} - -const baseDuration: object = { seconds: 0, nanos: 0 }; - -export const Duration = { - encode(message: Duration, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Duration { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration } as Duration; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Duration): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.d.ts deleted file mode 100644 index 0c9db0bc0d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} -export declare const Timestamp: { - encode(message: Timestamp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Timestamp; - fromJSON(object: any): Timestamp; - toJSON(message: Timestamp): unknown; - fromPartial(object: DeepPartial): Timestamp; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.js deleted file mode 100644 index 37b4119aef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseTimestamp = { seconds: 0, nanos: 0 }; -export const Timestamp = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 11864afc86..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/package.json b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/package.json deleted file mode 100755 index 12825ad91a..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmos-gov-v1beta1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmos.gov.v1beta1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/cosmos-sdk/x/gov/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/index.ts deleted file mode 100755 index 6ad7fa6c53..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/index.ts +++ /dev/null @@ -1,147 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { ParameterChangeProposal } from "./module/types/cosmos/params/v1beta1/params" -import { ParamChange } from "./module/types/cosmos/params/v1beta1/params" - - -export { ParameterChangeProposal, ParamChange }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Params: {}, - - _Structure: { - ParameterChangeProposal: getStructure(ParameterChangeProposal.fromPartial({})), - ParamChange: getStructure(ParamChange.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.params.v1beta1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryParams({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/index.ts deleted file mode 100755 index 67d4b093f0..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; - - -const types = [ - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/rest.ts deleted file mode 100644 index 88d657f7c2..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/rest.ts +++ /dev/null @@ -1,254 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface ProtobufAny { - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* ParamChange defines an individual parameter change, for use in -ParameterChangeProposal. -*/ -export interface V1Beta1ParamChange { - subspace?: string; - key?: string; - value?: string; -} - -/** - * QueryParamsResponse is response type for the Query/Params RPC method. - */ -export interface V1Beta1QueryParamsResponse { - /** param defines the queried parameter. */ - param?: V1Beta1ParamChange; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/params/v1beta1/params.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries a specific parameter of a module, given its subspace and -key. - * @request GET:/cosmos/params/v1beta1/params - */ - queryParams = (query?: { subspace?: string; key?: string }, params: RequestParams = {}) => - this.request({ - path: `/cosmos/params/v1beta1/params`, - method: "GET", - query: query, - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/cosmos/params/v1beta1/params.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/cosmos/params/v1beta1/params.ts deleted file mode 100644 index 1aae5a59ca..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/cosmos/params/v1beta1/params.ts +++ /dev/null @@ -1,231 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.params.v1beta1"; - -/** ParameterChangeProposal defines a proposal to change one or more parameters. */ -export interface ParameterChangeProposal { - title: string; - description: string; - changes: ParamChange[]; -} - -/** - * ParamChange defines an individual parameter change, for use in - * ParameterChangeProposal. - */ -export interface ParamChange { - subspace: string; - key: string; - value: string; -} - -const baseParameterChangeProposal: object = { title: "", description: "" }; - -export const ParameterChangeProposal = { - encode( - message: ParameterChangeProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.changes) { - ParamChange.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ParameterChangeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseParameterChangeProposal, - } as ParameterChangeProposal; - message.changes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.changes.push(ParamChange.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ParameterChangeProposal { - const message = { - ...baseParameterChangeProposal, - } as ParameterChangeProposal; - message.changes = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.changes !== undefined && object.changes !== null) { - for (const e of object.changes) { - message.changes.push(ParamChange.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ParameterChangeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - if (message.changes) { - obj.changes = message.changes.map((e) => - e ? ParamChange.toJSON(e) : undefined - ); - } else { - obj.changes = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ParameterChangeProposal { - const message = { - ...baseParameterChangeProposal, - } as ParameterChangeProposal; - message.changes = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.changes !== undefined && object.changes !== null) { - for (const e of object.changes) { - message.changes.push(ParamChange.fromPartial(e)); - } - } - return message; - }, -}; - -const baseParamChange: object = { subspace: "", key: "", value: "" }; - -export const ParamChange = { - encode(message: ParamChange, writer: Writer = Writer.create()): Writer { - if (message.subspace !== "") { - writer.uint32(10).string(message.subspace); - } - if (message.key !== "") { - writer.uint32(18).string(message.key); - } - if (message.value !== "") { - writer.uint32(26).string(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ParamChange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParamChange } as ParamChange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.subspace = reader.string(); - break; - case 2: - message.key = reader.string(); - break; - case 3: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ParamChange { - const message = { ...baseParamChange } as ParamChange; - if (object.subspace !== undefined && object.subspace !== null) { - message.subspace = String(object.subspace); - } else { - message.subspace = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = String(object.value); - } else { - message.value = ""; - } - return message; - }, - - toJSON(message: ParamChange): unknown { - const obj: any = {}; - message.subspace !== undefined && (obj.subspace = message.subspace); - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - - fromPartial(object: DeepPartial): ParamChange { - const message = { ...baseParamChange } as ParamChange; - if (object.subspace !== undefined && object.subspace !== null) { - message.subspace = object.subspace; - } else { - message.subspace = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/cosmos/params/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/cosmos/params/v1beta1/query.ts deleted file mode 100644 index 3057259340..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/cosmos/params/v1beta1/query.ts +++ /dev/null @@ -1,199 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { ParamChange } from "../../../cosmos/params/v1beta1/params"; - -export const protobufPackage = "cosmos.params.v1beta1"; - -/** QueryParamsRequest is request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { - /** subspace defines the module to query the parameter for. */ - subspace: string; - /** key defines the key of the parameter in the subspace. */ - key: string; -} - -/** QueryParamsResponse is response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** param defines the queried parameter. */ - param: ParamChange | undefined; -} - -const baseQueryParamsRequest: object = { subspace: "", key: "" }; - -export const QueryParamsRequest = { - encode( - message: QueryParamsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.subspace !== "") { - writer.uint32(10).string(message.subspace); - } - if (message.key !== "") { - writer.uint32(18).string(message.key); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.subspace = reader.string(); - break; - case 2: - message.key = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - if (object.subspace !== undefined && object.subspace !== null) { - message.subspace = String(object.subspace); - } else { - message.subspace = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } else { - message.key = ""; - } - return message; - }, - - toJSON(message: QueryParamsRequest): unknown { - const obj: any = {}; - message.subspace !== undefined && (obj.subspace = message.subspace); - message.key !== undefined && (obj.key = message.key); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - if (object.subspace !== undefined && object.subspace !== null) { - message.subspace = object.subspace; - } else { - message.subspace = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = ""; - } - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.param !== undefined) { - ParamChange.encode(message.param, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.param = ParamChange.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.param !== undefined && object.param !== null) { - message.param = ParamChange.fromJSON(object.param); - } else { - message.param = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.param !== undefined && - (obj.param = message.param - ? ParamChange.toJSON(message.param) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.param !== undefined && object.param !== null) { - message.param = ParamChange.fromPartial(object.param); - } else { - message.param = undefined; - } - return message; - }, -}; - -/** Query defines the gRPC querier service. */ -export interface Query { - /** - * Params queries a specific parameter of a module, given its subspace and - * key. - */ - Params(request: QueryParamsRequest): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.params.v1beta1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/package.json b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/package.json deleted file mode 100755 index a41b7662e6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmos-params-v1beta1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmos.params.v1beta1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/cosmos-sdk/x/params/types/proposal", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.params.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.d.ts deleted file mode 100644 index 640d2702da..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { SigningInfo } from "./module/types/cosmos/slashing/v1beta1/genesis"; -import { ValidatorMissedBlocks } from "./module/types/cosmos/slashing/v1beta1/genesis"; -import { MissedBlock } from "./module/types/cosmos/slashing/v1beta1/genesis"; -import { ValidatorSigningInfo } from "./module/types/cosmos/slashing/v1beta1/slashing"; -import { Params } from "./module/types/cosmos/slashing/v1beta1/slashing"; -export { SigningInfo, ValidatorMissedBlocks, MissedBlock, ValidatorSigningInfo, Params }; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.js deleted file mode 100644 index 53c5822d43..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.js +++ /dev/null @@ -1,207 +0,0 @@ -import { txClient, queryClient, MissingWalletError, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { SigningInfo } from "./module/types/cosmos/slashing/v1beta1/genesis"; -import { ValidatorMissedBlocks } from "./module/types/cosmos/slashing/v1beta1/genesis"; -import { MissedBlock } from "./module/types/cosmos/slashing/v1beta1/genesis"; -import { ValidatorSigningInfo } from "./module/types/cosmos/slashing/v1beta1/slashing"; -import { Params } from "./module/types/cosmos/slashing/v1beta1/slashing"; -export { SigningInfo, ValidatorMissedBlocks, MissedBlock, ValidatorSigningInfo, Params }; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Params: {}, - SigningInfo: {}, - SigningInfos: {}, - _Structure: { - SigningInfo: getStructure(SigningInfo.fromPartial({})), - ValidatorMissedBlocks: getStructure(ValidatorMissedBlocks.fromPartial({})), - MissedBlock: getStructure(MissedBlock.fromPartial({})), - ValidatorSigningInfo: getStructure(ValidatorSigningInfo.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - }, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getParams: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Params[JSON.stringify(params)] ?? {}; - }, - getSigningInfo: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.SigningInfo[JSON.stringify(params)] ?? {}; - }, - getSigningInfos: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.SigningInfos[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.slashing.v1beta1 initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryParams()).data; - commit('QUERY', { query: 'Params', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QuerySigningInfo({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.querySigningInfo(key.cons_address)).data; - commit('QUERY', { query: 'SigningInfo', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QuerySigningInfo', payload: { options: { all }, params: { ...key }, query } }); - return getters['getSigningInfo']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QuerySigningInfo', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QuerySigningInfos({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.querySigningInfos(query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.querySigningInfos({ ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'SigningInfos', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QuerySigningInfos', payload: { options: { all }, params: { ...key }, query } }); - return getters['getSigningInfos']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QuerySigningInfos', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async sendMsgUnjail({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgUnjail(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgUnjail:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgUnjail:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async MsgUnjail({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgUnjail(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgUnjail:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgUnjail:Create', 'Could not create message: ' + e.message); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.ts deleted file mode 100755 index e731c7f825..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.ts +++ /dev/null @@ -1,239 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { SigningInfo } from "./module/types/cosmos/slashing/v1beta1/genesis" -import { ValidatorMissedBlocks } from "./module/types/cosmos/slashing/v1beta1/genesis" -import { MissedBlock } from "./module/types/cosmos/slashing/v1beta1/genesis" -import { ValidatorSigningInfo } from "./module/types/cosmos/slashing/v1beta1/slashing" -import { Params } from "./module/types/cosmos/slashing/v1beta1/slashing" - - -export { SigningInfo, ValidatorMissedBlocks, MissedBlock, ValidatorSigningInfo, Params }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Params: {}, - SigningInfo: {}, - SigningInfos: {}, - - _Structure: { - SigningInfo: getStructure(SigningInfo.fromPartial({})), - ValidatorMissedBlocks: getStructure(ValidatorMissedBlocks.fromPartial({})), - MissedBlock: getStructure(MissedBlock.fromPartial({})), - ValidatorSigningInfo: getStructure(ValidatorSigningInfo.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - getSigningInfo: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.SigningInfo[JSON.stringify(params)] ?? {} - }, - getSigningInfos: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.SigningInfos[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.slashing.v1beta1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams()).data - - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QuerySigningInfo({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.querySigningInfo( key.cons_address)).data - - - commit('QUERY', { query: 'SigningInfo', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QuerySigningInfo', payload: { options: { all }, params: {...key},query }}) - return getters['getSigningInfo']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QuerySigningInfo API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QuerySigningInfos({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.querySigningInfos(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.querySigningInfos({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'SigningInfos', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QuerySigningInfos', payload: { options: { all }, params: {...key},query }}) - return getters['getSigningInfos']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QuerySigningInfos API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - async sendMsgUnjail({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgUnjail(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgUnjail:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgUnjail:Send Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgUnjail({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgUnjail(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgUnjail:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgUnjail:Create Could not create message: ' + e.message) - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.d.ts deleted file mode 100644 index c3e581c41c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgUnjail } from "./types/cosmos/slashing/v1beta1/tx"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; - msgUnjail: (data: MsgUnjail) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.js deleted file mode 100644 index 49c43347cf..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.js +++ /dev/null @@ -1,34 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgUnjail } from "./types/cosmos/slashing/v1beta1/tx"; -const types = [ - ["/cosmos.slashing.v1beta1.MsgUnjail", MsgUnjail], -]; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - msgUnjail: (data) => ({ typeUrl: "/cosmos.slashing.v1beta1.MsgUnjail", value: MsgUnjail.fromPartial(data) }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.ts deleted file mode 100755 index 2ade4f62bf..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.ts +++ /dev/null @@ -1,60 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgUnjail } from "./types/cosmos/slashing/v1beta1/tx"; - - -const types = [ - ["/cosmos.slashing.v1beta1.MsgUnjail", MsgUnjail], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgUnjail: (data: MsgUnjail): EncodeObject => ({ typeUrl: "/cosmos.slashing.v1beta1.MsgUnjail", value: MsgUnjail.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.d.ts deleted file mode 100644 index afcd64207c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,229 +0,0 @@ -export interface ProtobufAny { - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -export declare type V1Beta1MsgUnjailResponse = object; -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - /** - * 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. - * @format uint64 - */ - offset?: string; - /** - * 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. - * @format uint64 - */ - limit?: string; - /** - * 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. - */ - countTotal?: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse?: boolean; -} -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -/** - * Params represents the parameters used for by the slashing module. - */ -export interface V1Beta1Params { - /** @format int64 */ - signedBlocksWindow?: string; - /** @format byte */ - minSignedPerWindow?: string; - downtimeJailDuration?: string; - /** @format byte */ - slashFractionDoubleSign?: string; - /** @format byte */ - slashFractionDowntime?: string; -} -export interface V1Beta1QueryParamsResponse { - /** Params represents the parameters used for by the slashing module. */ - params?: V1Beta1Params; -} -export interface V1Beta1QuerySigningInfoResponse { - /** - * ValidatorSigningInfo defines a validator's signing info for monitoring their - * liveness activity. - */ - valSigningInfo?: V1Beta1ValidatorSigningInfo; -} -export interface V1Beta1QuerySigningInfosResponse { - info?: V1Beta1ValidatorSigningInfo[]; - /** - * 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; - * } - */ - pagination?: V1Beta1PageResponse; -} -/** -* ValidatorSigningInfo defines a validator's signing info for monitoring their -liveness activity. -*/ -export interface V1Beta1ValidatorSigningInfo { - address?: string; - /** @format int64 */ - startHeight?: string; - /** - * 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`. - * @format int64 - */ - indexOffset?: string; - /** - * Timestamp until which the validator is jailed due to liveness downtime. - * @format date-time - */ - jailedUntil?: string; - /** - * 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. - */ - tombstoned?: boolean; - /** - * A counter kept to avoid unnecessary array reads. - * Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. - * @format int64 - */ - missedBlocksCounter?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/slashing/v1beta1/genesis.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries the parameters of slashing module - * @request GET:/cosmos/slashing/v1beta1/params - */ - queryParams: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QuerySigningInfos - * @summary SigningInfos queries signing info of all validators - * @request GET:/cosmos/slashing/v1beta1/signing_infos - */ - querySigningInfos: (query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QuerySigningInfo - * @summary SigningInfo queries the signing info of given cons address - * @request GET:/cosmos/slashing/v1beta1/signing_infos/{consAddress} - */ - querySigningInfo: (consAddress: string, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.js deleted file mode 100644 index 3edbdb1adc..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.js +++ /dev/null @@ -1,183 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/slashing/v1beta1/genesis.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries the parameters of slashing module - * @request GET:/cosmos/slashing/v1beta1/params - */ - this.queryParams = (params = {}) => this.request({ - path: `/cosmos/slashing/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QuerySigningInfos - * @summary SigningInfos queries signing info of all validators - * @request GET:/cosmos/slashing/v1beta1/signing_infos - */ - this.querySigningInfos = (query, params = {}) => this.request({ - path: `/cosmos/slashing/v1beta1/signing_infos`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QuerySigningInfo - * @summary SigningInfo queries the signing info of given cons address - * @request GET:/cosmos/slashing/v1beta1/signing_infos/{consAddress} - */ - this.querySigningInfo = (consAddress, params = {}) => this.request({ - path: `/cosmos/slashing/v1beta1/signing_infos/${consAddress}`, - method: "GET", - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.ts deleted file mode 100644 index 9de08cffff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/rest.ts +++ /dev/null @@ -1,425 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface ProtobufAny { - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -export type V1Beta1MsgUnjailResponse = object; - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - 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; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -/** - * Params represents the parameters used for by the slashing module. - */ -export interface V1Beta1Params { - /** @format int64 */ - signed_blocks_window?: string; - - /** @format byte */ - min_signed_per_window?: string; - downtime_jail_duration?: string; - - /** @format byte */ - slash_fraction_double_sign?: string; - - /** @format byte */ - slash_fraction_downtime?: string; -} - -export interface V1Beta1QueryParamsResponse { - /** Params represents the parameters used for by the slashing module. */ - params?: V1Beta1Params; -} - -export interface V1Beta1QuerySigningInfoResponse { - /** - * ValidatorSigningInfo defines a validator's signing info for monitoring their - * liveness activity. - */ - val_signing_info?: V1Beta1ValidatorSigningInfo; -} - -export interface V1Beta1QuerySigningInfosResponse { - info?: V1Beta1ValidatorSigningInfo[]; - - /** - * 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; - * } - */ - pagination?: V1Beta1PageResponse; -} - -/** -* ValidatorSigningInfo defines a validator's signing info for monitoring their -liveness activity. -*/ -export interface V1Beta1ValidatorSigningInfo { - address?: string; - - /** @format int64 */ - start_height?: string; - - /** - * 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`. - * @format int64 - */ - index_offset?: string; - - /** - * Timestamp until which the validator is jailed due to liveness downtime. - * @format date-time - */ - jailed_until?: string; - - /** - * 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. - */ - tombstoned?: boolean; - - /** - * A counter kept to avoid unnecessary array reads. - * Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. - * @format int64 - */ - missed_blocks_counter?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/slashing/v1beta1/genesis.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries the parameters of slashing module - * @request GET:/cosmos/slashing/v1beta1/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/slashing/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QuerySigningInfos - * @summary SigningInfos queries signing info of all validators - * @request GET:/cosmos/slashing/v1beta1/signing_infos - */ - querySigningInfos = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/slashing/v1beta1/signing_infos`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QuerySigningInfo - * @summary SigningInfo queries the signing info of given cons address - * @request GET:/cosmos/slashing/v1beta1/signing_infos/{cons_address} - */ - querySigningInfo = (cons_address: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/slashing/v1beta1/signing_infos/${cons_address}`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index 767d2c358f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - countTotal: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; -} -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index b5f5ced3d6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,242 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { - offset: 0, - limit: 0, - countTotal: false, - reverse: false, -}; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } - else { - message.reverse = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - message.reverse !== undefined && (obj.reverse = message.reverse); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } - else { - message.reverse = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 9c87ac0c9c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - 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; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { - offset: 0, - limit: 0, - count_total: false, - reverse: false, -}; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } else { - message.reverse = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - 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; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } else { - message.reverse = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.d.ts deleted file mode 100644 index b2687c3330..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Params, ValidatorSigningInfo } from "../../../cosmos/slashing/v1beta1/slashing"; -export declare const protobufPackage = "cosmos.slashing.v1beta1"; -/** GenesisState defines the slashing module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of related to deposit. */ - params: Params | undefined; - /** - * signing_infos represents a map between validator addresses and their - * signing infos. - */ - signingInfos: SigningInfo[]; - /** - * missed_blocks represents a map between validator addresses and their - * missed blocks. - */ - missedBlocks: ValidatorMissedBlocks[]; -} -/** SigningInfo stores validator signing info of corresponding address. */ -export interface SigningInfo { - /** address is the validator address. */ - address: string; - /** validator_signing_info represents the signing info of this validator. */ - validatorSigningInfo: ValidatorSigningInfo | undefined; -} -/** - * ValidatorMissedBlocks contains array of missed blocks of corresponding - * address. - */ -export interface ValidatorMissedBlocks { - /** address is the validator address. */ - address: string; - /** missed_blocks is an array of missed blocks by the validator. */ - missedBlocks: MissedBlock[]; -} -/** MissedBlock contains height and missed status as boolean. */ -export interface MissedBlock { - /** index is the height at which the block was missed. */ - index: number; - /** missed is the missed status. */ - missed: boolean; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -export declare const SigningInfo: { - encode(message: SigningInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SigningInfo; - fromJSON(object: any): SigningInfo; - toJSON(message: SigningInfo): unknown; - fromPartial(object: DeepPartial): SigningInfo; -}; -export declare const ValidatorMissedBlocks: { - encode(message: ValidatorMissedBlocks, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorMissedBlocks; - fromJSON(object: any): ValidatorMissedBlocks; - toJSON(message: ValidatorMissedBlocks): unknown; - fromPartial(object: DeepPartial): ValidatorMissedBlocks; -}; -export declare const MissedBlock: { - encode(message: MissedBlock, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MissedBlock; - fromJSON(object: any): MissedBlock; - toJSON(message: MissedBlock): unknown; - fromPartial(object: DeepPartial): MissedBlock; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.js deleted file mode 100644 index 5614f5884e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.js +++ /dev/null @@ -1,349 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Params, ValidatorSigningInfo, } from "../../../cosmos/slashing/v1beta1/slashing"; -export const protobufPackage = "cosmos.slashing.v1beta1"; -const baseGenesisState = {}; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.signingInfos) { - SigningInfo.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.missedBlocks) { - ValidatorMissedBlocks.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.signingInfos = []; - message.missedBlocks = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.signingInfos.push(SigningInfo.decode(reader, reader.uint32())); - break; - case 3: - message.missedBlocks.push(ValidatorMissedBlocks.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.signingInfos = []; - message.missedBlocks = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - if (object.signingInfos !== undefined && object.signingInfos !== null) { - for (const e of object.signingInfos) { - message.signingInfos.push(SigningInfo.fromJSON(e)); - } - } - if (object.missedBlocks !== undefined && object.missedBlocks !== null) { - for (const e of object.missedBlocks) { - message.missedBlocks.push(ValidatorMissedBlocks.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.signingInfos) { - obj.signingInfos = message.signingInfos.map((e) => e ? SigningInfo.toJSON(e) : undefined); - } - else { - obj.signingInfos = []; - } - if (message.missedBlocks) { - obj.missedBlocks = message.missedBlocks.map((e) => e ? ValidatorMissedBlocks.toJSON(e) : undefined); - } - else { - obj.missedBlocks = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.signingInfos = []; - message.missedBlocks = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - if (object.signingInfos !== undefined && object.signingInfos !== null) { - for (const e of object.signingInfos) { - message.signingInfos.push(SigningInfo.fromPartial(e)); - } - } - if (object.missedBlocks !== undefined && object.missedBlocks !== null) { - for (const e of object.missedBlocks) { - message.missedBlocks.push(ValidatorMissedBlocks.fromPartial(e)); - } - } - return message; - }, -}; -const baseSigningInfo = { address: "" }; -export const SigningInfo = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.validatorSigningInfo !== undefined) { - ValidatorSigningInfo.encode(message.validatorSigningInfo, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSigningInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.validatorSigningInfo = ValidatorSigningInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSigningInfo }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.validatorSigningInfo !== undefined && - object.validatorSigningInfo !== null) { - message.validatorSigningInfo = ValidatorSigningInfo.fromJSON(object.validatorSigningInfo); - } - else { - message.validatorSigningInfo = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.validatorSigningInfo !== undefined && - (obj.validatorSigningInfo = message.validatorSigningInfo - ? ValidatorSigningInfo.toJSON(message.validatorSigningInfo) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseSigningInfo }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.validatorSigningInfo !== undefined && - object.validatorSigningInfo !== null) { - message.validatorSigningInfo = ValidatorSigningInfo.fromPartial(object.validatorSigningInfo); - } - else { - message.validatorSigningInfo = undefined; - } - return message; - }, -}; -const baseValidatorMissedBlocks = { address: "" }; -export const ValidatorMissedBlocks = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.missedBlocks) { - MissedBlock.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorMissedBlocks }; - message.missedBlocks = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.missedBlocks.push(MissedBlock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorMissedBlocks }; - message.missedBlocks = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.missedBlocks !== undefined && object.missedBlocks !== null) { - for (const e of object.missedBlocks) { - message.missedBlocks.push(MissedBlock.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - if (message.missedBlocks) { - obj.missedBlocks = message.missedBlocks.map((e) => e ? MissedBlock.toJSON(e) : undefined); - } - else { - obj.missedBlocks = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorMissedBlocks }; - message.missedBlocks = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.missedBlocks !== undefined && object.missedBlocks !== null) { - for (const e of object.missedBlocks) { - message.missedBlocks.push(MissedBlock.fromPartial(e)); - } - } - return message; - }, -}; -const baseMissedBlock = { index: 0, missed: false }; -export const MissedBlock = { - encode(message, writer = Writer.create()) { - if (message.index !== 0) { - writer.uint32(8).int64(message.index); - } - if (message.missed === true) { - writer.uint32(16).bool(message.missed); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMissedBlock }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = longToNumber(reader.int64()); - break; - case 2: - message.missed = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMissedBlock }; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.missed !== undefined && object.missed !== null) { - message.missed = Boolean(object.missed); - } - else { - message.missed = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.index !== undefined && (obj.index = message.index); - message.missed !== undefined && (obj.missed = message.missed); - return obj; - }, - fromPartial(object) { - const message = { ...baseMissedBlock }; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.missed !== undefined && object.missed !== null) { - message.missed = object.missed; - } - else { - message.missed = false; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.ts deleted file mode 100644 index 5ad9d40da2..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/genesis.ts +++ /dev/null @@ -1,448 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { - Params, - ValidatorSigningInfo, -} from "../../../cosmos/slashing/v1beta1/slashing"; - -export const protobufPackage = "cosmos.slashing.v1beta1"; - -/** GenesisState defines the slashing module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of related to deposit. */ - params: Params | undefined; - /** - * signing_infos represents a map between validator addresses and their - * signing infos. - */ - signing_infos: SigningInfo[]; - /** - * missed_blocks represents a map between validator addresses and their - * missed blocks. - */ - missed_blocks: ValidatorMissedBlocks[]; -} - -/** SigningInfo stores validator signing info of corresponding address. */ -export interface SigningInfo { - /** address is the validator address. */ - address: string; - /** validator_signing_info represents the signing info of this validator. */ - validator_signing_info: ValidatorSigningInfo | undefined; -} - -/** - * ValidatorMissedBlocks contains array of missed blocks of corresponding - * address. - */ -export interface ValidatorMissedBlocks { - /** address is the validator address. */ - address: string; - /** missed_blocks is an array of missed blocks by the validator. */ - missed_blocks: MissedBlock[]; -} - -/** MissedBlock contains height and missed status as boolean. */ -export interface MissedBlock { - /** index is the height at which the block was missed. */ - index: number; - /** missed is the missed status. */ - missed: boolean; -} - -const baseGenesisState: object = {}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.signing_infos) { - SigningInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.missed_blocks) { - ValidatorMissedBlocks.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.signing_infos = []; - message.missed_blocks = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.signing_infos.push( - SigningInfo.decode(reader, reader.uint32()) - ); - break; - case 3: - message.missed_blocks.push( - ValidatorMissedBlocks.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.signing_infos = []; - message.missed_blocks = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if (object.signing_infos !== undefined && object.signing_infos !== null) { - for (const e of object.signing_infos) { - message.signing_infos.push(SigningInfo.fromJSON(e)); - } - } - if (object.missed_blocks !== undefined && object.missed_blocks !== null) { - for (const e of object.missed_blocks) { - message.missed_blocks.push(ValidatorMissedBlocks.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.signing_infos) { - obj.signing_infos = message.signing_infos.map((e) => - e ? SigningInfo.toJSON(e) : undefined - ); - } else { - obj.signing_infos = []; - } - if (message.missed_blocks) { - obj.missed_blocks = message.missed_blocks.map((e) => - e ? ValidatorMissedBlocks.toJSON(e) : undefined - ); - } else { - obj.missed_blocks = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.signing_infos = []; - message.missed_blocks = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if (object.signing_infos !== undefined && object.signing_infos !== null) { - for (const e of object.signing_infos) { - message.signing_infos.push(SigningInfo.fromPartial(e)); - } - } - if (object.missed_blocks !== undefined && object.missed_blocks !== null) { - for (const e of object.missed_blocks) { - message.missed_blocks.push(ValidatorMissedBlocks.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSigningInfo: object = { address: "" }; - -export const SigningInfo = { - encode(message: SigningInfo, writer: Writer = Writer.create()): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.validator_signing_info !== undefined) { - ValidatorSigningInfo.encode( - message.validator_signing_info, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SigningInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSigningInfo } as SigningInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.validator_signing_info = ValidatorSigningInfo.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SigningInfo { - const message = { ...baseSigningInfo } as SigningInfo; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if ( - object.validator_signing_info !== undefined && - object.validator_signing_info !== null - ) { - message.validator_signing_info = ValidatorSigningInfo.fromJSON( - object.validator_signing_info - ); - } else { - message.validator_signing_info = undefined; - } - return message; - }, - - toJSON(message: SigningInfo): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.validator_signing_info !== undefined && - (obj.validator_signing_info = message.validator_signing_info - ? ValidatorSigningInfo.toJSON(message.validator_signing_info) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): SigningInfo { - const message = { ...baseSigningInfo } as SigningInfo; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if ( - object.validator_signing_info !== undefined && - object.validator_signing_info !== null - ) { - message.validator_signing_info = ValidatorSigningInfo.fromPartial( - object.validator_signing_info - ); - } else { - message.validator_signing_info = undefined; - } - return message; - }, -}; - -const baseValidatorMissedBlocks: object = { address: "" }; - -export const ValidatorMissedBlocks = { - encode( - message: ValidatorMissedBlocks, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.missed_blocks) { - MissedBlock.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorMissedBlocks { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorMissedBlocks } as ValidatorMissedBlocks; - message.missed_blocks = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.missed_blocks.push( - MissedBlock.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorMissedBlocks { - const message = { ...baseValidatorMissedBlocks } as ValidatorMissedBlocks; - message.missed_blocks = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.missed_blocks !== undefined && object.missed_blocks !== null) { - for (const e of object.missed_blocks) { - message.missed_blocks.push(MissedBlock.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ValidatorMissedBlocks): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.missed_blocks) { - obj.missed_blocks = message.missed_blocks.map((e) => - e ? MissedBlock.toJSON(e) : undefined - ); - } else { - obj.missed_blocks = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ValidatorMissedBlocks { - const message = { ...baseValidatorMissedBlocks } as ValidatorMissedBlocks; - message.missed_blocks = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.missed_blocks !== undefined && object.missed_blocks !== null) { - for (const e of object.missed_blocks) { - message.missed_blocks.push(MissedBlock.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMissedBlock: object = { index: 0, missed: false }; - -export const MissedBlock = { - encode(message: MissedBlock, writer: Writer = Writer.create()): Writer { - if (message.index !== 0) { - writer.uint32(8).int64(message.index); - } - if (message.missed === true) { - writer.uint32(16).bool(message.missed); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MissedBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMissedBlock } as MissedBlock; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = longToNumber(reader.int64() as Long); - break; - case 2: - message.missed = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MissedBlock { - const message = { ...baseMissedBlock } as MissedBlock; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.missed !== undefined && object.missed !== null) { - message.missed = Boolean(object.missed); - } else { - message.missed = false; - } - return message; - }, - - toJSON(message: MissedBlock): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = message.index); - message.missed !== undefined && (obj.missed = message.missed); - return obj; - }, - - fromPartial(object: DeepPartial): MissedBlock { - const message = { ...baseMissedBlock } as MissedBlock; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.missed !== undefined && object.missed !== null) { - message.missed = object.missed; - } else { - message.missed = false; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.d.ts deleted file mode 100644 index 02ca283246..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Params, ValidatorSigningInfo } from "../../../cosmos/slashing/v1beta1/slashing"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -export declare const protobufPackage = "cosmos.slashing.v1beta1"; -/** QueryParamsRequest is the request type for the Query/Params RPC method */ -export interface QueryParamsRequest { -} -/** QueryParamsResponse is the response type for the Query/Params RPC method */ -export interface QueryParamsResponse { - params: Params | undefined; -} -/** - * QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC - * method - */ -export interface QuerySigningInfoRequest { - /** cons_address is the address to query signing info of */ - consAddress: string; -} -/** - * QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC - * method - */ -export interface QuerySigningInfoResponse { - /** val_signing_info is the signing info of requested val cons address */ - valSigningInfo: ValidatorSigningInfo | undefined; -} -/** - * QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC - * method - */ -export interface QuerySigningInfosRequest { - pagination: PageRequest | undefined; -} -/** - * QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC - * method - */ -export interface QuerySigningInfosResponse { - /** info is the signing info of all validators */ - info: ValidatorSigningInfo[]; - pagination: PageResponse | undefined; -} -export declare const QueryParamsRequest: { - encode(_: QueryParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest; - fromJSON(_: any): QueryParamsRequest; - toJSON(_: QueryParamsRequest): unknown; - fromPartial(_: DeepPartial): QueryParamsRequest; -}; -export declare const QueryParamsResponse: { - encode(message: QueryParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse; - fromJSON(object: any): QueryParamsResponse; - toJSON(message: QueryParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryParamsResponse; -}; -export declare const QuerySigningInfoRequest: { - encode(message: QuerySigningInfoRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySigningInfoRequest; - fromJSON(object: any): QuerySigningInfoRequest; - toJSON(message: QuerySigningInfoRequest): unknown; - fromPartial(object: DeepPartial): QuerySigningInfoRequest; -}; -export declare const QuerySigningInfoResponse: { - encode(message: QuerySigningInfoResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySigningInfoResponse; - fromJSON(object: any): QuerySigningInfoResponse; - toJSON(message: QuerySigningInfoResponse): unknown; - fromPartial(object: DeepPartial): QuerySigningInfoResponse; -}; -export declare const QuerySigningInfosRequest: { - encode(message: QuerySigningInfosRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySigningInfosRequest; - fromJSON(object: any): QuerySigningInfosRequest; - toJSON(message: QuerySigningInfosRequest): unknown; - fromPartial(object: DeepPartial): QuerySigningInfosRequest; -}; -export declare const QuerySigningInfosResponse: { - encode(message: QuerySigningInfosResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QuerySigningInfosResponse; - fromJSON(object: any): QuerySigningInfosResponse; - toJSON(message: QuerySigningInfosResponse): unknown; - fromPartial(object: DeepPartial): QuerySigningInfosResponse; -}; -/** Query provides defines the gRPC querier service */ -export interface Query { - /** Params queries the parameters of slashing module */ - Params(request: QueryParamsRequest): Promise; - /** SigningInfo queries the signing info of given cons address */ - SigningInfo(request: QuerySigningInfoRequest): Promise; - /** SigningInfos queries signing info of all validators */ - SigningInfos(request: QuerySigningInfosRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Params(request: QueryParamsRequest): Promise; - SigningInfo(request: QuerySigningInfoRequest): Promise; - SigningInfos(request: QuerySigningInfosRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.js deleted file mode 100644 index 63469583f3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.js +++ /dev/null @@ -1,372 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Params, ValidatorSigningInfo, } from "../../../cosmos/slashing/v1beta1/slashing"; -import { PageRequest, PageResponse, } from "../../../cosmos/base/query/v1beta1/pagination"; -export const protobufPackage = "cosmos.slashing.v1beta1"; -const baseQueryParamsRequest = {}; -export const QueryParamsRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, -}; -const baseQueryParamsResponse = {}; -export const QueryParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; -const baseQuerySigningInfoRequest = { consAddress: "" }; -export const QuerySigningInfoRequest = { - encode(message, writer = Writer.create()) { - if (message.consAddress !== "") { - writer.uint32(10).string(message.consAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfoRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQuerySigningInfoRequest, - }; - if (object.consAddress !== undefined && object.consAddress !== null) { - message.consAddress = String(object.consAddress); - } - else { - message.consAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.consAddress !== undefined && - (obj.consAddress = message.consAddress); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQuerySigningInfoRequest, - }; - if (object.consAddress !== undefined && object.consAddress !== null) { - message.consAddress = object.consAddress; - } - else { - message.consAddress = ""; - } - return message; - }, -}; -const baseQuerySigningInfoResponse = {}; -export const QuerySigningInfoResponse = { - encode(message, writer = Writer.create()) { - if (message.valSigningInfo !== undefined) { - ValidatorSigningInfo.encode(message.valSigningInfo, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfoResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.valSigningInfo = ValidatorSigningInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQuerySigningInfoResponse, - }; - if (object.valSigningInfo !== undefined && object.valSigningInfo !== null) { - message.valSigningInfo = ValidatorSigningInfo.fromJSON(object.valSigningInfo); - } - else { - message.valSigningInfo = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.valSigningInfo !== undefined && - (obj.valSigningInfo = message.valSigningInfo - ? ValidatorSigningInfo.toJSON(message.valSigningInfo) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQuerySigningInfoResponse, - }; - if (object.valSigningInfo !== undefined && object.valSigningInfo !== null) { - message.valSigningInfo = ValidatorSigningInfo.fromPartial(object.valSigningInfo); - } - else { - message.valSigningInfo = undefined; - } - return message; - }, -}; -const baseQuerySigningInfosRequest = {}; -export const QuerySigningInfosRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfosRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQuerySigningInfosRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQuerySigningInfosRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQuerySigningInfosResponse = {}; -export const QuerySigningInfosResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.info) { - ValidatorSigningInfo.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfosResponse, - }; - message.info = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.info.push(ValidatorSigningInfo.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQuerySigningInfosResponse, - }; - message.info = []; - if (object.info !== undefined && object.info !== null) { - for (const e of object.info) { - message.info.push(ValidatorSigningInfo.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.info) { - obj.info = message.info.map((e) => e ? ValidatorSigningInfo.toJSON(e) : undefined); - } - else { - obj.info = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQuerySigningInfosResponse, - }; - message.info = []; - if (object.info !== undefined && object.info !== null) { - for (const e of object.info) { - message.info.push(ValidatorSigningInfo.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Params(request) { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.slashing.v1beta1.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - SigningInfo(request) { - const data = QuerySigningInfoRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.slashing.v1beta1.Query", "SigningInfo", data); - return promise.then((data) => QuerySigningInfoResponse.decode(new Reader(data))); - } - SigningInfos(request) { - const data = QuerySigningInfosRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.slashing.v1beta1.Query", "SigningInfos", data); - return promise.then((data) => QuerySigningInfosResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.ts deleted file mode 100644 index 9ed6a2fd26..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/query.ts +++ /dev/null @@ -1,560 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { - Params, - ValidatorSigningInfo, -} from "../../../cosmos/slashing/v1beta1/slashing"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; - -export const protobufPackage = "cosmos.slashing.v1beta1"; - -/** QueryParamsRequest is the request type for the Query/Params RPC method */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is the response type for the Query/Params RPC method */ -export interface QueryParamsResponse { - params: Params | undefined; -} - -/** - * QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC - * method - */ -export interface QuerySigningInfoRequest { - /** cons_address is the address to query signing info of */ - cons_address: string; -} - -/** - * QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC - * method - */ -export interface QuerySigningInfoResponse { - /** val_signing_info is the signing info of requested val cons address */ - val_signing_info: ValidatorSigningInfo | undefined; -} - -/** - * QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC - * method - */ -export interface QuerySigningInfosRequest { - pagination: PageRequest | undefined; -} - -/** - * QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC - * method - */ -export interface QuerySigningInfosResponse { - /** info is the signing info of all validators */ - info: ValidatorSigningInfo[]; - pagination: PageResponse | undefined; -} - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -const baseQuerySigningInfoRequest: object = { cons_address: "" }; - -export const QuerySigningInfoRequest = { - encode( - message: QuerySigningInfoRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.cons_address !== "") { - writer.uint32(10).string(message.cons_address); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QuerySigningInfoRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfoRequest, - } as QuerySigningInfoRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cons_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySigningInfoRequest { - const message = { - ...baseQuerySigningInfoRequest, - } as QuerySigningInfoRequest; - if (object.cons_address !== undefined && object.cons_address !== null) { - message.cons_address = String(object.cons_address); - } else { - message.cons_address = ""; - } - return message; - }, - - toJSON(message: QuerySigningInfoRequest): unknown { - const obj: any = {}; - message.cons_address !== undefined && - (obj.cons_address = message.cons_address); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QuerySigningInfoRequest { - const message = { - ...baseQuerySigningInfoRequest, - } as QuerySigningInfoRequest; - if (object.cons_address !== undefined && object.cons_address !== null) { - message.cons_address = object.cons_address; - } else { - message.cons_address = ""; - } - return message; - }, -}; - -const baseQuerySigningInfoResponse: object = {}; - -export const QuerySigningInfoResponse = { - encode( - message: QuerySigningInfoResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.val_signing_info !== undefined) { - ValidatorSigningInfo.encode( - message.val_signing_info, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QuerySigningInfoResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfoResponse, - } as QuerySigningInfoResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.val_signing_info = ValidatorSigningInfo.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySigningInfoResponse { - const message = { - ...baseQuerySigningInfoResponse, - } as QuerySigningInfoResponse; - if ( - object.val_signing_info !== undefined && - object.val_signing_info !== null - ) { - message.val_signing_info = ValidatorSigningInfo.fromJSON( - object.val_signing_info - ); - } else { - message.val_signing_info = undefined; - } - return message; - }, - - toJSON(message: QuerySigningInfoResponse): unknown { - const obj: any = {}; - message.val_signing_info !== undefined && - (obj.val_signing_info = message.val_signing_info - ? ValidatorSigningInfo.toJSON(message.val_signing_info) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QuerySigningInfoResponse { - const message = { - ...baseQuerySigningInfoResponse, - } as QuerySigningInfoResponse; - if ( - object.val_signing_info !== undefined && - object.val_signing_info !== null - ) { - message.val_signing_info = ValidatorSigningInfo.fromPartial( - object.val_signing_info - ); - } else { - message.val_signing_info = undefined; - } - return message; - }, -}; - -const baseQuerySigningInfosRequest: object = {}; - -export const QuerySigningInfosRequest = { - encode( - message: QuerySigningInfosRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QuerySigningInfosRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfosRequest, - } as QuerySigningInfosRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySigningInfosRequest { - const message = { - ...baseQuerySigningInfosRequest, - } as QuerySigningInfosRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QuerySigningInfosRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QuerySigningInfosRequest { - const message = { - ...baseQuerySigningInfosRequest, - } as QuerySigningInfosRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQuerySigningInfosResponse: object = {}; - -export const QuerySigningInfosResponse = { - encode( - message: QuerySigningInfosResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.info) { - ValidatorSigningInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QuerySigningInfosResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQuerySigningInfosResponse, - } as QuerySigningInfosResponse; - message.info = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.info.push( - ValidatorSigningInfo.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySigningInfosResponse { - const message = { - ...baseQuerySigningInfosResponse, - } as QuerySigningInfosResponse; - message.info = []; - if (object.info !== undefined && object.info !== null) { - for (const e of object.info) { - message.info.push(ValidatorSigningInfo.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QuerySigningInfosResponse): unknown { - const obj: any = {}; - if (message.info) { - obj.info = message.info.map((e) => - e ? ValidatorSigningInfo.toJSON(e) : undefined - ); - } else { - obj.info = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QuerySigningInfosResponse { - const message = { - ...baseQuerySigningInfosResponse, - } as QuerySigningInfosResponse; - message.info = []; - if (object.info !== undefined && object.info !== null) { - for (const e of object.info) { - message.info.push(ValidatorSigningInfo.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -/** Query provides defines the gRPC querier service */ -export interface Query { - /** Params queries the parameters of slashing module */ - Params(request: QueryParamsRequest): Promise; - /** SigningInfo queries the signing info of given cons address */ - SigningInfo( - request: QuerySigningInfoRequest - ): Promise; - /** SigningInfos queries signing info of all validators */ - SigningInfos( - request: QuerySigningInfosRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.slashing.v1beta1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - - SigningInfo( - request: QuerySigningInfoRequest - ): Promise { - const data = QuerySigningInfoRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.slashing.v1beta1.Query", - "SigningInfo", - data - ); - return promise.then((data) => - QuerySigningInfoResponse.decode(new Reader(data)) - ); - } - - SigningInfos( - request: QuerySigningInfosRequest - ): Promise { - const data = QuerySigningInfosRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.slashing.v1beta1.Query", - "SigningInfos", - data - ); - return promise.then((data) => - QuerySigningInfosResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.d.ts deleted file mode 100644 index 79c3a40116..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Duration } from "../../../google/protobuf/duration"; -export declare const protobufPackage = "cosmos.slashing.v1beta1"; -/** - * ValidatorSigningInfo defines a validator's signing info for monitoring their - * liveness activity. - */ -export interface ValidatorSigningInfo { - address: string; - /** Height at which validator was first a candidate OR was unjailed */ - startHeight: number; - /** - * 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`. - */ - indexOffset: number; - /** Timestamp until which the validator is jailed due to liveness downtime. */ - jailedUntil: Date | undefined; - /** - * 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. - */ - tombstoned: boolean; - /** - * A counter kept to avoid unnecessary array reads. - * Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. - */ - missedBlocksCounter: number; -} -/** Params represents the parameters used for by the slashing module. */ -export interface Params { - signedBlocksWindow: number; - minSignedPerWindow: Uint8Array; - downtimeJailDuration: Duration | undefined; - slashFractionDoubleSign: Uint8Array; - slashFractionDowntime: Uint8Array; -} -export declare const ValidatorSigningInfo: { - encode(message: ValidatorSigningInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorSigningInfo; - fromJSON(object: any): ValidatorSigningInfo; - toJSON(message: ValidatorSigningInfo): unknown; - fromPartial(object: DeepPartial): ValidatorSigningInfo; -}; -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.js deleted file mode 100644 index 15baf88b2f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.js +++ /dev/null @@ -1,369 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Duration } from "../../../google/protobuf/duration"; -export const protobufPackage = "cosmos.slashing.v1beta1"; -const baseValidatorSigningInfo = { - address: "", - startHeight: 0, - indexOffset: 0, - tombstoned: false, - missedBlocksCounter: 0, -}; -export const ValidatorSigningInfo = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.startHeight !== 0) { - writer.uint32(16).int64(message.startHeight); - } - if (message.indexOffset !== 0) { - writer.uint32(24).int64(message.indexOffset); - } - if (message.jailedUntil !== undefined) { - Timestamp.encode(toTimestamp(message.jailedUntil), writer.uint32(34).fork()).ldelim(); - } - if (message.tombstoned === true) { - writer.uint32(40).bool(message.tombstoned); - } - if (message.missedBlocksCounter !== 0) { - writer.uint32(48).int64(message.missedBlocksCounter); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSigningInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.startHeight = longToNumber(reader.int64()); - break; - case 3: - message.indexOffset = longToNumber(reader.int64()); - break; - case 4: - message.jailedUntil = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.tombstoned = reader.bool(); - break; - case 6: - message.missedBlocksCounter = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorSigningInfo }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.startHeight !== undefined && object.startHeight !== null) { - message.startHeight = Number(object.startHeight); - } - else { - message.startHeight = 0; - } - if (object.indexOffset !== undefined && object.indexOffset !== null) { - message.indexOffset = Number(object.indexOffset); - } - else { - message.indexOffset = 0; - } - if (object.jailedUntil !== undefined && object.jailedUntil !== null) { - message.jailedUntil = fromJsonTimestamp(object.jailedUntil); - } - else { - message.jailedUntil = undefined; - } - if (object.tombstoned !== undefined && object.tombstoned !== null) { - message.tombstoned = Boolean(object.tombstoned); - } - else { - message.tombstoned = false; - } - if (object.missedBlocksCounter !== undefined && - object.missedBlocksCounter !== null) { - message.missedBlocksCounter = Number(object.missedBlocksCounter); - } - else { - message.missedBlocksCounter = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.startHeight !== undefined && - (obj.startHeight = message.startHeight); - message.indexOffset !== undefined && - (obj.indexOffset = message.indexOffset); - message.jailedUntil !== undefined && - (obj.jailedUntil = - message.jailedUntil !== undefined - ? message.jailedUntil.toISOString() - : null); - message.tombstoned !== undefined && (obj.tombstoned = message.tombstoned); - message.missedBlocksCounter !== undefined && - (obj.missedBlocksCounter = message.missedBlocksCounter); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorSigningInfo }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.startHeight !== undefined && object.startHeight !== null) { - message.startHeight = object.startHeight; - } - else { - message.startHeight = 0; - } - if (object.indexOffset !== undefined && object.indexOffset !== null) { - message.indexOffset = object.indexOffset; - } - else { - message.indexOffset = 0; - } - if (object.jailedUntil !== undefined && object.jailedUntil !== null) { - message.jailedUntil = object.jailedUntil; - } - else { - message.jailedUntil = undefined; - } - if (object.tombstoned !== undefined && object.tombstoned !== null) { - message.tombstoned = object.tombstoned; - } - else { - message.tombstoned = false; - } - if (object.missedBlocksCounter !== undefined && - object.missedBlocksCounter !== null) { - message.missedBlocksCounter = object.missedBlocksCounter; - } - else { - message.missedBlocksCounter = 0; - } - return message; - }, -}; -const baseParams = { signedBlocksWindow: 0 }; -export const Params = { - encode(message, writer = Writer.create()) { - if (message.signedBlocksWindow !== 0) { - writer.uint32(8).int64(message.signedBlocksWindow); - } - if (message.minSignedPerWindow.length !== 0) { - writer.uint32(18).bytes(message.minSignedPerWindow); - } - if (message.downtimeJailDuration !== undefined) { - Duration.encode(message.downtimeJailDuration, writer.uint32(26).fork()).ldelim(); - } - if (message.slashFractionDoubleSign.length !== 0) { - writer.uint32(34).bytes(message.slashFractionDoubleSign); - } - if (message.slashFractionDowntime.length !== 0) { - writer.uint32(42).bytes(message.slashFractionDowntime); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signedBlocksWindow = longToNumber(reader.int64()); - break; - case 2: - message.minSignedPerWindow = reader.bytes(); - break; - case 3: - message.downtimeJailDuration = Duration.decode(reader, reader.uint32()); - break; - case 4: - message.slashFractionDoubleSign = reader.bytes(); - break; - case 5: - message.slashFractionDowntime = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - if (object.signedBlocksWindow !== undefined && - object.signedBlocksWindow !== null) { - message.signedBlocksWindow = Number(object.signedBlocksWindow); - } - else { - message.signedBlocksWindow = 0; - } - if (object.minSignedPerWindow !== undefined && - object.minSignedPerWindow !== null) { - message.minSignedPerWindow = bytesFromBase64(object.minSignedPerWindow); - } - if (object.downtimeJailDuration !== undefined && - object.downtimeJailDuration !== null) { - message.downtimeJailDuration = Duration.fromJSON(object.downtimeJailDuration); - } - else { - message.downtimeJailDuration = undefined; - } - if (object.slashFractionDoubleSign !== undefined && - object.slashFractionDoubleSign !== null) { - message.slashFractionDoubleSign = bytesFromBase64(object.slashFractionDoubleSign); - } - if (object.slashFractionDowntime !== undefined && - object.slashFractionDowntime !== null) { - message.slashFractionDowntime = bytesFromBase64(object.slashFractionDowntime); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.signedBlocksWindow !== undefined && - (obj.signedBlocksWindow = message.signedBlocksWindow); - message.minSignedPerWindow !== undefined && - (obj.minSignedPerWindow = base64FromBytes(message.minSignedPerWindow !== undefined - ? message.minSignedPerWindow - : new Uint8Array())); - message.downtimeJailDuration !== undefined && - (obj.downtimeJailDuration = message.downtimeJailDuration - ? Duration.toJSON(message.downtimeJailDuration) - : undefined); - message.slashFractionDoubleSign !== undefined && - (obj.slashFractionDoubleSign = base64FromBytes(message.slashFractionDoubleSign !== undefined - ? message.slashFractionDoubleSign - : new Uint8Array())); - message.slashFractionDowntime !== undefined && - (obj.slashFractionDowntime = base64FromBytes(message.slashFractionDowntime !== undefined - ? message.slashFractionDowntime - : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - if (object.signedBlocksWindow !== undefined && - object.signedBlocksWindow !== null) { - message.signedBlocksWindow = object.signedBlocksWindow; - } - else { - message.signedBlocksWindow = 0; - } - if (object.minSignedPerWindow !== undefined && - object.minSignedPerWindow !== null) { - message.minSignedPerWindow = object.minSignedPerWindow; - } - else { - message.minSignedPerWindow = new Uint8Array(); - } - if (object.downtimeJailDuration !== undefined && - object.downtimeJailDuration !== null) { - message.downtimeJailDuration = Duration.fromPartial(object.downtimeJailDuration); - } - else { - message.downtimeJailDuration = undefined; - } - if (object.slashFractionDoubleSign !== undefined && - object.slashFractionDoubleSign !== null) { - message.slashFractionDoubleSign = object.slashFractionDoubleSign; - } - else { - message.slashFractionDoubleSign = new Uint8Array(); - } - if (object.slashFractionDowntime !== undefined && - object.slashFractionDowntime !== null) { - message.slashFractionDowntime = object.slashFractionDowntime; - } - else { - message.slashFractionDowntime = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.ts deleted file mode 100644 index 5642533cb7..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/slashing.ts +++ /dev/null @@ -1,471 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Duration } from "../../../google/protobuf/duration"; - -export const protobufPackage = "cosmos.slashing.v1beta1"; - -/** - * ValidatorSigningInfo defines a validator's signing info for monitoring their - * liveness activity. - */ -export interface ValidatorSigningInfo { - address: string; - /** Height at which validator was first a candidate OR was unjailed */ - start_height: number; - /** - * 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`. - */ - index_offset: number; - /** Timestamp until which the validator is jailed due to liveness downtime. */ - jailed_until: Date | undefined; - /** - * 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. - */ - tombstoned: boolean; - /** - * A counter kept to avoid unnecessary array reads. - * Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. - */ - missed_blocks_counter: number; -} - -/** Params represents the parameters used for by the slashing module. */ -export interface Params { - signed_blocks_window: number; - min_signed_per_window: Uint8Array; - downtime_jail_duration: Duration | undefined; - slash_fraction_double_sign: Uint8Array; - slash_fraction_downtime: Uint8Array; -} - -const baseValidatorSigningInfo: object = { - address: "", - start_height: 0, - index_offset: 0, - tombstoned: false, - missed_blocks_counter: 0, -}; - -export const ValidatorSigningInfo = { - encode( - message: ValidatorSigningInfo, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.start_height !== 0) { - writer.uint32(16).int64(message.start_height); - } - if (message.index_offset !== 0) { - writer.uint32(24).int64(message.index_offset); - } - if (message.jailed_until !== undefined) { - Timestamp.encode( - toTimestamp(message.jailed_until), - writer.uint32(34).fork() - ).ldelim(); - } - if (message.tombstoned === true) { - writer.uint32(40).bool(message.tombstoned); - } - if (message.missed_blocks_counter !== 0) { - writer.uint32(48).int64(message.missed_blocks_counter); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorSigningInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSigningInfo } as ValidatorSigningInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.start_height = longToNumber(reader.int64() as Long); - break; - case 3: - message.index_offset = longToNumber(reader.int64() as Long); - break; - case 4: - message.jailed_until = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 5: - message.tombstoned = reader.bool(); - break; - case 6: - message.missed_blocks_counter = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorSigningInfo { - const message = { ...baseValidatorSigningInfo } as ValidatorSigningInfo; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.start_height !== undefined && object.start_height !== null) { - message.start_height = Number(object.start_height); - } else { - message.start_height = 0; - } - if (object.index_offset !== undefined && object.index_offset !== null) { - message.index_offset = Number(object.index_offset); - } else { - message.index_offset = 0; - } - if (object.jailed_until !== undefined && object.jailed_until !== null) { - message.jailed_until = fromJsonTimestamp(object.jailed_until); - } else { - message.jailed_until = undefined; - } - if (object.tombstoned !== undefined && object.tombstoned !== null) { - message.tombstoned = Boolean(object.tombstoned); - } else { - message.tombstoned = false; - } - if ( - object.missed_blocks_counter !== undefined && - object.missed_blocks_counter !== null - ) { - message.missed_blocks_counter = Number(object.missed_blocks_counter); - } else { - message.missed_blocks_counter = 0; - } - return message; - }, - - toJSON(message: ValidatorSigningInfo): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.start_height !== undefined && - (obj.start_height = message.start_height); - message.index_offset !== undefined && - (obj.index_offset = message.index_offset); - message.jailed_until !== undefined && - (obj.jailed_until = - message.jailed_until !== undefined - ? message.jailed_until.toISOString() - : null); - message.tombstoned !== undefined && (obj.tombstoned = message.tombstoned); - message.missed_blocks_counter !== undefined && - (obj.missed_blocks_counter = message.missed_blocks_counter); - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorSigningInfo { - const message = { ...baseValidatorSigningInfo } as ValidatorSigningInfo; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.start_height !== undefined && object.start_height !== null) { - message.start_height = object.start_height; - } else { - message.start_height = 0; - } - if (object.index_offset !== undefined && object.index_offset !== null) { - message.index_offset = object.index_offset; - } else { - message.index_offset = 0; - } - if (object.jailed_until !== undefined && object.jailed_until !== null) { - message.jailed_until = object.jailed_until; - } else { - message.jailed_until = undefined; - } - if (object.tombstoned !== undefined && object.tombstoned !== null) { - message.tombstoned = object.tombstoned; - } else { - message.tombstoned = false; - } - if ( - object.missed_blocks_counter !== undefined && - object.missed_blocks_counter !== null - ) { - message.missed_blocks_counter = object.missed_blocks_counter; - } else { - message.missed_blocks_counter = 0; - } - return message; - }, -}; - -const baseParams: object = { signed_blocks_window: 0 }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.signed_blocks_window !== 0) { - writer.uint32(8).int64(message.signed_blocks_window); - } - if (message.min_signed_per_window.length !== 0) { - writer.uint32(18).bytes(message.min_signed_per_window); - } - if (message.downtime_jail_duration !== undefined) { - Duration.encode( - message.downtime_jail_duration, - writer.uint32(26).fork() - ).ldelim(); - } - if (message.slash_fraction_double_sign.length !== 0) { - writer.uint32(34).bytes(message.slash_fraction_double_sign); - } - if (message.slash_fraction_downtime.length !== 0) { - writer.uint32(42).bytes(message.slash_fraction_downtime); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signed_blocks_window = longToNumber(reader.int64() as Long); - break; - case 2: - message.min_signed_per_window = reader.bytes(); - break; - case 3: - message.downtime_jail_duration = Duration.decode( - reader, - reader.uint32() - ); - break; - case 4: - message.slash_fraction_double_sign = reader.bytes(); - break; - case 5: - message.slash_fraction_downtime = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if ( - object.signed_blocks_window !== undefined && - object.signed_blocks_window !== null - ) { - message.signed_blocks_window = Number(object.signed_blocks_window); - } else { - message.signed_blocks_window = 0; - } - if ( - object.min_signed_per_window !== undefined && - object.min_signed_per_window !== null - ) { - message.min_signed_per_window = bytesFromBase64( - object.min_signed_per_window - ); - } - if ( - object.downtime_jail_duration !== undefined && - object.downtime_jail_duration !== null - ) { - message.downtime_jail_duration = Duration.fromJSON( - object.downtime_jail_duration - ); - } else { - message.downtime_jail_duration = undefined; - } - if ( - object.slash_fraction_double_sign !== undefined && - object.slash_fraction_double_sign !== null - ) { - message.slash_fraction_double_sign = bytesFromBase64( - object.slash_fraction_double_sign - ); - } - if ( - object.slash_fraction_downtime !== undefined && - object.slash_fraction_downtime !== null - ) { - message.slash_fraction_downtime = bytesFromBase64( - object.slash_fraction_downtime - ); - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.signed_blocks_window !== undefined && - (obj.signed_blocks_window = message.signed_blocks_window); - message.min_signed_per_window !== undefined && - (obj.min_signed_per_window = base64FromBytes( - message.min_signed_per_window !== undefined - ? message.min_signed_per_window - : new Uint8Array() - )); - message.downtime_jail_duration !== undefined && - (obj.downtime_jail_duration = message.downtime_jail_duration - ? Duration.toJSON(message.downtime_jail_duration) - : undefined); - message.slash_fraction_double_sign !== undefined && - (obj.slash_fraction_double_sign = base64FromBytes( - message.slash_fraction_double_sign !== undefined - ? message.slash_fraction_double_sign - : new Uint8Array() - )); - message.slash_fraction_downtime !== undefined && - (obj.slash_fraction_downtime = base64FromBytes( - message.slash_fraction_downtime !== undefined - ? message.slash_fraction_downtime - : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if ( - object.signed_blocks_window !== undefined && - object.signed_blocks_window !== null - ) { - message.signed_blocks_window = object.signed_blocks_window; - } else { - message.signed_blocks_window = 0; - } - if ( - object.min_signed_per_window !== undefined && - object.min_signed_per_window !== null - ) { - message.min_signed_per_window = object.min_signed_per_window; - } else { - message.min_signed_per_window = new Uint8Array(); - } - if ( - object.downtime_jail_duration !== undefined && - object.downtime_jail_duration !== null - ) { - message.downtime_jail_duration = Duration.fromPartial( - object.downtime_jail_duration - ); - } else { - message.downtime_jail_duration = undefined; - } - if ( - object.slash_fraction_double_sign !== undefined && - object.slash_fraction_double_sign !== null - ) { - message.slash_fraction_double_sign = object.slash_fraction_double_sign; - } else { - message.slash_fraction_double_sign = new Uint8Array(); - } - if ( - object.slash_fraction_downtime !== undefined && - object.slash_fraction_downtime !== null - ) { - message.slash_fraction_downtime = object.slash_fraction_downtime; - } else { - message.slash_fraction_downtime = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.d.ts deleted file mode 100644 index d33bfd7067..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.slashing.v1beta1"; -/** MsgUnjail defines the Msg/Unjail request type */ -export interface MsgUnjail { - validatorAddr: string; -} -/** MsgUnjailResponse defines the Msg/Unjail response type */ -export interface MsgUnjailResponse { -} -export declare const MsgUnjail: { - encode(message: MsgUnjail, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgUnjail; - fromJSON(object: any): MsgUnjail; - toJSON(message: MsgUnjail): unknown; - fromPartial(object: DeepPartial): MsgUnjail; -}; -export declare const MsgUnjailResponse: { - encode(_: MsgUnjailResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgUnjailResponse; - fromJSON(_: any): MsgUnjailResponse; - toJSON(_: MsgUnjailResponse): unknown; - fromPartial(_: DeepPartial): MsgUnjailResponse; -}; -/** Msg defines the slashing Msg service. */ -export interface Msg { - /** - * Unjail defines a method for unjailing a jailed validator, thus returning - * them into the bonded validator set, so they can begin receiving provisions - * and rewards again. - */ - Unjail(request: MsgUnjail): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - Unjail(request: MsgUnjail): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.js deleted file mode 100644 index cdb1d9d2ad..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.js +++ /dev/null @@ -1,97 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.slashing.v1beta1"; -const baseMsgUnjail = { validatorAddr: "" }; -export const MsgUnjail = { - encode(message, writer = Writer.create()) { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUnjail }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgUnjail }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgUnjail }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - return message; - }, -}; -const baseMsgUnjailResponse = {}; -export const MsgUnjailResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUnjailResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgUnjailResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgUnjailResponse }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Unjail(request) { - const data = MsgUnjail.encode(request).finish(); - const promise = this.rpc.request("cosmos.slashing.v1beta1.Msg", "Unjail", data); - return promise.then((data) => MsgUnjailResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.ts deleted file mode 100644 index a7028b64d2..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/cosmos/slashing/v1beta1/tx.ts +++ /dev/null @@ -1,151 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.slashing.v1beta1"; - -/** MsgUnjail defines the Msg/Unjail request type */ -export interface MsgUnjail { - validator_addr: string; -} - -/** MsgUnjailResponse defines the Msg/Unjail response type */ -export interface MsgUnjailResponse {} - -const baseMsgUnjail: object = { validator_addr: "" }; - -export const MsgUnjail = { - encode(message: MsgUnjail, writer: Writer = Writer.create()): Writer { - if (message.validator_addr !== "") { - writer.uint32(10).string(message.validator_addr); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUnjail { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUnjail } as MsgUnjail; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_addr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgUnjail { - const message = { ...baseMsgUnjail } as MsgUnjail; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = String(object.validator_addr); - } else { - message.validator_addr = ""; - } - return message; - }, - - toJSON(message: MsgUnjail): unknown { - const obj: any = {}; - message.validator_addr !== undefined && - (obj.validator_addr = message.validator_addr); - return obj; - }, - - fromPartial(object: DeepPartial): MsgUnjail { - const message = { ...baseMsgUnjail } as MsgUnjail; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = object.validator_addr; - } else { - message.validator_addr = ""; - } - return message; - }, -}; - -const baseMsgUnjailResponse: object = {}; - -export const MsgUnjailResponse = { - encode(_: MsgUnjailResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUnjailResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUnjailResponse } as MsgUnjailResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgUnjailResponse { - const message = { ...baseMsgUnjailResponse } as MsgUnjailResponse; - return message; - }, - - toJSON(_: MsgUnjailResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgUnjailResponse { - const message = { ...baseMsgUnjailResponse } as MsgUnjailResponse; - return message; - }, -}; - -/** Msg defines the slashing Msg service. */ -export interface Msg { - /** - * Unjail defines a method for unjailing a jailed validator, thus returning - * them into the bonded validator set, so they can begin receiving provisions - * and rewards again. - */ - Unjail(request: MsgUnjail): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Unjail(request: MsgUnjail): Promise { - const data = MsgUnjail.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.slashing.v1beta1.Msg", - "Unjail", - data - ); - return promise.then((data) => MsgUnjailResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30bdc6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0776..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.js deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7fb6d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b699..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index a3076569af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,1022 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 252725808b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4144 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } - else { - message.proto3Optional = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } - else { - message.proto3Optional = false; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.d.ts deleted file mode 100644 index 3493f63277..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (duration.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} -export declare const Duration: { - encode(message: Duration, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Duration; - fromJSON(object: any): Duration; - toJSON(message: Duration): unknown; - fromPartial(object: DeepPartial): Duration; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.js deleted file mode 100644 index ea556facef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseDuration = { seconds: 0, nanos: 0 }; -export const Duration = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.ts deleted file mode 100644 index fffd5b14ef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/duration.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (duration.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} - -const baseDuration: object = { seconds: 0, nanos: 0 }; - -export const Duration = { - encode(message: Duration, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Duration { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration } as Duration; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Duration): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.d.ts deleted file mode 100644 index 0c9db0bc0d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} -export declare const Timestamp: { - encode(message: Timestamp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Timestamp; - fromJSON(object: any): Timestamp; - toJSON(message: Timestamp): unknown; - fromPartial(object: DeepPartial): Timestamp; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.js deleted file mode 100644 index 37b4119aef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseTimestamp = { seconds: 0, nanos: 0 }; -export const Timestamp = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 11864afc86..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/package.json b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/package.json deleted file mode 100755 index f284fa51f6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmos-slashing-v1beta1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmos.slashing.v1beta1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/cosmos-sdk/x/slashing/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.d.ts deleted file mode 100644 index 250d47563d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { StakeAuthorization } from "./module/types/cosmos/staking/v1beta1/authz"; -import { StakeAuthorization_Validators } from "./module/types/cosmos/staking/v1beta1/authz"; -import { LastValidatorPower } from "./module/types/cosmos/staking/v1beta1/genesis"; -import { HistoricalInfo } from "./module/types/cosmos/staking/v1beta1/staking"; -import { CommissionRates } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Commission } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Description } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Validator } from "./module/types/cosmos/staking/v1beta1/staking"; -import { ValAddresses } from "./module/types/cosmos/staking/v1beta1/staking"; -import { DVPair } from "./module/types/cosmos/staking/v1beta1/staking"; -import { DVPairs } from "./module/types/cosmos/staking/v1beta1/staking"; -import { DVVTriplet } from "./module/types/cosmos/staking/v1beta1/staking"; -import { DVVTriplets } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Delegation } from "./module/types/cosmos/staking/v1beta1/staking"; -import { UnbondingDelegation } from "./module/types/cosmos/staking/v1beta1/staking"; -import { UnbondingDelegationEntry } from "./module/types/cosmos/staking/v1beta1/staking"; -import { RedelegationEntry } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Redelegation } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Params } from "./module/types/cosmos/staking/v1beta1/staking"; -import { DelegationResponse } from "./module/types/cosmos/staking/v1beta1/staking"; -import { RedelegationEntryResponse } from "./module/types/cosmos/staking/v1beta1/staking"; -import { RedelegationResponse } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Pool } from "./module/types/cosmos/staking/v1beta1/staking"; -export { StakeAuthorization, StakeAuthorization_Validators, LastValidatorPower, HistoricalInfo, CommissionRates, Commission, Description, Validator, ValAddresses, DVPair, DVPairs, DVVTriplet, DVVTriplets, Delegation, UnbondingDelegation, UnbondingDelegationEntry, RedelegationEntry, Redelegation, Params, DelegationResponse, RedelegationEntryResponse, RedelegationResponse, Pool }; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.js deleted file mode 100644 index 118e91ab2b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.js +++ /dev/null @@ -1,626 +0,0 @@ -import { txClient, queryClient, MissingWalletError, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { StakeAuthorization } from "./module/types/cosmos/staking/v1beta1/authz"; -import { StakeAuthorization_Validators } from "./module/types/cosmos/staking/v1beta1/authz"; -import { LastValidatorPower } from "./module/types/cosmos/staking/v1beta1/genesis"; -import { HistoricalInfo } from "./module/types/cosmos/staking/v1beta1/staking"; -import { CommissionRates } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Commission } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Description } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Validator } from "./module/types/cosmos/staking/v1beta1/staking"; -import { ValAddresses } from "./module/types/cosmos/staking/v1beta1/staking"; -import { DVPair } from "./module/types/cosmos/staking/v1beta1/staking"; -import { DVPairs } from "./module/types/cosmos/staking/v1beta1/staking"; -import { DVVTriplet } from "./module/types/cosmos/staking/v1beta1/staking"; -import { DVVTriplets } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Delegation } from "./module/types/cosmos/staking/v1beta1/staking"; -import { UnbondingDelegation } from "./module/types/cosmos/staking/v1beta1/staking"; -import { UnbondingDelegationEntry } from "./module/types/cosmos/staking/v1beta1/staking"; -import { RedelegationEntry } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Redelegation } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Params } from "./module/types/cosmos/staking/v1beta1/staking"; -import { DelegationResponse } from "./module/types/cosmos/staking/v1beta1/staking"; -import { RedelegationEntryResponse } from "./module/types/cosmos/staking/v1beta1/staking"; -import { RedelegationResponse } from "./module/types/cosmos/staking/v1beta1/staking"; -import { Pool } from "./module/types/cosmos/staking/v1beta1/staking"; -export { StakeAuthorization, StakeAuthorization_Validators, LastValidatorPower, HistoricalInfo, CommissionRates, Commission, Description, Validator, ValAddresses, DVPair, DVPairs, DVVTriplet, DVVTriplets, Delegation, UnbondingDelegation, UnbondingDelegationEntry, RedelegationEntry, Redelegation, Params, DelegationResponse, RedelegationEntryResponse, RedelegationResponse, Pool }; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Validators: {}, - Validator: {}, - ValidatorDelegations: {}, - ValidatorUnbondingDelegations: {}, - Delegation: {}, - UnbondingDelegation: {}, - DelegatorDelegations: {}, - DelegatorUnbondingDelegations: {}, - Redelegations: {}, - DelegatorValidators: {}, - DelegatorValidator: {}, - HistoricalInfo: {}, - Pool: {}, - Params: {}, - _Structure: { - StakeAuthorization: getStructure(StakeAuthorization.fromPartial({})), - StakeAuthorization_Validators: getStructure(StakeAuthorization_Validators.fromPartial({})), - LastValidatorPower: getStructure(LastValidatorPower.fromPartial({})), - HistoricalInfo: getStructure(HistoricalInfo.fromPartial({})), - CommissionRates: getStructure(CommissionRates.fromPartial({})), - Commission: getStructure(Commission.fromPartial({})), - Description: getStructure(Description.fromPartial({})), - Validator: getStructure(Validator.fromPartial({})), - ValAddresses: getStructure(ValAddresses.fromPartial({})), - DVPair: getStructure(DVPair.fromPartial({})), - DVPairs: getStructure(DVPairs.fromPartial({})), - DVVTriplet: getStructure(DVVTriplet.fromPartial({})), - DVVTriplets: getStructure(DVVTriplets.fromPartial({})), - Delegation: getStructure(Delegation.fromPartial({})), - UnbondingDelegation: getStructure(UnbondingDelegation.fromPartial({})), - UnbondingDelegationEntry: getStructure(UnbondingDelegationEntry.fromPartial({})), - RedelegationEntry: getStructure(RedelegationEntry.fromPartial({})), - Redelegation: getStructure(Redelegation.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - DelegationResponse: getStructure(DelegationResponse.fromPartial({})), - RedelegationEntryResponse: getStructure(RedelegationEntryResponse.fromPartial({})), - RedelegationResponse: getStructure(RedelegationResponse.fromPartial({})), - Pool: getStructure(Pool.fromPartial({})), - }, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getValidators: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Validators[JSON.stringify(params)] ?? {}; - }, - getValidator: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Validator[JSON.stringify(params)] ?? {}; - }, - getValidatorDelegations: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.ValidatorDelegations[JSON.stringify(params)] ?? {}; - }, - getValidatorUnbondingDelegations: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.ValidatorUnbondingDelegations[JSON.stringify(params)] ?? {}; - }, - getDelegation: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Delegation[JSON.stringify(params)] ?? {}; - }, - getUnbondingDelegation: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.UnbondingDelegation[JSON.stringify(params)] ?? {}; - }, - getDelegatorDelegations: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DelegatorDelegations[JSON.stringify(params)] ?? {}; - }, - getDelegatorUnbondingDelegations: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DelegatorUnbondingDelegations[JSON.stringify(params)] ?? {}; - }, - getRedelegations: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Redelegations[JSON.stringify(params)] ?? {}; - }, - getDelegatorValidators: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DelegatorValidators[JSON.stringify(params)] ?? {}; - }, - getDelegatorValidator: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DelegatorValidator[JSON.stringify(params)] ?? {}; - }, - getHistoricalInfo: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.HistoricalInfo[JSON.stringify(params)] ?? {}; - }, - getPool: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Pool[JSON.stringify(params)] ?? {}; - }, - getParams: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Params[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.staking.v1beta1 initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - async QueryValidators({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryValidators(query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryValidators({ ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Validators', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryValidators', payload: { options: { all }, params: { ...key }, query } }); - return getters['getValidators']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryValidators', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryValidator({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryValidator(key.validator_addr)).data; - commit('QUERY', { query: 'Validator', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryValidator', payload: { options: { all }, params: { ...key }, query } }); - return getters['getValidator']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryValidator', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryValidatorDelegations({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryValidatorDelegations(key.validator_addr, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryValidatorDelegations(key.validator_addr, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ValidatorDelegations', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryValidatorDelegations', payload: { options: { all }, params: { ...key }, query } }); - return getters['getValidatorDelegations']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryValidatorDelegations', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryValidatorUnbondingDelegations({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryValidatorUnbondingDelegations(key.validator_addr, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryValidatorUnbondingDelegations(key.validator_addr, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ValidatorUnbondingDelegations', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryValidatorUnbondingDelegations', payload: { options: { all }, params: { ...key }, query } }); - return getters['getValidatorUnbondingDelegations']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryValidatorUnbondingDelegations', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDelegation({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDelegation(key.validator_addr, key.delegator_addr)).data; - commit('QUERY', { query: 'Delegation', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegation', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegation']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDelegation', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryUnbondingDelegation({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryUnbondingDelegation(key.validator_addr, key.delegator_addr)).data; - commit('QUERY', { query: 'UnbondingDelegation', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryUnbondingDelegation', payload: { options: { all }, params: { ...key }, query } }); - return getters['getUnbondingDelegation']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryUnbondingDelegation', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDelegatorDelegations({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDelegatorDelegations(key.delegator_addr, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryDelegatorDelegations(key.delegator_addr, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'DelegatorDelegations', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegatorDelegations', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegatorDelegations']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDelegatorDelegations', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDelegatorUnbondingDelegations({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDelegatorUnbondingDelegations(key.delegator_addr, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryDelegatorUnbondingDelegations(key.delegator_addr, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'DelegatorUnbondingDelegations', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegatorUnbondingDelegations', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegatorUnbondingDelegations']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDelegatorUnbondingDelegations', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryRedelegations({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryRedelegations(key.delegator_addr, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryRedelegations(key.delegator_addr, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Redelegations', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryRedelegations', payload: { options: { all }, params: { ...key }, query } }); - return getters['getRedelegations']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryRedelegations', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDelegatorValidators({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDelegatorValidators(key.delegator_addr, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryDelegatorValidators(key.delegator_addr, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'DelegatorValidators', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegatorValidators', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegatorValidators']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDelegatorValidators', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDelegatorValidator({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDelegatorValidator(key.delegator_addr, key.validator_addr)).data; - commit('QUERY', { query: 'DelegatorValidator', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDelegatorValidator', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDelegatorValidator']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDelegatorValidator', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryHistoricalInfo({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryHistoricalInfo(key.height)).data; - commit('QUERY', { query: 'HistoricalInfo', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryHistoricalInfo', payload: { options: { all }, params: { ...key }, query } }); - return getters['getHistoricalInfo']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryHistoricalInfo', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryPool({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryPool()).data; - commit('QUERY', { query: 'Pool', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryPool', payload: { options: { all }, params: { ...key }, query } }); - return getters['getPool']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryPool', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryParams()).data; - commit('QUERY', { query: 'Params', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async sendMsgBeginRedelegate({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgBeginRedelegate(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgBeginRedelegate:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgBeginRedelegate:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgCreateValidator({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgCreateValidator(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgCreateValidator:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgCreateValidator:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgDelegate({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgDelegate(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgDelegate:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgDelegate:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgEditValidator({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgEditValidator(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgEditValidator:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgEditValidator:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgUndelegate({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgUndelegate(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgUndelegate:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgUndelegate:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async MsgBeginRedelegate({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgBeginRedelegate(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgBeginRedelegate:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgBeginRedelegate:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgCreateValidator({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgCreateValidator(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgCreateValidator:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgCreateValidator:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgDelegate({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgDelegate(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgDelegate:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgDelegate:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgEditValidator({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgEditValidator(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgEditValidator:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgEditValidator:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgUndelegate({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgUndelegate(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgUndelegate:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgUndelegate:Create', 'Could not create message: ' + e.message); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.ts deleted file mode 100755 index 051c4a2d9c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/index.ts +++ /dev/null @@ -1,730 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { StakeAuthorization } from "./module/types/cosmos/staking/v1beta1/authz" -import { StakeAuthorization_Validators } from "./module/types/cosmos/staking/v1beta1/authz" -import { LastValidatorPower } from "./module/types/cosmos/staking/v1beta1/genesis" -import { HistoricalInfo } from "./module/types/cosmos/staking/v1beta1/staking" -import { CommissionRates } from "./module/types/cosmos/staking/v1beta1/staking" -import { Commission } from "./module/types/cosmos/staking/v1beta1/staking" -import { Description } from "./module/types/cosmos/staking/v1beta1/staking" -import { Validator } from "./module/types/cosmos/staking/v1beta1/staking" -import { ValAddresses } from "./module/types/cosmos/staking/v1beta1/staking" -import { DVPair } from "./module/types/cosmos/staking/v1beta1/staking" -import { DVPairs } from "./module/types/cosmos/staking/v1beta1/staking" -import { DVVTriplet } from "./module/types/cosmos/staking/v1beta1/staking" -import { DVVTriplets } from "./module/types/cosmos/staking/v1beta1/staking" -import { Delegation } from "./module/types/cosmos/staking/v1beta1/staking" -import { UnbondingDelegation } from "./module/types/cosmos/staking/v1beta1/staking" -import { UnbondingDelegationEntry } from "./module/types/cosmos/staking/v1beta1/staking" -import { RedelegationEntry } from "./module/types/cosmos/staking/v1beta1/staking" -import { Redelegation } from "./module/types/cosmos/staking/v1beta1/staking" -import { Params } from "./module/types/cosmos/staking/v1beta1/staking" -import { DelegationResponse } from "./module/types/cosmos/staking/v1beta1/staking" -import { RedelegationEntryResponse } from "./module/types/cosmos/staking/v1beta1/staking" -import { RedelegationResponse } from "./module/types/cosmos/staking/v1beta1/staking" -import { Pool } from "./module/types/cosmos/staking/v1beta1/staking" - - -export { StakeAuthorization, StakeAuthorization_Validators, LastValidatorPower, HistoricalInfo, CommissionRates, Commission, Description, Validator, ValAddresses, DVPair, DVPairs, DVVTriplet, DVVTriplets, Delegation, UnbondingDelegation, UnbondingDelegationEntry, RedelegationEntry, Redelegation, Params, DelegationResponse, RedelegationEntryResponse, RedelegationResponse, Pool }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Validators: {}, - Validator: {}, - ValidatorDelegations: {}, - ValidatorUnbondingDelegations: {}, - Delegation: {}, - UnbondingDelegation: {}, - DelegatorDelegations: {}, - DelegatorUnbondingDelegations: {}, - Redelegations: {}, - DelegatorValidators: {}, - DelegatorValidator: {}, - HistoricalInfo: {}, - Pool: {}, - Params: {}, - - _Structure: { - StakeAuthorization: getStructure(StakeAuthorization.fromPartial({})), - StakeAuthorization_Validators: getStructure(StakeAuthorization_Validators.fromPartial({})), - LastValidatorPower: getStructure(LastValidatorPower.fromPartial({})), - HistoricalInfo: getStructure(HistoricalInfo.fromPartial({})), - CommissionRates: getStructure(CommissionRates.fromPartial({})), - Commission: getStructure(Commission.fromPartial({})), - Description: getStructure(Description.fromPartial({})), - Validator: getStructure(Validator.fromPartial({})), - ValAddresses: getStructure(ValAddresses.fromPartial({})), - DVPair: getStructure(DVPair.fromPartial({})), - DVPairs: getStructure(DVPairs.fromPartial({})), - DVVTriplet: getStructure(DVVTriplet.fromPartial({})), - DVVTriplets: getStructure(DVVTriplets.fromPartial({})), - Delegation: getStructure(Delegation.fromPartial({})), - UnbondingDelegation: getStructure(UnbondingDelegation.fromPartial({})), - UnbondingDelegationEntry: getStructure(UnbondingDelegationEntry.fromPartial({})), - RedelegationEntry: getStructure(RedelegationEntry.fromPartial({})), - Redelegation: getStructure(Redelegation.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - DelegationResponse: getStructure(DelegationResponse.fromPartial({})), - RedelegationEntryResponse: getStructure(RedelegationEntryResponse.fromPartial({})), - RedelegationResponse: getStructure(RedelegationResponse.fromPartial({})), - Pool: getStructure(Pool.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getValidators: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Validators[JSON.stringify(params)] ?? {} - }, - getValidator: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Validator[JSON.stringify(params)] ?? {} - }, - getValidatorDelegations: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ValidatorDelegations[JSON.stringify(params)] ?? {} - }, - getValidatorUnbondingDelegations: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ValidatorUnbondingDelegations[JSON.stringify(params)] ?? {} - }, - getDelegation: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Delegation[JSON.stringify(params)] ?? {} - }, - getUnbondingDelegation: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.UnbondingDelegation[JSON.stringify(params)] ?? {} - }, - getDelegatorDelegations: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegatorDelegations[JSON.stringify(params)] ?? {} - }, - getDelegatorUnbondingDelegations: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegatorUnbondingDelegations[JSON.stringify(params)] ?? {} - }, - getRedelegations: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Redelegations[JSON.stringify(params)] ?? {} - }, - getDelegatorValidators: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegatorValidators[JSON.stringify(params)] ?? {} - }, - getDelegatorValidator: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DelegatorValidator[JSON.stringify(params)] ?? {} - }, - getHistoricalInfo: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.HistoricalInfo[JSON.stringify(params)] ?? {} - }, - getPool: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Pool[JSON.stringify(params)] ?? {} - }, - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.staking.v1beta1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryValidators({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryValidators(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryValidators({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Validators', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryValidators', payload: { options: { all }, params: {...key},query }}) - return getters['getValidators']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryValidators API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryValidator({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryValidator( key.validator_addr)).data - - - commit('QUERY', { query: 'Validator', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryValidator', payload: { options: { all }, params: {...key},query }}) - return getters['getValidator']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryValidator API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryValidatorDelegations({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryValidatorDelegations( key.validator_addr, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryValidatorDelegations( key.validator_addr, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ValidatorDelegations', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryValidatorDelegations', payload: { options: { all }, params: {...key},query }}) - return getters['getValidatorDelegations']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryValidatorDelegations API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryValidatorUnbondingDelegations({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryValidatorUnbondingDelegations( key.validator_addr, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryValidatorUnbondingDelegations( key.validator_addr, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ValidatorUnbondingDelegations', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryValidatorUnbondingDelegations', payload: { options: { all }, params: {...key},query }}) - return getters['getValidatorUnbondingDelegations']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryValidatorUnbondingDelegations API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDelegation({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDelegation( key.validator_addr, key.delegator_addr)).data - - - commit('QUERY', { query: 'Delegation', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegation', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegation']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDelegation API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryUnbondingDelegation({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryUnbondingDelegation( key.validator_addr, key.delegator_addr)).data - - - commit('QUERY', { query: 'UnbondingDelegation', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryUnbondingDelegation', payload: { options: { all }, params: {...key},query }}) - return getters['getUnbondingDelegation']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryUnbondingDelegation API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDelegatorDelegations({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDelegatorDelegations( key.delegator_addr, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryDelegatorDelegations( key.delegator_addr, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'DelegatorDelegations', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegatorDelegations', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegatorDelegations']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDelegatorDelegations API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDelegatorUnbondingDelegations({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDelegatorUnbondingDelegations( key.delegator_addr, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryDelegatorUnbondingDelegations( key.delegator_addr, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'DelegatorUnbondingDelegations', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegatorUnbondingDelegations', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegatorUnbondingDelegations']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDelegatorUnbondingDelegations API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryRedelegations({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryRedelegations( key.delegator_addr, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryRedelegations( key.delegator_addr, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Redelegations', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryRedelegations', payload: { options: { all }, params: {...key},query }}) - return getters['getRedelegations']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryRedelegations API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDelegatorValidators({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDelegatorValidators( key.delegator_addr, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryDelegatorValidators( key.delegator_addr, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'DelegatorValidators', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegatorValidators', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegatorValidators']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDelegatorValidators API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDelegatorValidator({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDelegatorValidator( key.delegator_addr, key.validator_addr)).data - - - commit('QUERY', { query: 'DelegatorValidator', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDelegatorValidator', payload: { options: { all }, params: {...key},query }}) - return getters['getDelegatorValidator']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDelegatorValidator API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryHistoricalInfo({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryHistoricalInfo( key.height)).data - - - commit('QUERY', { query: 'HistoricalInfo', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryHistoricalInfo', payload: { options: { all }, params: {...key},query }}) - return getters['getHistoricalInfo']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryHistoricalInfo API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryPool({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryPool()).data - - - commit('QUERY', { query: 'Pool', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryPool', payload: { options: { all }, params: {...key},query }}) - return getters['getPool']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryPool API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams()).data - - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - async sendMsgCreateValidator({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateValidator(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateValidator:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgCreateValidator:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgBeginRedelegate({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgBeginRedelegate(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgBeginRedelegate:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgBeginRedelegate:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgUndelegate({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgUndelegate(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgUndelegate:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgUndelegate:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgDelegate({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgDelegate(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgDelegate:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgDelegate:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgEditValidator({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgEditValidator(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgEditValidator:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgEditValidator:Send Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgCreateValidator({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateValidator(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateValidator:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgCreateValidator:Create Could not create message: ' + e.message) - } - } - }, - async MsgBeginRedelegate({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgBeginRedelegate(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgBeginRedelegate:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgBeginRedelegate:Create Could not create message: ' + e.message) - } - } - }, - async MsgUndelegate({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgUndelegate(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgUndelegate:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgUndelegate:Create Could not create message: ' + e.message) - } - } - }, - async MsgDelegate({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgDelegate(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgDelegate:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgDelegate:Create Could not create message: ' + e.message) - } - } - }, - async MsgEditValidator({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgEditValidator(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgEditValidator:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgEditValidator:Create Could not create message: ' + e.message) - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.d.ts deleted file mode 100644 index 82074e3726..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; - msgBeginRedelegate: (data: MsgBeginRedelegate) => EncodeObject; - msgCreateValidator: (data: MsgCreateValidator) => EncodeObject; - msgDelegate: (data: MsgDelegate) => EncodeObject; - msgEditValidator: (data: MsgEditValidator) => EncodeObject; - msgUndelegate: (data: MsgUndelegate) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.js deleted file mode 100644 index bb88d98124..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.js +++ /dev/null @@ -1,46 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx"; -const types = [ - ["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate], - ["/cosmos.staking.v1beta1.MsgCreateValidator", MsgCreateValidator], - ["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate], - ["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator], - ["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate], -]; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - msgBeginRedelegate: (data) => ({ typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.fromPartial(data) }), - msgCreateValidator: (data) => ({ typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: MsgCreateValidator.fromPartial(data) }), - msgDelegate: (data) => ({ typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: MsgDelegate.fromPartial(data) }), - msgEditValidator: (data) => ({ typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: MsgEditValidator.fromPartial(data) }), - msgUndelegate: (data) => ({ typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.fromPartial(data) }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.ts deleted file mode 100755 index f7eaa5dd08..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.ts +++ /dev/null @@ -1,72 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx"; - - -const types = [ - ["/cosmos.staking.v1beta1.MsgCreateValidator", MsgCreateValidator], - ["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate], - ["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate], - ["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate], - ["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgCreateValidator: (data: MsgCreateValidator): EncodeObject => ({ typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: MsgCreateValidator.fromPartial( data ) }), - msgBeginRedelegate: (data: MsgBeginRedelegate): EncodeObject => ({ typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.fromPartial( data ) }), - msgUndelegate: (data: MsgUndelegate): EncodeObject => ({ typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.fromPartial( data ) }), - msgDelegate: (data: MsgDelegate): EncodeObject => ({ typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: MsgDelegate.fromPartial( data ) }), - msgEditValidator: (data: MsgEditValidator): EncodeObject => ({ typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: MsgEditValidator.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.d.ts deleted file mode 100644 index ca7d91a2f1..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,868 +0,0 @@ -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* 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. -*/ -export interface Stakingv1Beta1Validator { - /** operator_address defines the address of the validator's operator; bech encoded in JSON. */ - operatorAddress?: string; - /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */ - consensusPubkey?: ProtobufAny; - /** jailed defined whether the validator has been jailed from bonded status or not. */ - jailed?: boolean; - /** status is the validator status (bonded/unbonding/unbonded). */ - status?: V1Beta1BondStatus; - /** tokens define the delegated tokens (incl. self-delegation). */ - tokens?: string; - /** delegator_shares defines total shares issued to a validator's delegators. */ - delegatorShares?: string; - /** description defines the description terms for the validator. */ - description?: V1Beta1Description; - /** - * unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. - * @format int64 - */ - unbondingHeight?: string; - /** - * unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. - * @format date-time - */ - unbondingTime?: string; - /** commission defines the commission parameters. */ - commission?: V1Beta1Commission; - /** min_self_delegation is the validator's self declared minimum self delegation. */ - minSelfDelegation?: string; -} -export interface TypesBlockID { - /** @format byte */ - hash?: string; - partSetHeader?: TypesPartSetHeader; -} -/** - * Header defines the structure of a Tendermint block header. - */ -export interface TypesHeader { - /** - * 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. - */ - version?: VersionConsensus; - chainId?: string; - /** @format int64 */ - height?: string; - /** @format date-time */ - time?: string; - lastBlockId?: TypesBlockID; - /** @format byte */ - lastCommitHash?: string; - /** @format byte */ - dataHash?: string; - /** @format byte */ - validatorsHash?: string; - /** @format byte */ - nextValidatorsHash?: string; - /** @format byte */ - consensusHash?: string; - /** @format byte */ - appHash?: string; - /** @format byte */ - lastResultsHash?: string; - /** @format byte */ - evidenceHash?: string; - /** @format byte */ - proposerAddress?: string; -} -export interface TypesPartSetHeader { - /** @format int64 */ - total?: number; - /** @format byte */ - hash?: string; -} -/** -* 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. -*/ -export declare enum V1Beta1BondStatus { - BOND_STATUS_UNSPECIFIED = "BOND_STATUS_UNSPECIFIED", - BOND_STATUS_UNBONDED = "BOND_STATUS_UNBONDED", - BOND_STATUS_UNBONDING = "BOND_STATUS_UNBONDING", - BOND_STATUS_BONDED = "BOND_STATUS_BONDED" -} -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} -/** - * Commission defines commission parameters for a given validator. - */ -export interface V1Beta1Commission { - /** commission_rates defines the initial commission rates to be used for creating a validator. */ - commissionRates?: V1Beta1CommissionRates; - /** - * update_time is the last time the commission rate was changed. - * @format date-time - */ - updateTime?: string; -} -/** -* CommissionRates defines the initial commission rates to be used for creating -a validator. -*/ -export interface V1Beta1CommissionRates { - /** rate is the commission rate charged to delegators, as a fraction. */ - rate?: string; - /** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */ - maxRate?: string; - /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */ - maxChangeRate?: string; -} -/** -* 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. -*/ -export interface V1Beta1Delegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress?: string; - /** validator_address is the bech32-encoded address of the validator. */ - validatorAddress?: string; - /** shares define the delegation shares received. */ - shares?: string; -} -/** -* DelegationResponse is equivalent to Delegation except that it contains a -balance in addition to shares which is more suitable for client responses. -*/ -export interface V1Beta1DelegationResponse { - /** - * 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. - */ - delegation?: V1Beta1Delegation; - /** - * 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. - */ - balance?: V1Beta1Coin; -} -/** - * Description defines a validator description. - */ -export interface V1Beta1Description { - /** moniker defines a human-readable name for the validator. */ - moniker?: string; - /** identity defines an optional identity signature (ex. UPort or Keybase). */ - identity?: string; - /** website defines an optional website link. */ - website?: string; - /** security_contact defines an optional email for security contact. */ - securityContact?: string; - /** details define other optional details. */ - details?: string; -} -/** -* 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). -*/ -export interface V1Beta1HistoricalInfo { - /** Header defines the structure of a Tendermint block header. */ - header?: TypesHeader; - valset?: Stakingv1Beta1Validator[]; -} -/** - * MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. - */ -export interface V1Beta1MsgBeginRedelegateResponse { - /** @format date-time */ - completionTime?: string; -} -/** - * MsgCreateValidatorResponse defines the Msg/CreateValidator response type. - */ -export declare type V1Beta1MsgCreateValidatorResponse = object; -/** - * MsgDelegateResponse defines the Msg/Delegate response type. - */ -export declare type V1Beta1MsgDelegateResponse = object; -/** - * MsgEditValidatorResponse defines the Msg/EditValidator response type. - */ -export declare type V1Beta1MsgEditValidatorResponse = object; -/** - * MsgUndelegateResponse defines the Msg/Undelegate response type. - */ -export interface V1Beta1MsgUndelegateResponse { - /** @format date-time */ - completionTime?: string; -} -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - /** - * 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. - * @format uint64 - */ - offset?: string; - /** - * 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. - * @format uint64 - */ - limit?: string; - /** - * 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. - */ - countTotal?: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse?: boolean; -} -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -/** - * Params defines the parameters for the staking module. - */ -export interface V1Beta1Params { - /** unbonding_time is the time duration of unbonding. */ - unbondingTime?: string; - /** - * max_validators is the maximum number of validators. - * @format int64 - */ - maxValidators?: number; - /** - * max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). - * @format int64 - */ - maxEntries?: number; - /** - * historical_entries is the number of historical entries to persist. - * @format int64 - */ - historicalEntries?: number; - /** bond_denom defines the bondable coin denomination. */ - bondDenom?: string; -} -/** -* Pool is used for tracking bonded and not-bonded token supply of the bond -denomination. -*/ -export interface V1Beta1Pool { - notBondedTokens?: string; - bondedTokens?: string; -} -/** - * QueryDelegationResponse is response type for the Query/Delegation RPC method. - */ -export interface V1Beta1QueryDelegationResponse { - /** delegation_responses defines the delegation info of a delegation. */ - delegationResponse?: V1Beta1DelegationResponse; -} -/** -* QueryDelegatorDelegationsResponse is response type for the -Query/DelegatorDelegations RPC method. -*/ -export interface V1Beta1QueryDelegatorDelegationsResponse { - /** delegation_responses defines all the delegations' info of a delegator. */ - delegationResponses?: V1Beta1DelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** -* QueryUnbondingDelegatorDelegationsResponse is response type for the -Query/UnbondingDelegatorDelegations RPC method. -*/ -export interface V1Beta1QueryDelegatorUnbondingDelegationsResponse { - unbondingResponses?: V1Beta1UnbondingDelegation[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** -* QueryDelegatorValidatorResponse response type for the -Query/DelegatorValidator RPC method. -*/ -export interface V1Beta1QueryDelegatorValidatorResponse { - /** validator defines the the validator info. */ - validator?: Stakingv1Beta1Validator; -} -/** -* QueryDelegatorValidatorsResponse is response type for the -Query/DelegatorValidators RPC method. -*/ -export interface V1Beta1QueryDelegatorValidatorsResponse { - /** validators defines the the validators' info of a delegator. */ - validators?: Stakingv1Beta1Validator[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** -* QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -method. -*/ -export interface V1Beta1QueryHistoricalInfoResponse { - /** hist defines the historical info at the given height. */ - hist?: V1Beta1HistoricalInfo; -} -/** - * QueryParamsResponse is response type for the Query/Params RPC method. - */ -export interface V1Beta1QueryParamsResponse { - /** params holds all the parameters of this module. */ - params?: V1Beta1Params; -} -/** - * QueryPoolResponse is response type for the Query/Pool RPC method. - */ -export interface V1Beta1QueryPoolResponse { - /** pool defines the pool info. */ - pool?: V1Beta1Pool; -} -/** -* QueryRedelegationsResponse is response type for the Query/Redelegations RPC -method. -*/ -export interface V1Beta1QueryRedelegationsResponse { - redelegationResponses?: V1Beta1RedelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** -* QueryDelegationResponse is response type for the Query/UnbondingDelegation -RPC method. -*/ -export interface V1Beta1QueryUnbondingDelegationResponse { - /** unbond defines the unbonding information of a delegation. */ - unbond?: V1Beta1UnbondingDelegation; -} -export interface V1Beta1QueryValidatorDelegationsResponse { - delegationResponses?: V1Beta1DelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -export interface V1Beta1QueryValidatorResponse { - /** validator defines the the validator info. */ - validator?: Stakingv1Beta1Validator; -} -/** -* QueryValidatorUnbondingDelegationsResponse is response type for the -Query/ValidatorUnbondingDelegations RPC method. -*/ -export interface V1Beta1QueryValidatorUnbondingDelegationsResponse { - unbondingResponses?: V1Beta1UnbondingDelegation[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -export interface V1Beta1QueryValidatorsResponse { - /** validators contains all the queried validators. */ - validators?: Stakingv1Beta1Validator[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** -* Redelegation contains the list of a particular delegator's redelegating bonds -from a particular source validator to a particular destination validator. -*/ -export interface V1Beta1Redelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress?: string; - /** validator_src_address is the validator redelegation source operator address. */ - validatorSrcAddress?: string; - /** validator_dst_address is the validator redelegation destination operator address. */ - validatorDstAddress?: string; - /** entries are the redelegation entries. */ - entries?: V1Beta1RedelegationEntry[]; -} -/** - * RedelegationEntry defines a redelegation object with relevant metadata. - */ -export interface V1Beta1RedelegationEntry { - /** - * creation_height defines the height which the redelegation took place. - * @format int64 - */ - creationHeight?: string; - /** - * completion_time defines the unix time for redelegation completion. - * @format date-time - */ - completionTime?: string; - /** initial_balance defines the initial balance when redelegation started. */ - initialBalance?: string; - /** shares_dst is the amount of destination-validator shares created by redelegation. */ - sharesDst?: string; -} -/** -* RedelegationEntryResponse is equivalent to a RedelegationEntry except that it -contains a balance in addition to shares which is more suitable for client -responses. -*/ -export interface V1Beta1RedelegationEntryResponse { - /** RedelegationEntry defines a redelegation object with relevant metadata. */ - redelegationEntry?: V1Beta1RedelegationEntry; - balance?: string; -} -/** -* RedelegationResponse is equivalent to a Redelegation except that its entries -contain a balance in addition to shares which is more suitable for client -responses. -*/ -export interface V1Beta1RedelegationResponse { - /** - * Redelegation contains the list of a particular delegator's redelegating bonds - * from a particular source validator to a particular destination validator. - */ - redelegation?: V1Beta1Redelegation; - entries?: V1Beta1RedelegationEntryResponse[]; -} -/** -* UnbondingDelegation stores all of a single delegator's unbonding bonds -for a single validator in an time-ordered list. -*/ -export interface V1Beta1UnbondingDelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress?: string; - /** validator_address is the bech32-encoded address of the validator. */ - validatorAddress?: string; - /** entries are the unbonding delegation entries. */ - entries?: V1Beta1UnbondingDelegationEntry[]; -} -/** - * UnbondingDelegationEntry defines an unbonding object with relevant metadata. - */ -export interface V1Beta1UnbondingDelegationEntry { - /** - * creation_height is the height which the unbonding took place. - * @format int64 - */ - creationHeight?: string; - /** - * completion_time is the unix time for unbonding completion. - * @format date-time - */ - completionTime?: string; - /** initial_balance defines the tokens initially scheduled to receive at completion. */ - initialBalance?: string; - /** balance defines the tokens to receive at completion. */ - balance?: string; -} -/** -* 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. -*/ -export interface VersionConsensus { - /** @format uint64 */ - block?: string; - /** @format uint64 */ - app?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/staking/v1beta1/authz.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryDelegatorDelegations - * @summary DelegatorDelegations queries all delegations of a given delegator address. - * @request GET:/cosmos/staking/v1beta1/delegations/{delegatorAddr} - */ - queryDelegatorDelegations: (delegatorAddr: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryRedelegations - * @summary Redelegations queries redelegations of given address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/redelegations - */ - queryRedelegations: (delegatorAddr: string, query?: { - srcValidatorAddr?: string; - dstValidatorAddr?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegatorUnbondingDelegations - * @summary DelegatorUnbondingDelegations queries all unbonding delegations of a given - delegator address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/unbonding_delegations - */ - queryDelegatorUnbondingDelegations: (delegatorAddr: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidators - * @summary DelegatorValidators queries all validators info for given delegator - address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators - */ - queryDelegatorValidators: (delegatorAddr: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidator - * @summary DelegatorValidator queries validator info for given delegator validator - pair. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators/{validatorAddr} - */ - queryDelegatorValidator: (delegatorAddr: string, validatorAddr: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryHistoricalInfo - * @summary HistoricalInfo queries the historical info for given height. - * @request GET:/cosmos/staking/v1beta1/historical_info/{height} - */ - queryHistoricalInfo: (height: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Parameters queries the staking parameters. - * @request GET:/cosmos/staking/v1beta1/params - */ - queryParams: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryPool - * @summary Pool queries the pool info. - * @request GET:/cosmos/staking/v1beta1/pool - */ - queryPool: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryValidators - * @summary Validators queries all validators that match the given status. - * @request GET:/cosmos/staking/v1beta1/validators - */ - queryValidators: (query?: { - status?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryValidator - * @summary Validator queries validator info for given validator address. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr} - */ - queryValidator: (validatorAddr: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryValidatorDelegations - * @summary ValidatorDelegations queries delegate info for given validator. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/delegations - */ - queryValidatorDelegations: (validatorAddr: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDelegation - * @summary Delegation queries delegate info for given validator delegator pair. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr} - */ - queryDelegation: (validatorAddr: string, delegatorAddr: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryUnbondingDelegation - * @summary UnbondingDelegation queries unbonding info for given validator delegator - pair. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr}/unbonding_delegation - */ - queryUnbondingDelegation: (validatorAddr: string, delegatorAddr: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryValidatorUnbondingDelegations - * @summary ValidatorUnbondingDelegations queries unbonding delegations of a validator. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/unbonding_delegations - */ - queryValidatorUnbondingDelegations: (validatorAddr: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.js deleted file mode 100644 index 24ddb378db..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.js +++ /dev/null @@ -1,362 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -/** -* 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. -*/ -export var V1Beta1BondStatus; -(function (V1Beta1BondStatus) { - V1Beta1BondStatus["BOND_STATUS_UNSPECIFIED"] = "BOND_STATUS_UNSPECIFIED"; - V1Beta1BondStatus["BOND_STATUS_UNBONDED"] = "BOND_STATUS_UNBONDED"; - V1Beta1BondStatus["BOND_STATUS_UNBONDING"] = "BOND_STATUS_UNBONDING"; - V1Beta1BondStatus["BOND_STATUS_BONDED"] = "BOND_STATUS_BONDED"; -})(V1Beta1BondStatus || (V1Beta1BondStatus = {})); -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/staking/v1beta1/authz.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryDelegatorDelegations - * @summary DelegatorDelegations queries all delegations of a given delegator address. - * @request GET:/cosmos/staking/v1beta1/delegations/{delegatorAddr} - */ - this.queryDelegatorDelegations = (delegatorAddr, query, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/delegations/${delegatorAddr}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryRedelegations - * @summary Redelegations queries redelegations of given address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/redelegations - */ - this.queryRedelegations = (delegatorAddr, query, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/redelegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegatorUnbondingDelegations - * @summary DelegatorUnbondingDelegations queries all unbonding delegations of a given - delegator address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/unbonding_delegations - */ - this.queryDelegatorUnbondingDelegations = (delegatorAddr, query, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/unbonding_delegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidators - * @summary DelegatorValidators queries all validators info for given delegator - address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators - */ - this.queryDelegatorValidators = (delegatorAddr, query, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidator - * @summary DelegatorValidator queries validator info for given delegator validator - pair. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators/{validatorAddr} - */ - this.queryDelegatorValidator = (delegatorAddr, validatorAddr, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators/${validatorAddr}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryHistoricalInfo - * @summary HistoricalInfo queries the historical info for given height. - * @request GET:/cosmos/staking/v1beta1/historical_info/{height} - */ - this.queryHistoricalInfo = (height, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/historical_info/${height}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Parameters queries the staking parameters. - * @request GET:/cosmos/staking/v1beta1/params - */ - this.queryParams = (params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryPool - * @summary Pool queries the pool info. - * @request GET:/cosmos/staking/v1beta1/pool - */ - this.queryPool = (params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/pool`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryValidators - * @summary Validators queries all validators that match the given status. - * @request GET:/cosmos/staking/v1beta1/validators - */ - this.queryValidators = (query, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/validators`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryValidator - * @summary Validator queries validator info for given validator address. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr} - */ - this.queryValidator = (validatorAddr, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryValidatorDelegations - * @summary ValidatorDelegations queries delegate info for given validator. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/delegations - */ - this.queryValidatorDelegations = (validatorAddr, query, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDelegation - * @summary Delegation queries delegate info for given validator delegator pair. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr} - */ - this.queryDelegation = (validatorAddr, delegatorAddr, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryUnbondingDelegation - * @summary UnbondingDelegation queries unbonding info for given validator delegator - pair. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr}/unbonding_delegation - */ - this.queryUnbondingDelegation = (validatorAddr, delegatorAddr, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}/unbonding_delegation`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryValidatorUnbondingDelegations - * @summary ValidatorUnbondingDelegations queries unbonding delegations of a validator. - * @request GET:/cosmos/staking/v1beta1/validators/{validatorAddr}/unbonding_delegations - */ - this.queryValidatorUnbondingDelegations = (validatorAddr, query, params = {}) => this.request({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/unbonding_delegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.ts deleted file mode 100644 index e960b00a72..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/rest.ts +++ /dev/null @@ -1,1251 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* 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. -*/ -export interface Stakingv1Beta1Validator { - /** operator_address defines the address of the validator's operator; bech encoded in JSON. */ - operator_address?: string; - - /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */ - consensus_pubkey?: ProtobufAny; - - /** jailed defined whether the validator has been jailed from bonded status or not. */ - jailed?: boolean; - - /** status is the validator status (bonded/unbonding/unbonded). */ - status?: V1Beta1BondStatus; - - /** tokens define the delegated tokens (incl. self-delegation). */ - tokens?: string; - - /** delegator_shares defines total shares issued to a validator's delegators. */ - delegator_shares?: string; - - /** description defines the description terms for the validator. */ - description?: V1Beta1Description; - - /** - * unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. - * @format int64 - */ - unbonding_height?: string; - - /** - * unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. - * @format date-time - */ - unbonding_time?: string; - - /** commission defines the commission parameters. */ - commission?: V1Beta1Commission; - - /** min_self_delegation is the validator's self declared minimum self delegation. */ - min_self_delegation?: string; -} - -export interface TypesBlockID { - /** @format byte */ - hash?: string; - part_set_header?: TypesPartSetHeader; -} - -/** - * Header defines the structure of a Tendermint block header. - */ -export interface TypesHeader { - /** - * 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. - */ - version?: VersionConsensus; - chain_id?: string; - - /** @format int64 */ - height?: string; - - /** @format date-time */ - time?: string; - last_block_id?: TypesBlockID; - - /** @format byte */ - last_commit_hash?: string; - - /** @format byte */ - data_hash?: string; - - /** @format byte */ - validators_hash?: string; - - /** @format byte */ - next_validators_hash?: string; - - /** @format byte */ - consensus_hash?: string; - - /** @format byte */ - app_hash?: string; - - /** @format byte */ - last_results_hash?: string; - - /** @format byte */ - evidence_hash?: string; - - /** @format byte */ - proposer_address?: string; -} - -export interface TypesPartSetHeader { - /** @format int64 */ - total?: number; - - /** @format byte */ - hash?: string; -} - -/** -* 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. -*/ -export enum V1Beta1BondStatus { - BOND_STATUS_UNSPECIFIED = "BOND_STATUS_UNSPECIFIED", - BOND_STATUS_UNBONDED = "BOND_STATUS_UNBONDED", - BOND_STATUS_UNBONDING = "BOND_STATUS_UNBONDING", - BOND_STATUS_BONDED = "BOND_STATUS_BONDED", -} - -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** - * Commission defines commission parameters for a given validator. - */ -export interface V1Beta1Commission { - /** commission_rates defines the initial commission rates to be used for creating a validator. */ - commission_rates?: V1Beta1CommissionRates; - - /** - * update_time is the last time the commission rate was changed. - * @format date-time - */ - update_time?: string; -} - -/** -* CommissionRates defines the initial commission rates to be used for creating -a validator. -*/ -export interface V1Beta1CommissionRates { - /** rate is the commission rate charged to delegators, as a fraction. */ - rate?: string; - - /** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */ - max_rate?: string; - - /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */ - max_change_rate?: string; -} - -/** -* 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. -*/ -export interface V1Beta1Delegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegator_address?: string; - - /** validator_address is the bech32-encoded address of the validator. */ - validator_address?: string; - - /** shares define the delegation shares received. */ - shares?: string; -} - -/** -* DelegationResponse is equivalent to Delegation except that it contains a -balance in addition to shares which is more suitable for client responses. -*/ -export interface V1Beta1DelegationResponse { - /** - * 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. - */ - delegation?: V1Beta1Delegation; - - /** - * 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. - */ - balance?: V1Beta1Coin; -} - -/** - * Description defines a validator description. - */ -export interface V1Beta1Description { - /** moniker defines a human-readable name for the validator. */ - moniker?: string; - - /** identity defines an optional identity signature (ex. UPort or Keybase). */ - identity?: string; - - /** website defines an optional website link. */ - website?: string; - - /** security_contact defines an optional email for security contact. */ - security_contact?: string; - - /** details define other optional details. */ - details?: string; -} - -/** -* 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). -*/ -export interface V1Beta1HistoricalInfo { - /** Header defines the structure of a Tendermint block header. */ - header?: TypesHeader; - valset?: Stakingv1Beta1Validator[]; -} - -/** - * MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. - */ -export interface V1Beta1MsgBeginRedelegateResponse { - /** @format date-time */ - completion_time?: string; -} - -/** - * MsgCreateValidatorResponse defines the Msg/CreateValidator response type. - */ -export type V1Beta1MsgCreateValidatorResponse = object; - -/** - * MsgDelegateResponse defines the Msg/Delegate response type. - */ -export type V1Beta1MsgDelegateResponse = object; - -/** - * MsgEditValidatorResponse defines the Msg/EditValidator response type. - */ -export type V1Beta1MsgEditValidatorResponse = object; - -/** - * MsgUndelegateResponse defines the Msg/Undelegate response type. - */ -export interface V1Beta1MsgUndelegateResponse { - /** @format date-time */ - completion_time?: string; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - 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; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -/** - * Params defines the parameters for the staking module. - */ -export interface V1Beta1Params { - /** unbonding_time is the time duration of unbonding. */ - unbonding_time?: string; - - /** - * max_validators is the maximum number of validators. - * @format int64 - */ - max_validators?: number; - - /** - * max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). - * @format int64 - */ - max_entries?: number; - - /** - * historical_entries is the number of historical entries to persist. - * @format int64 - */ - historical_entries?: number; - - /** bond_denom defines the bondable coin denomination. */ - bond_denom?: string; -} - -/** -* Pool is used for tracking bonded and not-bonded token supply of the bond -denomination. -*/ -export interface V1Beta1Pool { - not_bonded_tokens?: string; - bonded_tokens?: string; -} - -/** - * QueryDelegationResponse is response type for the Query/Delegation RPC method. - */ -export interface V1Beta1QueryDelegationResponse { - /** delegation_responses defines the delegation info of a delegation. */ - delegation_response?: V1Beta1DelegationResponse; -} - -/** -* QueryDelegatorDelegationsResponse is response type for the -Query/DelegatorDelegations RPC method. -*/ -export interface V1Beta1QueryDelegatorDelegationsResponse { - /** delegation_responses defines all the delegations' info of a delegator. */ - delegation_responses?: V1Beta1DelegationResponse[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** -* QueryUnbondingDelegatorDelegationsResponse is response type for the -Query/UnbondingDelegatorDelegations RPC method. -*/ -export interface V1Beta1QueryDelegatorUnbondingDelegationsResponse { - unbonding_responses?: V1Beta1UnbondingDelegation[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** -* QueryDelegatorValidatorResponse response type for the -Query/DelegatorValidator RPC method. -*/ -export interface V1Beta1QueryDelegatorValidatorResponse { - /** validator defines the the validator info. */ - validator?: Stakingv1Beta1Validator; -} - -/** -* QueryDelegatorValidatorsResponse is response type for the -Query/DelegatorValidators RPC method. -*/ -export interface V1Beta1QueryDelegatorValidatorsResponse { - /** validators defines the the validators' info of a delegator. */ - validators?: Stakingv1Beta1Validator[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** -* QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -method. -*/ -export interface V1Beta1QueryHistoricalInfoResponse { - /** hist defines the historical info at the given height. */ - hist?: V1Beta1HistoricalInfo; -} - -/** - * QueryParamsResponse is response type for the Query/Params RPC method. - */ -export interface V1Beta1QueryParamsResponse { - /** params holds all the parameters of this module. */ - params?: V1Beta1Params; -} - -/** - * QueryPoolResponse is response type for the Query/Pool RPC method. - */ -export interface V1Beta1QueryPoolResponse { - /** pool defines the pool info. */ - pool?: V1Beta1Pool; -} - -/** -* QueryRedelegationsResponse is response type for the Query/Redelegations RPC -method. -*/ -export interface V1Beta1QueryRedelegationsResponse { - redelegation_responses?: V1Beta1RedelegationResponse[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** -* QueryDelegationResponse is response type for the Query/UnbondingDelegation -RPC method. -*/ -export interface V1Beta1QueryUnbondingDelegationResponse { - /** unbond defines the unbonding information of a delegation. */ - unbond?: V1Beta1UnbondingDelegation; -} - -export interface V1Beta1QueryValidatorDelegationsResponse { - delegation_responses?: V1Beta1DelegationResponse[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -export interface V1Beta1QueryValidatorResponse { - /** validator defines the the validator info. */ - validator?: Stakingv1Beta1Validator; -} - -/** -* QueryValidatorUnbondingDelegationsResponse is response type for the -Query/ValidatorUnbondingDelegations RPC method. -*/ -export interface V1Beta1QueryValidatorUnbondingDelegationsResponse { - unbonding_responses?: V1Beta1UnbondingDelegation[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -export interface V1Beta1QueryValidatorsResponse { - /** validators contains all the queried validators. */ - validators?: Stakingv1Beta1Validator[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** -* Redelegation contains the list of a particular delegator's redelegating bonds -from a particular source validator to a particular destination validator. -*/ -export interface V1Beta1Redelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegator_address?: string; - - /** validator_src_address is the validator redelegation source operator address. */ - validator_src_address?: string; - - /** validator_dst_address is the validator redelegation destination operator address. */ - validator_dst_address?: string; - - /** entries are the redelegation entries. */ - entries?: V1Beta1RedelegationEntry[]; -} - -/** - * RedelegationEntry defines a redelegation object with relevant metadata. - */ -export interface V1Beta1RedelegationEntry { - /** - * creation_height defines the height which the redelegation took place. - * @format int64 - */ - creation_height?: string; - - /** - * completion_time defines the unix time for redelegation completion. - * @format date-time - */ - completion_time?: string; - - /** initial_balance defines the initial balance when redelegation started. */ - initial_balance?: string; - - /** shares_dst is the amount of destination-validator shares created by redelegation. */ - shares_dst?: string; -} - -/** -* RedelegationEntryResponse is equivalent to a RedelegationEntry except that it -contains a balance in addition to shares which is more suitable for client -responses. -*/ -export interface V1Beta1RedelegationEntryResponse { - /** RedelegationEntry defines a redelegation object with relevant metadata. */ - redelegation_entry?: V1Beta1RedelegationEntry; - balance?: string; -} - -/** -* RedelegationResponse is equivalent to a Redelegation except that its entries -contain a balance in addition to shares which is more suitable for client -responses. -*/ -export interface V1Beta1RedelegationResponse { - /** - * Redelegation contains the list of a particular delegator's redelegating bonds - * from a particular source validator to a particular destination validator. - */ - redelegation?: V1Beta1Redelegation; - entries?: V1Beta1RedelegationEntryResponse[]; -} - -/** -* UnbondingDelegation stores all of a single delegator's unbonding bonds -for a single validator in an time-ordered list. -*/ -export interface V1Beta1UnbondingDelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegator_address?: string; - - /** validator_address is the bech32-encoded address of the validator. */ - validator_address?: string; - - /** entries are the unbonding delegation entries. */ - entries?: V1Beta1UnbondingDelegationEntry[]; -} - -/** - * UnbondingDelegationEntry defines an unbonding object with relevant metadata. - */ -export interface V1Beta1UnbondingDelegationEntry { - /** - * creation_height is the height which the unbonding took place. - * @format int64 - */ - creation_height?: string; - - /** - * completion_time is the unix time for unbonding completion. - * @format date-time - */ - completion_time?: string; - - /** initial_balance defines the tokens initially scheduled to receive at completion. */ - initial_balance?: string; - - /** balance defines the tokens to receive at completion. */ - balance?: string; -} - -/** -* 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. -*/ -export interface VersionConsensus { - /** @format uint64 */ - block?: string; - - /** @format uint64 */ - app?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/staking/v1beta1/authz.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryDelegatorDelegations - * @summary DelegatorDelegations queries all delegations of a given delegator address. - * @request GET:/cosmos/staking/v1beta1/delegations/{delegator_addr} - */ - queryDelegatorDelegations = ( - delegator_addr: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/staking/v1beta1/delegations/${delegator_addr}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryRedelegations - * @summary Redelegations queries redelegations of given address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations - */ - queryRedelegations = ( - delegator_addr: string, - query?: { - src_validator_addr?: string; - dst_validator_addr?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegator_addr}/redelegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegatorUnbondingDelegations - * @summary DelegatorUnbondingDelegations queries all unbonding delegations of a given -delegator address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations - */ - queryDelegatorUnbondingDelegations = ( - delegator_addr: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegator_addr}/unbonding_delegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidators - * @summary DelegatorValidators queries all validators info for given delegator -address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators - */ - queryDelegatorValidators = ( - delegator_addr: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegator_addr}/validators`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegatorValidator - * @summary DelegatorValidator queries validator info for given delegator validator -pair. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr} - */ - queryDelegatorValidator = (delegator_addr: string, validator_addr: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/staking/v1beta1/delegators/${delegator_addr}/validators/${validator_addr}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryHistoricalInfo - * @summary HistoricalInfo queries the historical info for given height. - * @request GET:/cosmos/staking/v1beta1/historical_info/{height} - */ - queryHistoricalInfo = (height: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/staking/v1beta1/historical_info/${height}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Parameters queries the staking parameters. - * @request GET:/cosmos/staking/v1beta1/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/staking/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryPool - * @summary Pool queries the pool info. - * @request GET:/cosmos/staking/v1beta1/pool - */ - queryPool = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/staking/v1beta1/pool`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryValidators - * @summary Validators queries all validators that match the given status. - * @request GET:/cosmos/staking/v1beta1/validators - */ - queryValidators = ( - query?: { - status?: string; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/staking/v1beta1/validators`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryValidator - * @summary Validator queries validator info for given validator address. - * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr} - */ - queryValidator = (validator_addr: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/staking/v1beta1/validators/${validator_addr}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryValidatorDelegations - * @summary ValidatorDelegations queries delegate info for given validator. - * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/delegations - */ - queryValidatorDelegations = ( - validator_addr: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/staking/v1beta1/validators/${validator_addr}/delegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDelegation - * @summary Delegation queries delegate info for given validator delegator pair. - * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr} - */ - queryDelegation = (validator_addr: string, delegator_addr: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/staking/v1beta1/validators/${validator_addr}/delegations/${delegator_addr}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryUnbondingDelegation - * @summary UnbondingDelegation queries unbonding info for given validator delegator -pair. - * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation - */ - queryUnbondingDelegation = (validator_addr: string, delegator_addr: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/staking/v1beta1/validators/${validator_addr}/delegations/${delegator_addr}/unbonding_delegation`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryValidatorUnbondingDelegations - * @summary ValidatorUnbondingDelegations queries unbonding delegations of a validator. - * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations - */ - queryValidatorUnbondingDelegations = ( - validator_addr: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/staking/v1beta1/validators/${validator_addr}/unbonding_delegations`, - method: "GET", - query: query, - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index 767d2c358f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - countTotal: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; -} -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index b5f5ced3d6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,242 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { - offset: 0, - limit: 0, - countTotal: false, - reverse: false, -}; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } - else { - message.reverse = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - message.reverse !== undefined && (obj.reverse = message.reverse); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } - else { - message.reverse = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 9c87ac0c9c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - 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; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { - offset: 0, - limit: 0, - count_total: false, - reverse: false, -}; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } else { - message.reverse = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - 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; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } else { - message.reverse = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac6a3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb30cd..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98406..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/authz.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/authz.d.ts deleted file mode 100644 index 9ff6051328..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/authz.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.staking.v1beta1"; -/** - * AuthorizationType defines the type of staking module authorization type - * - * Since: cosmos-sdk 0.43 - */ -export declare enum AuthorizationType { - /** AUTHORIZATION_TYPE_UNSPECIFIED - AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type */ - AUTHORIZATION_TYPE_UNSPECIFIED = 0, - /** AUTHORIZATION_TYPE_DELEGATE - AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate */ - AUTHORIZATION_TYPE_DELEGATE = 1, - /** AUTHORIZATION_TYPE_UNDELEGATE - AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate */ - AUTHORIZATION_TYPE_UNDELEGATE = 2, - /** AUTHORIZATION_TYPE_REDELEGATE - AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate */ - AUTHORIZATION_TYPE_REDELEGATE = 3, - UNRECOGNIZED = -1 -} -export declare function authorizationTypeFromJSON(object: any): AuthorizationType; -export declare function authorizationTypeToJSON(object: AuthorizationType): string; -/** - * StakeAuthorization defines authorization for delegate/undelegate/redelegate. - * - * Since: cosmos-sdk 0.43 - */ -export interface StakeAuthorization { - /** - * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is - * empty, there is no spend limit and any amount of coins can be delegated. - */ - maxTokens: Coin | undefined; - /** - * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - * account. - */ - allowList: StakeAuthorization_Validators | undefined; - /** deny_list specifies list of validator addresses to whom grantee can not delegate tokens. */ - denyList: StakeAuthorization_Validators | undefined; - /** authorization_type defines one of AuthorizationType. */ - authorizationType: AuthorizationType; -} -/** Validators defines list of validator addresses. */ -export interface StakeAuthorization_Validators { - address: string[]; -} -export declare const StakeAuthorization: { - encode(message: StakeAuthorization, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): StakeAuthorization; - fromJSON(object: any): StakeAuthorization; - toJSON(message: StakeAuthorization): unknown; - fromPartial(object: DeepPartial): StakeAuthorization; -}; -export declare const StakeAuthorization_Validators: { - encode(message: StakeAuthorization_Validators, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): StakeAuthorization_Validators; - fromJSON(object: any): StakeAuthorization_Validators; - toJSON(message: StakeAuthorization_Validators): unknown; - fromPartial(object: DeepPartial): StakeAuthorization_Validators; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/authz.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/authz.js deleted file mode 100644 index 0c8b4029ee..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/authz.js +++ /dev/null @@ -1,238 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.staking.v1beta1"; -/** - * AuthorizationType defines the type of staking module authorization type - * - * Since: cosmos-sdk 0.43 - */ -export var AuthorizationType; -(function (AuthorizationType) { - /** AUTHORIZATION_TYPE_UNSPECIFIED - AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type */ - AuthorizationType[AuthorizationType["AUTHORIZATION_TYPE_UNSPECIFIED"] = 0] = "AUTHORIZATION_TYPE_UNSPECIFIED"; - /** AUTHORIZATION_TYPE_DELEGATE - AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate */ - AuthorizationType[AuthorizationType["AUTHORIZATION_TYPE_DELEGATE"] = 1] = "AUTHORIZATION_TYPE_DELEGATE"; - /** AUTHORIZATION_TYPE_UNDELEGATE - AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate */ - AuthorizationType[AuthorizationType["AUTHORIZATION_TYPE_UNDELEGATE"] = 2] = "AUTHORIZATION_TYPE_UNDELEGATE"; - /** AUTHORIZATION_TYPE_REDELEGATE - AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate */ - AuthorizationType[AuthorizationType["AUTHORIZATION_TYPE_REDELEGATE"] = 3] = "AUTHORIZATION_TYPE_REDELEGATE"; - AuthorizationType[AuthorizationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(AuthorizationType || (AuthorizationType = {})); -export function authorizationTypeFromJSON(object) { - switch (object) { - case 0: - case "AUTHORIZATION_TYPE_UNSPECIFIED": - return AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED; - case 1: - case "AUTHORIZATION_TYPE_DELEGATE": - return AuthorizationType.AUTHORIZATION_TYPE_DELEGATE; - case 2: - case "AUTHORIZATION_TYPE_UNDELEGATE": - return AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE; - case 3: - case "AUTHORIZATION_TYPE_REDELEGATE": - return AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE; - case -1: - case "UNRECOGNIZED": - default: - return AuthorizationType.UNRECOGNIZED; - } -} -export function authorizationTypeToJSON(object) { - switch (object) { - case AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED: - return "AUTHORIZATION_TYPE_UNSPECIFIED"; - case AuthorizationType.AUTHORIZATION_TYPE_DELEGATE: - return "AUTHORIZATION_TYPE_DELEGATE"; - case AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE: - return "AUTHORIZATION_TYPE_UNDELEGATE"; - case AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE: - return "AUTHORIZATION_TYPE_REDELEGATE"; - default: - return "UNKNOWN"; - } -} -const baseStakeAuthorization = { authorizationType: 0 }; -export const StakeAuthorization = { - encode(message, writer = Writer.create()) { - if (message.maxTokens !== undefined) { - Coin.encode(message.maxTokens, writer.uint32(10).fork()).ldelim(); - } - if (message.allowList !== undefined) { - StakeAuthorization_Validators.encode(message.allowList, writer.uint32(18).fork()).ldelim(); - } - if (message.denyList !== undefined) { - StakeAuthorization_Validators.encode(message.denyList, writer.uint32(26).fork()).ldelim(); - } - if (message.authorizationType !== 0) { - writer.uint32(32).int32(message.authorizationType); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseStakeAuthorization }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxTokens = Coin.decode(reader, reader.uint32()); - break; - case 2: - message.allowList = StakeAuthorization_Validators.decode(reader, reader.uint32()); - break; - case 3: - message.denyList = StakeAuthorization_Validators.decode(reader, reader.uint32()); - break; - case 4: - message.authorizationType = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseStakeAuthorization }; - if (object.maxTokens !== undefined && object.maxTokens !== null) { - message.maxTokens = Coin.fromJSON(object.maxTokens); - } - else { - message.maxTokens = undefined; - } - if (object.allowList !== undefined && object.allowList !== null) { - message.allowList = StakeAuthorization_Validators.fromJSON(object.allowList); - } - else { - message.allowList = undefined; - } - if (object.denyList !== undefined && object.denyList !== null) { - message.denyList = StakeAuthorization_Validators.fromJSON(object.denyList); - } - else { - message.denyList = undefined; - } - if (object.authorizationType !== undefined && - object.authorizationType !== null) { - message.authorizationType = authorizationTypeFromJSON(object.authorizationType); - } - else { - message.authorizationType = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.maxTokens !== undefined && - (obj.maxTokens = message.maxTokens - ? Coin.toJSON(message.maxTokens) - : undefined); - message.allowList !== undefined && - (obj.allowList = message.allowList - ? StakeAuthorization_Validators.toJSON(message.allowList) - : undefined); - message.denyList !== undefined && - (obj.denyList = message.denyList - ? StakeAuthorization_Validators.toJSON(message.denyList) - : undefined); - message.authorizationType !== undefined && - (obj.authorizationType = authorizationTypeToJSON(message.authorizationType)); - return obj; - }, - fromPartial(object) { - const message = { ...baseStakeAuthorization }; - if (object.maxTokens !== undefined && object.maxTokens !== null) { - message.maxTokens = Coin.fromPartial(object.maxTokens); - } - else { - message.maxTokens = undefined; - } - if (object.allowList !== undefined && object.allowList !== null) { - message.allowList = StakeAuthorization_Validators.fromPartial(object.allowList); - } - else { - message.allowList = undefined; - } - if (object.denyList !== undefined && object.denyList !== null) { - message.denyList = StakeAuthorization_Validators.fromPartial(object.denyList); - } - else { - message.denyList = undefined; - } - if (object.authorizationType !== undefined && - object.authorizationType !== null) { - message.authorizationType = object.authorizationType; - } - else { - message.authorizationType = 0; - } - return message; - }, -}; -const baseStakeAuthorization_Validators = { address: "" }; -export const StakeAuthorization_Validators = { - encode(message, writer = Writer.create()) { - for (const v of message.address) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseStakeAuthorization_Validators, - }; - message.address = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseStakeAuthorization_Validators, - }; - message.address = []; - if (object.address !== undefined && object.address !== null) { - for (const e of object.address) { - message.address.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.address) { - obj.address = message.address.map((e) => e); - } - else { - obj.address = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseStakeAuthorization_Validators, - }; - message.address = []; - if (object.address !== undefined && object.address !== null) { - for (const e of object.address) { - message.address.push(e); - } - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/authz.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/authz.ts deleted file mode 100644 index 355022cba5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/authz.ts +++ /dev/null @@ -1,321 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.staking.v1beta1"; - -/** - * AuthorizationType defines the type of staking module authorization type - * - * Since: cosmos-sdk 0.43 - */ -export enum AuthorizationType { - /** AUTHORIZATION_TYPE_UNSPECIFIED - AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type */ - AUTHORIZATION_TYPE_UNSPECIFIED = 0, - /** AUTHORIZATION_TYPE_DELEGATE - AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate */ - AUTHORIZATION_TYPE_DELEGATE = 1, - /** AUTHORIZATION_TYPE_UNDELEGATE - AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate */ - AUTHORIZATION_TYPE_UNDELEGATE = 2, - /** AUTHORIZATION_TYPE_REDELEGATE - AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate */ - AUTHORIZATION_TYPE_REDELEGATE = 3, - UNRECOGNIZED = -1, -} - -export function authorizationTypeFromJSON(object: any): AuthorizationType { - switch (object) { - case 0: - case "AUTHORIZATION_TYPE_UNSPECIFIED": - return AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED; - case 1: - case "AUTHORIZATION_TYPE_DELEGATE": - return AuthorizationType.AUTHORIZATION_TYPE_DELEGATE; - case 2: - case "AUTHORIZATION_TYPE_UNDELEGATE": - return AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE; - case 3: - case "AUTHORIZATION_TYPE_REDELEGATE": - return AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE; - case -1: - case "UNRECOGNIZED": - default: - return AuthorizationType.UNRECOGNIZED; - } -} - -export function authorizationTypeToJSON(object: AuthorizationType): string { - switch (object) { - case AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED: - return "AUTHORIZATION_TYPE_UNSPECIFIED"; - case AuthorizationType.AUTHORIZATION_TYPE_DELEGATE: - return "AUTHORIZATION_TYPE_DELEGATE"; - case AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE: - return "AUTHORIZATION_TYPE_UNDELEGATE"; - case AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE: - return "AUTHORIZATION_TYPE_REDELEGATE"; - default: - return "UNKNOWN"; - } -} - -/** - * StakeAuthorization defines authorization for delegate/undelegate/redelegate. - * - * Since: cosmos-sdk 0.43 - */ -export interface StakeAuthorization { - /** - * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is - * empty, there is no spend limit and any amount of coins can be delegated. - */ - max_tokens: Coin | undefined; - /** - * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - * account. - */ - allow_list: StakeAuthorization_Validators | undefined; - /** deny_list specifies list of validator addresses to whom grantee can not delegate tokens. */ - deny_list: StakeAuthorization_Validators | undefined; - /** authorization_type defines one of AuthorizationType. */ - authorization_type: AuthorizationType; -} - -/** Validators defines list of validator addresses. */ -export interface StakeAuthorization_Validators { - address: string[]; -} - -const baseStakeAuthorization: object = { authorization_type: 0 }; - -export const StakeAuthorization = { - encode( - message: StakeAuthorization, - writer: Writer = Writer.create() - ): Writer { - if (message.max_tokens !== undefined) { - Coin.encode(message.max_tokens, writer.uint32(10).fork()).ldelim(); - } - if (message.allow_list !== undefined) { - StakeAuthorization_Validators.encode( - message.allow_list, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.deny_list !== undefined) { - StakeAuthorization_Validators.encode( - message.deny_list, - writer.uint32(26).fork() - ).ldelim(); - } - if (message.authorization_type !== 0) { - writer.uint32(32).int32(message.authorization_type); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): StakeAuthorization { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseStakeAuthorization } as StakeAuthorization; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_tokens = Coin.decode(reader, reader.uint32()); - break; - case 2: - message.allow_list = StakeAuthorization_Validators.decode( - reader, - reader.uint32() - ); - break; - case 3: - message.deny_list = StakeAuthorization_Validators.decode( - reader, - reader.uint32() - ); - break; - case 4: - message.authorization_type = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): StakeAuthorization { - const message = { ...baseStakeAuthorization } as StakeAuthorization; - if (object.max_tokens !== undefined && object.max_tokens !== null) { - message.max_tokens = Coin.fromJSON(object.max_tokens); - } else { - message.max_tokens = undefined; - } - if (object.allow_list !== undefined && object.allow_list !== null) { - message.allow_list = StakeAuthorization_Validators.fromJSON( - object.allow_list - ); - } else { - message.allow_list = undefined; - } - if (object.deny_list !== undefined && object.deny_list !== null) { - message.deny_list = StakeAuthorization_Validators.fromJSON( - object.deny_list - ); - } else { - message.deny_list = undefined; - } - if ( - object.authorization_type !== undefined && - object.authorization_type !== null - ) { - message.authorization_type = authorizationTypeFromJSON( - object.authorization_type - ); - } else { - message.authorization_type = 0; - } - return message; - }, - - toJSON(message: StakeAuthorization): unknown { - const obj: any = {}; - message.max_tokens !== undefined && - (obj.max_tokens = message.max_tokens - ? Coin.toJSON(message.max_tokens) - : undefined); - message.allow_list !== undefined && - (obj.allow_list = message.allow_list - ? StakeAuthorization_Validators.toJSON(message.allow_list) - : undefined); - message.deny_list !== undefined && - (obj.deny_list = message.deny_list - ? StakeAuthorization_Validators.toJSON(message.deny_list) - : undefined); - message.authorization_type !== undefined && - (obj.authorization_type = authorizationTypeToJSON( - message.authorization_type - )); - return obj; - }, - - fromPartial(object: DeepPartial): StakeAuthorization { - const message = { ...baseStakeAuthorization } as StakeAuthorization; - if (object.max_tokens !== undefined && object.max_tokens !== null) { - message.max_tokens = Coin.fromPartial(object.max_tokens); - } else { - message.max_tokens = undefined; - } - if (object.allow_list !== undefined && object.allow_list !== null) { - message.allow_list = StakeAuthorization_Validators.fromPartial( - object.allow_list - ); - } else { - message.allow_list = undefined; - } - if (object.deny_list !== undefined && object.deny_list !== null) { - message.deny_list = StakeAuthorization_Validators.fromPartial( - object.deny_list - ); - } else { - message.deny_list = undefined; - } - if ( - object.authorization_type !== undefined && - object.authorization_type !== null - ) { - message.authorization_type = object.authorization_type; - } else { - message.authorization_type = 0; - } - return message; - }, -}; - -const baseStakeAuthorization_Validators: object = { address: "" }; - -export const StakeAuthorization_Validators = { - encode( - message: StakeAuthorization_Validators, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.address) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): StakeAuthorization_Validators { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseStakeAuthorization_Validators, - } as StakeAuthorization_Validators; - message.address = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): StakeAuthorization_Validators { - const message = { - ...baseStakeAuthorization_Validators, - } as StakeAuthorization_Validators; - message.address = []; - if (object.address !== undefined && object.address !== null) { - for (const e of object.address) { - message.address.push(String(e)); - } - } - return message; - }, - - toJSON(message: StakeAuthorization_Validators): unknown { - const obj: any = {}; - if (message.address) { - obj.address = message.address.map((e) => e); - } else { - obj.address = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): StakeAuthorization_Validators { - const message = { - ...baseStakeAuthorization_Validators, - } as StakeAuthorization_Validators; - message.address = []; - if (object.address !== undefined && object.address !== null) { - for (const e of object.address) { - message.address.push(e); - } - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.d.ts deleted file mode 100644 index 060b7f5a61..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Params, Validator, Delegation, UnbondingDelegation, Redelegation } from "../../../cosmos/staking/v1beta1/staking"; -export declare const protobufPackage = "cosmos.staking.v1beta1"; -/** GenesisState defines the staking module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of related to deposit. */ - params: Params | undefined; - /** - * last_total_power tracks the total amounts of bonded tokens recorded during - * the previous end block. - */ - lastTotalPower: Uint8Array; - /** - * last_validator_powers is a special index that provides a historical list - * of the last-block's bonded validators. - */ - lastValidatorPowers: LastValidatorPower[]; - /** delegations defines the validator set at genesis. */ - validators: Validator[]; - /** delegations defines the delegations active at genesis. */ - delegations: Delegation[]; - /** unbonding_delegations defines the unbonding delegations active at genesis. */ - unbondingDelegations: UnbondingDelegation[]; - /** redelegations defines the redelegations active at genesis. */ - redelegations: Redelegation[]; - exported: boolean; -} -/** LastValidatorPower required for validator set update logic. */ -export interface LastValidatorPower { - /** address is the address of the validator. */ - address: string; - /** power defines the power of the validator. */ - power: number; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -export declare const LastValidatorPower: { - encode(message: LastValidatorPower, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): LastValidatorPower; - fromJSON(object: any): LastValidatorPower; - toJSON(message: LastValidatorPower): unknown; - fromPartial(object: DeepPartial): LastValidatorPower; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.js deleted file mode 100644 index 5899507726..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.js +++ /dev/null @@ -1,334 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Params, Validator, Delegation, UnbondingDelegation, Redelegation, } from "../../../cosmos/staking/v1beta1/staking"; -export const protobufPackage = "cosmos.staking.v1beta1"; -const baseGenesisState = { exported: false }; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - if (message.lastTotalPower.length !== 0) { - writer.uint32(18).bytes(message.lastTotalPower); - } - for (const v of message.lastValidatorPowers) { - LastValidatorPower.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.validators) { - Validator.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.delegations) { - Delegation.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.unbondingDelegations) { - UnbondingDelegation.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.redelegations) { - Redelegation.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.exported === true) { - writer.uint32(64).bool(message.exported); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.lastValidatorPowers = []; - message.validators = []; - message.delegations = []; - message.unbondingDelegations = []; - message.redelegations = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.lastTotalPower = reader.bytes(); - break; - case 3: - message.lastValidatorPowers.push(LastValidatorPower.decode(reader, reader.uint32())); - break; - case 4: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 5: - message.delegations.push(Delegation.decode(reader, reader.uint32())); - break; - case 6: - message.unbondingDelegations.push(UnbondingDelegation.decode(reader, reader.uint32())); - break; - case 7: - message.redelegations.push(Redelegation.decode(reader, reader.uint32())); - break; - case 8: - message.exported = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.lastValidatorPowers = []; - message.validators = []; - message.delegations = []; - message.unbondingDelegations = []; - message.redelegations = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - if (object.lastTotalPower !== undefined && object.lastTotalPower !== null) { - message.lastTotalPower = bytesFromBase64(object.lastTotalPower); - } - if (object.lastValidatorPowers !== undefined && - object.lastValidatorPowers !== null) { - for (const e of object.lastValidatorPowers) { - message.lastValidatorPowers.push(LastValidatorPower.fromJSON(e)); - } - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.delegations !== undefined && object.delegations !== null) { - for (const e of object.delegations) { - message.delegations.push(Delegation.fromJSON(e)); - } - } - if (object.unbondingDelegations !== undefined && - object.unbondingDelegations !== null) { - for (const e of object.unbondingDelegations) { - message.unbondingDelegations.push(UnbondingDelegation.fromJSON(e)); - } - } - if (object.redelegations !== undefined && object.redelegations !== null) { - for (const e of object.redelegations) { - message.redelegations.push(Redelegation.fromJSON(e)); - } - } - if (object.exported !== undefined && object.exported !== null) { - message.exported = Boolean(object.exported); - } - else { - message.exported = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.lastTotalPower !== undefined && - (obj.lastTotalPower = base64FromBytes(message.lastTotalPower !== undefined - ? message.lastTotalPower - : new Uint8Array())); - if (message.lastValidatorPowers) { - obj.lastValidatorPowers = message.lastValidatorPowers.map((e) => e ? LastValidatorPower.toJSON(e) : undefined); - } - else { - obj.lastValidatorPowers = []; - } - if (message.validators) { - obj.validators = message.validators.map((e) => e ? Validator.toJSON(e) : undefined); - } - else { - obj.validators = []; - } - if (message.delegations) { - obj.delegations = message.delegations.map((e) => e ? Delegation.toJSON(e) : undefined); - } - else { - obj.delegations = []; - } - if (message.unbondingDelegations) { - obj.unbondingDelegations = message.unbondingDelegations.map((e) => e ? UnbondingDelegation.toJSON(e) : undefined); - } - else { - obj.unbondingDelegations = []; - } - if (message.redelegations) { - obj.redelegations = message.redelegations.map((e) => e ? Redelegation.toJSON(e) : undefined); - } - else { - obj.redelegations = []; - } - message.exported !== undefined && (obj.exported = message.exported); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.lastValidatorPowers = []; - message.validators = []; - message.delegations = []; - message.unbondingDelegations = []; - message.redelegations = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - if (object.lastTotalPower !== undefined && object.lastTotalPower !== null) { - message.lastTotalPower = object.lastTotalPower; - } - else { - message.lastTotalPower = new Uint8Array(); - } - if (object.lastValidatorPowers !== undefined && - object.lastValidatorPowers !== null) { - for (const e of object.lastValidatorPowers) { - message.lastValidatorPowers.push(LastValidatorPower.fromPartial(e)); - } - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.delegations !== undefined && object.delegations !== null) { - for (const e of object.delegations) { - message.delegations.push(Delegation.fromPartial(e)); - } - } - if (object.unbondingDelegations !== undefined && - object.unbondingDelegations !== null) { - for (const e of object.unbondingDelegations) { - message.unbondingDelegations.push(UnbondingDelegation.fromPartial(e)); - } - } - if (object.redelegations !== undefined && object.redelegations !== null) { - for (const e of object.redelegations) { - message.redelegations.push(Redelegation.fromPartial(e)); - } - } - if (object.exported !== undefined && object.exported !== null) { - message.exported = object.exported; - } - else { - message.exported = false; - } - return message; - }, -}; -const baseLastValidatorPower = { address: "", power: 0 }; -export const LastValidatorPower = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.power !== 0) { - writer.uint32(16).int64(message.power); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLastValidatorPower }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.power = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseLastValidatorPower }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } - else { - message.power = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.power !== undefined && (obj.power = message.power); - return obj; - }, - fromPartial(object) { - const message = { ...baseLastValidatorPower }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } - else { - message.power = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.ts deleted file mode 100644 index 9fdd3df257..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/genesis.ts +++ /dev/null @@ -1,423 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { - Params, - Validator, - Delegation, - UnbondingDelegation, - Redelegation, -} from "../../../cosmos/staking/v1beta1/staking"; - -export const protobufPackage = "cosmos.staking.v1beta1"; - -/** GenesisState defines the staking module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of related to deposit. */ - params: Params | undefined; - /** - * last_total_power tracks the total amounts of bonded tokens recorded during - * the previous end block. - */ - last_total_power: Uint8Array; - /** - * last_validator_powers is a special index that provides a historical list - * of the last-block's bonded validators. - */ - last_validator_powers: LastValidatorPower[]; - /** delegations defines the validator set at genesis. */ - validators: Validator[]; - /** delegations defines the delegations active at genesis. */ - delegations: Delegation[]; - /** unbonding_delegations defines the unbonding delegations active at genesis. */ - unbonding_delegations: UnbondingDelegation[]; - /** redelegations defines the redelegations active at genesis. */ - redelegations: Redelegation[]; - exported: boolean; -} - -/** LastValidatorPower required for validator set update logic. */ -export interface LastValidatorPower { - /** address is the address of the validator. */ - address: string; - /** power defines the power of the validator. */ - power: number; -} - -const baseGenesisState: object = { exported: false }; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - if (message.last_total_power.length !== 0) { - writer.uint32(18).bytes(message.last_total_power); - } - for (const v of message.last_validator_powers) { - LastValidatorPower.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.delegations) { - Delegation.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.unbonding_delegations) { - UnbondingDelegation.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.redelegations) { - Redelegation.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.exported === true) { - writer.uint32(64).bool(message.exported); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.last_validator_powers = []; - message.validators = []; - message.delegations = []; - message.unbonding_delegations = []; - message.redelegations = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.last_total_power = reader.bytes(); - break; - case 3: - message.last_validator_powers.push( - LastValidatorPower.decode(reader, reader.uint32()) - ); - break; - case 4: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 5: - message.delegations.push(Delegation.decode(reader, reader.uint32())); - break; - case 6: - message.unbonding_delegations.push( - UnbondingDelegation.decode(reader, reader.uint32()) - ); - break; - case 7: - message.redelegations.push( - Redelegation.decode(reader, reader.uint32()) - ); - break; - case 8: - message.exported = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.last_validator_powers = []; - message.validators = []; - message.delegations = []; - message.unbonding_delegations = []; - message.redelegations = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if ( - object.last_total_power !== undefined && - object.last_total_power !== null - ) { - message.last_total_power = bytesFromBase64(object.last_total_power); - } - if ( - object.last_validator_powers !== undefined && - object.last_validator_powers !== null - ) { - for (const e of object.last_validator_powers) { - message.last_validator_powers.push(LastValidatorPower.fromJSON(e)); - } - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.delegations !== undefined && object.delegations !== null) { - for (const e of object.delegations) { - message.delegations.push(Delegation.fromJSON(e)); - } - } - if ( - object.unbonding_delegations !== undefined && - object.unbonding_delegations !== null - ) { - for (const e of object.unbonding_delegations) { - message.unbonding_delegations.push(UnbondingDelegation.fromJSON(e)); - } - } - if (object.redelegations !== undefined && object.redelegations !== null) { - for (const e of object.redelegations) { - message.redelegations.push(Redelegation.fromJSON(e)); - } - } - if (object.exported !== undefined && object.exported !== null) { - message.exported = Boolean(object.exported); - } else { - message.exported = false; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.last_total_power !== undefined && - (obj.last_total_power = base64FromBytes( - message.last_total_power !== undefined - ? message.last_total_power - : new Uint8Array() - )); - if (message.last_validator_powers) { - obj.last_validator_powers = message.last_validator_powers.map((e) => - e ? LastValidatorPower.toJSON(e) : undefined - ); - } else { - obj.last_validator_powers = []; - } - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - if (message.delegations) { - obj.delegations = message.delegations.map((e) => - e ? Delegation.toJSON(e) : undefined - ); - } else { - obj.delegations = []; - } - if (message.unbonding_delegations) { - obj.unbonding_delegations = message.unbonding_delegations.map((e) => - e ? UnbondingDelegation.toJSON(e) : undefined - ); - } else { - obj.unbonding_delegations = []; - } - if (message.redelegations) { - obj.redelegations = message.redelegations.map((e) => - e ? Redelegation.toJSON(e) : undefined - ); - } else { - obj.redelegations = []; - } - message.exported !== undefined && (obj.exported = message.exported); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.last_validator_powers = []; - message.validators = []; - message.delegations = []; - message.unbonding_delegations = []; - message.redelegations = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if ( - object.last_total_power !== undefined && - object.last_total_power !== null - ) { - message.last_total_power = object.last_total_power; - } else { - message.last_total_power = new Uint8Array(); - } - if ( - object.last_validator_powers !== undefined && - object.last_validator_powers !== null - ) { - for (const e of object.last_validator_powers) { - message.last_validator_powers.push(LastValidatorPower.fromPartial(e)); - } - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.delegations !== undefined && object.delegations !== null) { - for (const e of object.delegations) { - message.delegations.push(Delegation.fromPartial(e)); - } - } - if ( - object.unbonding_delegations !== undefined && - object.unbonding_delegations !== null - ) { - for (const e of object.unbonding_delegations) { - message.unbonding_delegations.push(UnbondingDelegation.fromPartial(e)); - } - } - if (object.redelegations !== undefined && object.redelegations !== null) { - for (const e of object.redelegations) { - message.redelegations.push(Redelegation.fromPartial(e)); - } - } - if (object.exported !== undefined && object.exported !== null) { - message.exported = object.exported; - } else { - message.exported = false; - } - return message; - }, -}; - -const baseLastValidatorPower: object = { address: "", power: 0 }; - -export const LastValidatorPower = { - encode( - message: LastValidatorPower, - writer: Writer = Writer.create() - ): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.power !== 0) { - writer.uint32(16).int64(message.power); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): LastValidatorPower { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLastValidatorPower } as LastValidatorPower; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.power = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LastValidatorPower { - const message = { ...baseLastValidatorPower } as LastValidatorPower; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } else { - message.power = 0; - } - return message; - }, - - toJSON(message: LastValidatorPower): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.power !== undefined && (obj.power = message.power); - return obj; - }, - - fromPartial(object: DeepPartial): LastValidatorPower { - const message = { ...baseLastValidatorPower } as LastValidatorPower; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } else { - message.power = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.d.ts deleted file mode 100644 index 1b2f32d390..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.d.ts +++ /dev/null @@ -1,493 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -import { Validator, DelegationResponse, UnbondingDelegation, RedelegationResponse, HistoricalInfo, Pool, Params } from "../../../cosmos/staking/v1beta1/staking"; -export declare const protobufPackage = "cosmos.staking.v1beta1"; -/** QueryValidatorsRequest is request type for Query/Validators RPC method. */ -export interface QueryValidatorsRequest { - /** status enables to query for validators matching a given status. */ - status: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** QueryValidatorsResponse is response type for the Query/Validators RPC method */ -export interface QueryValidatorsResponse { - /** validators contains all the queried validators. */ - validators: Validator[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** QueryValidatorRequest is response type for the Query/Validator RPC method */ -export interface QueryValidatorRequest { - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} -/** QueryValidatorResponse is response type for the Query/Validator RPC method */ -export interface QueryValidatorResponse { - /** validator defines the the validator info. */ - validator: Validator | undefined; -} -/** - * QueryValidatorDelegationsRequest is request type for the - * Query/ValidatorDelegations RPC method - */ -export interface QueryValidatorDelegationsRequest { - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryValidatorDelegationsResponse is response type for the - * Query/ValidatorDelegations RPC method - */ -export interface QueryValidatorDelegationsResponse { - delegationResponses: DelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryValidatorUnbondingDelegationsRequest is required type for the - * Query/ValidatorUnbondingDelegations RPC method - */ -export interface QueryValidatorUnbondingDelegationsRequest { - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryValidatorUnbondingDelegationsResponse is response type for the - * Query/ValidatorUnbondingDelegations RPC method. - */ -export interface QueryValidatorUnbondingDelegationsResponse { - unbondingResponses: UnbondingDelegation[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** QueryDelegationRequest is request type for the Query/Delegation RPC method. */ -export interface QueryDelegationRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} -/** QueryDelegationResponse is response type for the Query/Delegation RPC method. */ -export interface QueryDelegationResponse { - /** delegation_responses defines the delegation info of a delegation. */ - delegationResponse: DelegationResponse | undefined; -} -/** - * QueryUnbondingDelegationRequest is request type for the - * Query/UnbondingDelegation RPC method. - */ -export interface QueryUnbondingDelegationRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} -/** - * QueryDelegationResponse is response type for the Query/UnbondingDelegation - * RPC method. - */ -export interface QueryUnbondingDelegationResponse { - /** unbond defines the unbonding information of a delegation. */ - unbond: UnbondingDelegation | undefined; -} -/** - * QueryDelegatorDelegationsRequest is request type for the - * Query/DelegatorDelegations RPC method. - */ -export interface QueryDelegatorDelegationsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryDelegatorDelegationsResponse is response type for the - * Query/DelegatorDelegations RPC method. - */ -export interface QueryDelegatorDelegationsResponse { - /** delegation_responses defines all the delegations' info of a delegator. */ - delegationResponses: DelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryDelegatorUnbondingDelegationsRequest is request type for the - * Query/DelegatorUnbondingDelegations RPC method. - */ -export interface QueryDelegatorUnbondingDelegationsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryUnbondingDelegatorDelegationsResponse is response type for the - * Query/UnbondingDelegatorDelegations RPC method. - */ -export interface QueryDelegatorUnbondingDelegationsResponse { - unbondingResponses: UnbondingDelegation[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryRedelegationsRequest is request type for the Query/Redelegations RPC - * method. - */ -export interface QueryRedelegationsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** src_validator_addr defines the validator address to redelegate from. */ - srcValidatorAddr: string; - /** dst_validator_addr defines the validator address to redelegate to. */ - dstValidatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryRedelegationsResponse is response type for the Query/Redelegations RPC - * method. - */ -export interface QueryRedelegationsResponse { - redelegationResponses: RedelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryDelegatorValidatorsRequest is request type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryDelegatorValidatorsResponse is response type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsResponse { - /** validators defines the the validators' info of a delegator. */ - validators: Validator[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** - * QueryDelegatorValidatorRequest is request type for the - * Query/DelegatorValidator RPC method. - */ -export interface QueryDelegatorValidatorRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} -/** - * QueryDelegatorValidatorResponse response type for the - * Query/DelegatorValidator RPC method. - */ -export interface QueryDelegatorValidatorResponse { - /** validator defines the the validator info. */ - validator: Validator | undefined; -} -/** - * QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC - * method. - */ -export interface QueryHistoricalInfoRequest { - /** height defines at which height to query the historical info. */ - height: number; -} -/** - * QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC - * method. - */ -export interface QueryHistoricalInfoResponse { - /** hist defines the historical info at the given height. */ - hist: HistoricalInfo | undefined; -} -/** QueryPoolRequest is request type for the Query/Pool RPC method. */ -export interface QueryPoolRequest { -} -/** QueryPoolResponse is response type for the Query/Pool RPC method. */ -export interface QueryPoolResponse { - /** pool defines the pool info. */ - pool: Pool | undefined; -} -/** QueryParamsRequest is request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { -} -/** QueryParamsResponse is response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params holds all the parameters of this module. */ - params: Params | undefined; -} -export declare const QueryValidatorsRequest: { - encode(message: QueryValidatorsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorsRequest; - fromJSON(object: any): QueryValidatorsRequest; - toJSON(message: QueryValidatorsRequest): unknown; - fromPartial(object: DeepPartial): QueryValidatorsRequest; -}; -export declare const QueryValidatorsResponse: { - encode(message: QueryValidatorsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorsResponse; - fromJSON(object: any): QueryValidatorsResponse; - toJSON(message: QueryValidatorsResponse): unknown; - fromPartial(object: DeepPartial): QueryValidatorsResponse; -}; -export declare const QueryValidatorRequest: { - encode(message: QueryValidatorRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorRequest; - fromJSON(object: any): QueryValidatorRequest; - toJSON(message: QueryValidatorRequest): unknown; - fromPartial(object: DeepPartial): QueryValidatorRequest; -}; -export declare const QueryValidatorResponse: { - encode(message: QueryValidatorResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorResponse; - fromJSON(object: any): QueryValidatorResponse; - toJSON(message: QueryValidatorResponse): unknown; - fromPartial(object: DeepPartial): QueryValidatorResponse; -}; -export declare const QueryValidatorDelegationsRequest: { - encode(message: QueryValidatorDelegationsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorDelegationsRequest; - fromJSON(object: any): QueryValidatorDelegationsRequest; - toJSON(message: QueryValidatorDelegationsRequest): unknown; - fromPartial(object: DeepPartial): QueryValidatorDelegationsRequest; -}; -export declare const QueryValidatorDelegationsResponse: { - encode(message: QueryValidatorDelegationsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorDelegationsResponse; - fromJSON(object: any): QueryValidatorDelegationsResponse; - toJSON(message: QueryValidatorDelegationsResponse): unknown; - fromPartial(object: DeepPartial): QueryValidatorDelegationsResponse; -}; -export declare const QueryValidatorUnbondingDelegationsRequest: { - encode(message: QueryValidatorUnbondingDelegationsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorUnbondingDelegationsRequest; - fromJSON(object: any): QueryValidatorUnbondingDelegationsRequest; - toJSON(message: QueryValidatorUnbondingDelegationsRequest): unknown; - fromPartial(object: DeepPartial): QueryValidatorUnbondingDelegationsRequest; -}; -export declare const QueryValidatorUnbondingDelegationsResponse: { - encode(message: QueryValidatorUnbondingDelegationsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryValidatorUnbondingDelegationsResponse; - fromJSON(object: any): QueryValidatorUnbondingDelegationsResponse; - toJSON(message: QueryValidatorUnbondingDelegationsResponse): unknown; - fromPartial(object: DeepPartial): QueryValidatorUnbondingDelegationsResponse; -}; -export declare const QueryDelegationRequest: { - encode(message: QueryDelegationRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegationRequest; - fromJSON(object: any): QueryDelegationRequest; - toJSON(message: QueryDelegationRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegationRequest; -}; -export declare const QueryDelegationResponse: { - encode(message: QueryDelegationResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegationResponse; - fromJSON(object: any): QueryDelegationResponse; - toJSON(message: QueryDelegationResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegationResponse; -}; -export declare const QueryUnbondingDelegationRequest: { - encode(message: QueryUnbondingDelegationRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryUnbondingDelegationRequest; - fromJSON(object: any): QueryUnbondingDelegationRequest; - toJSON(message: QueryUnbondingDelegationRequest): unknown; - fromPartial(object: DeepPartial): QueryUnbondingDelegationRequest; -}; -export declare const QueryUnbondingDelegationResponse: { - encode(message: QueryUnbondingDelegationResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryUnbondingDelegationResponse; - fromJSON(object: any): QueryUnbondingDelegationResponse; - toJSON(message: QueryUnbondingDelegationResponse): unknown; - fromPartial(object: DeepPartial): QueryUnbondingDelegationResponse; -}; -export declare const QueryDelegatorDelegationsRequest: { - encode(message: QueryDelegatorDelegationsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorDelegationsRequest; - fromJSON(object: any): QueryDelegatorDelegationsRequest; - toJSON(message: QueryDelegatorDelegationsRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegatorDelegationsRequest; -}; -export declare const QueryDelegatorDelegationsResponse: { - encode(message: QueryDelegatorDelegationsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorDelegationsResponse; - fromJSON(object: any): QueryDelegatorDelegationsResponse; - toJSON(message: QueryDelegatorDelegationsResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegatorDelegationsResponse; -}; -export declare const QueryDelegatorUnbondingDelegationsRequest: { - encode(message: QueryDelegatorUnbondingDelegationsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorUnbondingDelegationsRequest; - fromJSON(object: any): QueryDelegatorUnbondingDelegationsRequest; - toJSON(message: QueryDelegatorUnbondingDelegationsRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegatorUnbondingDelegationsRequest; -}; -export declare const QueryDelegatorUnbondingDelegationsResponse: { - encode(message: QueryDelegatorUnbondingDelegationsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorUnbondingDelegationsResponse; - fromJSON(object: any): QueryDelegatorUnbondingDelegationsResponse; - toJSON(message: QueryDelegatorUnbondingDelegationsResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegatorUnbondingDelegationsResponse; -}; -export declare const QueryRedelegationsRequest: { - encode(message: QueryRedelegationsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryRedelegationsRequest; - fromJSON(object: any): QueryRedelegationsRequest; - toJSON(message: QueryRedelegationsRequest): unknown; - fromPartial(object: DeepPartial): QueryRedelegationsRequest; -}; -export declare const QueryRedelegationsResponse: { - encode(message: QueryRedelegationsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryRedelegationsResponse; - fromJSON(object: any): QueryRedelegationsResponse; - toJSON(message: QueryRedelegationsResponse): unknown; - fromPartial(object: DeepPartial): QueryRedelegationsResponse; -}; -export declare const QueryDelegatorValidatorsRequest: { - encode(message: QueryDelegatorValidatorsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorValidatorsRequest; - fromJSON(object: any): QueryDelegatorValidatorsRequest; - toJSON(message: QueryDelegatorValidatorsRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegatorValidatorsRequest; -}; -export declare const QueryDelegatorValidatorsResponse: { - encode(message: QueryDelegatorValidatorsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorValidatorsResponse; - fromJSON(object: any): QueryDelegatorValidatorsResponse; - toJSON(message: QueryDelegatorValidatorsResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegatorValidatorsResponse; -}; -export declare const QueryDelegatorValidatorRequest: { - encode(message: QueryDelegatorValidatorRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorValidatorRequest; - fromJSON(object: any): QueryDelegatorValidatorRequest; - toJSON(message: QueryDelegatorValidatorRequest): unknown; - fromPartial(object: DeepPartial): QueryDelegatorValidatorRequest; -}; -export declare const QueryDelegatorValidatorResponse: { - encode(message: QueryDelegatorValidatorResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDelegatorValidatorResponse; - fromJSON(object: any): QueryDelegatorValidatorResponse; - toJSON(message: QueryDelegatorValidatorResponse): unknown; - fromPartial(object: DeepPartial): QueryDelegatorValidatorResponse; -}; -export declare const QueryHistoricalInfoRequest: { - encode(message: QueryHistoricalInfoRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryHistoricalInfoRequest; - fromJSON(object: any): QueryHistoricalInfoRequest; - toJSON(message: QueryHistoricalInfoRequest): unknown; - fromPartial(object: DeepPartial): QueryHistoricalInfoRequest; -}; -export declare const QueryHistoricalInfoResponse: { - encode(message: QueryHistoricalInfoResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryHistoricalInfoResponse; - fromJSON(object: any): QueryHistoricalInfoResponse; - toJSON(message: QueryHistoricalInfoResponse): unknown; - fromPartial(object: DeepPartial): QueryHistoricalInfoResponse; -}; -export declare const QueryPoolRequest: { - encode(_: QueryPoolRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPoolRequest; - fromJSON(_: any): QueryPoolRequest; - toJSON(_: QueryPoolRequest): unknown; - fromPartial(_: DeepPartial): QueryPoolRequest; -}; -export declare const QueryPoolResponse: { - encode(message: QueryPoolResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPoolResponse; - fromJSON(object: any): QueryPoolResponse; - toJSON(message: QueryPoolResponse): unknown; - fromPartial(object: DeepPartial): QueryPoolResponse; -}; -export declare const QueryParamsRequest: { - encode(_: QueryParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest; - fromJSON(_: any): QueryParamsRequest; - toJSON(_: QueryParamsRequest): unknown; - fromPartial(_: DeepPartial): QueryParamsRequest; -}; -export declare const QueryParamsResponse: { - encode(message: QueryParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse; - fromJSON(object: any): QueryParamsResponse; - toJSON(message: QueryParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryParamsResponse; -}; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Validators queries all validators that match the given status. */ - Validators(request: QueryValidatorsRequest): Promise; - /** Validator queries validator info for given validator address. */ - Validator(request: QueryValidatorRequest): Promise; - /** ValidatorDelegations queries delegate info for given validator. */ - ValidatorDelegations(request: QueryValidatorDelegationsRequest): Promise; - /** ValidatorUnbondingDelegations queries unbonding delegations of a validator. */ - ValidatorUnbondingDelegations(request: QueryValidatorUnbondingDelegationsRequest): Promise; - /** Delegation queries delegate info for given validator delegator pair. */ - Delegation(request: QueryDelegationRequest): Promise; - /** - * UnbondingDelegation queries unbonding info for given validator delegator - * pair. - */ - UnbondingDelegation(request: QueryUnbondingDelegationRequest): Promise; - /** DelegatorDelegations queries all delegations of a given delegator address. */ - DelegatorDelegations(request: QueryDelegatorDelegationsRequest): Promise; - /** - * DelegatorUnbondingDelegations queries all unbonding delegations of a given - * delegator address. - */ - DelegatorUnbondingDelegations(request: QueryDelegatorUnbondingDelegationsRequest): Promise; - /** Redelegations queries redelegations of given address. */ - Redelegations(request: QueryRedelegationsRequest): Promise; - /** - * DelegatorValidators queries all validators info for given delegator - * address. - */ - DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; - /** - * DelegatorValidator queries validator info for given delegator validator - * pair. - */ - DelegatorValidator(request: QueryDelegatorValidatorRequest): Promise; - /** HistoricalInfo queries the historical info for given height. */ - HistoricalInfo(request: QueryHistoricalInfoRequest): Promise; - /** Pool queries the pool info. */ - Pool(request: QueryPoolRequest): Promise; - /** Parameters queries the staking parameters. */ - Params(request: QueryParamsRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Validators(request: QueryValidatorsRequest): Promise; - Validator(request: QueryValidatorRequest): Promise; - ValidatorDelegations(request: QueryValidatorDelegationsRequest): Promise; - ValidatorUnbondingDelegations(request: QueryValidatorUnbondingDelegationsRequest): Promise; - Delegation(request: QueryDelegationRequest): Promise; - UnbondingDelegation(request: QueryUnbondingDelegationRequest): Promise; - DelegatorDelegations(request: QueryDelegatorDelegationsRequest): Promise; - DelegatorUnbondingDelegations(request: QueryDelegatorUnbondingDelegationsRequest): Promise; - Redelegations(request: QueryRedelegationsRequest): Promise; - DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; - DelegatorValidator(request: QueryDelegatorValidatorRequest): Promise; - HistoricalInfo(request: QueryHistoricalInfoRequest): Promise; - Pool(request: QueryPoolRequest): Promise; - Params(request: QueryParamsRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.js deleted file mode 100644 index 33024f29d1..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.js +++ /dev/null @@ -1,2122 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { PageRequest, PageResponse, } from "../../../cosmos/base/query/v1beta1/pagination"; -import { Validator, DelegationResponse, UnbondingDelegation, RedelegationResponse, HistoricalInfo, Pool, Params, } from "../../../cosmos/staking/v1beta1/staking"; -export const protobufPackage = "cosmos.staking.v1beta1"; -const baseQueryValidatorsRequest = { status: "" }; -export const QueryValidatorsRequest = { - encode(message, writer = Writer.create()) { - if (message.status !== "") { - writer.uint32(10).string(message.status); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryValidatorsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryValidatorsRequest }; - if (object.status !== undefined && object.status !== null) { - message.status = String(object.status); - } - else { - message.status = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.status !== undefined && (obj.status = message.status); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryValidatorsRequest }; - if (object.status !== undefined && object.status !== null) { - message.status = object.status; - } - else { - message.status = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryValidatorsResponse = {}; -export const QueryValidatorsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.validators) { - Validator.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorsResponse, - }; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorsResponse, - }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => e ? Validator.toJSON(e) : undefined); - } - else { - obj.validators = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorsResponse, - }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryValidatorRequest = { validatorAddr: "" }; -export const QueryValidatorRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryValidatorRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryValidatorRequest }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryValidatorRequest }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - return message; - }, -}; -const baseQueryValidatorResponse = {}; -export const QueryValidatorResponse = { - encode(message, writer = Writer.create()) { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryValidatorResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryValidatorResponse }; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } - else { - message.validator = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryValidatorResponse }; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } - else { - message.validator = undefined; - } - return message; - }, -}; -const baseQueryValidatorDelegationsRequest = { validatorAddr: "" }; -export const QueryValidatorDelegationsRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorDelegationsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorDelegationsRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorDelegationsRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryValidatorDelegationsResponse = {}; -export const QueryValidatorDelegationsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.delegationResponses) { - DelegationResponse.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorDelegationsResponse, - }; - message.delegationResponses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegationResponses.push(DelegationResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorDelegationsResponse, - }; - message.delegationResponses = []; - if (object.delegationResponses !== undefined && - object.delegationResponses !== null) { - for (const e of object.delegationResponses) { - message.delegationResponses.push(DelegationResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.delegationResponses) { - obj.delegationResponses = message.delegationResponses.map((e) => e ? DelegationResponse.toJSON(e) : undefined); - } - else { - obj.delegationResponses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorDelegationsResponse, - }; - message.delegationResponses = []; - if (object.delegationResponses !== undefined && - object.delegationResponses !== null) { - for (const e of object.delegationResponses) { - message.delegationResponses.push(DelegationResponse.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryValidatorUnbondingDelegationsRequest = { - validatorAddr: "", -}; -export const QueryValidatorUnbondingDelegationsRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorUnbondingDelegationsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorUnbondingDelegationsRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorUnbondingDelegationsRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryValidatorUnbondingDelegationsResponse = {}; -export const QueryValidatorUnbondingDelegationsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.unbondingResponses) { - UnbondingDelegation.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorUnbondingDelegationsResponse, - }; - message.unbondingResponses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbondingResponses.push(UnbondingDelegation.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryValidatorUnbondingDelegationsResponse, - }; - message.unbondingResponses = []; - if (object.unbondingResponses !== undefined && - object.unbondingResponses !== null) { - for (const e of object.unbondingResponses) { - message.unbondingResponses.push(UnbondingDelegation.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.unbondingResponses) { - obj.unbondingResponses = message.unbondingResponses.map((e) => e ? UnbondingDelegation.toJSON(e) : undefined); - } - else { - obj.unbondingResponses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryValidatorUnbondingDelegationsResponse, - }; - message.unbondingResponses = []; - if (object.unbondingResponses !== undefined && - object.unbondingResponses !== null) { - for (const e of object.unbondingResponses) { - message.unbondingResponses.push(UnbondingDelegation.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegationRequest = { - delegatorAddr: "", - validatorAddr: "", -}; -export const QueryDelegationRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.validatorAddr !== "") { - writer.uint32(18).string(message.validatorAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDelegationRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryDelegationRequest }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } - else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryDelegationRequest }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } - else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - return message; - }, -}; -const baseQueryDelegationResponse = {}; -export const QueryDelegationResponse = { - encode(message, writer = Writer.create()) { - if (message.delegationResponse !== undefined) { - DelegationResponse.encode(message.delegationResponse, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegationResponse = DelegationResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegationResponse, - }; - if (object.delegationResponse !== undefined && - object.delegationResponse !== null) { - message.delegationResponse = DelegationResponse.fromJSON(object.delegationResponse); - } - else { - message.delegationResponse = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegationResponse !== undefined && - (obj.delegationResponse = message.delegationResponse - ? DelegationResponse.toJSON(message.delegationResponse) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegationResponse, - }; - if (object.delegationResponse !== undefined && - object.delegationResponse !== null) { - message.delegationResponse = DelegationResponse.fromPartial(object.delegationResponse); - } - else { - message.delegationResponse = undefined; - } - return message; - }, -}; -const baseQueryUnbondingDelegationRequest = { - delegatorAddr: "", - validatorAddr: "", -}; -export const QueryUnbondingDelegationRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.validatorAddr !== "") { - writer.uint32(18).string(message.validatorAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnbondingDelegationRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryUnbondingDelegationRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } - else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryUnbondingDelegationRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } - else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - return message; - }, -}; -const baseQueryUnbondingDelegationResponse = {}; -export const QueryUnbondingDelegationResponse = { - encode(message, writer = Writer.create()) { - if (message.unbond !== undefined) { - UnbondingDelegation.encode(message.unbond, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnbondingDelegationResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbond = UnbondingDelegation.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryUnbondingDelegationResponse, - }; - if (object.unbond !== undefined && object.unbond !== null) { - message.unbond = UnbondingDelegation.fromJSON(object.unbond); - } - else { - message.unbond = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.unbond !== undefined && - (obj.unbond = message.unbond - ? UnbondingDelegation.toJSON(message.unbond) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryUnbondingDelegationResponse, - }; - if (object.unbond !== undefined && object.unbond !== null) { - message.unbond = UnbondingDelegation.fromPartial(object.unbond); - } - else { - message.unbond = undefined; - } - return message; - }, -}; -const baseQueryDelegatorDelegationsRequest = { delegatorAddr: "" }; -export const QueryDelegatorDelegationsRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorDelegationsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorDelegationsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } - else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorDelegationsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } - else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegatorDelegationsResponse = {}; -export const QueryDelegatorDelegationsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.delegationResponses) { - DelegationResponse.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorDelegationsResponse, - }; - message.delegationResponses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegationResponses.push(DelegationResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorDelegationsResponse, - }; - message.delegationResponses = []; - if (object.delegationResponses !== undefined && - object.delegationResponses !== null) { - for (const e of object.delegationResponses) { - message.delegationResponses.push(DelegationResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.delegationResponses) { - obj.delegationResponses = message.delegationResponses.map((e) => e ? DelegationResponse.toJSON(e) : undefined); - } - else { - obj.delegationResponses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorDelegationsResponse, - }; - message.delegationResponses = []; - if (object.delegationResponses !== undefined && - object.delegationResponses !== null) { - for (const e of object.delegationResponses) { - message.delegationResponses.push(DelegationResponse.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegatorUnbondingDelegationsRequest = { - delegatorAddr: "", -}; -export const QueryDelegatorUnbondingDelegationsRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorUnbondingDelegationsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorUnbondingDelegationsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } - else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorUnbondingDelegationsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } - else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegatorUnbondingDelegationsResponse = {}; -export const QueryDelegatorUnbondingDelegationsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.unbondingResponses) { - UnbondingDelegation.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorUnbondingDelegationsResponse, - }; - message.unbondingResponses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbondingResponses.push(UnbondingDelegation.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorUnbondingDelegationsResponse, - }; - message.unbondingResponses = []; - if (object.unbondingResponses !== undefined && - object.unbondingResponses !== null) { - for (const e of object.unbondingResponses) { - message.unbondingResponses.push(UnbondingDelegation.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.unbondingResponses) { - obj.unbondingResponses = message.unbondingResponses.map((e) => e ? UnbondingDelegation.toJSON(e) : undefined); - } - else { - obj.unbondingResponses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorUnbondingDelegationsResponse, - }; - message.unbondingResponses = []; - if (object.unbondingResponses !== undefined && - object.unbondingResponses !== null) { - for (const e of object.unbondingResponses) { - message.unbondingResponses.push(UnbondingDelegation.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryRedelegationsRequest = { - delegatorAddr: "", - srcValidatorAddr: "", - dstValidatorAddr: "", -}; -export const QueryRedelegationsRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.srcValidatorAddr !== "") { - writer.uint32(18).string(message.srcValidatorAddr); - } - if (message.dstValidatorAddr !== "") { - writer.uint32(26).string(message.dstValidatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRedelegationsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.srcValidatorAddr = reader.string(); - break; - case 3: - message.dstValidatorAddr = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryRedelegationsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } - else { - message.delegatorAddr = ""; - } - if (object.srcValidatorAddr !== undefined && - object.srcValidatorAddr !== null) { - message.srcValidatorAddr = String(object.srcValidatorAddr); - } - else { - message.srcValidatorAddr = ""; - } - if (object.dstValidatorAddr !== undefined && - object.dstValidatorAddr !== null) { - message.dstValidatorAddr = String(object.dstValidatorAddr); - } - else { - message.dstValidatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.srcValidatorAddr !== undefined && - (obj.srcValidatorAddr = message.srcValidatorAddr); - message.dstValidatorAddr !== undefined && - (obj.dstValidatorAddr = message.dstValidatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryRedelegationsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } - else { - message.delegatorAddr = ""; - } - if (object.srcValidatorAddr !== undefined && - object.srcValidatorAddr !== null) { - message.srcValidatorAddr = object.srcValidatorAddr; - } - else { - message.srcValidatorAddr = ""; - } - if (object.dstValidatorAddr !== undefined && - object.dstValidatorAddr !== null) { - message.dstValidatorAddr = object.dstValidatorAddr; - } - else { - message.dstValidatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryRedelegationsResponse = {}; -export const QueryRedelegationsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.redelegationResponses) { - RedelegationResponse.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRedelegationsResponse, - }; - message.redelegationResponses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.redelegationResponses.push(RedelegationResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryRedelegationsResponse, - }; - message.redelegationResponses = []; - if (object.redelegationResponses !== undefined && - object.redelegationResponses !== null) { - for (const e of object.redelegationResponses) { - message.redelegationResponses.push(RedelegationResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.redelegationResponses) { - obj.redelegationResponses = message.redelegationResponses.map((e) => e ? RedelegationResponse.toJSON(e) : undefined); - } - else { - obj.redelegationResponses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryRedelegationsResponse, - }; - message.redelegationResponses = []; - if (object.redelegationResponses !== undefined && - object.redelegationResponses !== null) { - for (const e of object.redelegationResponses) { - message.redelegationResponses.push(RedelegationResponse.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegatorValidatorsRequest = { delegatorAddr: "" }; -export const QueryDelegatorValidatorsRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorValidatorsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } - else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorValidatorsRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } - else { - message.delegatorAddr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegatorValidatorsResponse = {}; -export const QueryDelegatorValidatorsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.validators) { - Validator.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsResponse, - }; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorValidatorsResponse, - }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => e ? Validator.toJSON(e) : undefined); - } - else { - obj.validators = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorValidatorsResponse, - }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDelegatorValidatorRequest = { - delegatorAddr: "", - validatorAddr: "", -}; -export const QueryDelegatorValidatorRequest = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.validatorAddr !== "") { - writer.uint32(18).string(message.validatorAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorValidatorRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = String(object.delegatorAddr); - } - else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddr !== undefined && - (obj.delegatorAddr = message.delegatorAddr); - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorValidatorRequest, - }; - if (object.delegatorAddr !== undefined && object.delegatorAddr !== null) { - message.delegatorAddr = object.delegatorAddr; - } - else { - message.delegatorAddr = ""; - } - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - return message; - }, -}; -const baseQueryDelegatorValidatorResponse = {}; -export const QueryDelegatorValidatorResponse = { - encode(message, writer = Writer.create()) { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDelegatorValidatorResponse, - }; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } - else { - message.validator = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDelegatorValidatorResponse, - }; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } - else { - message.validator = undefined; - } - return message; - }, -}; -const baseQueryHistoricalInfoRequest = { height: 0 }; -export const QueryHistoricalInfoRequest = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryHistoricalInfoRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryHistoricalInfoRequest, - }; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryHistoricalInfoRequest, - }; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - return message; - }, -}; -const baseQueryHistoricalInfoResponse = {}; -export const QueryHistoricalInfoResponse = { - encode(message, writer = Writer.create()) { - if (message.hist !== undefined) { - HistoricalInfo.encode(message.hist, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryHistoricalInfoResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hist = HistoricalInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryHistoricalInfoResponse, - }; - if (object.hist !== undefined && object.hist !== null) { - message.hist = HistoricalInfo.fromJSON(object.hist); - } - else { - message.hist = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hist !== undefined && - (obj.hist = message.hist - ? HistoricalInfo.toJSON(message.hist) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryHistoricalInfoResponse, - }; - if (object.hist !== undefined && object.hist !== null) { - message.hist = HistoricalInfo.fromPartial(object.hist); - } - else { - message.hist = undefined; - } - return message; - }, -}; -const baseQueryPoolRequest = {}; -export const QueryPoolRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryPoolRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryPoolRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryPoolRequest }; - return message; - }, -}; -const baseQueryPoolResponse = {}; -export const QueryPoolResponse = { - encode(message, writer = Writer.create()) { - if (message.pool !== undefined) { - Pool.encode(message.pool, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryPoolResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pool = Pool.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryPoolResponse }; - if (object.pool !== undefined && object.pool !== null) { - message.pool = Pool.fromJSON(object.pool); - } - else { - message.pool = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pool !== undefined && - (obj.pool = message.pool ? Pool.toJSON(message.pool) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryPoolResponse }; - if (object.pool !== undefined && object.pool !== null) { - message.pool = Pool.fromPartial(object.pool); - } - else { - message.pool = undefined; - } - return message; - }, -}; -const baseQueryParamsRequest = {}; -export const QueryParamsRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, -}; -const baseQueryParamsResponse = {}; -export const QueryParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Validators(request) { - const data = QueryValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Validators", data); - return promise.then((data) => QueryValidatorsResponse.decode(new Reader(data))); - } - Validator(request) { - const data = QueryValidatorRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Validator", data); - return promise.then((data) => QueryValidatorResponse.decode(new Reader(data))); - } - ValidatorDelegations(request) { - const data = QueryValidatorDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "ValidatorDelegations", data); - return promise.then((data) => QueryValidatorDelegationsResponse.decode(new Reader(data))); - } - ValidatorUnbondingDelegations(request) { - const data = QueryValidatorUnbondingDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "ValidatorUnbondingDelegations", data); - return promise.then((data) => QueryValidatorUnbondingDelegationsResponse.decode(new Reader(data))); - } - Delegation(request) { - const data = QueryDelegationRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Delegation", data); - return promise.then((data) => QueryDelegationResponse.decode(new Reader(data))); - } - UnbondingDelegation(request) { - const data = QueryUnbondingDelegationRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "UnbondingDelegation", data); - return promise.then((data) => QueryUnbondingDelegationResponse.decode(new Reader(data))); - } - DelegatorDelegations(request) { - const data = QueryDelegatorDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorDelegations", data); - return promise.then((data) => QueryDelegatorDelegationsResponse.decode(new Reader(data))); - } - DelegatorUnbondingDelegations(request) { - const data = QueryDelegatorUnbondingDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorUnbondingDelegations", data); - return promise.then((data) => QueryDelegatorUnbondingDelegationsResponse.decode(new Reader(data))); - } - Redelegations(request) { - const data = QueryRedelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Redelegations", data); - return promise.then((data) => QueryRedelegationsResponse.decode(new Reader(data))); - } - DelegatorValidators(request) { - const data = QueryDelegatorValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorValidators", data); - return promise.then((data) => QueryDelegatorValidatorsResponse.decode(new Reader(data))); - } - DelegatorValidator(request) { - const data = QueryDelegatorValidatorRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorValidator", data); - return promise.then((data) => QueryDelegatorValidatorResponse.decode(new Reader(data))); - } - HistoricalInfo(request) { - const data = QueryHistoricalInfoRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "HistoricalInfo", data); - return promise.then((data) => QueryHistoricalInfoResponse.decode(new Reader(data))); - } - Pool(request) { - const data = QueryPoolRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Pool", data); - return promise.then((data) => QueryPoolResponse.decode(new Reader(data))); - } - Params(request) { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.ts deleted file mode 100644 index 097be2e995..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/query.ts +++ /dev/null @@ -1,2941 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; -import { - Validator, - DelegationResponse, - UnbondingDelegation, - RedelegationResponse, - HistoricalInfo, - Pool, - Params, -} from "../../../cosmos/staking/v1beta1/staking"; - -export const protobufPackage = "cosmos.staking.v1beta1"; - -/** QueryValidatorsRequest is request type for Query/Validators RPC method. */ -export interface QueryValidatorsRequest { - /** status enables to query for validators matching a given status. */ - status: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** QueryValidatorsResponse is response type for the Query/Validators RPC method */ -export interface QueryValidatorsResponse { - /** validators contains all the queried validators. */ - validators: Validator[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryValidatorRequest is response type for the Query/Validator RPC method */ -export interface QueryValidatorRequest { - /** validator_addr defines the validator address to query for. */ - validator_addr: string; -} - -/** QueryValidatorResponse is response type for the Query/Validator RPC method */ -export interface QueryValidatorResponse { - /** validator defines the the validator info. */ - validator: Validator | undefined; -} - -/** - * QueryValidatorDelegationsRequest is request type for the - * Query/ValidatorDelegations RPC method - */ -export interface QueryValidatorDelegationsRequest { - /** validator_addr defines the validator address to query for. */ - validator_addr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryValidatorDelegationsResponse is response type for the - * Query/ValidatorDelegations RPC method - */ -export interface QueryValidatorDelegationsResponse { - delegation_responses: DelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryValidatorUnbondingDelegationsRequest is required type for the - * Query/ValidatorUnbondingDelegations RPC method - */ -export interface QueryValidatorUnbondingDelegationsRequest { - /** validator_addr defines the validator address to query for. */ - validator_addr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryValidatorUnbondingDelegationsResponse is response type for the - * Query/ValidatorUnbondingDelegations RPC method. - */ -export interface QueryValidatorUnbondingDelegationsResponse { - unbonding_responses: UnbondingDelegation[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryDelegationRequest is request type for the Query/Delegation RPC method. */ -export interface QueryDelegationRequest { - /** delegator_addr defines the delegator address to query for. */ - delegator_addr: string; - /** validator_addr defines the validator address to query for. */ - validator_addr: string; -} - -/** QueryDelegationResponse is response type for the Query/Delegation RPC method. */ -export interface QueryDelegationResponse { - /** delegation_responses defines the delegation info of a delegation. */ - delegation_response: DelegationResponse | undefined; -} - -/** - * QueryUnbondingDelegationRequest is request type for the - * Query/UnbondingDelegation RPC method. - */ -export interface QueryUnbondingDelegationRequest { - /** delegator_addr defines the delegator address to query for. */ - delegator_addr: string; - /** validator_addr defines the validator address to query for. */ - validator_addr: string; -} - -/** - * QueryDelegationResponse is response type for the Query/UnbondingDelegation - * RPC method. - */ -export interface QueryUnbondingDelegationResponse { - /** unbond defines the unbonding information of a delegation. */ - unbond: UnbondingDelegation | undefined; -} - -/** - * QueryDelegatorDelegationsRequest is request type for the - * Query/DelegatorDelegations RPC method. - */ -export interface QueryDelegatorDelegationsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegator_addr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryDelegatorDelegationsResponse is response type for the - * Query/DelegatorDelegations RPC method. - */ -export interface QueryDelegatorDelegationsResponse { - /** delegation_responses defines all the delegations' info of a delegator. */ - delegation_responses: DelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryDelegatorUnbondingDelegationsRequest is request type for the - * Query/DelegatorUnbondingDelegations RPC method. - */ -export interface QueryDelegatorUnbondingDelegationsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegator_addr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryUnbondingDelegatorDelegationsResponse is response type for the - * Query/UnbondingDelegatorDelegations RPC method. - */ -export interface QueryDelegatorUnbondingDelegationsResponse { - unbonding_responses: UnbondingDelegation[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryRedelegationsRequest is request type for the Query/Redelegations RPC - * method. - */ -export interface QueryRedelegationsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegator_addr: string; - /** src_validator_addr defines the validator address to redelegate from. */ - src_validator_addr: string; - /** dst_validator_addr defines the validator address to redelegate to. */ - dst_validator_addr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryRedelegationsResponse is response type for the Query/Redelegations RPC - * method. - */ -export interface QueryRedelegationsResponse { - redelegation_responses: RedelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryDelegatorValidatorsRequest is request type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegator_addr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryDelegatorValidatorsResponse is response type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsResponse { - /** validators defines the the validators' info of a delegator. */ - validators: Validator[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** - * QueryDelegatorValidatorRequest is request type for the - * Query/DelegatorValidator RPC method. - */ -export interface QueryDelegatorValidatorRequest { - /** delegator_addr defines the delegator address to query for. */ - delegator_addr: string; - /** validator_addr defines the validator address to query for. */ - validator_addr: string; -} - -/** - * QueryDelegatorValidatorResponse response type for the - * Query/DelegatorValidator RPC method. - */ -export interface QueryDelegatorValidatorResponse { - /** validator defines the the validator info. */ - validator: Validator | undefined; -} - -/** - * QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC - * method. - */ -export interface QueryHistoricalInfoRequest { - /** height defines at which height to query the historical info. */ - height: number; -} - -/** - * QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC - * method. - */ -export interface QueryHistoricalInfoResponse { - /** hist defines the historical info at the given height. */ - hist: HistoricalInfo | undefined; -} - -/** QueryPoolRequest is request type for the Query/Pool RPC method. */ -export interface QueryPoolRequest {} - -/** QueryPoolResponse is response type for the Query/Pool RPC method. */ -export interface QueryPoolResponse { - /** pool defines the pool info. */ - pool: Pool | undefined; -} - -/** QueryParamsRequest is request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params holds all the parameters of this module. */ - params: Params | undefined; -} - -const baseQueryValidatorsRequest: object = { status: "" }; - -export const QueryValidatorsRequest = { - encode( - message: QueryValidatorsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.status !== "") { - writer.uint32(10).string(message.status); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryValidatorsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryValidatorsRequest } as QueryValidatorsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorsRequest { - const message = { ...baseQueryValidatorsRequest } as QueryValidatorsRequest; - if (object.status !== undefined && object.status !== null) { - message.status = String(object.status); - } else { - message.status = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorsRequest): unknown { - const obj: any = {}; - message.status !== undefined && (obj.status = message.status); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorsRequest { - const message = { ...baseQueryValidatorsRequest } as QueryValidatorsRequest; - if (object.status !== undefined && object.status !== null) { - message.status = object.status; - } else { - message.status = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryValidatorsResponse: object = {}; - -export const QueryValidatorsResponse = { - encode( - message: QueryValidatorsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryValidatorsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorsResponse, - } as QueryValidatorsResponse; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorsResponse { - const message = { - ...baseQueryValidatorsResponse, - } as QueryValidatorsResponse; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorsResponse): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorsResponse { - const message = { - ...baseQueryValidatorsResponse, - } as QueryValidatorsResponse; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryValidatorRequest: object = { validator_addr: "" }; - -export const QueryValidatorRequest = { - encode( - message: QueryValidatorRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_addr !== "") { - writer.uint32(10).string(message.validator_addr); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryValidatorRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryValidatorRequest } as QueryValidatorRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_addr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorRequest { - const message = { ...baseQueryValidatorRequest } as QueryValidatorRequest; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = String(object.validator_addr); - } else { - message.validator_addr = ""; - } - return message; - }, - - toJSON(message: QueryValidatorRequest): unknown { - const obj: any = {}; - message.validator_addr !== undefined && - (obj.validator_addr = message.validator_addr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorRequest { - const message = { ...baseQueryValidatorRequest } as QueryValidatorRequest; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = object.validator_addr; - } else { - message.validator_addr = ""; - } - return message; - }, -}; - -const baseQueryValidatorResponse: object = {}; - -export const QueryValidatorResponse = { - encode( - message: QueryValidatorResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryValidatorResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryValidatorResponse } as QueryValidatorResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorResponse { - const message = { ...baseQueryValidatorResponse } as QueryValidatorResponse; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } else { - message.validator = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorResponse): unknown { - const obj: any = {}; - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorResponse { - const message = { ...baseQueryValidatorResponse } as QueryValidatorResponse; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } else { - message.validator = undefined; - } - return message; - }, -}; - -const baseQueryValidatorDelegationsRequest: object = { validator_addr: "" }; - -export const QueryValidatorDelegationsRequest = { - encode( - message: QueryValidatorDelegationsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_addr !== "") { - writer.uint32(10).string(message.validator_addr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorDelegationsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorDelegationsRequest, - } as QueryValidatorDelegationsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_addr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorDelegationsRequest { - const message = { - ...baseQueryValidatorDelegationsRequest, - } as QueryValidatorDelegationsRequest; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = String(object.validator_addr); - } else { - message.validator_addr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorDelegationsRequest): unknown { - const obj: any = {}; - message.validator_addr !== undefined && - (obj.validator_addr = message.validator_addr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorDelegationsRequest { - const message = { - ...baseQueryValidatorDelegationsRequest, - } as QueryValidatorDelegationsRequest; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = object.validator_addr; - } else { - message.validator_addr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryValidatorDelegationsResponse: object = {}; - -export const QueryValidatorDelegationsResponse = { - encode( - message: QueryValidatorDelegationsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.delegation_responses) { - DelegationResponse.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorDelegationsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorDelegationsResponse, - } as QueryValidatorDelegationsResponse; - message.delegation_responses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegation_responses.push( - DelegationResponse.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorDelegationsResponse { - const message = { - ...baseQueryValidatorDelegationsResponse, - } as QueryValidatorDelegationsResponse; - message.delegation_responses = []; - if ( - object.delegation_responses !== undefined && - object.delegation_responses !== null - ) { - for (const e of object.delegation_responses) { - message.delegation_responses.push(DelegationResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorDelegationsResponse): unknown { - const obj: any = {}; - if (message.delegation_responses) { - obj.delegation_responses = message.delegation_responses.map((e) => - e ? DelegationResponse.toJSON(e) : undefined - ); - } else { - obj.delegation_responses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorDelegationsResponse { - const message = { - ...baseQueryValidatorDelegationsResponse, - } as QueryValidatorDelegationsResponse; - message.delegation_responses = []; - if ( - object.delegation_responses !== undefined && - object.delegation_responses !== null - ) { - for (const e of object.delegation_responses) { - message.delegation_responses.push(DelegationResponse.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryValidatorUnbondingDelegationsRequest: object = { - validator_addr: "", -}; - -export const QueryValidatorUnbondingDelegationsRequest = { - encode( - message: QueryValidatorUnbondingDelegationsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_addr !== "") { - writer.uint32(10).string(message.validator_addr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorUnbondingDelegationsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorUnbondingDelegationsRequest, - } as QueryValidatorUnbondingDelegationsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_addr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorUnbondingDelegationsRequest { - const message = { - ...baseQueryValidatorUnbondingDelegationsRequest, - } as QueryValidatorUnbondingDelegationsRequest; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = String(object.validator_addr); - } else { - message.validator_addr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorUnbondingDelegationsRequest): unknown { - const obj: any = {}; - message.validator_addr !== undefined && - (obj.validator_addr = message.validator_addr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorUnbondingDelegationsRequest { - const message = { - ...baseQueryValidatorUnbondingDelegationsRequest, - } as QueryValidatorUnbondingDelegationsRequest; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = object.validator_addr; - } else { - message.validator_addr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryValidatorUnbondingDelegationsResponse: object = {}; - -export const QueryValidatorUnbondingDelegationsResponse = { - encode( - message: QueryValidatorUnbondingDelegationsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.unbonding_responses) { - UnbondingDelegation.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryValidatorUnbondingDelegationsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryValidatorUnbondingDelegationsResponse, - } as QueryValidatorUnbondingDelegationsResponse; - message.unbonding_responses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbonding_responses.push( - UnbondingDelegation.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryValidatorUnbondingDelegationsResponse { - const message = { - ...baseQueryValidatorUnbondingDelegationsResponse, - } as QueryValidatorUnbondingDelegationsResponse; - message.unbonding_responses = []; - if ( - object.unbonding_responses !== undefined && - object.unbonding_responses !== null - ) { - for (const e of object.unbonding_responses) { - message.unbonding_responses.push(UnbondingDelegation.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryValidatorUnbondingDelegationsResponse): unknown { - const obj: any = {}; - if (message.unbonding_responses) { - obj.unbonding_responses = message.unbonding_responses.map((e) => - e ? UnbondingDelegation.toJSON(e) : undefined - ); - } else { - obj.unbonding_responses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryValidatorUnbondingDelegationsResponse { - const message = { - ...baseQueryValidatorUnbondingDelegationsResponse, - } as QueryValidatorUnbondingDelegationsResponse; - message.unbonding_responses = []; - if ( - object.unbonding_responses !== undefined && - object.unbonding_responses !== null - ) { - for (const e of object.unbonding_responses) { - message.unbonding_responses.push(UnbondingDelegation.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegationRequest: object = { - delegator_addr: "", - validator_addr: "", -}; - -export const QueryDelegationRequest = { - encode( - message: QueryDelegationRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_addr !== "") { - writer.uint32(10).string(message.delegator_addr); - } - if (message.validator_addr !== "") { - writer.uint32(18).string(message.validator_addr); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDelegationRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDelegationRequest } as QueryDelegationRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_addr = reader.string(); - break; - case 2: - message.validator_addr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegationRequest { - const message = { ...baseQueryDelegationRequest } as QueryDelegationRequest; - if (object.delegator_addr !== undefined && object.delegator_addr !== null) { - message.delegator_addr = String(object.delegator_addr); - } else { - message.delegator_addr = ""; - } - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = String(object.validator_addr); - } else { - message.validator_addr = ""; - } - return message; - }, - - toJSON(message: QueryDelegationRequest): unknown { - const obj: any = {}; - message.delegator_addr !== undefined && - (obj.delegator_addr = message.delegator_addr); - message.validator_addr !== undefined && - (obj.validator_addr = message.validator_addr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegationRequest { - const message = { ...baseQueryDelegationRequest } as QueryDelegationRequest; - if (object.delegator_addr !== undefined && object.delegator_addr !== null) { - message.delegator_addr = object.delegator_addr; - } else { - message.delegator_addr = ""; - } - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = object.validator_addr; - } else { - message.validator_addr = ""; - } - return message; - }, -}; - -const baseQueryDelegationResponse: object = {}; - -export const QueryDelegationResponse = { - encode( - message: QueryDelegationResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.delegation_response !== undefined) { - DelegationResponse.encode( - message.delegation_response, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDelegationResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegationResponse, - } as QueryDelegationResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegation_response = DelegationResponse.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegationResponse { - const message = { - ...baseQueryDelegationResponse, - } as QueryDelegationResponse; - if ( - object.delegation_response !== undefined && - object.delegation_response !== null - ) { - message.delegation_response = DelegationResponse.fromJSON( - object.delegation_response - ); - } else { - message.delegation_response = undefined; - } - return message; - }, - - toJSON(message: QueryDelegationResponse): unknown { - const obj: any = {}; - message.delegation_response !== undefined && - (obj.delegation_response = message.delegation_response - ? DelegationResponse.toJSON(message.delegation_response) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegationResponse { - const message = { - ...baseQueryDelegationResponse, - } as QueryDelegationResponse; - if ( - object.delegation_response !== undefined && - object.delegation_response !== null - ) { - message.delegation_response = DelegationResponse.fromPartial( - object.delegation_response - ); - } else { - message.delegation_response = undefined; - } - return message; - }, -}; - -const baseQueryUnbondingDelegationRequest: object = { - delegator_addr: "", - validator_addr: "", -}; - -export const QueryUnbondingDelegationRequest = { - encode( - message: QueryUnbondingDelegationRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_addr !== "") { - writer.uint32(10).string(message.delegator_addr); - } - if (message.validator_addr !== "") { - writer.uint32(18).string(message.validator_addr); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUnbondingDelegationRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnbondingDelegationRequest, - } as QueryUnbondingDelegationRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_addr = reader.string(); - break; - case 2: - message.validator_addr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUnbondingDelegationRequest { - const message = { - ...baseQueryUnbondingDelegationRequest, - } as QueryUnbondingDelegationRequest; - if (object.delegator_addr !== undefined && object.delegator_addr !== null) { - message.delegator_addr = String(object.delegator_addr); - } else { - message.delegator_addr = ""; - } - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = String(object.validator_addr); - } else { - message.validator_addr = ""; - } - return message; - }, - - toJSON(message: QueryUnbondingDelegationRequest): unknown { - const obj: any = {}; - message.delegator_addr !== undefined && - (obj.delegator_addr = message.delegator_addr); - message.validator_addr !== undefined && - (obj.validator_addr = message.validator_addr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUnbondingDelegationRequest { - const message = { - ...baseQueryUnbondingDelegationRequest, - } as QueryUnbondingDelegationRequest; - if (object.delegator_addr !== undefined && object.delegator_addr !== null) { - message.delegator_addr = object.delegator_addr; - } else { - message.delegator_addr = ""; - } - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = object.validator_addr; - } else { - message.validator_addr = ""; - } - return message; - }, -}; - -const baseQueryUnbondingDelegationResponse: object = {}; - -export const QueryUnbondingDelegationResponse = { - encode( - message: QueryUnbondingDelegationResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.unbond !== undefined) { - UnbondingDelegation.encode( - message.unbond, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUnbondingDelegationResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnbondingDelegationResponse, - } as QueryUnbondingDelegationResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbond = UnbondingDelegation.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUnbondingDelegationResponse { - const message = { - ...baseQueryUnbondingDelegationResponse, - } as QueryUnbondingDelegationResponse; - if (object.unbond !== undefined && object.unbond !== null) { - message.unbond = UnbondingDelegation.fromJSON(object.unbond); - } else { - message.unbond = undefined; - } - return message; - }, - - toJSON(message: QueryUnbondingDelegationResponse): unknown { - const obj: any = {}; - message.unbond !== undefined && - (obj.unbond = message.unbond - ? UnbondingDelegation.toJSON(message.unbond) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUnbondingDelegationResponse { - const message = { - ...baseQueryUnbondingDelegationResponse, - } as QueryUnbondingDelegationResponse; - if (object.unbond !== undefined && object.unbond !== null) { - message.unbond = UnbondingDelegation.fromPartial(object.unbond); - } else { - message.unbond = undefined; - } - return message; - }, -}; - -const baseQueryDelegatorDelegationsRequest: object = { delegator_addr: "" }; - -export const QueryDelegatorDelegationsRequest = { - encode( - message: QueryDelegatorDelegationsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_addr !== "") { - writer.uint32(10).string(message.delegator_addr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorDelegationsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorDelegationsRequest, - } as QueryDelegatorDelegationsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_addr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorDelegationsRequest { - const message = { - ...baseQueryDelegatorDelegationsRequest, - } as QueryDelegatorDelegationsRequest; - if (object.delegator_addr !== undefined && object.delegator_addr !== null) { - message.delegator_addr = String(object.delegator_addr); - } else { - message.delegator_addr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDelegatorDelegationsRequest): unknown { - const obj: any = {}; - message.delegator_addr !== undefined && - (obj.delegator_addr = message.delegator_addr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorDelegationsRequest { - const message = { - ...baseQueryDelegatorDelegationsRequest, - } as QueryDelegatorDelegationsRequest; - if (object.delegator_addr !== undefined && object.delegator_addr !== null) { - message.delegator_addr = object.delegator_addr; - } else { - message.delegator_addr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegatorDelegationsResponse: object = {}; - -export const QueryDelegatorDelegationsResponse = { - encode( - message: QueryDelegatorDelegationsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.delegation_responses) { - DelegationResponse.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorDelegationsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorDelegationsResponse, - } as QueryDelegatorDelegationsResponse; - message.delegation_responses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegation_responses.push( - DelegationResponse.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorDelegationsResponse { - const message = { - ...baseQueryDelegatorDelegationsResponse, - } as QueryDelegatorDelegationsResponse; - message.delegation_responses = []; - if ( - object.delegation_responses !== undefined && - object.delegation_responses !== null - ) { - for (const e of object.delegation_responses) { - message.delegation_responses.push(DelegationResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDelegatorDelegationsResponse): unknown { - const obj: any = {}; - if (message.delegation_responses) { - obj.delegation_responses = message.delegation_responses.map((e) => - e ? DelegationResponse.toJSON(e) : undefined - ); - } else { - obj.delegation_responses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorDelegationsResponse { - const message = { - ...baseQueryDelegatorDelegationsResponse, - } as QueryDelegatorDelegationsResponse; - message.delegation_responses = []; - if ( - object.delegation_responses !== undefined && - object.delegation_responses !== null - ) { - for (const e of object.delegation_responses) { - message.delegation_responses.push(DelegationResponse.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegatorUnbondingDelegationsRequest: object = { - delegator_addr: "", -}; - -export const QueryDelegatorUnbondingDelegationsRequest = { - encode( - message: QueryDelegatorUnbondingDelegationsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_addr !== "") { - writer.uint32(10).string(message.delegator_addr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorUnbondingDelegationsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorUnbondingDelegationsRequest, - } as QueryDelegatorUnbondingDelegationsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_addr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorUnbondingDelegationsRequest { - const message = { - ...baseQueryDelegatorUnbondingDelegationsRequest, - } as QueryDelegatorUnbondingDelegationsRequest; - if (object.delegator_addr !== undefined && object.delegator_addr !== null) { - message.delegator_addr = String(object.delegator_addr); - } else { - message.delegator_addr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDelegatorUnbondingDelegationsRequest): unknown { - const obj: any = {}; - message.delegator_addr !== undefined && - (obj.delegator_addr = message.delegator_addr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorUnbondingDelegationsRequest { - const message = { - ...baseQueryDelegatorUnbondingDelegationsRequest, - } as QueryDelegatorUnbondingDelegationsRequest; - if (object.delegator_addr !== undefined && object.delegator_addr !== null) { - message.delegator_addr = object.delegator_addr; - } else { - message.delegator_addr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegatorUnbondingDelegationsResponse: object = {}; - -export const QueryDelegatorUnbondingDelegationsResponse = { - encode( - message: QueryDelegatorUnbondingDelegationsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.unbonding_responses) { - UnbondingDelegation.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorUnbondingDelegationsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorUnbondingDelegationsResponse, - } as QueryDelegatorUnbondingDelegationsResponse; - message.unbonding_responses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbonding_responses.push( - UnbondingDelegation.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorUnbondingDelegationsResponse { - const message = { - ...baseQueryDelegatorUnbondingDelegationsResponse, - } as QueryDelegatorUnbondingDelegationsResponse; - message.unbonding_responses = []; - if ( - object.unbonding_responses !== undefined && - object.unbonding_responses !== null - ) { - for (const e of object.unbonding_responses) { - message.unbonding_responses.push(UnbondingDelegation.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDelegatorUnbondingDelegationsResponse): unknown { - const obj: any = {}; - if (message.unbonding_responses) { - obj.unbonding_responses = message.unbonding_responses.map((e) => - e ? UnbondingDelegation.toJSON(e) : undefined - ); - } else { - obj.unbonding_responses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorUnbondingDelegationsResponse { - const message = { - ...baseQueryDelegatorUnbondingDelegationsResponse, - } as QueryDelegatorUnbondingDelegationsResponse; - message.unbonding_responses = []; - if ( - object.unbonding_responses !== undefined && - object.unbonding_responses !== null - ) { - for (const e of object.unbonding_responses) { - message.unbonding_responses.push(UnbondingDelegation.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryRedelegationsRequest: object = { - delegator_addr: "", - src_validator_addr: "", - dst_validator_addr: "", -}; - -export const QueryRedelegationsRequest = { - encode( - message: QueryRedelegationsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_addr !== "") { - writer.uint32(10).string(message.delegator_addr); - } - if (message.src_validator_addr !== "") { - writer.uint32(18).string(message.src_validator_addr); - } - if (message.dst_validator_addr !== "") { - writer.uint32(26).string(message.dst_validator_addr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryRedelegationsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRedelegationsRequest, - } as QueryRedelegationsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_addr = reader.string(); - break; - case 2: - message.src_validator_addr = reader.string(); - break; - case 3: - message.dst_validator_addr = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryRedelegationsRequest { - const message = { - ...baseQueryRedelegationsRequest, - } as QueryRedelegationsRequest; - if (object.delegator_addr !== undefined && object.delegator_addr !== null) { - message.delegator_addr = String(object.delegator_addr); - } else { - message.delegator_addr = ""; - } - if ( - object.src_validator_addr !== undefined && - object.src_validator_addr !== null - ) { - message.src_validator_addr = String(object.src_validator_addr); - } else { - message.src_validator_addr = ""; - } - if ( - object.dst_validator_addr !== undefined && - object.dst_validator_addr !== null - ) { - message.dst_validator_addr = String(object.dst_validator_addr); - } else { - message.dst_validator_addr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryRedelegationsRequest): unknown { - const obj: any = {}; - message.delegator_addr !== undefined && - (obj.delegator_addr = message.delegator_addr); - message.src_validator_addr !== undefined && - (obj.src_validator_addr = message.src_validator_addr); - message.dst_validator_addr !== undefined && - (obj.dst_validator_addr = message.dst_validator_addr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryRedelegationsRequest { - const message = { - ...baseQueryRedelegationsRequest, - } as QueryRedelegationsRequest; - if (object.delegator_addr !== undefined && object.delegator_addr !== null) { - message.delegator_addr = object.delegator_addr; - } else { - message.delegator_addr = ""; - } - if ( - object.src_validator_addr !== undefined && - object.src_validator_addr !== null - ) { - message.src_validator_addr = object.src_validator_addr; - } else { - message.src_validator_addr = ""; - } - if ( - object.dst_validator_addr !== undefined && - object.dst_validator_addr !== null - ) { - message.dst_validator_addr = object.dst_validator_addr; - } else { - message.dst_validator_addr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryRedelegationsResponse: object = {}; - -export const QueryRedelegationsResponse = { - encode( - message: QueryRedelegationsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.redelegation_responses) { - RedelegationResponse.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryRedelegationsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRedelegationsResponse, - } as QueryRedelegationsResponse; - message.redelegation_responses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.redelegation_responses.push( - RedelegationResponse.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryRedelegationsResponse { - const message = { - ...baseQueryRedelegationsResponse, - } as QueryRedelegationsResponse; - message.redelegation_responses = []; - if ( - object.redelegation_responses !== undefined && - object.redelegation_responses !== null - ) { - for (const e of object.redelegation_responses) { - message.redelegation_responses.push(RedelegationResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryRedelegationsResponse): unknown { - const obj: any = {}; - if (message.redelegation_responses) { - obj.redelegation_responses = message.redelegation_responses.map((e) => - e ? RedelegationResponse.toJSON(e) : undefined - ); - } else { - obj.redelegation_responses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryRedelegationsResponse { - const message = { - ...baseQueryRedelegationsResponse, - } as QueryRedelegationsResponse; - message.redelegation_responses = []; - if ( - object.redelegation_responses !== undefined && - object.redelegation_responses !== null - ) { - for (const e of object.redelegation_responses) { - message.redelegation_responses.push( - RedelegationResponse.fromPartial(e) - ); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegatorValidatorsRequest: object = { delegator_addr: "" }; - -export const QueryDelegatorValidatorsRequest = { - encode( - message: QueryDelegatorValidatorsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_addr !== "") { - writer.uint32(10).string(message.delegator_addr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorValidatorsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsRequest, - } as QueryDelegatorValidatorsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_addr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorValidatorsRequest { - const message = { - ...baseQueryDelegatorValidatorsRequest, - } as QueryDelegatorValidatorsRequest; - if (object.delegator_addr !== undefined && object.delegator_addr !== null) { - message.delegator_addr = String(object.delegator_addr); - } else { - message.delegator_addr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDelegatorValidatorsRequest): unknown { - const obj: any = {}; - message.delegator_addr !== undefined && - (obj.delegator_addr = message.delegator_addr); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorValidatorsRequest { - const message = { - ...baseQueryDelegatorValidatorsRequest, - } as QueryDelegatorValidatorsRequest; - if (object.delegator_addr !== undefined && object.delegator_addr !== null) { - message.delegator_addr = object.delegator_addr; - } else { - message.delegator_addr = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegatorValidatorsResponse: object = {}; - -export const QueryDelegatorValidatorsResponse = { - encode( - message: QueryDelegatorValidatorsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorValidatorsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorsResponse, - } as QueryDelegatorValidatorsResponse; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorValidatorsResponse { - const message = { - ...baseQueryDelegatorValidatorsResponse, - } as QueryDelegatorValidatorsResponse; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDelegatorValidatorsResponse): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorValidatorsResponse { - const message = { - ...baseQueryDelegatorValidatorsResponse, - } as QueryDelegatorValidatorsResponse; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDelegatorValidatorRequest: object = { - delegator_addr: "", - validator_addr: "", -}; - -export const QueryDelegatorValidatorRequest = { - encode( - message: QueryDelegatorValidatorRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_addr !== "") { - writer.uint32(10).string(message.delegator_addr); - } - if (message.validator_addr !== "") { - writer.uint32(18).string(message.validator_addr); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorValidatorRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorRequest, - } as QueryDelegatorValidatorRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_addr = reader.string(); - break; - case 2: - message.validator_addr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorValidatorRequest { - const message = { - ...baseQueryDelegatorValidatorRequest, - } as QueryDelegatorValidatorRequest; - if (object.delegator_addr !== undefined && object.delegator_addr !== null) { - message.delegator_addr = String(object.delegator_addr); - } else { - message.delegator_addr = ""; - } - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = String(object.validator_addr); - } else { - message.validator_addr = ""; - } - return message; - }, - - toJSON(message: QueryDelegatorValidatorRequest): unknown { - const obj: any = {}; - message.delegator_addr !== undefined && - (obj.delegator_addr = message.delegator_addr); - message.validator_addr !== undefined && - (obj.validator_addr = message.validator_addr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorValidatorRequest { - const message = { - ...baseQueryDelegatorValidatorRequest, - } as QueryDelegatorValidatorRequest; - if (object.delegator_addr !== undefined && object.delegator_addr !== null) { - message.delegator_addr = object.delegator_addr; - } else { - message.delegator_addr = ""; - } - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = object.validator_addr; - } else { - message.validator_addr = ""; - } - return message; - }, -}; - -const baseQueryDelegatorValidatorResponse: object = {}; - -export const QueryDelegatorValidatorResponse = { - encode( - message: QueryDelegatorValidatorResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDelegatorValidatorResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDelegatorValidatorResponse, - } as QueryDelegatorValidatorResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDelegatorValidatorResponse { - const message = { - ...baseQueryDelegatorValidatorResponse, - } as QueryDelegatorValidatorResponse; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } else { - message.validator = undefined; - } - return message; - }, - - toJSON(message: QueryDelegatorValidatorResponse): unknown { - const obj: any = {}; - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDelegatorValidatorResponse { - const message = { - ...baseQueryDelegatorValidatorResponse, - } as QueryDelegatorValidatorResponse; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } else { - message.validator = undefined; - } - return message; - }, -}; - -const baseQueryHistoricalInfoRequest: object = { height: 0 }; - -export const QueryHistoricalInfoRequest = { - encode( - message: QueryHistoricalInfoRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryHistoricalInfoRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryHistoricalInfoRequest, - } as QueryHistoricalInfoRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryHistoricalInfoRequest { - const message = { - ...baseQueryHistoricalInfoRequest, - } as QueryHistoricalInfoRequest; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - return message; - }, - - toJSON(message: QueryHistoricalInfoRequest): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryHistoricalInfoRequest { - const message = { - ...baseQueryHistoricalInfoRequest, - } as QueryHistoricalInfoRequest; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - return message; - }, -}; - -const baseQueryHistoricalInfoResponse: object = {}; - -export const QueryHistoricalInfoResponse = { - encode( - message: QueryHistoricalInfoResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.hist !== undefined) { - HistoricalInfo.encode(message.hist, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryHistoricalInfoResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryHistoricalInfoResponse, - } as QueryHistoricalInfoResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hist = HistoricalInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryHistoricalInfoResponse { - const message = { - ...baseQueryHistoricalInfoResponse, - } as QueryHistoricalInfoResponse; - if (object.hist !== undefined && object.hist !== null) { - message.hist = HistoricalInfo.fromJSON(object.hist); - } else { - message.hist = undefined; - } - return message; - }, - - toJSON(message: QueryHistoricalInfoResponse): unknown { - const obj: any = {}; - message.hist !== undefined && - (obj.hist = message.hist - ? HistoricalInfo.toJSON(message.hist) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryHistoricalInfoResponse { - const message = { - ...baseQueryHistoricalInfoResponse, - } as QueryHistoricalInfoResponse; - if (object.hist !== undefined && object.hist !== null) { - message.hist = HistoricalInfo.fromPartial(object.hist); - } else { - message.hist = undefined; - } - return message; - }, -}; - -const baseQueryPoolRequest: object = {}; - -export const QueryPoolRequest = { - encode(_: QueryPoolRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryPoolRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryPoolRequest } as QueryPoolRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryPoolRequest { - const message = { ...baseQueryPoolRequest } as QueryPoolRequest; - return message; - }, - - toJSON(_: QueryPoolRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryPoolRequest { - const message = { ...baseQueryPoolRequest } as QueryPoolRequest; - return message; - }, -}; - -const baseQueryPoolResponse: object = {}; - -export const QueryPoolResponse = { - encode(message: QueryPoolResponse, writer: Writer = Writer.create()): Writer { - if (message.pool !== undefined) { - Pool.encode(message.pool, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryPoolResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryPoolResponse } as QueryPoolResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pool = Pool.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPoolResponse { - const message = { ...baseQueryPoolResponse } as QueryPoolResponse; - if (object.pool !== undefined && object.pool !== null) { - message.pool = Pool.fromJSON(object.pool); - } else { - message.pool = undefined; - } - return message; - }, - - toJSON(message: QueryPoolResponse): unknown { - const obj: any = {}; - message.pool !== undefined && - (obj.pool = message.pool ? Pool.toJSON(message.pool) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryPoolResponse { - const message = { ...baseQueryPoolResponse } as QueryPoolResponse; - if (object.pool !== undefined && object.pool !== null) { - message.pool = Pool.fromPartial(object.pool); - } else { - message.pool = undefined; - } - return message; - }, -}; - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -/** Query defines the gRPC querier service. */ -export interface Query { - /** Validators queries all validators that match the given status. */ - Validators(request: QueryValidatorsRequest): Promise; - /** Validator queries validator info for given validator address. */ - Validator(request: QueryValidatorRequest): Promise; - /** ValidatorDelegations queries delegate info for given validator. */ - ValidatorDelegations( - request: QueryValidatorDelegationsRequest - ): Promise; - /** ValidatorUnbondingDelegations queries unbonding delegations of a validator. */ - ValidatorUnbondingDelegations( - request: QueryValidatorUnbondingDelegationsRequest - ): Promise; - /** Delegation queries delegate info for given validator delegator pair. */ - Delegation(request: QueryDelegationRequest): Promise; - /** - * UnbondingDelegation queries unbonding info for given validator delegator - * pair. - */ - UnbondingDelegation( - request: QueryUnbondingDelegationRequest - ): Promise; - /** DelegatorDelegations queries all delegations of a given delegator address. */ - DelegatorDelegations( - request: QueryDelegatorDelegationsRequest - ): Promise; - /** - * DelegatorUnbondingDelegations queries all unbonding delegations of a given - * delegator address. - */ - DelegatorUnbondingDelegations( - request: QueryDelegatorUnbondingDelegationsRequest - ): Promise; - /** Redelegations queries redelegations of given address. */ - Redelegations( - request: QueryRedelegationsRequest - ): Promise; - /** - * DelegatorValidators queries all validators info for given delegator - * address. - */ - DelegatorValidators( - request: QueryDelegatorValidatorsRequest - ): Promise; - /** - * DelegatorValidator queries validator info for given delegator validator - * pair. - */ - DelegatorValidator( - request: QueryDelegatorValidatorRequest - ): Promise; - /** HistoricalInfo queries the historical info for given height. */ - HistoricalInfo( - request: QueryHistoricalInfoRequest - ): Promise; - /** Pool queries the pool info. */ - Pool(request: QueryPoolRequest): Promise; - /** Parameters queries the staking parameters. */ - Params(request: QueryParamsRequest): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Validators( - request: QueryValidatorsRequest - ): Promise { - const data = QueryValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "Validators", - data - ); - return promise.then((data) => - QueryValidatorsResponse.decode(new Reader(data)) - ); - } - - Validator(request: QueryValidatorRequest): Promise { - const data = QueryValidatorRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "Validator", - data - ); - return promise.then((data) => - QueryValidatorResponse.decode(new Reader(data)) - ); - } - - ValidatorDelegations( - request: QueryValidatorDelegationsRequest - ): Promise { - const data = QueryValidatorDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "ValidatorDelegations", - data - ); - return promise.then((data) => - QueryValidatorDelegationsResponse.decode(new Reader(data)) - ); - } - - ValidatorUnbondingDelegations( - request: QueryValidatorUnbondingDelegationsRequest - ): Promise { - const data = QueryValidatorUnbondingDelegationsRequest.encode( - request - ).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "ValidatorUnbondingDelegations", - data - ); - return promise.then((data) => - QueryValidatorUnbondingDelegationsResponse.decode(new Reader(data)) - ); - } - - Delegation( - request: QueryDelegationRequest - ): Promise { - const data = QueryDelegationRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "Delegation", - data - ); - return promise.then((data) => - QueryDelegationResponse.decode(new Reader(data)) - ); - } - - UnbondingDelegation( - request: QueryUnbondingDelegationRequest - ): Promise { - const data = QueryUnbondingDelegationRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "UnbondingDelegation", - data - ); - return promise.then((data) => - QueryUnbondingDelegationResponse.decode(new Reader(data)) - ); - } - - DelegatorDelegations( - request: QueryDelegatorDelegationsRequest - ): Promise { - const data = QueryDelegatorDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "DelegatorDelegations", - data - ); - return promise.then((data) => - QueryDelegatorDelegationsResponse.decode(new Reader(data)) - ); - } - - DelegatorUnbondingDelegations( - request: QueryDelegatorUnbondingDelegationsRequest - ): Promise { - const data = QueryDelegatorUnbondingDelegationsRequest.encode( - request - ).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "DelegatorUnbondingDelegations", - data - ); - return promise.then((data) => - QueryDelegatorUnbondingDelegationsResponse.decode(new Reader(data)) - ); - } - - Redelegations( - request: QueryRedelegationsRequest - ): Promise { - const data = QueryRedelegationsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "Redelegations", - data - ); - return promise.then((data) => - QueryRedelegationsResponse.decode(new Reader(data)) - ); - } - - DelegatorValidators( - request: QueryDelegatorValidatorsRequest - ): Promise { - const data = QueryDelegatorValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "DelegatorValidators", - data - ); - return promise.then((data) => - QueryDelegatorValidatorsResponse.decode(new Reader(data)) - ); - } - - DelegatorValidator( - request: QueryDelegatorValidatorRequest - ): Promise { - const data = QueryDelegatorValidatorRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "DelegatorValidator", - data - ); - return promise.then((data) => - QueryDelegatorValidatorResponse.decode(new Reader(data)) - ); - } - - HistoricalInfo( - request: QueryHistoricalInfoRequest - ): Promise { - const data = QueryHistoricalInfoRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "HistoricalInfo", - data - ); - return promise.then((data) => - QueryHistoricalInfoResponse.decode(new Reader(data)) - ); - } - - Pool(request: QueryPoolRequest): Promise { - const data = QueryPoolRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "Pool", - data - ); - return promise.then((data) => QueryPoolResponse.decode(new Reader(data))); - } - - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.d.ts deleted file mode 100644 index b309902cd9..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.d.ts +++ /dev/null @@ -1,381 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Header } from "../../../tendermint/types/types"; -import { Any } from "../../../google/protobuf/any"; -import { Duration } from "../../../google/protobuf/duration"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.staking.v1beta1"; -/** BondStatus is the status of a validator. */ -export declare enum BondStatus { - /** BOND_STATUS_UNSPECIFIED - UNSPECIFIED defines an invalid validator status. */ - BOND_STATUS_UNSPECIFIED = 0, - /** BOND_STATUS_UNBONDED - UNBONDED defines a validator that is not bonded. */ - BOND_STATUS_UNBONDED = 1, - /** BOND_STATUS_UNBONDING - UNBONDING defines a validator that is unbonding. */ - BOND_STATUS_UNBONDING = 2, - /** BOND_STATUS_BONDED - BONDED defines a validator that is bonded. */ - BOND_STATUS_BONDED = 3, - UNRECOGNIZED = -1 -} -export declare function bondStatusFromJSON(object: any): BondStatus; -export declare function bondStatusToJSON(object: BondStatus): string; -/** - * 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). - */ -export interface HistoricalInfo { - header: Header | undefined; - valset: Validator[]; -} -/** - * CommissionRates defines the initial commission rates to be used for creating - * a validator. - */ -export interface CommissionRates { - /** rate is the commission rate charged to delegators, as a fraction. */ - rate: string; - /** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */ - maxRate: string; - /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */ - maxChangeRate: string; -} -/** Commission defines commission parameters for a given validator. */ -export interface Commission { - /** commission_rates defines the initial commission rates to be used for creating a validator. */ - commissionRates: CommissionRates | undefined; - /** update_time is the last time the commission rate was changed. */ - updateTime: Date | undefined; -} -/** Description defines a validator description. */ -export interface Description { - /** moniker defines a human-readable name for the validator. */ - moniker: string; - /** identity defines an optional identity signature (ex. UPort or Keybase). */ - identity: string; - /** website defines an optional website link. */ - website: string; - /** security_contact defines an optional email for security contact. */ - securityContact: string; - /** details define other optional details. */ - details: string; -} -/** - * 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. - */ -export interface Validator { - /** operator_address defines the address of the validator's operator; bech encoded in JSON. */ - operatorAddress: string; - /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */ - consensusPubkey: Any | undefined; - /** jailed defined whether the validator has been jailed from bonded status or not. */ - jailed: boolean; - /** status is the validator status (bonded/unbonding/unbonded). */ - status: BondStatus; - /** tokens define the delegated tokens (incl. self-delegation). */ - tokens: string; - /** delegator_shares defines total shares issued to a validator's delegators. */ - delegatorShares: string; - /** description defines the description terms for the validator. */ - description: Description | undefined; - /** unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. */ - unbondingHeight: number; - /** unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. */ - unbondingTime: Date | undefined; - /** commission defines the commission parameters. */ - commission: Commission | undefined; - /** min_self_delegation is the validator's self declared minimum self delegation. */ - minSelfDelegation: string; -} -/** ValAddresses defines a repeated set of validator addresses. */ -export interface ValAddresses { - addresses: string[]; -} -/** - * DVPair is struct that just has a delegator-validator pair with no other data. - * It is intended to be used as a marshalable pointer. For example, a DVPair can - * be used to construct the key to getting an UnbondingDelegation from state. - */ -export interface DVPair { - delegatorAddress: string; - validatorAddress: string; -} -/** DVPairs defines an array of DVPair objects. */ -export interface DVPairs { - pairs: DVPair[]; -} -/** - * DVVTriplet is struct that just has a delegator-validator-validator triplet - * with no other data. It is intended to be used as a marshalable pointer. For - * example, a DVVTriplet can be used to construct the key to getting a - * Redelegation from state. - */ -export interface DVVTriplet { - delegatorAddress: string; - validatorSrcAddress: string; - validatorDstAddress: string; -} -/** DVVTriplets defines an array of DVVTriplet objects. */ -export interface DVVTriplets { - triplets: DVVTriplet[]; -} -/** - * 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. - */ -export interface Delegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress: string; - /** validator_address is the bech32-encoded address of the validator. */ - validatorAddress: string; - /** shares define the delegation shares received. */ - shares: string; -} -/** - * UnbondingDelegation stores all of a single delegator's unbonding bonds - * for a single validator in an time-ordered list. - */ -export interface UnbondingDelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress: string; - /** validator_address is the bech32-encoded address of the validator. */ - validatorAddress: string; - /** entries are the unbonding delegation entries. */ - entries: UnbondingDelegationEntry[]; -} -/** UnbondingDelegationEntry defines an unbonding object with relevant metadata. */ -export interface UnbondingDelegationEntry { - /** creation_height is the height which the unbonding took place. */ - creationHeight: number; - /** completion_time is the unix time for unbonding completion. */ - completionTime: Date | undefined; - /** initial_balance defines the tokens initially scheduled to receive at completion. */ - initialBalance: string; - /** balance defines the tokens to receive at completion. */ - balance: string; -} -/** RedelegationEntry defines a redelegation object with relevant metadata. */ -export interface RedelegationEntry { - /** creation_height defines the height which the redelegation took place. */ - creationHeight: number; - /** completion_time defines the unix time for redelegation completion. */ - completionTime: Date | undefined; - /** initial_balance defines the initial balance when redelegation started. */ - initialBalance: string; - /** shares_dst is the amount of destination-validator shares created by redelegation. */ - sharesDst: string; -} -/** - * Redelegation contains the list of a particular delegator's redelegating bonds - * from a particular source validator to a particular destination validator. - */ -export interface Redelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress: string; - /** validator_src_address is the validator redelegation source operator address. */ - validatorSrcAddress: string; - /** validator_dst_address is the validator redelegation destination operator address. */ - validatorDstAddress: string; - /** entries are the redelegation entries. */ - entries: RedelegationEntry[]; -} -/** Params defines the parameters for the staking module. */ -export interface Params { - /** unbonding_time is the time duration of unbonding. */ - unbondingTime: Duration | undefined; - /** max_validators is the maximum number of validators. */ - maxValidators: number; - /** max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). */ - maxEntries: number; - /** historical_entries is the number of historical entries to persist. */ - historicalEntries: number; - /** bond_denom defines the bondable coin denomination. */ - bondDenom: string; -} -/** - * DelegationResponse is equivalent to Delegation except that it contains a - * balance in addition to shares which is more suitable for client responses. - */ -export interface DelegationResponse { - delegation: Delegation | undefined; - balance: Coin | undefined; -} -/** - * RedelegationEntryResponse is equivalent to a RedelegationEntry except that it - * contains a balance in addition to shares which is more suitable for client - * responses. - */ -export interface RedelegationEntryResponse { - redelegationEntry: RedelegationEntry | undefined; - balance: string; -} -/** - * RedelegationResponse is equivalent to a Redelegation except that its entries - * contain a balance in addition to shares which is more suitable for client - * responses. - */ -export interface RedelegationResponse { - redelegation: Redelegation | undefined; - entries: RedelegationEntryResponse[]; -} -/** - * Pool is used for tracking bonded and not-bonded token supply of the bond - * denomination. - */ -export interface Pool { - notBondedTokens: string; - bondedTokens: string; -} -export declare const HistoricalInfo: { - encode(message: HistoricalInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HistoricalInfo; - fromJSON(object: any): HistoricalInfo; - toJSON(message: HistoricalInfo): unknown; - fromPartial(object: DeepPartial): HistoricalInfo; -}; -export declare const CommissionRates: { - encode(message: CommissionRates, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CommissionRates; - fromJSON(object: any): CommissionRates; - toJSON(message: CommissionRates): unknown; - fromPartial(object: DeepPartial): CommissionRates; -}; -export declare const Commission: { - encode(message: Commission, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Commission; - fromJSON(object: any): Commission; - toJSON(message: Commission): unknown; - fromPartial(object: DeepPartial): Commission; -}; -export declare const Description: { - encode(message: Description, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Description; - fromJSON(object: any): Description; - toJSON(message: Description): unknown; - fromPartial(object: DeepPartial): Description; -}; -export declare const Validator: { - encode(message: Validator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Validator; - fromJSON(object: any): Validator; - toJSON(message: Validator): unknown; - fromPartial(object: DeepPartial): Validator; -}; -export declare const ValAddresses: { - encode(message: ValAddresses, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValAddresses; - fromJSON(object: any): ValAddresses; - toJSON(message: ValAddresses): unknown; - fromPartial(object: DeepPartial): ValAddresses; -}; -export declare const DVPair: { - encode(message: DVPair, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DVPair; - fromJSON(object: any): DVPair; - toJSON(message: DVPair): unknown; - fromPartial(object: DeepPartial): DVPair; -}; -export declare const DVPairs: { - encode(message: DVPairs, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DVPairs; - fromJSON(object: any): DVPairs; - toJSON(message: DVPairs): unknown; - fromPartial(object: DeepPartial): DVPairs; -}; -export declare const DVVTriplet: { - encode(message: DVVTriplet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DVVTriplet; - fromJSON(object: any): DVVTriplet; - toJSON(message: DVVTriplet): unknown; - fromPartial(object: DeepPartial): DVVTriplet; -}; -export declare const DVVTriplets: { - encode(message: DVVTriplets, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DVVTriplets; - fromJSON(object: any): DVVTriplets; - toJSON(message: DVVTriplets): unknown; - fromPartial(object: DeepPartial): DVVTriplets; -}; -export declare const Delegation: { - encode(message: Delegation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Delegation; - fromJSON(object: any): Delegation; - toJSON(message: Delegation): unknown; - fromPartial(object: DeepPartial): Delegation; -}; -export declare const UnbondingDelegation: { - encode(message: UnbondingDelegation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UnbondingDelegation; - fromJSON(object: any): UnbondingDelegation; - toJSON(message: UnbondingDelegation): unknown; - fromPartial(object: DeepPartial): UnbondingDelegation; -}; -export declare const UnbondingDelegationEntry: { - encode(message: UnbondingDelegationEntry, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UnbondingDelegationEntry; - fromJSON(object: any): UnbondingDelegationEntry; - toJSON(message: UnbondingDelegationEntry): unknown; - fromPartial(object: DeepPartial): UnbondingDelegationEntry; -}; -export declare const RedelegationEntry: { - encode(message: RedelegationEntry, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RedelegationEntry; - fromJSON(object: any): RedelegationEntry; - toJSON(message: RedelegationEntry): unknown; - fromPartial(object: DeepPartial): RedelegationEntry; -}; -export declare const Redelegation: { - encode(message: Redelegation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Redelegation; - fromJSON(object: any): Redelegation; - toJSON(message: Redelegation): unknown; - fromPartial(object: DeepPartial): Redelegation; -}; -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -export declare const DelegationResponse: { - encode(message: DelegationResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DelegationResponse; - fromJSON(object: any): DelegationResponse; - toJSON(message: DelegationResponse): unknown; - fromPartial(object: DeepPartial): DelegationResponse; -}; -export declare const RedelegationEntryResponse: { - encode(message: RedelegationEntryResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RedelegationEntryResponse; - fromJSON(object: any): RedelegationEntryResponse; - toJSON(message: RedelegationEntryResponse): unknown; - fromPartial(object: DeepPartial): RedelegationEntryResponse; -}; -export declare const RedelegationResponse: { - encode(message: RedelegationResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RedelegationResponse; - fromJSON(object: any): RedelegationResponse; - toJSON(message: RedelegationResponse): unknown; - fromPartial(object: DeepPartial): RedelegationResponse; -}; -export declare const Pool: { - encode(message: Pool, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Pool; - fromJSON(object: any): Pool; - toJSON(message: Pool): unknown; - fromPartial(object: DeepPartial): Pool; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.js deleted file mode 100644 index b333be7293..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.js +++ /dev/null @@ -1,2131 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Header } from "../../../tendermint/types/types"; -import { Any } from "../../../google/protobuf/any"; -import { Duration } from "../../../google/protobuf/duration"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.staking.v1beta1"; -/** BondStatus is the status of a validator. */ -export var BondStatus; -(function (BondStatus) { - /** BOND_STATUS_UNSPECIFIED - UNSPECIFIED defines an invalid validator status. */ - BondStatus[BondStatus["BOND_STATUS_UNSPECIFIED"] = 0] = "BOND_STATUS_UNSPECIFIED"; - /** BOND_STATUS_UNBONDED - UNBONDED defines a validator that is not bonded. */ - BondStatus[BondStatus["BOND_STATUS_UNBONDED"] = 1] = "BOND_STATUS_UNBONDED"; - /** BOND_STATUS_UNBONDING - UNBONDING defines a validator that is unbonding. */ - BondStatus[BondStatus["BOND_STATUS_UNBONDING"] = 2] = "BOND_STATUS_UNBONDING"; - /** BOND_STATUS_BONDED - BONDED defines a validator that is bonded. */ - BondStatus[BondStatus["BOND_STATUS_BONDED"] = 3] = "BOND_STATUS_BONDED"; - BondStatus[BondStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(BondStatus || (BondStatus = {})); -export function bondStatusFromJSON(object) { - switch (object) { - case 0: - case "BOND_STATUS_UNSPECIFIED": - return BondStatus.BOND_STATUS_UNSPECIFIED; - case 1: - case "BOND_STATUS_UNBONDED": - return BondStatus.BOND_STATUS_UNBONDED; - case 2: - case "BOND_STATUS_UNBONDING": - return BondStatus.BOND_STATUS_UNBONDING; - case 3: - case "BOND_STATUS_BONDED": - return BondStatus.BOND_STATUS_BONDED; - case -1: - case "UNRECOGNIZED": - default: - return BondStatus.UNRECOGNIZED; - } -} -export function bondStatusToJSON(object) { - switch (object) { - case BondStatus.BOND_STATUS_UNSPECIFIED: - return "BOND_STATUS_UNSPECIFIED"; - case BondStatus.BOND_STATUS_UNBONDED: - return "BOND_STATUS_UNBONDED"; - case BondStatus.BOND_STATUS_UNBONDING: - return "BOND_STATUS_UNBONDING"; - case BondStatus.BOND_STATUS_BONDED: - return "BOND_STATUS_BONDED"; - default: - return "UNKNOWN"; - } -} -const baseHistoricalInfo = {}; -export const HistoricalInfo = { - encode(message, writer = Writer.create()) { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.valset) { - Validator.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHistoricalInfo }; - message.valset = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.valset.push(Validator.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHistoricalInfo }; - message.valset = []; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } - else { - message.header = undefined; - } - if (object.valset !== undefined && object.valset !== null) { - for (const e of object.valset) { - message.valset.push(Validator.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - if (message.valset) { - obj.valset = message.valset.map((e) => e ? Validator.toJSON(e) : undefined); - } - else { - obj.valset = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHistoricalInfo }; - message.valset = []; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } - else { - message.header = undefined; - } - if (object.valset !== undefined && object.valset !== null) { - for (const e of object.valset) { - message.valset.push(Validator.fromPartial(e)); - } - } - return message; - }, -}; -const baseCommissionRates = { - rate: "", - maxRate: "", - maxChangeRate: "", -}; -export const CommissionRates = { - encode(message, writer = Writer.create()) { - if (message.rate !== "") { - writer.uint32(10).string(message.rate); - } - if (message.maxRate !== "") { - writer.uint32(18).string(message.maxRate); - } - if (message.maxChangeRate !== "") { - writer.uint32(26).string(message.maxChangeRate); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommissionRates }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rate = reader.string(); - break; - case 2: - message.maxRate = reader.string(); - break; - case 3: - message.maxChangeRate = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCommissionRates }; - if (object.rate !== undefined && object.rate !== null) { - message.rate = String(object.rate); - } - else { - message.rate = ""; - } - if (object.maxRate !== undefined && object.maxRate !== null) { - message.maxRate = String(object.maxRate); - } - else { - message.maxRate = ""; - } - if (object.maxChangeRate !== undefined && object.maxChangeRate !== null) { - message.maxChangeRate = String(object.maxChangeRate); - } - else { - message.maxChangeRate = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.rate !== undefined && (obj.rate = message.rate); - message.maxRate !== undefined && (obj.maxRate = message.maxRate); - message.maxChangeRate !== undefined && - (obj.maxChangeRate = message.maxChangeRate); - return obj; - }, - fromPartial(object) { - const message = { ...baseCommissionRates }; - if (object.rate !== undefined && object.rate !== null) { - message.rate = object.rate; - } - else { - message.rate = ""; - } - if (object.maxRate !== undefined && object.maxRate !== null) { - message.maxRate = object.maxRate; - } - else { - message.maxRate = ""; - } - if (object.maxChangeRate !== undefined && object.maxChangeRate !== null) { - message.maxChangeRate = object.maxChangeRate; - } - else { - message.maxChangeRate = ""; - } - return message; - }, -}; -const baseCommission = {}; -export const Commission = { - encode(message, writer = Writer.create()) { - if (message.commissionRates !== undefined) { - CommissionRates.encode(message.commissionRates, writer.uint32(10).fork()).ldelim(); - } - if (message.updateTime !== undefined) { - Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommission }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commissionRates = CommissionRates.decode(reader, reader.uint32()); - break; - case 2: - message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCommission }; - if (object.commissionRates !== undefined && - object.commissionRates !== null) { - message.commissionRates = CommissionRates.fromJSON(object.commissionRates); - } - else { - message.commissionRates = undefined; - } - if (object.updateTime !== undefined && object.updateTime !== null) { - message.updateTime = fromJsonTimestamp(object.updateTime); - } - else { - message.updateTime = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.commissionRates !== undefined && - (obj.commissionRates = message.commissionRates - ? CommissionRates.toJSON(message.commissionRates) - : undefined); - message.updateTime !== undefined && - (obj.updateTime = - message.updateTime !== undefined - ? message.updateTime.toISOString() - : null); - return obj; - }, - fromPartial(object) { - const message = { ...baseCommission }; - if (object.commissionRates !== undefined && - object.commissionRates !== null) { - message.commissionRates = CommissionRates.fromPartial(object.commissionRates); - } - else { - message.commissionRates = undefined; - } - if (object.updateTime !== undefined && object.updateTime !== null) { - message.updateTime = object.updateTime; - } - else { - message.updateTime = undefined; - } - return message; - }, -}; -const baseDescription = { - moniker: "", - identity: "", - website: "", - securityContact: "", - details: "", -}; -export const Description = { - encode(message, writer = Writer.create()) { - if (message.moniker !== "") { - writer.uint32(10).string(message.moniker); - } - if (message.identity !== "") { - writer.uint32(18).string(message.identity); - } - if (message.website !== "") { - writer.uint32(26).string(message.website); - } - if (message.securityContact !== "") { - writer.uint32(34).string(message.securityContact); - } - if (message.details !== "") { - writer.uint32(42).string(message.details); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescription }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.moniker = reader.string(); - break; - case 2: - message.identity = reader.string(); - break; - case 3: - message.website = reader.string(); - break; - case 4: - message.securityContact = reader.string(); - break; - case 5: - message.details = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescription }; - if (object.moniker !== undefined && object.moniker !== null) { - message.moniker = String(object.moniker); - } - else { - message.moniker = ""; - } - if (object.identity !== undefined && object.identity !== null) { - message.identity = String(object.identity); - } - else { - message.identity = ""; - } - if (object.website !== undefined && object.website !== null) { - message.website = String(object.website); - } - else { - message.website = ""; - } - if (object.securityContact !== undefined && - object.securityContact !== null) { - message.securityContact = String(object.securityContact); - } - else { - message.securityContact = ""; - } - if (object.details !== undefined && object.details !== null) { - message.details = String(object.details); - } - else { - message.details = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.moniker !== undefined && (obj.moniker = message.moniker); - message.identity !== undefined && (obj.identity = message.identity); - message.website !== undefined && (obj.website = message.website); - message.securityContact !== undefined && - (obj.securityContact = message.securityContact); - message.details !== undefined && (obj.details = message.details); - return obj; - }, - fromPartial(object) { - const message = { ...baseDescription }; - if (object.moniker !== undefined && object.moniker !== null) { - message.moniker = object.moniker; - } - else { - message.moniker = ""; - } - if (object.identity !== undefined && object.identity !== null) { - message.identity = object.identity; - } - else { - message.identity = ""; - } - if (object.website !== undefined && object.website !== null) { - message.website = object.website; - } - else { - message.website = ""; - } - if (object.securityContact !== undefined && - object.securityContact !== null) { - message.securityContact = object.securityContact; - } - else { - message.securityContact = ""; - } - if (object.details !== undefined && object.details !== null) { - message.details = object.details; - } - else { - message.details = ""; - } - return message; - }, -}; -const baseValidator = { - operatorAddress: "", - jailed: false, - status: 0, - tokens: "", - delegatorShares: "", - unbondingHeight: 0, - minSelfDelegation: "", -}; -export const Validator = { - encode(message, writer = Writer.create()) { - if (message.operatorAddress !== "") { - writer.uint32(10).string(message.operatorAddress); - } - if (message.consensusPubkey !== undefined) { - Any.encode(message.consensusPubkey, writer.uint32(18).fork()).ldelim(); - } - if (message.jailed === true) { - writer.uint32(24).bool(message.jailed); - } - if (message.status !== 0) { - writer.uint32(32).int32(message.status); - } - if (message.tokens !== "") { - writer.uint32(42).string(message.tokens); - } - if (message.delegatorShares !== "") { - writer.uint32(50).string(message.delegatorShares); - } - if (message.description !== undefined) { - Description.encode(message.description, writer.uint32(58).fork()).ldelim(); - } - if (message.unbondingHeight !== 0) { - writer.uint32(64).int64(message.unbondingHeight); - } - if (message.unbondingTime !== undefined) { - Timestamp.encode(toTimestamp(message.unbondingTime), writer.uint32(74).fork()).ldelim(); - } - if (message.commission !== undefined) { - Commission.encode(message.commission, writer.uint32(82).fork()).ldelim(); - } - if (message.minSelfDelegation !== "") { - writer.uint32(90).string(message.minSelfDelegation); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.operatorAddress = reader.string(); - break; - case 2: - message.consensusPubkey = Any.decode(reader, reader.uint32()); - break; - case 3: - message.jailed = reader.bool(); - break; - case 4: - message.status = reader.int32(); - break; - case 5: - message.tokens = reader.string(); - break; - case 6: - message.delegatorShares = reader.string(); - break; - case 7: - message.description = Description.decode(reader, reader.uint32()); - break; - case 8: - message.unbondingHeight = longToNumber(reader.int64()); - break; - case 9: - message.unbondingTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 10: - message.commission = Commission.decode(reader, reader.uint32()); - break; - case 11: - message.minSelfDelegation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidator }; - if (object.operatorAddress !== undefined && - object.operatorAddress !== null) { - message.operatorAddress = String(object.operatorAddress); - } - else { - message.operatorAddress = ""; - } - if (object.consensusPubkey !== undefined && - object.consensusPubkey !== null) { - message.consensusPubkey = Any.fromJSON(object.consensusPubkey); - } - else { - message.consensusPubkey = undefined; - } - if (object.jailed !== undefined && object.jailed !== null) { - message.jailed = Boolean(object.jailed); - } - else { - message.jailed = false; - } - if (object.status !== undefined && object.status !== null) { - message.status = bondStatusFromJSON(object.status); - } - else { - message.status = 0; - } - if (object.tokens !== undefined && object.tokens !== null) { - message.tokens = String(object.tokens); - } - else { - message.tokens = ""; - } - if (object.delegatorShares !== undefined && - object.delegatorShares !== null) { - message.delegatorShares = String(object.delegatorShares); - } - else { - message.delegatorShares = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromJSON(object.description); - } - else { - message.description = undefined; - } - if (object.unbondingHeight !== undefined && - object.unbondingHeight !== null) { - message.unbondingHeight = Number(object.unbondingHeight); - } - else { - message.unbondingHeight = 0; - } - if (object.unbondingTime !== undefined && object.unbondingTime !== null) { - message.unbondingTime = fromJsonTimestamp(object.unbondingTime); - } - else { - message.unbondingTime = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = Commission.fromJSON(object.commission); - } - else { - message.commission = undefined; - } - if (object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null) { - message.minSelfDelegation = String(object.minSelfDelegation); - } - else { - message.minSelfDelegation = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.operatorAddress !== undefined && - (obj.operatorAddress = message.operatorAddress); - message.consensusPubkey !== undefined && - (obj.consensusPubkey = message.consensusPubkey - ? Any.toJSON(message.consensusPubkey) - : undefined); - message.jailed !== undefined && (obj.jailed = message.jailed); - message.status !== undefined && - (obj.status = bondStatusToJSON(message.status)); - message.tokens !== undefined && (obj.tokens = message.tokens); - message.delegatorShares !== undefined && - (obj.delegatorShares = message.delegatorShares); - message.description !== undefined && - (obj.description = message.description - ? Description.toJSON(message.description) - : undefined); - message.unbondingHeight !== undefined && - (obj.unbondingHeight = message.unbondingHeight); - message.unbondingTime !== undefined && - (obj.unbondingTime = - message.unbondingTime !== undefined - ? message.unbondingTime.toISOString() - : null); - message.commission !== undefined && - (obj.commission = message.commission - ? Commission.toJSON(message.commission) - : undefined); - message.minSelfDelegation !== undefined && - (obj.minSelfDelegation = message.minSelfDelegation); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidator }; - if (object.operatorAddress !== undefined && - object.operatorAddress !== null) { - message.operatorAddress = object.operatorAddress; - } - else { - message.operatorAddress = ""; - } - if (object.consensusPubkey !== undefined && - object.consensusPubkey !== null) { - message.consensusPubkey = Any.fromPartial(object.consensusPubkey); - } - else { - message.consensusPubkey = undefined; - } - if (object.jailed !== undefined && object.jailed !== null) { - message.jailed = object.jailed; - } - else { - message.jailed = false; - } - if (object.status !== undefined && object.status !== null) { - message.status = object.status; - } - else { - message.status = 0; - } - if (object.tokens !== undefined && object.tokens !== null) { - message.tokens = object.tokens; - } - else { - message.tokens = ""; - } - if (object.delegatorShares !== undefined && - object.delegatorShares !== null) { - message.delegatorShares = object.delegatorShares; - } - else { - message.delegatorShares = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromPartial(object.description); - } - else { - message.description = undefined; - } - if (object.unbondingHeight !== undefined && - object.unbondingHeight !== null) { - message.unbondingHeight = object.unbondingHeight; - } - else { - message.unbondingHeight = 0; - } - if (object.unbondingTime !== undefined && object.unbondingTime !== null) { - message.unbondingTime = object.unbondingTime; - } - else { - message.unbondingTime = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = Commission.fromPartial(object.commission); - } - else { - message.commission = undefined; - } - if (object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null) { - message.minSelfDelegation = object.minSelfDelegation; - } - else { - message.minSelfDelegation = ""; - } - return message; - }, -}; -const baseValAddresses = { addresses: "" }; -export const ValAddresses = { - encode(message, writer = Writer.create()) { - for (const v of message.addresses) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValAddresses }; - message.addresses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.addresses.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValAddresses }; - message.addresses = []; - if (object.addresses !== undefined && object.addresses !== null) { - for (const e of object.addresses) { - message.addresses.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.addresses) { - obj.addresses = message.addresses.map((e) => e); - } - else { - obj.addresses = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseValAddresses }; - message.addresses = []; - if (object.addresses !== undefined && object.addresses !== null) { - for (const e of object.addresses) { - message.addresses.push(e); - } - } - return message; - }, -}; -const baseDVPair = { delegatorAddress: "", validatorAddress: "" }; -export const DVPair = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVPair }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDVPair }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object) { - const message = { ...baseDVPair }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - return message; - }, -}; -const baseDVPairs = {}; -export const DVPairs = { - encode(message, writer = Writer.create()) { - for (const v of message.pairs) { - DVPair.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVPairs }; - message.pairs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pairs.push(DVPair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDVPairs }; - message.pairs = []; - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(DVPair.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.pairs) { - obj.pairs = message.pairs.map((e) => (e ? DVPair.toJSON(e) : undefined)); - } - else { - obj.pairs = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDVPairs }; - message.pairs = []; - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(DVPair.fromPartial(e)); - } - } - return message; - }, -}; -const baseDVVTriplet = { - delegatorAddress: "", - validatorSrcAddress: "", - validatorDstAddress: "", -}; -export const DVVTriplet = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorSrcAddress !== "") { - writer.uint32(18).string(message.validatorSrcAddress); - } - if (message.validatorDstAddress !== "") { - writer.uint32(26).string(message.validatorDstAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVVTriplet }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorSrcAddress = reader.string(); - break; - case 3: - message.validatorDstAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDVVTriplet }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null) { - message.validatorSrcAddress = String(object.validatorSrcAddress); - } - else { - message.validatorSrcAddress = ""; - } - if (object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null) { - message.validatorDstAddress = String(object.validatorDstAddress); - } - else { - message.validatorDstAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorSrcAddress !== undefined && - (obj.validatorSrcAddress = message.validatorSrcAddress); - message.validatorDstAddress !== undefined && - (obj.validatorDstAddress = message.validatorDstAddress); - return obj; - }, - fromPartial(object) { - const message = { ...baseDVVTriplet }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null) { - message.validatorSrcAddress = object.validatorSrcAddress; - } - else { - message.validatorSrcAddress = ""; - } - if (object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null) { - message.validatorDstAddress = object.validatorDstAddress; - } - else { - message.validatorDstAddress = ""; - } - return message; - }, -}; -const baseDVVTriplets = {}; -export const DVVTriplets = { - encode(message, writer = Writer.create()) { - for (const v of message.triplets) { - DVVTriplet.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVVTriplets }; - message.triplets = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.triplets.push(DVVTriplet.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDVVTriplets }; - message.triplets = []; - if (object.triplets !== undefined && object.triplets !== null) { - for (const e of object.triplets) { - message.triplets.push(DVVTriplet.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.triplets) { - obj.triplets = message.triplets.map((e) => e ? DVVTriplet.toJSON(e) : undefined); - } - else { - obj.triplets = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDVVTriplets }; - message.triplets = []; - if (object.triplets !== undefined && object.triplets !== null) { - for (const e of object.triplets) { - message.triplets.push(DVVTriplet.fromPartial(e)); - } - } - return message; - }, -}; -const baseDelegation = { - delegatorAddress: "", - validatorAddress: "", - shares: "", -}; -export const Delegation = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.shares !== "") { - writer.uint32(26).string(message.shares); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegation }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.shares = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDelegation }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.shares !== undefined && object.shares !== null) { - message.shares = String(object.shares); - } - else { - message.shares = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.shares !== undefined && (obj.shares = message.shares); - return obj; - }, - fromPartial(object) { - const message = { ...baseDelegation }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.shares !== undefined && object.shares !== null) { - message.shares = object.shares; - } - else { - message.shares = ""; - } - return message; - }, -}; -const baseUnbondingDelegation = { - delegatorAddress: "", - validatorAddress: "", -}; -export const UnbondingDelegation = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - for (const v of message.entries) { - UnbondingDelegationEntry.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUnbondingDelegation }; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.entries.push(UnbondingDelegationEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUnbondingDelegation }; - message.entries = []; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(UnbondingDelegationEntry.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - if (message.entries) { - obj.entries = message.entries.map((e) => e ? UnbondingDelegationEntry.toJSON(e) : undefined); - } - else { - obj.entries = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseUnbondingDelegation }; - message.entries = []; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(UnbondingDelegationEntry.fromPartial(e)); - } - } - return message; - }, -}; -const baseUnbondingDelegationEntry = { - creationHeight: 0, - initialBalance: "", - balance: "", -}; -export const UnbondingDelegationEntry = { - encode(message, writer = Writer.create()) { - if (message.creationHeight !== 0) { - writer.uint32(8).int64(message.creationHeight); - } - if (message.completionTime !== undefined) { - Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(18).fork()).ldelim(); - } - if (message.initialBalance !== "") { - writer.uint32(26).string(message.initialBalance); - } - if (message.balance !== "") { - writer.uint32(34).string(message.balance); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUnbondingDelegationEntry, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creationHeight = longToNumber(reader.int64()); - break; - case 2: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.initialBalance = reader.string(); - break; - case 4: - message.balance = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUnbondingDelegationEntry, - }; - if (object.creationHeight !== undefined && object.creationHeight !== null) { - message.creationHeight = Number(object.creationHeight); - } - else { - message.creationHeight = 0; - } - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = fromJsonTimestamp(object.completionTime); - } - else { - message.completionTime = undefined; - } - if (object.initialBalance !== undefined && object.initialBalance !== null) { - message.initialBalance = String(object.initialBalance); - } - else { - message.initialBalance = ""; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = String(object.balance); - } - else { - message.balance = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.creationHeight !== undefined && - (obj.creationHeight = message.creationHeight); - message.completionTime !== undefined && - (obj.completionTime = - message.completionTime !== undefined - ? message.completionTime.toISOString() - : null); - message.initialBalance !== undefined && - (obj.initialBalance = message.initialBalance); - message.balance !== undefined && (obj.balance = message.balance); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUnbondingDelegationEntry, - }; - if (object.creationHeight !== undefined && object.creationHeight !== null) { - message.creationHeight = object.creationHeight; - } - else { - message.creationHeight = 0; - } - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = object.completionTime; - } - else { - message.completionTime = undefined; - } - if (object.initialBalance !== undefined && object.initialBalance !== null) { - message.initialBalance = object.initialBalance; - } - else { - message.initialBalance = ""; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = object.balance; - } - else { - message.balance = ""; - } - return message; - }, -}; -const baseRedelegationEntry = { - creationHeight: 0, - initialBalance: "", - sharesDst: "", -}; -export const RedelegationEntry = { - encode(message, writer = Writer.create()) { - if (message.creationHeight !== 0) { - writer.uint32(8).int64(message.creationHeight); - } - if (message.completionTime !== undefined) { - Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(18).fork()).ldelim(); - } - if (message.initialBalance !== "") { - writer.uint32(26).string(message.initialBalance); - } - if (message.sharesDst !== "") { - writer.uint32(34).string(message.sharesDst); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRedelegationEntry }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creationHeight = longToNumber(reader.int64()); - break; - case 2: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.initialBalance = reader.string(); - break; - case 4: - message.sharesDst = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRedelegationEntry }; - if (object.creationHeight !== undefined && object.creationHeight !== null) { - message.creationHeight = Number(object.creationHeight); - } - else { - message.creationHeight = 0; - } - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = fromJsonTimestamp(object.completionTime); - } - else { - message.completionTime = undefined; - } - if (object.initialBalance !== undefined && object.initialBalance !== null) { - message.initialBalance = String(object.initialBalance); - } - else { - message.initialBalance = ""; - } - if (object.sharesDst !== undefined && object.sharesDst !== null) { - message.sharesDst = String(object.sharesDst); - } - else { - message.sharesDst = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.creationHeight !== undefined && - (obj.creationHeight = message.creationHeight); - message.completionTime !== undefined && - (obj.completionTime = - message.completionTime !== undefined - ? message.completionTime.toISOString() - : null); - message.initialBalance !== undefined && - (obj.initialBalance = message.initialBalance); - message.sharesDst !== undefined && (obj.sharesDst = message.sharesDst); - return obj; - }, - fromPartial(object) { - const message = { ...baseRedelegationEntry }; - if (object.creationHeight !== undefined && object.creationHeight !== null) { - message.creationHeight = object.creationHeight; - } - else { - message.creationHeight = 0; - } - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = object.completionTime; - } - else { - message.completionTime = undefined; - } - if (object.initialBalance !== undefined && object.initialBalance !== null) { - message.initialBalance = object.initialBalance; - } - else { - message.initialBalance = ""; - } - if (object.sharesDst !== undefined && object.sharesDst !== null) { - message.sharesDst = object.sharesDst; - } - else { - message.sharesDst = ""; - } - return message; - }, -}; -const baseRedelegation = { - delegatorAddress: "", - validatorSrcAddress: "", - validatorDstAddress: "", -}; -export const Redelegation = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorSrcAddress !== "") { - writer.uint32(18).string(message.validatorSrcAddress); - } - if (message.validatorDstAddress !== "") { - writer.uint32(26).string(message.validatorDstAddress); - } - for (const v of message.entries) { - RedelegationEntry.encode(v, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRedelegation }; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorSrcAddress = reader.string(); - break; - case 3: - message.validatorDstAddress = reader.string(); - break; - case 4: - message.entries.push(RedelegationEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRedelegation }; - message.entries = []; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null) { - message.validatorSrcAddress = String(object.validatorSrcAddress); - } - else { - message.validatorSrcAddress = ""; - } - if (object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null) { - message.validatorDstAddress = String(object.validatorDstAddress); - } - else { - message.validatorDstAddress = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntry.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorSrcAddress !== undefined && - (obj.validatorSrcAddress = message.validatorSrcAddress); - message.validatorDstAddress !== undefined && - (obj.validatorDstAddress = message.validatorDstAddress); - if (message.entries) { - obj.entries = message.entries.map((e) => e ? RedelegationEntry.toJSON(e) : undefined); - } - else { - obj.entries = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseRedelegation }; - message.entries = []; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null) { - message.validatorSrcAddress = object.validatorSrcAddress; - } - else { - message.validatorSrcAddress = ""; - } - if (object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null) { - message.validatorDstAddress = object.validatorDstAddress; - } - else { - message.validatorDstAddress = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntry.fromPartial(e)); - } - } - return message; - }, -}; -const baseParams = { - maxValidators: 0, - maxEntries: 0, - historicalEntries: 0, - bondDenom: "", -}; -export const Params = { - encode(message, writer = Writer.create()) { - if (message.unbondingTime !== undefined) { - Duration.encode(message.unbondingTime, writer.uint32(10).fork()).ldelim(); - } - if (message.maxValidators !== 0) { - writer.uint32(16).uint32(message.maxValidators); - } - if (message.maxEntries !== 0) { - writer.uint32(24).uint32(message.maxEntries); - } - if (message.historicalEntries !== 0) { - writer.uint32(32).uint32(message.historicalEntries); - } - if (message.bondDenom !== "") { - writer.uint32(42).string(message.bondDenom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbondingTime = Duration.decode(reader, reader.uint32()); - break; - case 2: - message.maxValidators = reader.uint32(); - break; - case 3: - message.maxEntries = reader.uint32(); - break; - case 4: - message.historicalEntries = reader.uint32(); - break; - case 5: - message.bondDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - if (object.unbondingTime !== undefined && object.unbondingTime !== null) { - message.unbondingTime = Duration.fromJSON(object.unbondingTime); - } - else { - message.unbondingTime = undefined; - } - if (object.maxValidators !== undefined && object.maxValidators !== null) { - message.maxValidators = Number(object.maxValidators); - } - else { - message.maxValidators = 0; - } - if (object.maxEntries !== undefined && object.maxEntries !== null) { - message.maxEntries = Number(object.maxEntries); - } - else { - message.maxEntries = 0; - } - if (object.historicalEntries !== undefined && - object.historicalEntries !== null) { - message.historicalEntries = Number(object.historicalEntries); - } - else { - message.historicalEntries = 0; - } - if (object.bondDenom !== undefined && object.bondDenom !== null) { - message.bondDenom = String(object.bondDenom); - } - else { - message.bondDenom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.unbondingTime !== undefined && - (obj.unbondingTime = message.unbondingTime - ? Duration.toJSON(message.unbondingTime) - : undefined); - message.maxValidators !== undefined && - (obj.maxValidators = message.maxValidators); - message.maxEntries !== undefined && (obj.maxEntries = message.maxEntries); - message.historicalEntries !== undefined && - (obj.historicalEntries = message.historicalEntries); - message.bondDenom !== undefined && (obj.bondDenom = message.bondDenom); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - if (object.unbondingTime !== undefined && object.unbondingTime !== null) { - message.unbondingTime = Duration.fromPartial(object.unbondingTime); - } - else { - message.unbondingTime = undefined; - } - if (object.maxValidators !== undefined && object.maxValidators !== null) { - message.maxValidators = object.maxValidators; - } - else { - message.maxValidators = 0; - } - if (object.maxEntries !== undefined && object.maxEntries !== null) { - message.maxEntries = object.maxEntries; - } - else { - message.maxEntries = 0; - } - if (object.historicalEntries !== undefined && - object.historicalEntries !== null) { - message.historicalEntries = object.historicalEntries; - } - else { - message.historicalEntries = 0; - } - if (object.bondDenom !== undefined && object.bondDenom !== null) { - message.bondDenom = object.bondDenom; - } - else { - message.bondDenom = ""; - } - return message; - }, -}; -const baseDelegationResponse = {}; -export const DelegationResponse = { - encode(message, writer = Writer.create()) { - if (message.delegation !== undefined) { - Delegation.encode(message.delegation, writer.uint32(10).fork()).ldelim(); - } - if (message.balance !== undefined) { - Coin.encode(message.balance, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegationResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegation = Delegation.decode(reader, reader.uint32()); - break; - case 2: - message.balance = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDelegationResponse }; - if (object.delegation !== undefined && object.delegation !== null) { - message.delegation = Delegation.fromJSON(object.delegation); - } - else { - message.delegation = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromJSON(object.balance); - } - else { - message.balance = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegation !== undefined && - (obj.delegation = message.delegation - ? Delegation.toJSON(message.delegation) - : undefined); - message.balance !== undefined && - (obj.balance = message.balance - ? Coin.toJSON(message.balance) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseDelegationResponse }; - if (object.delegation !== undefined && object.delegation !== null) { - message.delegation = Delegation.fromPartial(object.delegation); - } - else { - message.delegation = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromPartial(object.balance); - } - else { - message.balance = undefined; - } - return message; - }, -}; -const baseRedelegationEntryResponse = { balance: "" }; -export const RedelegationEntryResponse = { - encode(message, writer = Writer.create()) { - if (message.redelegationEntry !== undefined) { - RedelegationEntry.encode(message.redelegationEntry, writer.uint32(10).fork()).ldelim(); - } - if (message.balance !== "") { - writer.uint32(34).string(message.balance); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseRedelegationEntryResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.redelegationEntry = RedelegationEntry.decode(reader, reader.uint32()); - break; - case 4: - message.balance = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseRedelegationEntryResponse, - }; - if (object.redelegationEntry !== undefined && - object.redelegationEntry !== null) { - message.redelegationEntry = RedelegationEntry.fromJSON(object.redelegationEntry); - } - else { - message.redelegationEntry = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = String(object.balance); - } - else { - message.balance = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.redelegationEntry !== undefined && - (obj.redelegationEntry = message.redelegationEntry - ? RedelegationEntry.toJSON(message.redelegationEntry) - : undefined); - message.balance !== undefined && (obj.balance = message.balance); - return obj; - }, - fromPartial(object) { - const message = { - ...baseRedelegationEntryResponse, - }; - if (object.redelegationEntry !== undefined && - object.redelegationEntry !== null) { - message.redelegationEntry = RedelegationEntry.fromPartial(object.redelegationEntry); - } - else { - message.redelegationEntry = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = object.balance; - } - else { - message.balance = ""; - } - return message; - }, -}; -const baseRedelegationResponse = {}; -export const RedelegationResponse = { - encode(message, writer = Writer.create()) { - if (message.redelegation !== undefined) { - Redelegation.encode(message.redelegation, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.entries) { - RedelegationEntryResponse.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRedelegationResponse }; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.redelegation = Redelegation.decode(reader, reader.uint32()); - break; - case 2: - message.entries.push(RedelegationEntryResponse.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRedelegationResponse }; - message.entries = []; - if (object.redelegation !== undefined && object.redelegation !== null) { - message.redelegation = Redelegation.fromJSON(object.redelegation); - } - else { - message.redelegation = undefined; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntryResponse.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.redelegation !== undefined && - (obj.redelegation = message.redelegation - ? Redelegation.toJSON(message.redelegation) - : undefined); - if (message.entries) { - obj.entries = message.entries.map((e) => e ? RedelegationEntryResponse.toJSON(e) : undefined); - } - else { - obj.entries = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseRedelegationResponse }; - message.entries = []; - if (object.redelegation !== undefined && object.redelegation !== null) { - message.redelegation = Redelegation.fromPartial(object.redelegation); - } - else { - message.redelegation = undefined; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntryResponse.fromPartial(e)); - } - } - return message; - }, -}; -const basePool = { notBondedTokens: "", bondedTokens: "" }; -export const Pool = { - encode(message, writer = Writer.create()) { - if (message.notBondedTokens !== "") { - writer.uint32(10).string(message.notBondedTokens); - } - if (message.bondedTokens !== "") { - writer.uint32(18).string(message.bondedTokens); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePool }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.notBondedTokens = reader.string(); - break; - case 2: - message.bondedTokens = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePool }; - if (object.notBondedTokens !== undefined && - object.notBondedTokens !== null) { - message.notBondedTokens = String(object.notBondedTokens); - } - else { - message.notBondedTokens = ""; - } - if (object.bondedTokens !== undefined && object.bondedTokens !== null) { - message.bondedTokens = String(object.bondedTokens); - } - else { - message.bondedTokens = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.notBondedTokens !== undefined && - (obj.notBondedTokens = message.notBondedTokens); - message.bondedTokens !== undefined && - (obj.bondedTokens = message.bondedTokens); - return obj; - }, - fromPartial(object) { - const message = { ...basePool }; - if (object.notBondedTokens !== undefined && - object.notBondedTokens !== null) { - message.notBondedTokens = object.notBondedTokens; - } - else { - message.notBondedTokens = ""; - } - if (object.bondedTokens !== undefined && object.bondedTokens !== null) { - message.bondedTokens = object.bondedTokens; - } - else { - message.bondedTokens = ""; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.ts deleted file mode 100644 index 924ca2299f..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/staking.ts +++ /dev/null @@ -1,2607 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Header } from "../../../tendermint/types/types"; -import { Any } from "../../../google/protobuf/any"; -import { Duration } from "../../../google/protobuf/duration"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.staking.v1beta1"; - -/** BondStatus is the status of a validator. */ -export enum BondStatus { - /** BOND_STATUS_UNSPECIFIED - UNSPECIFIED defines an invalid validator status. */ - BOND_STATUS_UNSPECIFIED = 0, - /** BOND_STATUS_UNBONDED - UNBONDED defines a validator that is not bonded. */ - BOND_STATUS_UNBONDED = 1, - /** BOND_STATUS_UNBONDING - UNBONDING defines a validator that is unbonding. */ - BOND_STATUS_UNBONDING = 2, - /** BOND_STATUS_BONDED - BONDED defines a validator that is bonded. */ - BOND_STATUS_BONDED = 3, - UNRECOGNIZED = -1, -} - -export function bondStatusFromJSON(object: any): BondStatus { - switch (object) { - case 0: - case "BOND_STATUS_UNSPECIFIED": - return BondStatus.BOND_STATUS_UNSPECIFIED; - case 1: - case "BOND_STATUS_UNBONDED": - return BondStatus.BOND_STATUS_UNBONDED; - case 2: - case "BOND_STATUS_UNBONDING": - return BondStatus.BOND_STATUS_UNBONDING; - case 3: - case "BOND_STATUS_BONDED": - return BondStatus.BOND_STATUS_BONDED; - case -1: - case "UNRECOGNIZED": - default: - return BondStatus.UNRECOGNIZED; - } -} - -export function bondStatusToJSON(object: BondStatus): string { - switch (object) { - case BondStatus.BOND_STATUS_UNSPECIFIED: - return "BOND_STATUS_UNSPECIFIED"; - case BondStatus.BOND_STATUS_UNBONDED: - return "BOND_STATUS_UNBONDED"; - case BondStatus.BOND_STATUS_UNBONDING: - return "BOND_STATUS_UNBONDING"; - case BondStatus.BOND_STATUS_BONDED: - return "BOND_STATUS_BONDED"; - default: - return "UNKNOWN"; - } -} - -/** - * 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). - */ -export interface HistoricalInfo { - header: Header | undefined; - valset: Validator[]; -} - -/** - * CommissionRates defines the initial commission rates to be used for creating - * a validator. - */ -export interface CommissionRates { - /** rate is the commission rate charged to delegators, as a fraction. */ - rate: string; - /** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */ - max_rate: string; - /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */ - max_change_rate: string; -} - -/** Commission defines commission parameters for a given validator. */ -export interface Commission { - /** commission_rates defines the initial commission rates to be used for creating a validator. */ - commission_rates: CommissionRates | undefined; - /** update_time is the last time the commission rate was changed. */ - update_time: Date | undefined; -} - -/** Description defines a validator description. */ -export interface Description { - /** moniker defines a human-readable name for the validator. */ - moniker: string; - /** identity defines an optional identity signature (ex. UPort or Keybase). */ - identity: string; - /** website defines an optional website link. */ - website: string; - /** security_contact defines an optional email for security contact. */ - security_contact: string; - /** details define other optional details. */ - details: string; -} - -/** - * 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. - */ -export interface Validator { - /** operator_address defines the address of the validator's operator; bech encoded in JSON. */ - operator_address: string; - /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */ - consensus_pubkey: Any | undefined; - /** jailed defined whether the validator has been jailed from bonded status or not. */ - jailed: boolean; - /** status is the validator status (bonded/unbonding/unbonded). */ - status: BondStatus; - /** tokens define the delegated tokens (incl. self-delegation). */ - tokens: string; - /** delegator_shares defines total shares issued to a validator's delegators. */ - delegator_shares: string; - /** description defines the description terms for the validator. */ - description: Description | undefined; - /** unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. */ - unbonding_height: number; - /** unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. */ - unbonding_time: Date | undefined; - /** commission defines the commission parameters. */ - commission: Commission | undefined; - /** min_self_delegation is the validator's self declared minimum self delegation. */ - min_self_delegation: string; -} - -/** ValAddresses defines a repeated set of validator addresses. */ -export interface ValAddresses { - addresses: string[]; -} - -/** - * DVPair is struct that just has a delegator-validator pair with no other data. - * It is intended to be used as a marshalable pointer. For example, a DVPair can - * be used to construct the key to getting an UnbondingDelegation from state. - */ -export interface DVPair { - delegator_address: string; - validator_address: string; -} - -/** DVPairs defines an array of DVPair objects. */ -export interface DVPairs { - pairs: DVPair[]; -} - -/** - * DVVTriplet is struct that just has a delegator-validator-validator triplet - * with no other data. It is intended to be used as a marshalable pointer. For - * example, a DVVTriplet can be used to construct the key to getting a - * Redelegation from state. - */ -export interface DVVTriplet { - delegator_address: string; - validator_src_address: string; - validator_dst_address: string; -} - -/** DVVTriplets defines an array of DVVTriplet objects. */ -export interface DVVTriplets { - triplets: DVVTriplet[]; -} - -/** - * 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. - */ -export interface Delegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegator_address: string; - /** validator_address is the bech32-encoded address of the validator. */ - validator_address: string; - /** shares define the delegation shares received. */ - shares: string; -} - -/** - * UnbondingDelegation stores all of a single delegator's unbonding bonds - * for a single validator in an time-ordered list. - */ -export interface UnbondingDelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegator_address: string; - /** validator_address is the bech32-encoded address of the validator. */ - validator_address: string; - /** entries are the unbonding delegation entries. */ - entries: UnbondingDelegationEntry[]; -} - -/** UnbondingDelegationEntry defines an unbonding object with relevant metadata. */ -export interface UnbondingDelegationEntry { - /** creation_height is the height which the unbonding took place. */ - creation_height: number; - /** completion_time is the unix time for unbonding completion. */ - completion_time: Date | undefined; - /** initial_balance defines the tokens initially scheduled to receive at completion. */ - initial_balance: string; - /** balance defines the tokens to receive at completion. */ - balance: string; -} - -/** RedelegationEntry defines a redelegation object with relevant metadata. */ -export interface RedelegationEntry { - /** creation_height defines the height which the redelegation took place. */ - creation_height: number; - /** completion_time defines the unix time for redelegation completion. */ - completion_time: Date | undefined; - /** initial_balance defines the initial balance when redelegation started. */ - initial_balance: string; - /** shares_dst is the amount of destination-validator shares created by redelegation. */ - shares_dst: string; -} - -/** - * Redelegation contains the list of a particular delegator's redelegating bonds - * from a particular source validator to a particular destination validator. - */ -export interface Redelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegator_address: string; - /** validator_src_address is the validator redelegation source operator address. */ - validator_src_address: string; - /** validator_dst_address is the validator redelegation destination operator address. */ - validator_dst_address: string; - /** entries are the redelegation entries. */ - entries: RedelegationEntry[]; -} - -/** Params defines the parameters for the staking module. */ -export interface Params { - /** unbonding_time is the time duration of unbonding. */ - unbonding_time: Duration | undefined; - /** max_validators is the maximum number of validators. */ - max_validators: number; - /** max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). */ - max_entries: number; - /** historical_entries is the number of historical entries to persist. */ - historical_entries: number; - /** bond_denom defines the bondable coin denomination. */ - bond_denom: string; -} - -/** - * DelegationResponse is equivalent to Delegation except that it contains a - * balance in addition to shares which is more suitable for client responses. - */ -export interface DelegationResponse { - delegation: Delegation | undefined; - balance: Coin | undefined; -} - -/** - * RedelegationEntryResponse is equivalent to a RedelegationEntry except that it - * contains a balance in addition to shares which is more suitable for client - * responses. - */ -export interface RedelegationEntryResponse { - redelegation_entry: RedelegationEntry | undefined; - balance: string; -} - -/** - * RedelegationResponse is equivalent to a Redelegation except that its entries - * contain a balance in addition to shares which is more suitable for client - * responses. - */ -export interface RedelegationResponse { - redelegation: Redelegation | undefined; - entries: RedelegationEntryResponse[]; -} - -/** - * Pool is used for tracking bonded and not-bonded token supply of the bond - * denomination. - */ -export interface Pool { - not_bonded_tokens: string; - bonded_tokens: string; -} - -const baseHistoricalInfo: object = {}; - -export const HistoricalInfo = { - encode(message: HistoricalInfo, writer: Writer = Writer.create()): Writer { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.valset) { - Validator.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HistoricalInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHistoricalInfo } as HistoricalInfo; - message.valset = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.valset.push(Validator.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HistoricalInfo { - const message = { ...baseHistoricalInfo } as HistoricalInfo; - message.valset = []; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.valset !== undefined && object.valset !== null) { - for (const e of object.valset) { - message.valset.push(Validator.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HistoricalInfo): unknown { - const obj: any = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - if (message.valset) { - obj.valset = message.valset.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.valset = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HistoricalInfo { - const message = { ...baseHistoricalInfo } as HistoricalInfo; - message.valset = []; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.valset !== undefined && object.valset !== null) { - for (const e of object.valset) { - message.valset.push(Validator.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCommissionRates: object = { - rate: "", - max_rate: "", - max_change_rate: "", -}; - -export const CommissionRates = { - encode(message: CommissionRates, writer: Writer = Writer.create()): Writer { - if (message.rate !== "") { - writer.uint32(10).string(message.rate); - } - if (message.max_rate !== "") { - writer.uint32(18).string(message.max_rate); - } - if (message.max_change_rate !== "") { - writer.uint32(26).string(message.max_change_rate); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CommissionRates { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommissionRates } as CommissionRates; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rate = reader.string(); - break; - case 2: - message.max_rate = reader.string(); - break; - case 3: - message.max_change_rate = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CommissionRates { - const message = { ...baseCommissionRates } as CommissionRates; - if (object.rate !== undefined && object.rate !== null) { - message.rate = String(object.rate); - } else { - message.rate = ""; - } - if (object.max_rate !== undefined && object.max_rate !== null) { - message.max_rate = String(object.max_rate); - } else { - message.max_rate = ""; - } - if ( - object.max_change_rate !== undefined && - object.max_change_rate !== null - ) { - message.max_change_rate = String(object.max_change_rate); - } else { - message.max_change_rate = ""; - } - return message; - }, - - toJSON(message: CommissionRates): unknown { - const obj: any = {}; - message.rate !== undefined && (obj.rate = message.rate); - message.max_rate !== undefined && (obj.max_rate = message.max_rate); - message.max_change_rate !== undefined && - (obj.max_change_rate = message.max_change_rate); - return obj; - }, - - fromPartial(object: DeepPartial): CommissionRates { - const message = { ...baseCommissionRates } as CommissionRates; - if (object.rate !== undefined && object.rate !== null) { - message.rate = object.rate; - } else { - message.rate = ""; - } - if (object.max_rate !== undefined && object.max_rate !== null) { - message.max_rate = object.max_rate; - } else { - message.max_rate = ""; - } - if ( - object.max_change_rate !== undefined && - object.max_change_rate !== null - ) { - message.max_change_rate = object.max_change_rate; - } else { - message.max_change_rate = ""; - } - return message; - }, -}; - -const baseCommission: object = {}; - -export const Commission = { - encode(message: Commission, writer: Writer = Writer.create()): Writer { - if (message.commission_rates !== undefined) { - CommissionRates.encode( - message.commission_rates, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.update_time !== undefined) { - Timestamp.encode( - toTimestamp(message.update_time), - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Commission { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommission } as Commission; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commission_rates = CommissionRates.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.update_time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Commission { - const message = { ...baseCommission } as Commission; - if ( - object.commission_rates !== undefined && - object.commission_rates !== null - ) { - message.commission_rates = CommissionRates.fromJSON( - object.commission_rates - ); - } else { - message.commission_rates = undefined; - } - if (object.update_time !== undefined && object.update_time !== null) { - message.update_time = fromJsonTimestamp(object.update_time); - } else { - message.update_time = undefined; - } - return message; - }, - - toJSON(message: Commission): unknown { - const obj: any = {}; - message.commission_rates !== undefined && - (obj.commission_rates = message.commission_rates - ? CommissionRates.toJSON(message.commission_rates) - : undefined); - message.update_time !== undefined && - (obj.update_time = - message.update_time !== undefined - ? message.update_time.toISOString() - : null); - return obj; - }, - - fromPartial(object: DeepPartial): Commission { - const message = { ...baseCommission } as Commission; - if ( - object.commission_rates !== undefined && - object.commission_rates !== null - ) { - message.commission_rates = CommissionRates.fromPartial( - object.commission_rates - ); - } else { - message.commission_rates = undefined; - } - if (object.update_time !== undefined && object.update_time !== null) { - message.update_time = object.update_time; - } else { - message.update_time = undefined; - } - return message; - }, -}; - -const baseDescription: object = { - moniker: "", - identity: "", - website: "", - security_contact: "", - details: "", -}; - -export const Description = { - encode(message: Description, writer: Writer = Writer.create()): Writer { - if (message.moniker !== "") { - writer.uint32(10).string(message.moniker); - } - if (message.identity !== "") { - writer.uint32(18).string(message.identity); - } - if (message.website !== "") { - writer.uint32(26).string(message.website); - } - if (message.security_contact !== "") { - writer.uint32(34).string(message.security_contact); - } - if (message.details !== "") { - writer.uint32(42).string(message.details); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Description { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescription } as Description; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.moniker = reader.string(); - break; - case 2: - message.identity = reader.string(); - break; - case 3: - message.website = reader.string(); - break; - case 4: - message.security_contact = reader.string(); - break; - case 5: - message.details = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Description { - const message = { ...baseDescription } as Description; - if (object.moniker !== undefined && object.moniker !== null) { - message.moniker = String(object.moniker); - } else { - message.moniker = ""; - } - if (object.identity !== undefined && object.identity !== null) { - message.identity = String(object.identity); - } else { - message.identity = ""; - } - if (object.website !== undefined && object.website !== null) { - message.website = String(object.website); - } else { - message.website = ""; - } - if ( - object.security_contact !== undefined && - object.security_contact !== null - ) { - message.security_contact = String(object.security_contact); - } else { - message.security_contact = ""; - } - if (object.details !== undefined && object.details !== null) { - message.details = String(object.details); - } else { - message.details = ""; - } - return message; - }, - - toJSON(message: Description): unknown { - const obj: any = {}; - message.moniker !== undefined && (obj.moniker = message.moniker); - message.identity !== undefined && (obj.identity = message.identity); - message.website !== undefined && (obj.website = message.website); - message.security_contact !== undefined && - (obj.security_contact = message.security_contact); - message.details !== undefined && (obj.details = message.details); - return obj; - }, - - fromPartial(object: DeepPartial): Description { - const message = { ...baseDescription } as Description; - if (object.moniker !== undefined && object.moniker !== null) { - message.moniker = object.moniker; - } else { - message.moniker = ""; - } - if (object.identity !== undefined && object.identity !== null) { - message.identity = object.identity; - } else { - message.identity = ""; - } - if (object.website !== undefined && object.website !== null) { - message.website = object.website; - } else { - message.website = ""; - } - if ( - object.security_contact !== undefined && - object.security_contact !== null - ) { - message.security_contact = object.security_contact; - } else { - message.security_contact = ""; - } - if (object.details !== undefined && object.details !== null) { - message.details = object.details; - } else { - message.details = ""; - } - return message; - }, -}; - -const baseValidator: object = { - operator_address: "", - jailed: false, - status: 0, - tokens: "", - delegator_shares: "", - unbonding_height: 0, - min_self_delegation: "", -}; - -export const Validator = { - encode(message: Validator, writer: Writer = Writer.create()): Writer { - if (message.operator_address !== "") { - writer.uint32(10).string(message.operator_address); - } - if (message.consensus_pubkey !== undefined) { - Any.encode(message.consensus_pubkey, writer.uint32(18).fork()).ldelim(); - } - if (message.jailed === true) { - writer.uint32(24).bool(message.jailed); - } - if (message.status !== 0) { - writer.uint32(32).int32(message.status); - } - if (message.tokens !== "") { - writer.uint32(42).string(message.tokens); - } - if (message.delegator_shares !== "") { - writer.uint32(50).string(message.delegator_shares); - } - if (message.description !== undefined) { - Description.encode( - message.description, - writer.uint32(58).fork() - ).ldelim(); - } - if (message.unbonding_height !== 0) { - writer.uint32(64).int64(message.unbonding_height); - } - if (message.unbonding_time !== undefined) { - Timestamp.encode( - toTimestamp(message.unbonding_time), - writer.uint32(74).fork() - ).ldelim(); - } - if (message.commission !== undefined) { - Commission.encode(message.commission, writer.uint32(82).fork()).ldelim(); - } - if (message.min_self_delegation !== "") { - writer.uint32(90).string(message.min_self_delegation); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Validator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator } as Validator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.operator_address = reader.string(); - break; - case 2: - message.consensus_pubkey = Any.decode(reader, reader.uint32()); - break; - case 3: - message.jailed = reader.bool(); - break; - case 4: - message.status = reader.int32() as any; - break; - case 5: - message.tokens = reader.string(); - break; - case 6: - message.delegator_shares = reader.string(); - break; - case 7: - message.description = Description.decode(reader, reader.uint32()); - break; - case 8: - message.unbonding_height = longToNumber(reader.int64() as Long); - break; - case 9: - message.unbonding_time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 10: - message.commission = Commission.decode(reader, reader.uint32()); - break; - case 11: - message.min_self_delegation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Validator { - const message = { ...baseValidator } as Validator; - if ( - object.operator_address !== undefined && - object.operator_address !== null - ) { - message.operator_address = String(object.operator_address); - } else { - message.operator_address = ""; - } - if ( - object.consensus_pubkey !== undefined && - object.consensus_pubkey !== null - ) { - message.consensus_pubkey = Any.fromJSON(object.consensus_pubkey); - } else { - message.consensus_pubkey = undefined; - } - if (object.jailed !== undefined && object.jailed !== null) { - message.jailed = Boolean(object.jailed); - } else { - message.jailed = false; - } - if (object.status !== undefined && object.status !== null) { - message.status = bondStatusFromJSON(object.status); - } else { - message.status = 0; - } - if (object.tokens !== undefined && object.tokens !== null) { - message.tokens = String(object.tokens); - } else { - message.tokens = ""; - } - if ( - object.delegator_shares !== undefined && - object.delegator_shares !== null - ) { - message.delegator_shares = String(object.delegator_shares); - } else { - message.delegator_shares = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromJSON(object.description); - } else { - message.description = undefined; - } - if ( - object.unbonding_height !== undefined && - object.unbonding_height !== null - ) { - message.unbonding_height = Number(object.unbonding_height); - } else { - message.unbonding_height = 0; - } - if (object.unbonding_time !== undefined && object.unbonding_time !== null) { - message.unbonding_time = fromJsonTimestamp(object.unbonding_time); - } else { - message.unbonding_time = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = Commission.fromJSON(object.commission); - } else { - message.commission = undefined; - } - if ( - object.min_self_delegation !== undefined && - object.min_self_delegation !== null - ) { - message.min_self_delegation = String(object.min_self_delegation); - } else { - message.min_self_delegation = ""; - } - return message; - }, - - toJSON(message: Validator): unknown { - const obj: any = {}; - message.operator_address !== undefined && - (obj.operator_address = message.operator_address); - message.consensus_pubkey !== undefined && - (obj.consensus_pubkey = message.consensus_pubkey - ? Any.toJSON(message.consensus_pubkey) - : undefined); - message.jailed !== undefined && (obj.jailed = message.jailed); - message.status !== undefined && - (obj.status = bondStatusToJSON(message.status)); - message.tokens !== undefined && (obj.tokens = message.tokens); - message.delegator_shares !== undefined && - (obj.delegator_shares = message.delegator_shares); - message.description !== undefined && - (obj.description = message.description - ? Description.toJSON(message.description) - : undefined); - message.unbonding_height !== undefined && - (obj.unbonding_height = message.unbonding_height); - message.unbonding_time !== undefined && - (obj.unbonding_time = - message.unbonding_time !== undefined - ? message.unbonding_time.toISOString() - : null); - message.commission !== undefined && - (obj.commission = message.commission - ? Commission.toJSON(message.commission) - : undefined); - message.min_self_delegation !== undefined && - (obj.min_self_delegation = message.min_self_delegation); - return obj; - }, - - fromPartial(object: DeepPartial): Validator { - const message = { ...baseValidator } as Validator; - if ( - object.operator_address !== undefined && - object.operator_address !== null - ) { - message.operator_address = object.operator_address; - } else { - message.operator_address = ""; - } - if ( - object.consensus_pubkey !== undefined && - object.consensus_pubkey !== null - ) { - message.consensus_pubkey = Any.fromPartial(object.consensus_pubkey); - } else { - message.consensus_pubkey = undefined; - } - if (object.jailed !== undefined && object.jailed !== null) { - message.jailed = object.jailed; - } else { - message.jailed = false; - } - if (object.status !== undefined && object.status !== null) { - message.status = object.status; - } else { - message.status = 0; - } - if (object.tokens !== undefined && object.tokens !== null) { - message.tokens = object.tokens; - } else { - message.tokens = ""; - } - if ( - object.delegator_shares !== undefined && - object.delegator_shares !== null - ) { - message.delegator_shares = object.delegator_shares; - } else { - message.delegator_shares = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromPartial(object.description); - } else { - message.description = undefined; - } - if ( - object.unbonding_height !== undefined && - object.unbonding_height !== null - ) { - message.unbonding_height = object.unbonding_height; - } else { - message.unbonding_height = 0; - } - if (object.unbonding_time !== undefined && object.unbonding_time !== null) { - message.unbonding_time = object.unbonding_time; - } else { - message.unbonding_time = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = Commission.fromPartial(object.commission); - } else { - message.commission = undefined; - } - if ( - object.min_self_delegation !== undefined && - object.min_self_delegation !== null - ) { - message.min_self_delegation = object.min_self_delegation; - } else { - message.min_self_delegation = ""; - } - return message; - }, -}; - -const baseValAddresses: object = { addresses: "" }; - -export const ValAddresses = { - encode(message: ValAddresses, writer: Writer = Writer.create()): Writer { - for (const v of message.addresses) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValAddresses { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValAddresses } as ValAddresses; - message.addresses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.addresses.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValAddresses { - const message = { ...baseValAddresses } as ValAddresses; - message.addresses = []; - if (object.addresses !== undefined && object.addresses !== null) { - for (const e of object.addresses) { - message.addresses.push(String(e)); - } - } - return message; - }, - - toJSON(message: ValAddresses): unknown { - const obj: any = {}; - if (message.addresses) { - obj.addresses = message.addresses.map((e) => e); - } else { - obj.addresses = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ValAddresses { - const message = { ...baseValAddresses } as ValAddresses; - message.addresses = []; - if (object.addresses !== undefined && object.addresses !== null) { - for (const e of object.addresses) { - message.addresses.push(e); - } - } - return message; - }, -}; - -const baseDVPair: object = { delegator_address: "", validator_address: "" }; - -export const DVPair = { - encode(message: DVPair, writer: Writer = Writer.create()): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - if (message.validator_address !== "") { - writer.uint32(18).string(message.validator_address); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DVPair { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVPair } as DVPair; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - case 2: - message.validator_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DVPair { - const message = { ...baseDVPair } as DVPair; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - return message; - }, - - toJSON(message: DVPair): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - return obj; - }, - - fromPartial(object: DeepPartial): DVPair { - const message = { ...baseDVPair } as DVPair; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - return message; - }, -}; - -const baseDVPairs: object = {}; - -export const DVPairs = { - encode(message: DVPairs, writer: Writer = Writer.create()): Writer { - for (const v of message.pairs) { - DVPair.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DVPairs { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVPairs } as DVPairs; - message.pairs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pairs.push(DVPair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DVPairs { - const message = { ...baseDVPairs } as DVPairs; - message.pairs = []; - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(DVPair.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: DVPairs): unknown { - const obj: any = {}; - if (message.pairs) { - obj.pairs = message.pairs.map((e) => (e ? DVPair.toJSON(e) : undefined)); - } else { - obj.pairs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DVPairs { - const message = { ...baseDVPairs } as DVPairs; - message.pairs = []; - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(DVPair.fromPartial(e)); - } - } - return message; - }, -}; - -const baseDVVTriplet: object = { - delegator_address: "", - validator_src_address: "", - validator_dst_address: "", -}; - -export const DVVTriplet = { - encode(message: DVVTriplet, writer: Writer = Writer.create()): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - if (message.validator_src_address !== "") { - writer.uint32(18).string(message.validator_src_address); - } - if (message.validator_dst_address !== "") { - writer.uint32(26).string(message.validator_dst_address); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DVVTriplet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVVTriplet } as DVVTriplet; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - case 2: - message.validator_src_address = reader.string(); - break; - case 3: - message.validator_dst_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DVVTriplet { - const message = { ...baseDVVTriplet } as DVVTriplet; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - if ( - object.validator_src_address !== undefined && - object.validator_src_address !== null - ) { - message.validator_src_address = String(object.validator_src_address); - } else { - message.validator_src_address = ""; - } - if ( - object.validator_dst_address !== undefined && - object.validator_dst_address !== null - ) { - message.validator_dst_address = String(object.validator_dst_address); - } else { - message.validator_dst_address = ""; - } - return message; - }, - - toJSON(message: DVVTriplet): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - message.validator_src_address !== undefined && - (obj.validator_src_address = message.validator_src_address); - message.validator_dst_address !== undefined && - (obj.validator_dst_address = message.validator_dst_address); - return obj; - }, - - fromPartial(object: DeepPartial): DVVTriplet { - const message = { ...baseDVVTriplet } as DVVTriplet; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - if ( - object.validator_src_address !== undefined && - object.validator_src_address !== null - ) { - message.validator_src_address = object.validator_src_address; - } else { - message.validator_src_address = ""; - } - if ( - object.validator_dst_address !== undefined && - object.validator_dst_address !== null - ) { - message.validator_dst_address = object.validator_dst_address; - } else { - message.validator_dst_address = ""; - } - return message; - }, -}; - -const baseDVVTriplets: object = {}; - -export const DVVTriplets = { - encode(message: DVVTriplets, writer: Writer = Writer.create()): Writer { - for (const v of message.triplets) { - DVVTriplet.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DVVTriplets { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDVVTriplets } as DVVTriplets; - message.triplets = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.triplets.push(DVVTriplet.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DVVTriplets { - const message = { ...baseDVVTriplets } as DVVTriplets; - message.triplets = []; - if (object.triplets !== undefined && object.triplets !== null) { - for (const e of object.triplets) { - message.triplets.push(DVVTriplet.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: DVVTriplets): unknown { - const obj: any = {}; - if (message.triplets) { - obj.triplets = message.triplets.map((e) => - e ? DVVTriplet.toJSON(e) : undefined - ); - } else { - obj.triplets = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DVVTriplets { - const message = { ...baseDVVTriplets } as DVVTriplets; - message.triplets = []; - if (object.triplets !== undefined && object.triplets !== null) { - for (const e of object.triplets) { - message.triplets.push(DVVTriplet.fromPartial(e)); - } - } - return message; - }, -}; - -const baseDelegation: object = { - delegator_address: "", - validator_address: "", - shares: "", -}; - -export const Delegation = { - encode(message: Delegation, writer: Writer = Writer.create()): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - if (message.validator_address !== "") { - writer.uint32(18).string(message.validator_address); - } - if (message.shares !== "") { - writer.uint32(26).string(message.shares); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Delegation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegation } as Delegation; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - case 2: - message.validator_address = reader.string(); - break; - case 3: - message.shares = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Delegation { - const message = { ...baseDelegation } as Delegation; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - if (object.shares !== undefined && object.shares !== null) { - message.shares = String(object.shares); - } else { - message.shares = ""; - } - return message; - }, - - toJSON(message: Delegation): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - message.shares !== undefined && (obj.shares = message.shares); - return obj; - }, - - fromPartial(object: DeepPartial): Delegation { - const message = { ...baseDelegation } as Delegation; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - if (object.shares !== undefined && object.shares !== null) { - message.shares = object.shares; - } else { - message.shares = ""; - } - return message; - }, -}; - -const baseUnbondingDelegation: object = { - delegator_address: "", - validator_address: "", -}; - -export const UnbondingDelegation = { - encode( - message: UnbondingDelegation, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - if (message.validator_address !== "") { - writer.uint32(18).string(message.validator_address); - } - for (const v of message.entries) { - UnbondingDelegationEntry.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UnbondingDelegation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUnbondingDelegation } as UnbondingDelegation; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - case 2: - message.validator_address = reader.string(); - break; - case 3: - message.entries.push( - UnbondingDelegationEntry.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UnbondingDelegation { - const message = { ...baseUnbondingDelegation } as UnbondingDelegation; - message.entries = []; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(UnbondingDelegationEntry.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: UnbondingDelegation): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - if (message.entries) { - obj.entries = message.entries.map((e) => - e ? UnbondingDelegationEntry.toJSON(e) : undefined - ); - } else { - obj.entries = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): UnbondingDelegation { - const message = { ...baseUnbondingDelegation } as UnbondingDelegation; - message.entries = []; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(UnbondingDelegationEntry.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUnbondingDelegationEntry: object = { - creation_height: 0, - initial_balance: "", - balance: "", -}; - -export const UnbondingDelegationEntry = { - encode( - message: UnbondingDelegationEntry, - writer: Writer = Writer.create() - ): Writer { - if (message.creation_height !== 0) { - writer.uint32(8).int64(message.creation_height); - } - if (message.completion_time !== undefined) { - Timestamp.encode( - toTimestamp(message.completion_time), - writer.uint32(18).fork() - ).ldelim(); - } - if (message.initial_balance !== "") { - writer.uint32(26).string(message.initial_balance); - } - if (message.balance !== "") { - writer.uint32(34).string(message.balance); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UnbondingDelegationEntry { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUnbondingDelegationEntry, - } as UnbondingDelegationEntry; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creation_height = longToNumber(reader.int64() as Long); - break; - case 2: - message.completion_time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 3: - message.initial_balance = reader.string(); - break; - case 4: - message.balance = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UnbondingDelegationEntry { - const message = { - ...baseUnbondingDelegationEntry, - } as UnbondingDelegationEntry; - if ( - object.creation_height !== undefined && - object.creation_height !== null - ) { - message.creation_height = Number(object.creation_height); - } else { - message.creation_height = 0; - } - if ( - object.completion_time !== undefined && - object.completion_time !== null - ) { - message.completion_time = fromJsonTimestamp(object.completion_time); - } else { - message.completion_time = undefined; - } - if ( - object.initial_balance !== undefined && - object.initial_balance !== null - ) { - message.initial_balance = String(object.initial_balance); - } else { - message.initial_balance = ""; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = String(object.balance); - } else { - message.balance = ""; - } - return message; - }, - - toJSON(message: UnbondingDelegationEntry): unknown { - const obj: any = {}; - message.creation_height !== undefined && - (obj.creation_height = message.creation_height); - message.completion_time !== undefined && - (obj.completion_time = - message.completion_time !== undefined - ? message.completion_time.toISOString() - : null); - message.initial_balance !== undefined && - (obj.initial_balance = message.initial_balance); - message.balance !== undefined && (obj.balance = message.balance); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UnbondingDelegationEntry { - const message = { - ...baseUnbondingDelegationEntry, - } as UnbondingDelegationEntry; - if ( - object.creation_height !== undefined && - object.creation_height !== null - ) { - message.creation_height = object.creation_height; - } else { - message.creation_height = 0; - } - if ( - object.completion_time !== undefined && - object.completion_time !== null - ) { - message.completion_time = object.completion_time; - } else { - message.completion_time = undefined; - } - if ( - object.initial_balance !== undefined && - object.initial_balance !== null - ) { - message.initial_balance = object.initial_balance; - } else { - message.initial_balance = ""; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = object.balance; - } else { - message.balance = ""; - } - return message; - }, -}; - -const baseRedelegationEntry: object = { - creation_height: 0, - initial_balance: "", - shares_dst: "", -}; - -export const RedelegationEntry = { - encode(message: RedelegationEntry, writer: Writer = Writer.create()): Writer { - if (message.creation_height !== 0) { - writer.uint32(8).int64(message.creation_height); - } - if (message.completion_time !== undefined) { - Timestamp.encode( - toTimestamp(message.completion_time), - writer.uint32(18).fork() - ).ldelim(); - } - if (message.initial_balance !== "") { - writer.uint32(26).string(message.initial_balance); - } - if (message.shares_dst !== "") { - writer.uint32(34).string(message.shares_dst); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RedelegationEntry { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRedelegationEntry } as RedelegationEntry; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creation_height = longToNumber(reader.int64() as Long); - break; - case 2: - message.completion_time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 3: - message.initial_balance = reader.string(); - break; - case 4: - message.shares_dst = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RedelegationEntry { - const message = { ...baseRedelegationEntry } as RedelegationEntry; - if ( - object.creation_height !== undefined && - object.creation_height !== null - ) { - message.creation_height = Number(object.creation_height); - } else { - message.creation_height = 0; - } - if ( - object.completion_time !== undefined && - object.completion_time !== null - ) { - message.completion_time = fromJsonTimestamp(object.completion_time); - } else { - message.completion_time = undefined; - } - if ( - object.initial_balance !== undefined && - object.initial_balance !== null - ) { - message.initial_balance = String(object.initial_balance); - } else { - message.initial_balance = ""; - } - if (object.shares_dst !== undefined && object.shares_dst !== null) { - message.shares_dst = String(object.shares_dst); - } else { - message.shares_dst = ""; - } - return message; - }, - - toJSON(message: RedelegationEntry): unknown { - const obj: any = {}; - message.creation_height !== undefined && - (obj.creation_height = message.creation_height); - message.completion_time !== undefined && - (obj.completion_time = - message.completion_time !== undefined - ? message.completion_time.toISOString() - : null); - message.initial_balance !== undefined && - (obj.initial_balance = message.initial_balance); - message.shares_dst !== undefined && (obj.shares_dst = message.shares_dst); - return obj; - }, - - fromPartial(object: DeepPartial): RedelegationEntry { - const message = { ...baseRedelegationEntry } as RedelegationEntry; - if ( - object.creation_height !== undefined && - object.creation_height !== null - ) { - message.creation_height = object.creation_height; - } else { - message.creation_height = 0; - } - if ( - object.completion_time !== undefined && - object.completion_time !== null - ) { - message.completion_time = object.completion_time; - } else { - message.completion_time = undefined; - } - if ( - object.initial_balance !== undefined && - object.initial_balance !== null - ) { - message.initial_balance = object.initial_balance; - } else { - message.initial_balance = ""; - } - if (object.shares_dst !== undefined && object.shares_dst !== null) { - message.shares_dst = object.shares_dst; - } else { - message.shares_dst = ""; - } - return message; - }, -}; - -const baseRedelegation: object = { - delegator_address: "", - validator_src_address: "", - validator_dst_address: "", -}; - -export const Redelegation = { - encode(message: Redelegation, writer: Writer = Writer.create()): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - if (message.validator_src_address !== "") { - writer.uint32(18).string(message.validator_src_address); - } - if (message.validator_dst_address !== "") { - writer.uint32(26).string(message.validator_dst_address); - } - for (const v of message.entries) { - RedelegationEntry.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Redelegation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRedelegation } as Redelegation; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - case 2: - message.validator_src_address = reader.string(); - break; - case 3: - message.validator_dst_address = reader.string(); - break; - case 4: - message.entries.push( - RedelegationEntry.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Redelegation { - const message = { ...baseRedelegation } as Redelegation; - message.entries = []; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - if ( - object.validator_src_address !== undefined && - object.validator_src_address !== null - ) { - message.validator_src_address = String(object.validator_src_address); - } else { - message.validator_src_address = ""; - } - if ( - object.validator_dst_address !== undefined && - object.validator_dst_address !== null - ) { - message.validator_dst_address = String(object.validator_dst_address); - } else { - message.validator_dst_address = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntry.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Redelegation): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - message.validator_src_address !== undefined && - (obj.validator_src_address = message.validator_src_address); - message.validator_dst_address !== undefined && - (obj.validator_dst_address = message.validator_dst_address); - if (message.entries) { - obj.entries = message.entries.map((e) => - e ? RedelegationEntry.toJSON(e) : undefined - ); - } else { - obj.entries = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Redelegation { - const message = { ...baseRedelegation } as Redelegation; - message.entries = []; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - if ( - object.validator_src_address !== undefined && - object.validator_src_address !== null - ) { - message.validator_src_address = object.validator_src_address; - } else { - message.validator_src_address = ""; - } - if ( - object.validator_dst_address !== undefined && - object.validator_dst_address !== null - ) { - message.validator_dst_address = object.validator_dst_address; - } else { - message.validator_dst_address = ""; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntry.fromPartial(e)); - } - } - return message; - }, -}; - -const baseParams: object = { - max_validators: 0, - max_entries: 0, - historical_entries: 0, - bond_denom: "", -}; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.unbonding_time !== undefined) { - Duration.encode( - message.unbonding_time, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.max_validators !== 0) { - writer.uint32(16).uint32(message.max_validators); - } - if (message.max_entries !== 0) { - writer.uint32(24).uint32(message.max_entries); - } - if (message.historical_entries !== 0) { - writer.uint32(32).uint32(message.historical_entries); - } - if (message.bond_denom !== "") { - writer.uint32(42).string(message.bond_denom); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbonding_time = Duration.decode(reader, reader.uint32()); - break; - case 2: - message.max_validators = reader.uint32(); - break; - case 3: - message.max_entries = reader.uint32(); - break; - case 4: - message.historical_entries = reader.uint32(); - break; - case 5: - message.bond_denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if (object.unbonding_time !== undefined && object.unbonding_time !== null) { - message.unbonding_time = Duration.fromJSON(object.unbonding_time); - } else { - message.unbonding_time = undefined; - } - if (object.max_validators !== undefined && object.max_validators !== null) { - message.max_validators = Number(object.max_validators); - } else { - message.max_validators = 0; - } - if (object.max_entries !== undefined && object.max_entries !== null) { - message.max_entries = Number(object.max_entries); - } else { - message.max_entries = 0; - } - if ( - object.historical_entries !== undefined && - object.historical_entries !== null - ) { - message.historical_entries = Number(object.historical_entries); - } else { - message.historical_entries = 0; - } - if (object.bond_denom !== undefined && object.bond_denom !== null) { - message.bond_denom = String(object.bond_denom); - } else { - message.bond_denom = ""; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.unbonding_time !== undefined && - (obj.unbonding_time = message.unbonding_time - ? Duration.toJSON(message.unbonding_time) - : undefined); - message.max_validators !== undefined && - (obj.max_validators = message.max_validators); - message.max_entries !== undefined && - (obj.max_entries = message.max_entries); - message.historical_entries !== undefined && - (obj.historical_entries = message.historical_entries); - message.bond_denom !== undefined && (obj.bond_denom = message.bond_denom); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if (object.unbonding_time !== undefined && object.unbonding_time !== null) { - message.unbonding_time = Duration.fromPartial(object.unbonding_time); - } else { - message.unbonding_time = undefined; - } - if (object.max_validators !== undefined && object.max_validators !== null) { - message.max_validators = object.max_validators; - } else { - message.max_validators = 0; - } - if (object.max_entries !== undefined && object.max_entries !== null) { - message.max_entries = object.max_entries; - } else { - message.max_entries = 0; - } - if ( - object.historical_entries !== undefined && - object.historical_entries !== null - ) { - message.historical_entries = object.historical_entries; - } else { - message.historical_entries = 0; - } - if (object.bond_denom !== undefined && object.bond_denom !== null) { - message.bond_denom = object.bond_denom; - } else { - message.bond_denom = ""; - } - return message; - }, -}; - -const baseDelegationResponse: object = {}; - -export const DelegationResponse = { - encode( - message: DelegationResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.delegation !== undefined) { - Delegation.encode(message.delegation, writer.uint32(10).fork()).ldelim(); - } - if (message.balance !== undefined) { - Coin.encode(message.balance, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DelegationResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelegationResponse } as DelegationResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegation = Delegation.decode(reader, reader.uint32()); - break; - case 2: - message.balance = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DelegationResponse { - const message = { ...baseDelegationResponse } as DelegationResponse; - if (object.delegation !== undefined && object.delegation !== null) { - message.delegation = Delegation.fromJSON(object.delegation); - } else { - message.delegation = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromJSON(object.balance); - } else { - message.balance = undefined; - } - return message; - }, - - toJSON(message: DelegationResponse): unknown { - const obj: any = {}; - message.delegation !== undefined && - (obj.delegation = message.delegation - ? Delegation.toJSON(message.delegation) - : undefined); - message.balance !== undefined && - (obj.balance = message.balance - ? Coin.toJSON(message.balance) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): DelegationResponse { - const message = { ...baseDelegationResponse } as DelegationResponse; - if (object.delegation !== undefined && object.delegation !== null) { - message.delegation = Delegation.fromPartial(object.delegation); - } else { - message.delegation = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = Coin.fromPartial(object.balance); - } else { - message.balance = undefined; - } - return message; - }, -}; - -const baseRedelegationEntryResponse: object = { balance: "" }; - -export const RedelegationEntryResponse = { - encode( - message: RedelegationEntryResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.redelegation_entry !== undefined) { - RedelegationEntry.encode( - message.redelegation_entry, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.balance !== "") { - writer.uint32(34).string(message.balance); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): RedelegationEntryResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseRedelegationEntryResponse, - } as RedelegationEntryResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.redelegation_entry = RedelegationEntry.decode( - reader, - reader.uint32() - ); - break; - case 4: - message.balance = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RedelegationEntryResponse { - const message = { - ...baseRedelegationEntryResponse, - } as RedelegationEntryResponse; - if ( - object.redelegation_entry !== undefined && - object.redelegation_entry !== null - ) { - message.redelegation_entry = RedelegationEntry.fromJSON( - object.redelegation_entry - ); - } else { - message.redelegation_entry = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = String(object.balance); - } else { - message.balance = ""; - } - return message; - }, - - toJSON(message: RedelegationEntryResponse): unknown { - const obj: any = {}; - message.redelegation_entry !== undefined && - (obj.redelegation_entry = message.redelegation_entry - ? RedelegationEntry.toJSON(message.redelegation_entry) - : undefined); - message.balance !== undefined && (obj.balance = message.balance); - return obj; - }, - - fromPartial( - object: DeepPartial - ): RedelegationEntryResponse { - const message = { - ...baseRedelegationEntryResponse, - } as RedelegationEntryResponse; - if ( - object.redelegation_entry !== undefined && - object.redelegation_entry !== null - ) { - message.redelegation_entry = RedelegationEntry.fromPartial( - object.redelegation_entry - ); - } else { - message.redelegation_entry = undefined; - } - if (object.balance !== undefined && object.balance !== null) { - message.balance = object.balance; - } else { - message.balance = ""; - } - return message; - }, -}; - -const baseRedelegationResponse: object = {}; - -export const RedelegationResponse = { - encode( - message: RedelegationResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.redelegation !== undefined) { - Redelegation.encode( - message.redelegation, - writer.uint32(10).fork() - ).ldelim(); - } - for (const v of message.entries) { - RedelegationEntryResponse.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RedelegationResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRedelegationResponse } as RedelegationResponse; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.redelegation = Redelegation.decode(reader, reader.uint32()); - break; - case 2: - message.entries.push( - RedelegationEntryResponse.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RedelegationResponse { - const message = { ...baseRedelegationResponse } as RedelegationResponse; - message.entries = []; - if (object.redelegation !== undefined && object.redelegation !== null) { - message.redelegation = Redelegation.fromJSON(object.redelegation); - } else { - message.redelegation = undefined; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntryResponse.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: RedelegationResponse): unknown { - const obj: any = {}; - message.redelegation !== undefined && - (obj.redelegation = message.redelegation - ? Redelegation.toJSON(message.redelegation) - : undefined); - if (message.entries) { - obj.entries = message.entries.map((e) => - e ? RedelegationEntryResponse.toJSON(e) : undefined - ); - } else { - obj.entries = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): RedelegationResponse { - const message = { ...baseRedelegationResponse } as RedelegationResponse; - message.entries = []; - if (object.redelegation !== undefined && object.redelegation !== null) { - message.redelegation = Redelegation.fromPartial(object.redelegation); - } else { - message.redelegation = undefined; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(RedelegationEntryResponse.fromPartial(e)); - } - } - return message; - }, -}; - -const basePool: object = { not_bonded_tokens: "", bonded_tokens: "" }; - -export const Pool = { - encode(message: Pool, writer: Writer = Writer.create()): Writer { - if (message.not_bonded_tokens !== "") { - writer.uint32(10).string(message.not_bonded_tokens); - } - if (message.bonded_tokens !== "") { - writer.uint32(18).string(message.bonded_tokens); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Pool { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePool } as Pool; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.not_bonded_tokens = reader.string(); - break; - case 2: - message.bonded_tokens = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Pool { - const message = { ...basePool } as Pool; - if ( - object.not_bonded_tokens !== undefined && - object.not_bonded_tokens !== null - ) { - message.not_bonded_tokens = String(object.not_bonded_tokens); - } else { - message.not_bonded_tokens = ""; - } - if (object.bonded_tokens !== undefined && object.bonded_tokens !== null) { - message.bonded_tokens = String(object.bonded_tokens); - } else { - message.bonded_tokens = ""; - } - return message; - }, - - toJSON(message: Pool): unknown { - const obj: any = {}; - message.not_bonded_tokens !== undefined && - (obj.not_bonded_tokens = message.not_bonded_tokens); - message.bonded_tokens !== undefined && - (obj.bonded_tokens = message.bonded_tokens); - return obj; - }, - - fromPartial(object: DeepPartial): Pool { - const message = { ...basePool } as Pool; - if ( - object.not_bonded_tokens !== undefined && - object.not_bonded_tokens !== null - ) { - message.not_bonded_tokens = object.not_bonded_tokens; - } else { - message.not_bonded_tokens = ""; - } - if (object.bonded_tokens !== undefined && object.bonded_tokens !== null) { - message.bonded_tokens = object.bonded_tokens; - } else { - message.bonded_tokens = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.d.ts deleted file mode 100644 index 8eb1d1d4ce..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.d.ts +++ /dev/null @@ -1,182 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Description, CommissionRates } from "../../../cosmos/staking/v1beta1/staking"; -import { Any } from "../../../google/protobuf/any"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.staking.v1beta1"; -/** MsgCreateValidator defines a SDK message for creating a new validator. */ -export interface MsgCreateValidator { - description: Description | undefined; - commission: CommissionRates | undefined; - minSelfDelegation: string; - delegatorAddress: string; - validatorAddress: string; - pubkey: Any | undefined; - value: Coin | undefined; -} -/** MsgCreateValidatorResponse defines the Msg/CreateValidator response type. */ -export interface MsgCreateValidatorResponse { -} -/** MsgEditValidator defines a SDK message for editing an existing validator. */ -export interface MsgEditValidator { - description: Description | undefined; - validatorAddress: string; - /** - * We pass a reference to the new commission rate and min self delegation as - * it's not mandatory to update. If not updated, the deserialized rate will be - * zero with no way to distinguish if an update was intended. - * REF: #2373 - */ - commissionRate: string; - minSelfDelegation: string; -} -/** MsgEditValidatorResponse defines the Msg/EditValidator response type. */ -export interface MsgEditValidatorResponse { -} -/** - * MsgDelegate defines a SDK message for performing a delegation of coins - * from a delegator to a validator. - */ -export interface MsgDelegate { - delegatorAddress: string; - validatorAddress: string; - amount: Coin | undefined; -} -/** MsgDelegateResponse defines the Msg/Delegate response type. */ -export interface MsgDelegateResponse { -} -/** - * MsgBeginRedelegate defines a SDK message for performing a redelegation - * of coins from a delegator and source validator to a destination validator. - */ -export interface MsgBeginRedelegate { - delegatorAddress: string; - validatorSrcAddress: string; - validatorDstAddress: string; - amount: Coin | undefined; -} -/** MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. */ -export interface MsgBeginRedelegateResponse { - completionTime: Date | undefined; -} -/** - * MsgUndelegate defines a SDK message for performing an undelegation from a - * delegate and a validator. - */ -export interface MsgUndelegate { - delegatorAddress: string; - validatorAddress: string; - amount: Coin | undefined; -} -/** MsgUndelegateResponse defines the Msg/Undelegate response type. */ -export interface MsgUndelegateResponse { - completionTime: Date | undefined; -} -export declare const MsgCreateValidator: { - encode(message: MsgCreateValidator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgCreateValidator; - fromJSON(object: any): MsgCreateValidator; - toJSON(message: MsgCreateValidator): unknown; - fromPartial(object: DeepPartial): MsgCreateValidator; -}; -export declare const MsgCreateValidatorResponse: { - encode(_: MsgCreateValidatorResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgCreateValidatorResponse; - fromJSON(_: any): MsgCreateValidatorResponse; - toJSON(_: MsgCreateValidatorResponse): unknown; - fromPartial(_: DeepPartial): MsgCreateValidatorResponse; -}; -export declare const MsgEditValidator: { - encode(message: MsgEditValidator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgEditValidator; - fromJSON(object: any): MsgEditValidator; - toJSON(message: MsgEditValidator): unknown; - fromPartial(object: DeepPartial): MsgEditValidator; -}; -export declare const MsgEditValidatorResponse: { - encode(_: MsgEditValidatorResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgEditValidatorResponse; - fromJSON(_: any): MsgEditValidatorResponse; - toJSON(_: MsgEditValidatorResponse): unknown; - fromPartial(_: DeepPartial): MsgEditValidatorResponse; -}; -export declare const MsgDelegate: { - encode(message: MsgDelegate, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgDelegate; - fromJSON(object: any): MsgDelegate; - toJSON(message: MsgDelegate): unknown; - fromPartial(object: DeepPartial): MsgDelegate; -}; -export declare const MsgDelegateResponse: { - encode(_: MsgDelegateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgDelegateResponse; - fromJSON(_: any): MsgDelegateResponse; - toJSON(_: MsgDelegateResponse): unknown; - fromPartial(_: DeepPartial): MsgDelegateResponse; -}; -export declare const MsgBeginRedelegate: { - encode(message: MsgBeginRedelegate, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgBeginRedelegate; - fromJSON(object: any): MsgBeginRedelegate; - toJSON(message: MsgBeginRedelegate): unknown; - fromPartial(object: DeepPartial): MsgBeginRedelegate; -}; -export declare const MsgBeginRedelegateResponse: { - encode(message: MsgBeginRedelegateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgBeginRedelegateResponse; - fromJSON(object: any): MsgBeginRedelegateResponse; - toJSON(message: MsgBeginRedelegateResponse): unknown; - fromPartial(object: DeepPartial): MsgBeginRedelegateResponse; -}; -export declare const MsgUndelegate: { - encode(message: MsgUndelegate, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgUndelegate; - fromJSON(object: any): MsgUndelegate; - toJSON(message: MsgUndelegate): unknown; - fromPartial(object: DeepPartial): MsgUndelegate; -}; -export declare const MsgUndelegateResponse: { - encode(message: MsgUndelegateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgUndelegateResponse; - fromJSON(object: any): MsgUndelegateResponse; - toJSON(message: MsgUndelegateResponse): unknown; - fromPartial(object: DeepPartial): MsgUndelegateResponse; -}; -/** Msg defines the staking Msg service. */ -export interface Msg { - /** CreateValidator defines a method for creating a new validator. */ - CreateValidator(request: MsgCreateValidator): Promise; - /** EditValidator defines a method for editing an existing validator. */ - EditValidator(request: MsgEditValidator): Promise; - /** - * Delegate defines a method for performing a delegation of coins - * from a delegator to a validator. - */ - Delegate(request: MsgDelegate): Promise; - /** - * BeginRedelegate defines a method for performing a redelegation - * of coins from a delegator and source validator to a destination validator. - */ - BeginRedelegate(request: MsgBeginRedelegate): Promise; - /** - * Undelegate defines a method for performing an undelegation from a - * delegate and a validator. - */ - Undelegate(request: MsgUndelegate): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - CreateValidator(request: MsgCreateValidator): Promise; - EditValidator(request: MsgEditValidator): Promise; - Delegate(request: MsgDelegate): Promise; - BeginRedelegate(request: MsgBeginRedelegate): Promise; - Undelegate(request: MsgUndelegate): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.js deleted file mode 100644 index fe3cb79981..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.js +++ /dev/null @@ -1,907 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Description, CommissionRates, } from "../../../cosmos/staking/v1beta1/staking"; -import { Any } from "../../../google/protobuf/any"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.staking.v1beta1"; -const baseMsgCreateValidator = { - minSelfDelegation: "", - delegatorAddress: "", - validatorAddress: "", -}; -export const MsgCreateValidator = { - encode(message, writer = Writer.create()) { - if (message.description !== undefined) { - Description.encode(message.description, writer.uint32(10).fork()).ldelim(); - } - if (message.commission !== undefined) { - CommissionRates.encode(message.commission, writer.uint32(18).fork()).ldelim(); - } - if (message.minSelfDelegation !== "") { - writer.uint32(26).string(message.minSelfDelegation); - } - if (message.delegatorAddress !== "") { - writer.uint32(34).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(42).string(message.validatorAddress); - } - if (message.pubkey !== undefined) { - Any.encode(message.pubkey, writer.uint32(50).fork()).ldelim(); - } - if (message.value !== undefined) { - Coin.encode(message.value, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgCreateValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = Description.decode(reader, reader.uint32()); - break; - case 2: - message.commission = CommissionRates.decode(reader, reader.uint32()); - break; - case 3: - message.minSelfDelegation = reader.string(); - break; - case 4: - message.delegatorAddress = reader.string(); - break; - case 5: - message.validatorAddress = reader.string(); - break; - case 6: - message.pubkey = Any.decode(reader, reader.uint32()); - break; - case 7: - message.value = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgCreateValidator }; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromJSON(object.description); - } - else { - message.description = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = CommissionRates.fromJSON(object.commission); - } - else { - message.commission = undefined; - } - if (object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null) { - message.minSelfDelegation = String(object.minSelfDelegation); - } - else { - message.minSelfDelegation = ""; - } - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.pubkey !== undefined && object.pubkey !== null) { - message.pubkey = Any.fromJSON(object.pubkey); - } - else { - message.pubkey = undefined; - } - if (object.value !== undefined && object.value !== null) { - message.value = Coin.fromJSON(object.value); - } - else { - message.value = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.description !== undefined && - (obj.description = message.description - ? Description.toJSON(message.description) - : undefined); - message.commission !== undefined && - (obj.commission = message.commission - ? CommissionRates.toJSON(message.commission) - : undefined); - message.minSelfDelegation !== undefined && - (obj.minSelfDelegation = message.minSelfDelegation); - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.pubkey !== undefined && - (obj.pubkey = message.pubkey ? Any.toJSON(message.pubkey) : undefined); - message.value !== undefined && - (obj.value = message.value ? Coin.toJSON(message.value) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgCreateValidator }; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromPartial(object.description); - } - else { - message.description = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = CommissionRates.fromPartial(object.commission); - } - else { - message.commission = undefined; - } - if (object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null) { - message.minSelfDelegation = object.minSelfDelegation; - } - else { - message.minSelfDelegation = ""; - } - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.pubkey !== undefined && object.pubkey !== null) { - message.pubkey = Any.fromPartial(object.pubkey); - } - else { - message.pubkey = undefined; - } - if (object.value !== undefined && object.value !== null) { - message.value = Coin.fromPartial(object.value); - } - else { - message.value = undefined; - } - return message; - }, -}; -const baseMsgCreateValidatorResponse = {}; -export const MsgCreateValidatorResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreateValidatorResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgCreateValidatorResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgCreateValidatorResponse, - }; - return message; - }, -}; -const baseMsgEditValidator = { - validatorAddress: "", - commissionRate: "", - minSelfDelegation: "", -}; -export const MsgEditValidator = { - encode(message, writer = Writer.create()) { - if (message.description !== undefined) { - Description.encode(message.description, writer.uint32(10).fork()).ldelim(); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.commissionRate !== "") { - writer.uint32(26).string(message.commissionRate); - } - if (message.minSelfDelegation !== "") { - writer.uint32(34).string(message.minSelfDelegation); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgEditValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = Description.decode(reader, reader.uint32()); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.commissionRate = reader.string(); - break; - case 4: - message.minSelfDelegation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgEditValidator }; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromJSON(object.description); - } - else { - message.description = undefined; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.commissionRate !== undefined && object.commissionRate !== null) { - message.commissionRate = String(object.commissionRate); - } - else { - message.commissionRate = ""; - } - if (object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null) { - message.minSelfDelegation = String(object.minSelfDelegation); - } - else { - message.minSelfDelegation = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.description !== undefined && - (obj.description = message.description - ? Description.toJSON(message.description) - : undefined); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.commissionRate !== undefined && - (obj.commissionRate = message.commissionRate); - message.minSelfDelegation !== undefined && - (obj.minSelfDelegation = message.minSelfDelegation); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgEditValidator }; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromPartial(object.description); - } - else { - message.description = undefined; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.commissionRate !== undefined && object.commissionRate !== null) { - message.commissionRate = object.commissionRate; - } - else { - message.commissionRate = ""; - } - if (object.minSelfDelegation !== undefined && - object.minSelfDelegation !== null) { - message.minSelfDelegation = object.minSelfDelegation; - } - else { - message.minSelfDelegation = ""; - } - return message; - }, -}; -const baseMsgEditValidatorResponse = {}; -export const MsgEditValidatorResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgEditValidatorResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgEditValidatorResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgEditValidatorResponse, - }; - return message; - }, -}; -const baseMsgDelegate = { delegatorAddress: "", validatorAddress: "" }; -export const MsgDelegate = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDelegate }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgDelegate }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgDelegate }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, -}; -const baseMsgDelegateResponse = {}; -export const MsgDelegateResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDelegateResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgDelegateResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgDelegateResponse }; - return message; - }, -}; -const baseMsgBeginRedelegate = { - delegatorAddress: "", - validatorSrcAddress: "", - validatorDstAddress: "", -}; -export const MsgBeginRedelegate = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorSrcAddress !== "") { - writer.uint32(18).string(message.validatorSrcAddress); - } - if (message.validatorDstAddress !== "") { - writer.uint32(26).string(message.validatorDstAddress); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgBeginRedelegate }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorSrcAddress = reader.string(); - break; - case 3: - message.validatorDstAddress = reader.string(); - break; - case 4: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgBeginRedelegate }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null) { - message.validatorSrcAddress = String(object.validatorSrcAddress); - } - else { - message.validatorSrcAddress = ""; - } - if (object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null) { - message.validatorDstAddress = String(object.validatorDstAddress); - } - else { - message.validatorDstAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorSrcAddress !== undefined && - (obj.validatorSrcAddress = message.validatorSrcAddress); - message.validatorDstAddress !== undefined && - (obj.validatorDstAddress = message.validatorDstAddress); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgBeginRedelegate }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorSrcAddress !== undefined && - object.validatorSrcAddress !== null) { - message.validatorSrcAddress = object.validatorSrcAddress; - } - else { - message.validatorSrcAddress = ""; - } - if (object.validatorDstAddress !== undefined && - object.validatorDstAddress !== null) { - message.validatorDstAddress = object.validatorDstAddress; - } - else { - message.validatorDstAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, -}; -const baseMsgBeginRedelegateResponse = {}; -export const MsgBeginRedelegateResponse = { - encode(message, writer = Writer.create()) { - if (message.completionTime !== undefined) { - Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgBeginRedelegateResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgBeginRedelegateResponse, - }; - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = fromJsonTimestamp(object.completionTime); - } - else { - message.completionTime = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.completionTime !== undefined && - (obj.completionTime = - message.completionTime !== undefined - ? message.completionTime.toISOString() - : null); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgBeginRedelegateResponse, - }; - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = object.completionTime; - } - else { - message.completionTime = undefined; - } - return message; - }, -}; -const baseMsgUndelegate = { - delegatorAddress: "", - validatorAddress: "", -}; -export const MsgUndelegate = { - encode(message, writer = Writer.create()) { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUndelegate }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgUndelegate }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = String(object.delegatorAddress); - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.delegatorAddress !== undefined && - (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgUndelegate }; - if (object.delegatorAddress !== undefined && - object.delegatorAddress !== null) { - message.delegatorAddress = object.delegatorAddress; - } - else { - message.delegatorAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, -}; -const baseMsgUndelegateResponse = {}; -export const MsgUndelegateResponse = { - encode(message, writer = Writer.create()) { - if (message.completionTime !== undefined) { - Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUndelegateResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgUndelegateResponse }; - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = fromJsonTimestamp(object.completionTime); - } - else { - message.completionTime = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.completionTime !== undefined && - (obj.completionTime = - message.completionTime !== undefined - ? message.completionTime.toISOString() - : null); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgUndelegateResponse }; - if (object.completionTime !== undefined && object.completionTime !== null) { - message.completionTime = object.completionTime; - } - else { - message.completionTime = undefined; - } - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - CreateValidator(request) { - const data = MsgCreateValidator.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "CreateValidator", data); - return promise.then((data) => MsgCreateValidatorResponse.decode(new Reader(data))); - } - EditValidator(request) { - const data = MsgEditValidator.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "EditValidator", data); - return promise.then((data) => MsgEditValidatorResponse.decode(new Reader(data))); - } - Delegate(request) { - const data = MsgDelegate.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "Delegate", data); - return promise.then((data) => MsgDelegateResponse.decode(new Reader(data))); - } - BeginRedelegate(request) { - const data = MsgBeginRedelegate.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "BeginRedelegate", data); - return promise.then((data) => MsgBeginRedelegateResponse.decode(new Reader(data))); - } - Undelegate(request) { - const data = MsgUndelegate.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "Undelegate", data); - return promise.then((data) => MsgUndelegateResponse.decode(new Reader(data))); - } -} -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.ts deleted file mode 100644 index 3807dbc0e1..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos/staking/v1beta1/tx.ts +++ /dev/null @@ -1,1208 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { - Description, - CommissionRates, -} from "../../../cosmos/staking/v1beta1/staking"; -import { Any } from "../../../google/protobuf/any"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.staking.v1beta1"; - -/** MsgCreateValidator defines a SDK message for creating a new validator. */ -export interface MsgCreateValidator { - description: Description | undefined; - commission: CommissionRates | undefined; - min_self_delegation: string; - delegator_address: string; - validator_address: string; - pubkey: Any | undefined; - value: Coin | undefined; -} - -/** MsgCreateValidatorResponse defines the Msg/CreateValidator response type. */ -export interface MsgCreateValidatorResponse {} - -/** MsgEditValidator defines a SDK message for editing an existing validator. */ -export interface MsgEditValidator { - description: Description | undefined; - validator_address: string; - /** - * We pass a reference to the new commission rate and min self delegation as - * it's not mandatory to update. If not updated, the deserialized rate will be - * zero with no way to distinguish if an update was intended. - * REF: #2373 - */ - commission_rate: string; - min_self_delegation: string; -} - -/** MsgEditValidatorResponse defines the Msg/EditValidator response type. */ -export interface MsgEditValidatorResponse {} - -/** - * MsgDelegate defines a SDK message for performing a delegation of coins - * from a delegator to a validator. - */ -export interface MsgDelegate { - delegator_address: string; - validator_address: string; - amount: Coin | undefined; -} - -/** MsgDelegateResponse defines the Msg/Delegate response type. */ -export interface MsgDelegateResponse {} - -/** - * MsgBeginRedelegate defines a SDK message for performing a redelegation - * of coins from a delegator and source validator to a destination validator. - */ -export interface MsgBeginRedelegate { - delegator_address: string; - validator_src_address: string; - validator_dst_address: string; - amount: Coin | undefined; -} - -/** MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. */ -export interface MsgBeginRedelegateResponse { - completion_time: Date | undefined; -} - -/** - * MsgUndelegate defines a SDK message for performing an undelegation from a - * delegate and a validator. - */ -export interface MsgUndelegate { - delegator_address: string; - validator_address: string; - amount: Coin | undefined; -} - -/** MsgUndelegateResponse defines the Msg/Undelegate response type. */ -export interface MsgUndelegateResponse { - completion_time: Date | undefined; -} - -const baseMsgCreateValidator: object = { - min_self_delegation: "", - delegator_address: "", - validator_address: "", -}; - -export const MsgCreateValidator = { - encode( - message: MsgCreateValidator, - writer: Writer = Writer.create() - ): Writer { - if (message.description !== undefined) { - Description.encode( - message.description, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.commission !== undefined) { - CommissionRates.encode( - message.commission, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.min_self_delegation !== "") { - writer.uint32(26).string(message.min_self_delegation); - } - if (message.delegator_address !== "") { - writer.uint32(34).string(message.delegator_address); - } - if (message.validator_address !== "") { - writer.uint32(42).string(message.validator_address); - } - if (message.pubkey !== undefined) { - Any.encode(message.pubkey, writer.uint32(50).fork()).ldelim(); - } - if (message.value !== undefined) { - Coin.encode(message.value, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgCreateValidator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgCreateValidator } as MsgCreateValidator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = Description.decode(reader, reader.uint32()); - break; - case 2: - message.commission = CommissionRates.decode(reader, reader.uint32()); - break; - case 3: - message.min_self_delegation = reader.string(); - break; - case 4: - message.delegator_address = reader.string(); - break; - case 5: - message.validator_address = reader.string(); - break; - case 6: - message.pubkey = Any.decode(reader, reader.uint32()); - break; - case 7: - message.value = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgCreateValidator { - const message = { ...baseMsgCreateValidator } as MsgCreateValidator; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromJSON(object.description); - } else { - message.description = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = CommissionRates.fromJSON(object.commission); - } else { - message.commission = undefined; - } - if ( - object.min_self_delegation !== undefined && - object.min_self_delegation !== null - ) { - message.min_self_delegation = String(object.min_self_delegation); - } else { - message.min_self_delegation = ""; - } - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - if (object.pubkey !== undefined && object.pubkey !== null) { - message.pubkey = Any.fromJSON(object.pubkey); - } else { - message.pubkey = undefined; - } - if (object.value !== undefined && object.value !== null) { - message.value = Coin.fromJSON(object.value); - } else { - message.value = undefined; - } - return message; - }, - - toJSON(message: MsgCreateValidator): unknown { - const obj: any = {}; - message.description !== undefined && - (obj.description = message.description - ? Description.toJSON(message.description) - : undefined); - message.commission !== undefined && - (obj.commission = message.commission - ? CommissionRates.toJSON(message.commission) - : undefined); - message.min_self_delegation !== undefined && - (obj.min_self_delegation = message.min_self_delegation); - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - message.pubkey !== undefined && - (obj.pubkey = message.pubkey ? Any.toJSON(message.pubkey) : undefined); - message.value !== undefined && - (obj.value = message.value ? Coin.toJSON(message.value) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgCreateValidator { - const message = { ...baseMsgCreateValidator } as MsgCreateValidator; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromPartial(object.description); - } else { - message.description = undefined; - } - if (object.commission !== undefined && object.commission !== null) { - message.commission = CommissionRates.fromPartial(object.commission); - } else { - message.commission = undefined; - } - if ( - object.min_self_delegation !== undefined && - object.min_self_delegation !== null - ) { - message.min_self_delegation = object.min_self_delegation; - } else { - message.min_self_delegation = ""; - } - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - if (object.pubkey !== undefined && object.pubkey !== null) { - message.pubkey = Any.fromPartial(object.pubkey); - } else { - message.pubkey = undefined; - } - if (object.value !== undefined && object.value !== null) { - message.value = Coin.fromPartial(object.value); - } else { - message.value = undefined; - } - return message; - }, -}; - -const baseMsgCreateValidatorResponse: object = {}; - -export const MsgCreateValidatorResponse = { - encode( - _: MsgCreateValidatorResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgCreateValidatorResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreateValidatorResponse, - } as MsgCreateValidatorResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgCreateValidatorResponse { - const message = { - ...baseMsgCreateValidatorResponse, - } as MsgCreateValidatorResponse; - return message; - }, - - toJSON(_: MsgCreateValidatorResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgCreateValidatorResponse { - const message = { - ...baseMsgCreateValidatorResponse, - } as MsgCreateValidatorResponse; - return message; - }, -}; - -const baseMsgEditValidator: object = { - validator_address: "", - commission_rate: "", - min_self_delegation: "", -}; - -export const MsgEditValidator = { - encode(message: MsgEditValidator, writer: Writer = Writer.create()): Writer { - if (message.description !== undefined) { - Description.encode( - message.description, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.validator_address !== "") { - writer.uint32(18).string(message.validator_address); - } - if (message.commission_rate !== "") { - writer.uint32(26).string(message.commission_rate); - } - if (message.min_self_delegation !== "") { - writer.uint32(34).string(message.min_self_delegation); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgEditValidator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgEditValidator } as MsgEditValidator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = Description.decode(reader, reader.uint32()); - break; - case 2: - message.validator_address = reader.string(); - break; - case 3: - message.commission_rate = reader.string(); - break; - case 4: - message.min_self_delegation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgEditValidator { - const message = { ...baseMsgEditValidator } as MsgEditValidator; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromJSON(object.description); - } else { - message.description = undefined; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - if ( - object.commission_rate !== undefined && - object.commission_rate !== null - ) { - message.commission_rate = String(object.commission_rate); - } else { - message.commission_rate = ""; - } - if ( - object.min_self_delegation !== undefined && - object.min_self_delegation !== null - ) { - message.min_self_delegation = String(object.min_self_delegation); - } else { - message.min_self_delegation = ""; - } - return message; - }, - - toJSON(message: MsgEditValidator): unknown { - const obj: any = {}; - message.description !== undefined && - (obj.description = message.description - ? Description.toJSON(message.description) - : undefined); - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - message.commission_rate !== undefined && - (obj.commission_rate = message.commission_rate); - message.min_self_delegation !== undefined && - (obj.min_self_delegation = message.min_self_delegation); - return obj; - }, - - fromPartial(object: DeepPartial): MsgEditValidator { - const message = { ...baseMsgEditValidator } as MsgEditValidator; - if (object.description !== undefined && object.description !== null) { - message.description = Description.fromPartial(object.description); - } else { - message.description = undefined; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - if ( - object.commission_rate !== undefined && - object.commission_rate !== null - ) { - message.commission_rate = object.commission_rate; - } else { - message.commission_rate = ""; - } - if ( - object.min_self_delegation !== undefined && - object.min_self_delegation !== null - ) { - message.min_self_delegation = object.min_self_delegation; - } else { - message.min_self_delegation = ""; - } - return message; - }, -}; - -const baseMsgEditValidatorResponse: object = {}; - -export const MsgEditValidatorResponse = { - encode( - _: MsgEditValidatorResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgEditValidatorResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgEditValidatorResponse, - } as MsgEditValidatorResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgEditValidatorResponse { - const message = { - ...baseMsgEditValidatorResponse, - } as MsgEditValidatorResponse; - return message; - }, - - toJSON(_: MsgEditValidatorResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgEditValidatorResponse { - const message = { - ...baseMsgEditValidatorResponse, - } as MsgEditValidatorResponse; - return message; - }, -}; - -const baseMsgDelegate: object = { - delegator_address: "", - validator_address: "", -}; - -export const MsgDelegate = { - encode(message: MsgDelegate, writer: Writer = Writer.create()): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - if (message.validator_address !== "") { - writer.uint32(18).string(message.validator_address); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgDelegate { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDelegate } as MsgDelegate; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - case 2: - message.validator_address = reader.string(); - break; - case 3: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgDelegate { - const message = { ...baseMsgDelegate } as MsgDelegate; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } else { - message.amount = undefined; - } - return message; - }, - - toJSON(message: MsgDelegate): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgDelegate { - const message = { ...baseMsgDelegate } as MsgDelegate; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } else { - message.amount = undefined; - } - return message; - }, -}; - -const baseMsgDelegateResponse: object = {}; - -export const MsgDelegateResponse = { - encode(_: MsgDelegateResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgDelegateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDelegateResponse } as MsgDelegateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgDelegateResponse { - const message = { ...baseMsgDelegateResponse } as MsgDelegateResponse; - return message; - }, - - toJSON(_: MsgDelegateResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgDelegateResponse { - const message = { ...baseMsgDelegateResponse } as MsgDelegateResponse; - return message; - }, -}; - -const baseMsgBeginRedelegate: object = { - delegator_address: "", - validator_src_address: "", - validator_dst_address: "", -}; - -export const MsgBeginRedelegate = { - encode( - message: MsgBeginRedelegate, - writer: Writer = Writer.create() - ): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - if (message.validator_src_address !== "") { - writer.uint32(18).string(message.validator_src_address); - } - if (message.validator_dst_address !== "") { - writer.uint32(26).string(message.validator_dst_address); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgBeginRedelegate { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgBeginRedelegate } as MsgBeginRedelegate; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - case 2: - message.validator_src_address = reader.string(); - break; - case 3: - message.validator_dst_address = reader.string(); - break; - case 4: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgBeginRedelegate { - const message = { ...baseMsgBeginRedelegate } as MsgBeginRedelegate; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - if ( - object.validator_src_address !== undefined && - object.validator_src_address !== null - ) { - message.validator_src_address = String(object.validator_src_address); - } else { - message.validator_src_address = ""; - } - if ( - object.validator_dst_address !== undefined && - object.validator_dst_address !== null - ) { - message.validator_dst_address = String(object.validator_dst_address); - } else { - message.validator_dst_address = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } else { - message.amount = undefined; - } - return message; - }, - - toJSON(message: MsgBeginRedelegate): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - message.validator_src_address !== undefined && - (obj.validator_src_address = message.validator_src_address); - message.validator_dst_address !== undefined && - (obj.validator_dst_address = message.validator_dst_address); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgBeginRedelegate { - const message = { ...baseMsgBeginRedelegate } as MsgBeginRedelegate; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - if ( - object.validator_src_address !== undefined && - object.validator_src_address !== null - ) { - message.validator_src_address = object.validator_src_address; - } else { - message.validator_src_address = ""; - } - if ( - object.validator_dst_address !== undefined && - object.validator_dst_address !== null - ) { - message.validator_dst_address = object.validator_dst_address; - } else { - message.validator_dst_address = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } else { - message.amount = undefined; - } - return message; - }, -}; - -const baseMsgBeginRedelegateResponse: object = {}; - -export const MsgBeginRedelegateResponse = { - encode( - message: MsgBeginRedelegateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.completion_time !== undefined) { - Timestamp.encode( - toTimestamp(message.completion_time), - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgBeginRedelegateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgBeginRedelegateResponse, - } as MsgBeginRedelegateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.completion_time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgBeginRedelegateResponse { - const message = { - ...baseMsgBeginRedelegateResponse, - } as MsgBeginRedelegateResponse; - if ( - object.completion_time !== undefined && - object.completion_time !== null - ) { - message.completion_time = fromJsonTimestamp(object.completion_time); - } else { - message.completion_time = undefined; - } - return message; - }, - - toJSON(message: MsgBeginRedelegateResponse): unknown { - const obj: any = {}; - message.completion_time !== undefined && - (obj.completion_time = - message.completion_time !== undefined - ? message.completion_time.toISOString() - : null); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgBeginRedelegateResponse { - const message = { - ...baseMsgBeginRedelegateResponse, - } as MsgBeginRedelegateResponse; - if ( - object.completion_time !== undefined && - object.completion_time !== null - ) { - message.completion_time = object.completion_time; - } else { - message.completion_time = undefined; - } - return message; - }, -}; - -const baseMsgUndelegate: object = { - delegator_address: "", - validator_address: "", -}; - -export const MsgUndelegate = { - encode(message: MsgUndelegate, writer: Writer = Writer.create()): Writer { - if (message.delegator_address !== "") { - writer.uint32(10).string(message.delegator_address); - } - if (message.validator_address !== "") { - writer.uint32(18).string(message.validator_address); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUndelegate { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUndelegate } as MsgUndelegate; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegator_address = reader.string(); - break; - case 2: - message.validator_address = reader.string(); - break; - case 3: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgUndelegate { - const message = { ...baseMsgUndelegate } as MsgUndelegate; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = String(object.delegator_address); - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } else { - message.amount = undefined; - } - return message; - }, - - toJSON(message: MsgUndelegate): unknown { - const obj: any = {}; - message.delegator_address !== undefined && - (obj.delegator_address = message.delegator_address); - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgUndelegate { - const message = { ...baseMsgUndelegate } as MsgUndelegate; - if ( - object.delegator_address !== undefined && - object.delegator_address !== null - ) { - message.delegator_address = object.delegator_address; - } else { - message.delegator_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } else { - message.amount = undefined; - } - return message; - }, -}; - -const baseMsgUndelegateResponse: object = {}; - -export const MsgUndelegateResponse = { - encode( - message: MsgUndelegateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.completion_time !== undefined) { - Timestamp.encode( - toTimestamp(message.completion_time), - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUndelegateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUndelegateResponse } as MsgUndelegateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.completion_time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgUndelegateResponse { - const message = { ...baseMsgUndelegateResponse } as MsgUndelegateResponse; - if ( - object.completion_time !== undefined && - object.completion_time !== null - ) { - message.completion_time = fromJsonTimestamp(object.completion_time); - } else { - message.completion_time = undefined; - } - return message; - }, - - toJSON(message: MsgUndelegateResponse): unknown { - const obj: any = {}; - message.completion_time !== undefined && - (obj.completion_time = - message.completion_time !== undefined - ? message.completion_time.toISOString() - : null); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgUndelegateResponse { - const message = { ...baseMsgUndelegateResponse } as MsgUndelegateResponse; - if ( - object.completion_time !== undefined && - object.completion_time !== null - ) { - message.completion_time = object.completion_time; - } else { - message.completion_time = undefined; - } - return message; - }, -}; - -/** Msg defines the staking Msg service. */ -export interface Msg { - /** CreateValidator defines a method for creating a new validator. */ - CreateValidator( - request: MsgCreateValidator - ): Promise; - /** EditValidator defines a method for editing an existing validator. */ - EditValidator(request: MsgEditValidator): Promise; - /** - * Delegate defines a method for performing a delegation of coins - * from a delegator to a validator. - */ - Delegate(request: MsgDelegate): Promise; - /** - * BeginRedelegate defines a method for performing a redelegation - * of coins from a delegator and source validator to a destination validator. - */ - BeginRedelegate( - request: MsgBeginRedelegate - ): Promise; - /** - * Undelegate defines a method for performing an undelegation from a - * delegate and a validator. - */ - Undelegate(request: MsgUndelegate): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - CreateValidator( - request: MsgCreateValidator - ): Promise { - const data = MsgCreateValidator.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Msg", - "CreateValidator", - data - ); - return promise.then((data) => - MsgCreateValidatorResponse.decode(new Reader(data)) - ); - } - - EditValidator(request: MsgEditValidator): Promise { - const data = MsgEditValidator.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Msg", - "EditValidator", - data - ); - return promise.then((data) => - MsgEditValidatorResponse.decode(new Reader(data)) - ); - } - - Delegate(request: MsgDelegate): Promise { - const data = MsgDelegate.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Msg", - "Delegate", - data - ); - return promise.then((data) => MsgDelegateResponse.decode(new Reader(data))); - } - - BeginRedelegate( - request: MsgBeginRedelegate - ): Promise { - const data = MsgBeginRedelegate.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Msg", - "BeginRedelegate", - data - ); - return promise.then((data) => - MsgBeginRedelegateResponse.decode(new Reader(data)) - ); - } - - Undelegate(request: MsgUndelegate): Promise { - const data = MsgUndelegate.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.staking.v1beta1.Msg", - "Undelegate", - data - ); - return promise.then((data) => - MsgUndelegateResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.d.ts deleted file mode 100644 index ac37814871..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.js deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30bdc6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0776..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.js deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7fb6d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b699..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index bb088caa2a..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809039..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.ts deleted file mode 100644 index 233eae465d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - type_url: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { type_url: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.type_url !== "") { - writer.uint32(10).string(message.type_url); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = String(object.type_url); - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.type_url !== undefined && (obj.type_url = message.type_url); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = object.type_url; - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index a3076569af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,1022 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 252725808b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4144 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } - else { - message.proto3Optional = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } - else { - message.proto3Optional = false; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.d.ts deleted file mode 100644 index 3493f63277..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (duration.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} -export declare const Duration: { - encode(message: Duration, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Duration; - fromJSON(object: any): Duration; - toJSON(message: Duration): unknown; - fromPartial(object: DeepPartial): Duration; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.js deleted file mode 100644 index ea556facef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseDuration = { seconds: 0, nanos: 0 }; -export const Duration = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseDuration }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.ts deleted file mode 100644 index fffd5b14ef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/duration.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (duration.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} - -const baseDuration: object = { seconds: 0, nanos: 0 }; - -export const Duration = { - encode(message: Duration, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Duration { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration } as Duration; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Duration): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.d.ts deleted file mode 100644 index 0c9db0bc0d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} -export declare const Timestamp: { - encode(message: Timestamp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Timestamp; - fromJSON(object: any): Timestamp; - toJSON(message: Timestamp): unknown; - fromPartial(object: DeepPartial): Timestamp; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.js deleted file mode 100644 index 37b4119aef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseTimestamp = { seconds: 0, nanos: 0 }; -export const Timestamp = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 11864afc86..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.d.ts deleted file mode 100644 index 8fa5bdcbe4..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "tendermint.crypto"; -/** PublicKey defines the keys available for use with Tendermint Validators */ -export interface PublicKey { - ed25519: Uint8Array | undefined; - secp256k1: Uint8Array | undefined; -} -export declare const PublicKey: { - encode(message: PublicKey, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PublicKey; - fromJSON(object: any): PublicKey; - toJSON(message: PublicKey): unknown; - fromPartial(object: DeepPartial): PublicKey; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.js deleted file mode 100644 index bbd03cb8ad..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.js +++ /dev/null @@ -1,105 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "tendermint.crypto"; -const basePublicKey = {}; -export const PublicKey = { - encode(message, writer = Writer.create()) { - if (message.ed25519 !== undefined) { - writer.uint32(10).bytes(message.ed25519); - } - if (message.secp256k1 !== undefined) { - writer.uint32(18).bytes(message.secp256k1); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePublicKey }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ed25519 = reader.bytes(); - break; - case 2: - message.secp256k1 = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePublicKey }; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = bytesFromBase64(object.ed25519); - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = bytesFromBase64(object.secp256k1); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ed25519 !== undefined && - (obj.ed25519 = - message.ed25519 !== undefined - ? base64FromBytes(message.ed25519) - : undefined); - message.secp256k1 !== undefined && - (obj.secp256k1 = - message.secp256k1 !== undefined - ? base64FromBytes(message.secp256k1) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...basePublicKey }; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = object.ed25519; - } - else { - message.ed25519 = undefined; - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = object.secp256k1; - } - else { - message.secp256k1 = undefined; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.ts deleted file mode 100644 index 450db2a15d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.crypto"; - -/** PublicKey defines the keys available for use with Tendermint Validators */ -export interface PublicKey { - ed25519: Uint8Array | undefined; - secp256k1: Uint8Array | undefined; -} - -const basePublicKey: object = {}; - -export const PublicKey = { - encode(message: PublicKey, writer: Writer = Writer.create()): Writer { - if (message.ed25519 !== undefined) { - writer.uint32(10).bytes(message.ed25519); - } - if (message.secp256k1 !== undefined) { - writer.uint32(18).bytes(message.secp256k1); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PublicKey { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePublicKey } as PublicKey; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ed25519 = reader.bytes(); - break; - case 2: - message.secp256k1 = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PublicKey { - const message = { ...basePublicKey } as PublicKey; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = bytesFromBase64(object.ed25519); - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = bytesFromBase64(object.secp256k1); - } - return message; - }, - - toJSON(message: PublicKey): unknown { - const obj: any = {}; - message.ed25519 !== undefined && - (obj.ed25519 = - message.ed25519 !== undefined - ? base64FromBytes(message.ed25519) - : undefined); - message.secp256k1 !== undefined && - (obj.secp256k1 = - message.secp256k1 !== undefined - ? base64FromBytes(message.secp256k1) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): PublicKey { - const message = { ...basePublicKey } as PublicKey; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = object.ed25519; - } else { - message.ed25519 = undefined; - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = object.secp256k1; - } else { - message.secp256k1 = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.d.ts deleted file mode 100644 index fd48f83e7d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "tendermint.crypto"; -export interface Proof { - total: number; - index: number; - leafHash: Uint8Array; - aunts: Uint8Array[]; -} -export interface ValueOp { - /** Encoded in ProofOp.Key. */ - key: Uint8Array; - /** To encode in ProofOp.Data */ - proof: Proof | undefined; -} -export interface DominoOp { - key: string; - input: string; - output: string; -} -/** - * ProofOp defines an operation used for calculating Merkle root - * The data could be arbitrary format, providing nessecary data - * for example neighbouring node hash - */ -export interface ProofOp { - type: string; - key: Uint8Array; - data: Uint8Array; -} -/** ProofOps is Merkle proof defined by the list of ProofOps */ -export interface ProofOps { - ops: ProofOp[]; -} -export declare const Proof: { - encode(message: Proof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Proof; - fromJSON(object: any): Proof; - toJSON(message: Proof): unknown; - fromPartial(object: DeepPartial): Proof; -}; -export declare const ValueOp: { - encode(message: ValueOp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValueOp; - fromJSON(object: any): ValueOp; - toJSON(message: ValueOp): unknown; - fromPartial(object: DeepPartial): ValueOp; -}; -export declare const DominoOp: { - encode(message: DominoOp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DominoOp; - fromJSON(object: any): DominoOp; - toJSON(message: DominoOp): unknown; - fromPartial(object: DeepPartial): DominoOp; -}; -export declare const ProofOp: { - encode(message: ProofOp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ProofOp; - fromJSON(object: any): ProofOp; - toJSON(message: ProofOp): unknown; - fromPartial(object: DeepPartial): ProofOp; -}; -export declare const ProofOps: { - encode(message: ProofOps, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ProofOps; - fromJSON(object: any): ProofOps; - toJSON(message: ProofOps): unknown; - fromPartial(object: DeepPartial): ProofOps; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.js deleted file mode 100644 index 240e074337..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.js +++ /dev/null @@ -1,456 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "tendermint.crypto"; -const baseProof = { total: 0, index: 0 }; -export const Proof = { - encode(message, writer = Writer.create()) { - if (message.total !== 0) { - writer.uint32(8).int64(message.total); - } - if (message.index !== 0) { - writer.uint32(16).int64(message.index); - } - if (message.leafHash.length !== 0) { - writer.uint32(26).bytes(message.leafHash); - } - for (const v of message.aunts) { - writer.uint32(34).bytes(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProof }; - message.aunts = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = longToNumber(reader.int64()); - break; - case 2: - message.index = longToNumber(reader.int64()); - break; - case 3: - message.leafHash = reader.bytes(); - break; - case 4: - message.aunts.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProof }; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.leafHash !== undefined && object.leafHash !== null) { - message.leafHash = bytesFromBase64(object.leafHash); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(bytesFromBase64(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.total !== undefined && (obj.total = message.total); - message.index !== undefined && (obj.index = message.index); - message.leafHash !== undefined && - (obj.leafHash = base64FromBytes(message.leafHash !== undefined ? message.leafHash : new Uint8Array())); - if (message.aunts) { - obj.aunts = message.aunts.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } - else { - obj.aunts = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseProof }; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.leafHash !== undefined && object.leafHash !== null) { - message.leafHash = object.leafHash; - } - else { - message.leafHash = new Uint8Array(); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(e); - } - } - return message; - }, -}; -const baseValueOp = {}; -export const ValueOp = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValueOp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValueOp }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseValueOp }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, -}; -const baseDominoOp = { key: "", input: "", output: "" }; -export const DominoOp = { - encode(message, writer = Writer.create()) { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.input !== "") { - writer.uint32(18).string(message.input); - } - if (message.output !== "") { - writer.uint32(26).string(message.output); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDominoOp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.input = reader.string(); - break; - case 3: - message.output = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDominoOp }; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } - else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = String(object.input); - } - else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = String(object.output); - } - else { - message.output = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && (obj.key = message.key); - message.input !== undefined && (obj.input = message.input); - message.output !== undefined && (obj.output = message.output); - return obj; - }, - fromPartial(object) { - const message = { ...baseDominoOp }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = object.input; - } - else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = object.output; - } - else { - message.output = ""; - } - return message; - }, -}; -const baseProofOp = { type: "" }; -export const ProofOp = { - encode(message, writer = Writer.create()) { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - if (message.key.length !== 0) { - writer.uint32(18).bytes(message.key); - } - if (message.data.length !== 0) { - writer.uint32(26).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.key = reader.bytes(); - break; - case 3: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProofOp }; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } - else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && (obj.type = message.type); - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseProofOp }; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseProofOps = {}; -export const ProofOps = { - encode(message, writer = Writer.create()) { - for (const v of message.ops) { - ProofOp.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOps }; - message.ops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ops.push(ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProofOps }; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.ops) { - obj.ops = message.ops.map((e) => (e ? ProofOp.toJSON(e) : undefined)); - } - else { - obj.ops = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseProofOps }; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromPartial(e)); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.ts deleted file mode 100644 index db05869473..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/proof.ts +++ /dev/null @@ -1,529 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.crypto"; - -export interface Proof { - total: number; - index: number; - leaf_hash: Uint8Array; - aunts: Uint8Array[]; -} - -export interface ValueOp { - /** Encoded in ProofOp.Key. */ - key: Uint8Array; - /** To encode in ProofOp.Data */ - proof: Proof | undefined; -} - -export interface DominoOp { - key: string; - input: string; - output: string; -} - -/** - * ProofOp defines an operation used for calculating Merkle root - * The data could be arbitrary format, providing nessecary data - * for example neighbouring node hash - */ -export interface ProofOp { - type: string; - key: Uint8Array; - data: Uint8Array; -} - -/** ProofOps is Merkle proof defined by the list of ProofOps */ -export interface ProofOps { - ops: ProofOp[]; -} - -const baseProof: object = { total: 0, index: 0 }; - -export const Proof = { - encode(message: Proof, writer: Writer = Writer.create()): Writer { - if (message.total !== 0) { - writer.uint32(8).int64(message.total); - } - if (message.index !== 0) { - writer.uint32(16).int64(message.index); - } - if (message.leaf_hash.length !== 0) { - writer.uint32(26).bytes(message.leaf_hash); - } - for (const v of message.aunts) { - writer.uint32(34).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Proof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProof } as Proof; - message.aunts = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = longToNumber(reader.int64() as Long); - break; - case 2: - message.index = longToNumber(reader.int64() as Long); - break; - case 3: - message.leaf_hash = reader.bytes(); - break; - case 4: - message.aunts.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Proof { - const message = { ...baseProof } as Proof; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.leaf_hash !== undefined && object.leaf_hash !== null) { - message.leaf_hash = bytesFromBase64(object.leaf_hash); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: Proof): unknown { - const obj: any = {}; - message.total !== undefined && (obj.total = message.total); - message.index !== undefined && (obj.index = message.index); - message.leaf_hash !== undefined && - (obj.leaf_hash = base64FromBytes( - message.leaf_hash !== undefined ? message.leaf_hash : new Uint8Array() - )); - if (message.aunts) { - obj.aunts = message.aunts.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.aunts = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Proof { - const message = { ...baseProof } as Proof; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.leaf_hash !== undefined && object.leaf_hash !== null) { - message.leaf_hash = object.leaf_hash; - } else { - message.leaf_hash = new Uint8Array(); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(e); - } - } - return message; - }, -}; - -const baseValueOp: object = {}; - -export const ValueOp = { - encode(message: ValueOp, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValueOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValueOp } as ValueOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValueOp { - const message = { ...baseValueOp } as ValueOp; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: ValueOp): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ValueOp { - const message = { ...baseValueOp } as ValueOp; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -const baseDominoOp: object = { key: "", input: "", output: "" }; - -export const DominoOp = { - encode(message: DominoOp, writer: Writer = Writer.create()): Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.input !== "") { - writer.uint32(18).string(message.input); - } - if (message.output !== "") { - writer.uint32(26).string(message.output); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DominoOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDominoOp } as DominoOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.input = reader.string(); - break; - case 3: - message.output = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DominoOp { - const message = { ...baseDominoOp } as DominoOp; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = String(object.input); - } else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = String(object.output); - } else { - message.output = ""; - } - return message; - }, - - toJSON(message: DominoOp): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.input !== undefined && (obj.input = message.input); - message.output !== undefined && (obj.output = message.output); - return obj; - }, - - fromPartial(object: DeepPartial): DominoOp { - const message = { ...baseDominoOp } as DominoOp; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = object.input; - } else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = object.output; - } else { - message.output = ""; - } - return message; - }, -}; - -const baseProofOp: object = { type: "" }; - -export const ProofOp = { - encode(message: ProofOp, writer: Writer = Writer.create()): Writer { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - if (message.key.length !== 0) { - writer.uint32(18).bytes(message.key); - } - if (message.data.length !== 0) { - writer.uint32(26).bytes(message.data); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ProofOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOp } as ProofOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.key = reader.bytes(); - break; - case 3: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ProofOp { - const message = { ...baseProofOp } as ProofOp; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: ProofOp): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): ProofOp { - const message = { ...baseProofOp } as ProofOp; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseProofOps: object = {}; - -export const ProofOps = { - encode(message: ProofOps, writer: Writer = Writer.create()): Writer { - for (const v of message.ops) { - ProofOp.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ProofOps { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ops.push(ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ProofOps { - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ProofOps): unknown { - const obj: any = {}; - if (message.ops) { - obj.ops = message.ops.map((e) => (e ? ProofOp.toJSON(e) : undefined)); - } else { - obj.ops = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ProofOps { - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.d.ts deleted file mode 100644 index 52af8f2768..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.d.ts +++ /dev/null @@ -1,233 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Proof } from "../../tendermint/crypto/proof"; -import { Consensus } from "../../tendermint/version/types"; -import { ValidatorSet } from "../../tendermint/types/validator"; -export declare const protobufPackage = "tendermint.types"; -/** BlockIdFlag indicates which BlcokID the signature is for */ -export declare enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0, - BLOCK_ID_FLAG_ABSENT = 1, - BLOCK_ID_FLAG_COMMIT = 2, - BLOCK_ID_FLAG_NIL = 3, - UNRECOGNIZED = -1 -} -export declare function blockIDFlagFromJSON(object: any): BlockIDFlag; -export declare function blockIDFlagToJSON(object: BlockIDFlag): string; -/** SignedMsgType is a type of signed message in the consensus. */ -export declare enum SignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = 0, - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SIGNED_MSG_TYPE_PREVOTE = 1, - SIGNED_MSG_TYPE_PRECOMMIT = 2, - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SIGNED_MSG_TYPE_PROPOSAL = 32, - UNRECOGNIZED = -1 -} -export declare function signedMsgTypeFromJSON(object: any): SignedMsgType; -export declare function signedMsgTypeToJSON(object: SignedMsgType): string; -/** PartsetHeader */ -export interface PartSetHeader { - total: number; - hash: Uint8Array; -} -export interface Part { - index: number; - bytes: Uint8Array; - proof: Proof | undefined; -} -/** BlockID */ -export interface BlockID { - hash: Uint8Array; - partSetHeader: PartSetHeader | undefined; -} -/** Header defines the structure of a Tendermint block header. */ -export interface Header { - /** basic block info */ - version: Consensus | undefined; - chainId: string; - height: number; - time: Date | undefined; - /** prev block info */ - lastBlockId: BlockID | undefined; - /** hashes of block data */ - lastCommitHash: Uint8Array; - /** transactions */ - dataHash: Uint8Array; - /** hashes from the app output from the prev block */ - validatorsHash: Uint8Array; - /** validators for the next block */ - nextValidatorsHash: Uint8Array; - /** consensus params for current block */ - consensusHash: Uint8Array; - /** state after txs from the previous block */ - appHash: Uint8Array; - /** root hash of all results from the txs from the previous block */ - lastResultsHash: Uint8Array; - /** consensus info */ - evidenceHash: Uint8Array; - /** original proposer of the block */ - proposerAddress: Uint8Array; -} -/** Data contains the set of transactions included in the block */ -export interface Data { - /** - * 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. - */ - txs: Uint8Array[]; -} -/** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ -export interface Vote { - type: SignedMsgType; - height: number; - round: number; - /** zero if vote is nil. */ - blockId: BlockID | undefined; - timestamp: Date | undefined; - validatorAddress: Uint8Array; - validatorIndex: number; - signature: Uint8Array; -} -/** Commit contains the evidence that a block was committed by a set of validators. */ -export interface Commit { - height: number; - round: number; - blockId: BlockID | undefined; - signatures: CommitSig[]; -} -/** CommitSig is a part of the Vote included in a Commit. */ -export interface CommitSig { - blockIdFlag: BlockIDFlag; - validatorAddress: Uint8Array; - timestamp: Date | undefined; - signature: Uint8Array; -} -export interface Proposal { - type: SignedMsgType; - height: number; - round: number; - polRound: number; - blockId: BlockID | undefined; - timestamp: Date | undefined; - signature: Uint8Array; -} -export interface SignedHeader { - header: Header | undefined; - commit: Commit | undefined; -} -export interface LightBlock { - signedHeader: SignedHeader | undefined; - validatorSet: ValidatorSet | undefined; -} -export interface BlockMeta { - blockId: BlockID | undefined; - blockSize: number; - header: Header | undefined; - numTxs: number; -} -/** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ -export interface TxProof { - rootHash: Uint8Array; - data: Uint8Array; - proof: Proof | undefined; -} -export declare const PartSetHeader: { - encode(message: PartSetHeader, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PartSetHeader; - fromJSON(object: any): PartSetHeader; - toJSON(message: PartSetHeader): unknown; - fromPartial(object: DeepPartial): PartSetHeader; -}; -export declare const Part: { - encode(message: Part, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Part; - fromJSON(object: any): Part; - toJSON(message: Part): unknown; - fromPartial(object: DeepPartial): Part; -}; -export declare const BlockID: { - encode(message: BlockID, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BlockID; - fromJSON(object: any): BlockID; - toJSON(message: BlockID): unknown; - fromPartial(object: DeepPartial): BlockID; -}; -export declare const Header: { - encode(message: Header, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Header; - fromJSON(object: any): Header; - toJSON(message: Header): unknown; - fromPartial(object: DeepPartial
): Header; -}; -export declare const Data: { - encode(message: Data, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Data; - fromJSON(object: any): Data; - toJSON(message: Data): unknown; - fromPartial(object: DeepPartial): Data; -}; -export declare const Vote: { - encode(message: Vote, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Vote; - fromJSON(object: any): Vote; - toJSON(message: Vote): unknown; - fromPartial(object: DeepPartial): Vote; -}; -export declare const Commit: { - encode(message: Commit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Commit; - fromJSON(object: any): Commit; - toJSON(message: Commit): unknown; - fromPartial(object: DeepPartial): Commit; -}; -export declare const CommitSig: { - encode(message: CommitSig, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CommitSig; - fromJSON(object: any): CommitSig; - toJSON(message: CommitSig): unknown; - fromPartial(object: DeepPartial): CommitSig; -}; -export declare const Proposal: { - encode(message: Proposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Proposal; - fromJSON(object: any): Proposal; - toJSON(message: Proposal): unknown; - fromPartial(object: DeepPartial): Proposal; -}; -export declare const SignedHeader: { - encode(message: SignedHeader, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SignedHeader; - fromJSON(object: any): SignedHeader; - toJSON(message: SignedHeader): unknown; - fromPartial(object: DeepPartial): SignedHeader; -}; -export declare const LightBlock: { - encode(message: LightBlock, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): LightBlock; - fromJSON(object: any): LightBlock; - toJSON(message: LightBlock): unknown; - fromPartial(object: DeepPartial): LightBlock; -}; -export declare const BlockMeta: { - encode(message: BlockMeta, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BlockMeta; - fromJSON(object: any): BlockMeta; - toJSON(message: BlockMeta): unknown; - fromPartial(object: DeepPartial): BlockMeta; -}; -export declare const TxProof: { - encode(message: TxProof, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TxProof; - fromJSON(object: any): TxProof; - toJSON(message: TxProof): unknown; - fromPartial(object: DeepPartial): TxProof; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.js deleted file mode 100644 index 2eb6d87850..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.js +++ /dev/null @@ -1,1689 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Proof } from "../../tendermint/crypto/proof"; -import { Consensus } from "../../tendermint/version/types"; -import { ValidatorSet } from "../../tendermint/types/validator"; -export const protobufPackage = "tendermint.types"; -/** BlockIdFlag indicates which BlcokID the signature is for */ -export var BlockIDFlag; -(function (BlockIDFlag) { - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_UNKNOWN"] = 0] = "BLOCK_ID_FLAG_UNKNOWN"; - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_ABSENT"] = 1] = "BLOCK_ID_FLAG_ABSENT"; - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_COMMIT"] = 2] = "BLOCK_ID_FLAG_COMMIT"; - BlockIDFlag[BlockIDFlag["BLOCK_ID_FLAG_NIL"] = 3] = "BLOCK_ID_FLAG_NIL"; - BlockIDFlag[BlockIDFlag["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(BlockIDFlag || (BlockIDFlag = {})); -export function blockIDFlagFromJSON(object) { - switch (object) { - case 0: - case "BLOCK_ID_FLAG_UNKNOWN": - return BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN; - case 1: - case "BLOCK_ID_FLAG_ABSENT": - return BlockIDFlag.BLOCK_ID_FLAG_ABSENT; - case 2: - case "BLOCK_ID_FLAG_COMMIT": - return BlockIDFlag.BLOCK_ID_FLAG_COMMIT; - case 3: - case "BLOCK_ID_FLAG_NIL": - return BlockIDFlag.BLOCK_ID_FLAG_NIL; - case -1: - case "UNRECOGNIZED": - default: - return BlockIDFlag.UNRECOGNIZED; - } -} -export function blockIDFlagToJSON(object) { - switch (object) { - case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN: - return "BLOCK_ID_FLAG_UNKNOWN"; - case BlockIDFlag.BLOCK_ID_FLAG_ABSENT: - return "BLOCK_ID_FLAG_ABSENT"; - case BlockIDFlag.BLOCK_ID_FLAG_COMMIT: - return "BLOCK_ID_FLAG_COMMIT"; - case BlockIDFlag.BLOCK_ID_FLAG_NIL: - return "BLOCK_ID_FLAG_NIL"; - default: - return "UNKNOWN"; - } -} -/** SignedMsgType is a type of signed message in the consensus. */ -export var SignedMsgType; -(function (SignedMsgType) { - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_UNKNOWN"] = 0] = "SIGNED_MSG_TYPE_UNKNOWN"; - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_PREVOTE"] = 1] = "SIGNED_MSG_TYPE_PREVOTE"; - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_PRECOMMIT"] = 2] = "SIGNED_MSG_TYPE_PRECOMMIT"; - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SignedMsgType[SignedMsgType["SIGNED_MSG_TYPE_PROPOSAL"] = 32] = "SIGNED_MSG_TYPE_PROPOSAL"; - SignedMsgType[SignedMsgType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(SignedMsgType || (SignedMsgType = {})); -export function signedMsgTypeFromJSON(object) { - switch (object) { - case 0: - case "SIGNED_MSG_TYPE_UNKNOWN": - return SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN; - case 1: - case "SIGNED_MSG_TYPE_PREVOTE": - return SignedMsgType.SIGNED_MSG_TYPE_PREVOTE; - case 2: - case "SIGNED_MSG_TYPE_PRECOMMIT": - return SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT; - case 32: - case "SIGNED_MSG_TYPE_PROPOSAL": - return SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL; - case -1: - case "UNRECOGNIZED": - default: - return SignedMsgType.UNRECOGNIZED; - } -} -export function signedMsgTypeToJSON(object) { - switch (object) { - case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN: - return "SIGNED_MSG_TYPE_UNKNOWN"; - case SignedMsgType.SIGNED_MSG_TYPE_PREVOTE: - return "SIGNED_MSG_TYPE_PREVOTE"; - case SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT: - return "SIGNED_MSG_TYPE_PRECOMMIT"; - case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL: - return "SIGNED_MSG_TYPE_PROPOSAL"; - default: - return "UNKNOWN"; - } -} -const basePartSetHeader = { total: 0 }; -export const PartSetHeader = { - encode(message, writer = Writer.create()) { - if (message.total !== 0) { - writer.uint32(8).uint32(message.total); - } - if (message.hash.length !== 0) { - writer.uint32(18).bytes(message.hash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePartSetHeader }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.uint32(); - break; - case 2: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePartSetHeader }; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.total !== undefined && (obj.total = message.total); - message.hash !== undefined && - (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...basePartSetHeader }; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = new Uint8Array(); - } - return message; - }, -}; -const basePart = { index: 0 }; -export const Part = { - encode(message, writer = Writer.create()) { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.bytes.length !== 0) { - writer.uint32(18).bytes(message.bytes); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePart }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePart }; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } - else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = bytesFromBase64(object.bytes); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.index !== undefined && (obj.index = message.index); - message.bytes !== undefined && - (obj.bytes = base64FromBytes(message.bytes !== undefined ? message.bytes : new Uint8Array())); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...basePart }; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } - else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = object.bytes; - } - else { - message.bytes = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, -}; -const baseBlockID = {}; -export const BlockID = { - encode(message, writer = Writer.create()) { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.partSetHeader !== undefined) { - PartSetHeader.encode(message.partSetHeader, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockID }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.partSetHeader = PartSetHeader.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBlockID }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.partSetHeader !== undefined && object.partSetHeader !== null) { - message.partSetHeader = PartSetHeader.fromJSON(object.partSetHeader); - } - else { - message.partSetHeader = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - message.partSetHeader !== undefined && - (obj.partSetHeader = message.partSetHeader - ? PartSetHeader.toJSON(message.partSetHeader) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseBlockID }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = new Uint8Array(); - } - if (object.partSetHeader !== undefined && object.partSetHeader !== null) { - message.partSetHeader = PartSetHeader.fromPartial(object.partSetHeader); - } - else { - message.partSetHeader = undefined; - } - return message; - }, -}; -const baseHeader = { chainId: "", height: 0 }; -export const Header = { - encode(message, writer = Writer.create()) { - if (message.version !== undefined) { - Consensus.encode(message.version, writer.uint32(10).fork()).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(18).string(message.chainId); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(34).fork()).ldelim(); - } - if (message.lastBlockId !== undefined) { - BlockID.encode(message.lastBlockId, writer.uint32(42).fork()).ldelim(); - } - if (message.lastCommitHash.length !== 0) { - writer.uint32(50).bytes(message.lastCommitHash); - } - if (message.dataHash.length !== 0) { - writer.uint32(58).bytes(message.dataHash); - } - if (message.validatorsHash.length !== 0) { - writer.uint32(66).bytes(message.validatorsHash); - } - if (message.nextValidatorsHash.length !== 0) { - writer.uint32(74).bytes(message.nextValidatorsHash); - } - if (message.consensusHash.length !== 0) { - writer.uint32(82).bytes(message.consensusHash); - } - if (message.appHash.length !== 0) { - writer.uint32(90).bytes(message.appHash); - } - if (message.lastResultsHash.length !== 0) { - writer.uint32(98).bytes(message.lastResultsHash); - } - if (message.evidenceHash.length !== 0) { - writer.uint32(106).bytes(message.evidenceHash); - } - if (message.proposerAddress.length !== 0) { - writer.uint32(114).bytes(message.proposerAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeader }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.height = longToNumber(reader.int64()); - break; - case 4: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.lastBlockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.lastCommitHash = reader.bytes(); - break; - case 7: - message.dataHash = reader.bytes(); - break; - case 8: - message.validatorsHash = reader.bytes(); - break; - case 9: - message.nextValidatorsHash = reader.bytes(); - break; - case 10: - message.consensusHash = reader.bytes(); - break; - case 11: - message.appHash = reader.bytes(); - break; - case 12: - message.lastResultsHash = reader.bytes(); - break; - case 13: - message.evidenceHash = reader.bytes(); - break; - case 14: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHeader }; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromJSON(object.version); - } - else { - message.version = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = String(object.chainId); - } - else { - message.chainId = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } - else { - message.time = undefined; - } - if (object.lastBlockId !== undefined && object.lastBlockId !== null) { - message.lastBlockId = BlockID.fromJSON(object.lastBlockId); - } - else { - message.lastBlockId = undefined; - } - if (object.lastCommitHash !== undefined && object.lastCommitHash !== null) { - message.lastCommitHash = bytesFromBase64(object.lastCommitHash); - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = bytesFromBase64(object.dataHash); - } - if (object.validatorsHash !== undefined && object.validatorsHash !== null) { - message.validatorsHash = bytesFromBase64(object.validatorsHash); - } - if (object.nextValidatorsHash !== undefined && - object.nextValidatorsHash !== null) { - message.nextValidatorsHash = bytesFromBase64(object.nextValidatorsHash); - } - if (object.consensusHash !== undefined && object.consensusHash !== null) { - message.consensusHash = bytesFromBase64(object.consensusHash); - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = bytesFromBase64(object.appHash); - } - if (object.lastResultsHash !== undefined && - object.lastResultsHash !== null) { - message.lastResultsHash = bytesFromBase64(object.lastResultsHash); - } - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = bytesFromBase64(object.evidenceHash); - } - if (object.proposerAddress !== undefined && - object.proposerAddress !== null) { - message.proposerAddress = bytesFromBase64(object.proposerAddress); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.version !== undefined && - (obj.version = message.version - ? Consensus.toJSON(message.version) - : undefined); - message.chainId !== undefined && (obj.chainId = message.chainId); - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.lastBlockId !== undefined && - (obj.lastBlockId = message.lastBlockId - ? BlockID.toJSON(message.lastBlockId) - : undefined); - message.lastCommitHash !== undefined && - (obj.lastCommitHash = base64FromBytes(message.lastCommitHash !== undefined - ? message.lastCommitHash - : new Uint8Array())); - message.dataHash !== undefined && - (obj.dataHash = base64FromBytes(message.dataHash !== undefined ? message.dataHash : new Uint8Array())); - message.validatorsHash !== undefined && - (obj.validatorsHash = base64FromBytes(message.validatorsHash !== undefined - ? message.validatorsHash - : new Uint8Array())); - message.nextValidatorsHash !== undefined && - (obj.nextValidatorsHash = base64FromBytes(message.nextValidatorsHash !== undefined - ? message.nextValidatorsHash - : new Uint8Array())); - message.consensusHash !== undefined && - (obj.consensusHash = base64FromBytes(message.consensusHash !== undefined - ? message.consensusHash - : new Uint8Array())); - message.appHash !== undefined && - (obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array())); - message.lastResultsHash !== undefined && - (obj.lastResultsHash = base64FromBytes(message.lastResultsHash !== undefined - ? message.lastResultsHash - : new Uint8Array())); - message.evidenceHash !== undefined && - (obj.evidenceHash = base64FromBytes(message.evidenceHash !== undefined - ? message.evidenceHash - : new Uint8Array())); - message.proposerAddress !== undefined && - (obj.proposerAddress = base64FromBytes(message.proposerAddress !== undefined - ? message.proposerAddress - : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseHeader }; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromPartial(object.version); - } - else { - message.version = undefined; - } - if (object.chainId !== undefined && object.chainId !== null) { - message.chainId = object.chainId; - } - else { - message.chainId = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } - else { - message.time = undefined; - } - if (object.lastBlockId !== undefined && object.lastBlockId !== null) { - message.lastBlockId = BlockID.fromPartial(object.lastBlockId); - } - else { - message.lastBlockId = undefined; - } - if (object.lastCommitHash !== undefined && object.lastCommitHash !== null) { - message.lastCommitHash = object.lastCommitHash; - } - else { - message.lastCommitHash = new Uint8Array(); - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = object.dataHash; - } - else { - message.dataHash = new Uint8Array(); - } - if (object.validatorsHash !== undefined && object.validatorsHash !== null) { - message.validatorsHash = object.validatorsHash; - } - else { - message.validatorsHash = new Uint8Array(); - } - if (object.nextValidatorsHash !== undefined && - object.nextValidatorsHash !== null) { - message.nextValidatorsHash = object.nextValidatorsHash; - } - else { - message.nextValidatorsHash = new Uint8Array(); - } - if (object.consensusHash !== undefined && object.consensusHash !== null) { - message.consensusHash = object.consensusHash; - } - else { - message.consensusHash = new Uint8Array(); - } - if (object.appHash !== undefined && object.appHash !== null) { - message.appHash = object.appHash; - } - else { - message.appHash = new Uint8Array(); - } - if (object.lastResultsHash !== undefined && - object.lastResultsHash !== null) { - message.lastResultsHash = object.lastResultsHash; - } - else { - message.lastResultsHash = new Uint8Array(); - } - if (object.evidenceHash !== undefined && object.evidenceHash !== null) { - message.evidenceHash = object.evidenceHash; - } - else { - message.evidenceHash = new Uint8Array(); - } - if (object.proposerAddress !== undefined && - object.proposerAddress !== null) { - message.proposerAddress = object.proposerAddress; - } - else { - message.proposerAddress = new Uint8Array(); - } - return message; - }, -}; -const baseData = {}; -export const Data = { - encode(message, writer = Writer.create()) { - for (const v of message.txs) { - writer.uint32(10).bytes(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseData }; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseData }; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(bytesFromBase64(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.txs) { - obj.txs = message.txs.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } - else { - obj.txs = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseData }; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(e); - } - } - return message; - }, -}; -const baseVote = { type: 0, height: 0, round: 0, validatorIndex: 0 }; -export const Vote = { - encode(message, writer = Writer.create()) { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(34).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim(); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(50).bytes(message.validatorAddress); - } - if (message.validatorIndex !== 0) { - writer.uint32(56).int32(message.validatorIndex); - } - if (message.signature.length !== 0) { - writer.uint32(66).bytes(message.signature); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVote }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.height = longToNumber(reader.int64()); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.validatorAddress = reader.bytes(); - break; - case 7: - message.validatorIndex = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseVote }; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } - else { - message.timestamp = undefined; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = bytesFromBase64(object.validatorAddress); - } - if (object.validatorIndex !== undefined && object.validatorIndex !== null) { - message.validatorIndex = Number(object.validatorIndex); - } - else { - message.validatorIndex = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.validatorAddress !== undefined && - (obj.validatorAddress = base64FromBytes(message.validatorAddress !== undefined - ? message.validatorAddress - : new Uint8Array())); - message.validatorIndex !== undefined && - (obj.validatorIndex = message.validatorIndex); - message.signature !== undefined && - (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseVote }; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } - else { - message.timestamp = undefined; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = new Uint8Array(); - } - if (object.validatorIndex !== undefined && object.validatorIndex !== null) { - message.validatorIndex = object.validatorIndex; - } - else { - message.validatorIndex = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } - else { - message.signature = new Uint8Array(); - } - return message; - }, -}; -const baseCommit = { height: 0, round: 0 }; -export const Commit = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(16).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.signatures) { - CommitSig.encode(v, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommit }; - message.signatures = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64()); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 4: - message.signatures.push(CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCommit }; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map((e) => e ? CommitSig.toJSON(e) : undefined); - } - else { - obj.signatures = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseCommit }; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } - else { - message.round = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromPartial(e)); - } - } - return message; - }, -}; -const baseCommitSig = { blockIdFlag: 0 }; -export const CommitSig = { - encode(message, writer = Writer.create()) { - if (message.blockIdFlag !== 0) { - writer.uint32(8).int32(message.blockIdFlag); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(18).bytes(message.validatorAddress); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(26).fork()).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(34).bytes(message.signature); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommitSig }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockIdFlag = reader.int32(); - break; - case 2: - message.validatorAddress = reader.bytes(); - break; - case 3: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCommitSig }; - if (object.blockIdFlag !== undefined && object.blockIdFlag !== null) { - message.blockIdFlag = blockIDFlagFromJSON(object.blockIdFlag); - } - else { - message.blockIdFlag = 0; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = bytesFromBase64(object.validatorAddress); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.blockIdFlag !== undefined && - (obj.blockIdFlag = blockIDFlagToJSON(message.blockIdFlag)); - message.validatorAddress !== undefined && - (obj.validatorAddress = base64FromBytes(message.validatorAddress !== undefined - ? message.validatorAddress - : new Uint8Array())); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseCommitSig }; - if (object.blockIdFlag !== undefined && object.blockIdFlag !== null) { - message.blockIdFlag = object.blockIdFlag; - } - else { - message.blockIdFlag = 0; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = new Uint8Array(); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } - else { - message.signature = new Uint8Array(); - } - return message; - }, -}; -const baseProposal = { type: 0, height: 0, round: 0, polRound: 0 }; -export const Proposal = { - encode(message, writer = Writer.create()) { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.polRound !== 0) { - writer.uint32(32).int32(message.polRound); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(42).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(50).fork()).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(58).bytes(message.signature); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.height = longToNumber(reader.int64()); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.polRound = reader.int32(); - break; - case 5: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseProposal }; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } - else { - message.round = 0; - } - if (object.polRound !== undefined && object.polRound !== null) { - message.polRound = Number(object.polRound); - } - else { - message.polRound = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.polRound !== undefined && (obj.polRound = message.polRound); - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseProposal }; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } - else { - message.round = 0; - } - if (object.polRound !== undefined && object.polRound !== null) { - message.polRound = object.polRound; - } - else { - message.polRound = 0; - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } - else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } - else { - message.signature = new Uint8Array(); - } - return message; - }, -}; -const baseSignedHeader = {}; -export const SignedHeader = { - encode(message, writer = Writer.create()) { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.commit !== undefined) { - Commit.encode(message.commit, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSignedHeader }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSignedHeader }; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } - else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromJSON(object.commit); - } - else { - message.commit = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.commit !== undefined && - (obj.commit = message.commit ? Commit.toJSON(message.commit) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseSignedHeader }; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } - else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromPartial(object.commit); - } - else { - message.commit = undefined; - } - return message; - }, -}; -const baseLightBlock = {}; -export const LightBlock = { - encode(message, writer = Writer.create()) { - if (message.signedHeader !== undefined) { - SignedHeader.encode(message.signedHeader, writer.uint32(10).fork()).ldelim(); - } - if (message.validatorSet !== undefined) { - ValidatorSet.encode(message.validatorSet, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLightBlock }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signedHeader = SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validatorSet = ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseLightBlock }; - if (object.signedHeader !== undefined && object.signedHeader !== null) { - message.signedHeader = SignedHeader.fromJSON(object.signedHeader); - } - else { - message.signedHeader = undefined; - } - if (object.validatorSet !== undefined && object.validatorSet !== null) { - message.validatorSet = ValidatorSet.fromJSON(object.validatorSet); - } - else { - message.validatorSet = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.signedHeader !== undefined && - (obj.signedHeader = message.signedHeader - ? SignedHeader.toJSON(message.signedHeader) - : undefined); - message.validatorSet !== undefined && - (obj.validatorSet = message.validatorSet - ? ValidatorSet.toJSON(message.validatorSet) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseLightBlock }; - if (object.signedHeader !== undefined && object.signedHeader !== null) { - message.signedHeader = SignedHeader.fromPartial(object.signedHeader); - } - else { - message.signedHeader = undefined; - } - if (object.validatorSet !== undefined && object.validatorSet !== null) { - message.validatorSet = ValidatorSet.fromPartial(object.validatorSet); - } - else { - message.validatorSet = undefined; - } - return message; - }, -}; -const baseBlockMeta = { blockSize: 0, numTxs: 0 }; -export const BlockMeta = { - encode(message, writer = Writer.create()) { - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(10).fork()).ldelim(); - } - if (message.blockSize !== 0) { - writer.uint32(16).int64(message.blockSize); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(26).fork()).ldelim(); - } - if (message.numTxs !== 0) { - writer.uint32(32).int64(message.numTxs); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockMeta }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.blockSize = longToNumber(reader.int64()); - break; - case 3: - message.header = Header.decode(reader, reader.uint32()); - break; - case 4: - message.numTxs = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBlockMeta }; - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.blockSize !== undefined && object.blockSize !== null) { - message.blockSize = Number(object.blockSize); - } - else { - message.blockSize = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } - else { - message.header = undefined; - } - if (object.numTxs !== undefined && object.numTxs !== null) { - message.numTxs = Number(object.numTxs); - } - else { - message.numTxs = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.blockId !== undefined && - (obj.blockId = message.blockId - ? BlockID.toJSON(message.blockId) - : undefined); - message.blockSize !== undefined && (obj.blockSize = message.blockSize); - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.numTxs !== undefined && (obj.numTxs = message.numTxs); - return obj; - }, - fromPartial(object) { - const message = { ...baseBlockMeta }; - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } - else { - message.blockId = undefined; - } - if (object.blockSize !== undefined && object.blockSize !== null) { - message.blockSize = object.blockSize; - } - else { - message.blockSize = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } - else { - message.header = undefined; - } - if (object.numTxs !== undefined && object.numTxs !== null) { - message.numTxs = object.numTxs; - } - else { - message.numTxs = 0; - } - return message; - }, -}; -const baseTxProof = {}; -export const TxProof = { - encode(message, writer = Writer.create()) { - if (message.rootHash.length !== 0) { - writer.uint32(10).bytes(message.rootHash); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxProof }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rootHash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTxProof }; - if (object.rootHash !== undefined && object.rootHash !== null) { - message.rootHash = bytesFromBase64(object.rootHash); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.rootHash !== undefined && - (obj.rootHash = base64FromBytes(message.rootHash !== undefined ? message.rootHash : new Uint8Array())); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseTxProof }; - if (object.rootHash !== undefined && object.rootHash !== null) { - message.rootHash = object.rootHash; - } - else { - message.rootHash = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } - else { - message.proof = undefined; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.ts deleted file mode 100644 index 59a41a8e5b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/types.ts +++ /dev/null @@ -1,1943 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Proof } from "../../tendermint/crypto/proof"; -import { Consensus } from "../../tendermint/version/types"; -import { ValidatorSet } from "../../tendermint/types/validator"; - -export const protobufPackage = "tendermint.types"; - -/** BlockIdFlag indicates which BlcokID the signature is for */ -export enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0, - BLOCK_ID_FLAG_ABSENT = 1, - BLOCK_ID_FLAG_COMMIT = 2, - BLOCK_ID_FLAG_NIL = 3, - UNRECOGNIZED = -1, -} - -export function blockIDFlagFromJSON(object: any): BlockIDFlag { - switch (object) { - case 0: - case "BLOCK_ID_FLAG_UNKNOWN": - return BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN; - case 1: - case "BLOCK_ID_FLAG_ABSENT": - return BlockIDFlag.BLOCK_ID_FLAG_ABSENT; - case 2: - case "BLOCK_ID_FLAG_COMMIT": - return BlockIDFlag.BLOCK_ID_FLAG_COMMIT; - case 3: - case "BLOCK_ID_FLAG_NIL": - return BlockIDFlag.BLOCK_ID_FLAG_NIL; - case -1: - case "UNRECOGNIZED": - default: - return BlockIDFlag.UNRECOGNIZED; - } -} - -export function blockIDFlagToJSON(object: BlockIDFlag): string { - switch (object) { - case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN: - return "BLOCK_ID_FLAG_UNKNOWN"; - case BlockIDFlag.BLOCK_ID_FLAG_ABSENT: - return "BLOCK_ID_FLAG_ABSENT"; - case BlockIDFlag.BLOCK_ID_FLAG_COMMIT: - return "BLOCK_ID_FLAG_COMMIT"; - case BlockIDFlag.BLOCK_ID_FLAG_NIL: - return "BLOCK_ID_FLAG_NIL"; - default: - return "UNKNOWN"; - } -} - -/** SignedMsgType is a type of signed message in the consensus. */ -export enum SignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = 0, - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SIGNED_MSG_TYPE_PREVOTE = 1, - SIGNED_MSG_TYPE_PRECOMMIT = 2, - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SIGNED_MSG_TYPE_PROPOSAL = 32, - UNRECOGNIZED = -1, -} - -export function signedMsgTypeFromJSON(object: any): SignedMsgType { - switch (object) { - case 0: - case "SIGNED_MSG_TYPE_UNKNOWN": - return SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN; - case 1: - case "SIGNED_MSG_TYPE_PREVOTE": - return SignedMsgType.SIGNED_MSG_TYPE_PREVOTE; - case 2: - case "SIGNED_MSG_TYPE_PRECOMMIT": - return SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT; - case 32: - case "SIGNED_MSG_TYPE_PROPOSAL": - return SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL; - case -1: - case "UNRECOGNIZED": - default: - return SignedMsgType.UNRECOGNIZED; - } -} - -export function signedMsgTypeToJSON(object: SignedMsgType): string { - switch (object) { - case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN: - return "SIGNED_MSG_TYPE_UNKNOWN"; - case SignedMsgType.SIGNED_MSG_TYPE_PREVOTE: - return "SIGNED_MSG_TYPE_PREVOTE"; - case SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT: - return "SIGNED_MSG_TYPE_PRECOMMIT"; - case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL: - return "SIGNED_MSG_TYPE_PROPOSAL"; - default: - return "UNKNOWN"; - } -} - -/** PartsetHeader */ -export interface PartSetHeader { - total: number; - hash: Uint8Array; -} - -export interface Part { - index: number; - bytes: Uint8Array; - proof: Proof | undefined; -} - -/** BlockID */ -export interface BlockID { - hash: Uint8Array; - part_set_header: PartSetHeader | undefined; -} - -/** Header defines the structure of a Tendermint block header. */ -export interface Header { - /** basic block info */ - version: Consensus | undefined; - chain_id: string; - height: number; - time: Date | undefined; - /** prev block info */ - last_block_id: BlockID | undefined; - /** hashes of block data */ - last_commit_hash: Uint8Array; - /** transactions */ - data_hash: Uint8Array; - /** hashes from the app output from the prev block */ - validators_hash: Uint8Array; - /** validators for the next block */ - next_validators_hash: Uint8Array; - /** consensus params for current block */ - consensus_hash: Uint8Array; - /** state after txs from the previous block */ - app_hash: Uint8Array; - /** root hash of all results from the txs from the previous block */ - last_results_hash: Uint8Array; - /** consensus info */ - evidence_hash: Uint8Array; - /** original proposer of the block */ - proposer_address: Uint8Array; -} - -/** Data contains the set of transactions included in the block */ -export interface Data { - /** - * 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. - */ - txs: Uint8Array[]; -} - -/** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ -export interface Vote { - type: SignedMsgType; - height: number; - round: number; - /** zero if vote is nil. */ - block_id: BlockID | undefined; - timestamp: Date | undefined; - validator_address: Uint8Array; - validator_index: number; - signature: Uint8Array; -} - -/** Commit contains the evidence that a block was committed by a set of validators. */ -export interface Commit { - height: number; - round: number; - block_id: BlockID | undefined; - signatures: CommitSig[]; -} - -/** CommitSig is a part of the Vote included in a Commit. */ -export interface CommitSig { - block_id_flag: BlockIDFlag; - validator_address: Uint8Array; - timestamp: Date | undefined; - signature: Uint8Array; -} - -export interface Proposal { - type: SignedMsgType; - height: number; - round: number; - pol_round: number; - block_id: BlockID | undefined; - timestamp: Date | undefined; - signature: Uint8Array; -} - -export interface SignedHeader { - header: Header | undefined; - commit: Commit | undefined; -} - -export interface LightBlock { - signed_header: SignedHeader | undefined; - validator_set: ValidatorSet | undefined; -} - -export interface BlockMeta { - block_id: BlockID | undefined; - block_size: number; - header: Header | undefined; - num_txs: number; -} - -/** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ -export interface TxProof { - root_hash: Uint8Array; - data: Uint8Array; - proof: Proof | undefined; -} - -const basePartSetHeader: object = { total: 0 }; - -export const PartSetHeader = { - encode(message: PartSetHeader, writer: Writer = Writer.create()): Writer { - if (message.total !== 0) { - writer.uint32(8).uint32(message.total); - } - if (message.hash.length !== 0) { - writer.uint32(18).bytes(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PartSetHeader { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePartSetHeader } as PartSetHeader; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.uint32(); - break; - case 2: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PartSetHeader { - const message = { ...basePartSetHeader } as PartSetHeader; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - - toJSON(message: PartSetHeader): unknown { - const obj: any = {}; - message.total !== undefined && (obj.total = message.total); - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): PartSetHeader { - const message = { ...basePartSetHeader } as PartSetHeader; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - return message; - }, -}; - -const basePart: object = { index: 0 }; - -export const Part = { - encode(message: Part, writer: Writer = Writer.create()): Writer { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.bytes.length !== 0) { - writer.uint32(18).bytes(message.bytes); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Part { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePart } as Part; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Part { - const message = { ...basePart } as Part; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = bytesFromBase64(object.bytes); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: Part): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = message.index); - message.bytes !== undefined && - (obj.bytes = base64FromBytes( - message.bytes !== undefined ? message.bytes : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Part { - const message = { ...basePart } as Part; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = object.bytes; - } else { - message.bytes = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -const baseBlockID: object = {}; - -export const BlockID = { - encode(message: BlockID, writer: Writer = Writer.create()): Writer { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.part_set_header !== undefined) { - PartSetHeader.encode( - message.part_set_header, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockID { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockID } as BlockID; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.part_set_header = PartSetHeader.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockID { - const message = { ...baseBlockID } as BlockID; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if ( - object.part_set_header !== undefined && - object.part_set_header !== null - ) { - message.part_set_header = PartSetHeader.fromJSON(object.part_set_header); - } else { - message.part_set_header = undefined; - } - return message; - }, - - toJSON(message: BlockID): unknown { - const obj: any = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - message.part_set_header !== undefined && - (obj.part_set_header = message.part_set_header - ? PartSetHeader.toJSON(message.part_set_header) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): BlockID { - const message = { ...baseBlockID } as BlockID; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - if ( - object.part_set_header !== undefined && - object.part_set_header !== null - ) { - message.part_set_header = PartSetHeader.fromPartial( - object.part_set_header - ); - } else { - message.part_set_header = undefined; - } - return message; - }, -}; - -const baseHeader: object = { chain_id: "", height: 0 }; - -export const Header = { - encode(message: Header, writer: Writer = Writer.create()): Writer { - if (message.version !== undefined) { - Consensus.encode(message.version, writer.uint32(10).fork()).ldelim(); - } - if (message.chain_id !== "") { - writer.uint32(18).string(message.chain_id); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(34).fork() - ).ldelim(); - } - if (message.last_block_id !== undefined) { - BlockID.encode(message.last_block_id, writer.uint32(42).fork()).ldelim(); - } - if (message.last_commit_hash.length !== 0) { - writer.uint32(50).bytes(message.last_commit_hash); - } - if (message.data_hash.length !== 0) { - writer.uint32(58).bytes(message.data_hash); - } - if (message.validators_hash.length !== 0) { - writer.uint32(66).bytes(message.validators_hash); - } - if (message.next_validators_hash.length !== 0) { - writer.uint32(74).bytes(message.next_validators_hash); - } - if (message.consensus_hash.length !== 0) { - writer.uint32(82).bytes(message.consensus_hash); - } - if (message.app_hash.length !== 0) { - writer.uint32(90).bytes(message.app_hash); - } - if (message.last_results_hash.length !== 0) { - writer.uint32(98).bytes(message.last_results_hash); - } - if (message.evidence_hash.length !== 0) { - writer.uint32(106).bytes(message.evidence_hash); - } - if (message.proposer_address.length !== 0) { - writer.uint32(114).bytes(message.proposer_address); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Header { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeader } as Header; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chain_id = reader.string(); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 5: - message.last_block_id = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.last_commit_hash = reader.bytes(); - break; - case 7: - message.data_hash = reader.bytes(); - break; - case 8: - message.validators_hash = reader.bytes(); - break; - case 9: - message.next_validators_hash = reader.bytes(); - break; - case 10: - message.consensus_hash = reader.bytes(); - break; - case 11: - message.app_hash = reader.bytes(); - break; - case 12: - message.last_results_hash = reader.bytes(); - break; - case 13: - message.evidence_hash = reader.bytes(); - break; - case 14: - message.proposer_address = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Header { - const message = { ...baseHeader } as Header; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromJSON(object.version); - } else { - message.version = undefined; - } - if (object.chain_id !== undefined && object.chain_id !== null) { - message.chain_id = String(object.chain_id); - } else { - message.chain_id = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.last_block_id !== undefined && object.last_block_id !== null) { - message.last_block_id = BlockID.fromJSON(object.last_block_id); - } else { - message.last_block_id = undefined; - } - if ( - object.last_commit_hash !== undefined && - object.last_commit_hash !== null - ) { - message.last_commit_hash = bytesFromBase64(object.last_commit_hash); - } - if (object.data_hash !== undefined && object.data_hash !== null) { - message.data_hash = bytesFromBase64(object.data_hash); - } - if ( - object.validators_hash !== undefined && - object.validators_hash !== null - ) { - message.validators_hash = bytesFromBase64(object.validators_hash); - } - if ( - object.next_validators_hash !== undefined && - object.next_validators_hash !== null - ) { - message.next_validators_hash = bytesFromBase64( - object.next_validators_hash - ); - } - if (object.consensus_hash !== undefined && object.consensus_hash !== null) { - message.consensus_hash = bytesFromBase64(object.consensus_hash); - } - if (object.app_hash !== undefined && object.app_hash !== null) { - message.app_hash = bytesFromBase64(object.app_hash); - } - if ( - object.last_results_hash !== undefined && - object.last_results_hash !== null - ) { - message.last_results_hash = bytesFromBase64(object.last_results_hash); - } - if (object.evidence_hash !== undefined && object.evidence_hash !== null) { - message.evidence_hash = bytesFromBase64(object.evidence_hash); - } - if ( - object.proposer_address !== undefined && - object.proposer_address !== null - ) { - message.proposer_address = bytesFromBase64(object.proposer_address); - } - return message; - }, - - toJSON(message: Header): unknown { - const obj: any = {}; - message.version !== undefined && - (obj.version = message.version - ? Consensus.toJSON(message.version) - : undefined); - message.chain_id !== undefined && (obj.chain_id = message.chain_id); - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.last_block_id !== undefined && - (obj.last_block_id = message.last_block_id - ? BlockID.toJSON(message.last_block_id) - : undefined); - message.last_commit_hash !== undefined && - (obj.last_commit_hash = base64FromBytes( - message.last_commit_hash !== undefined - ? message.last_commit_hash - : new Uint8Array() - )); - message.data_hash !== undefined && - (obj.data_hash = base64FromBytes( - message.data_hash !== undefined ? message.data_hash : new Uint8Array() - )); - message.validators_hash !== undefined && - (obj.validators_hash = base64FromBytes( - message.validators_hash !== undefined - ? message.validators_hash - : new Uint8Array() - )); - message.next_validators_hash !== undefined && - (obj.next_validators_hash = base64FromBytes( - message.next_validators_hash !== undefined - ? message.next_validators_hash - : new Uint8Array() - )); - message.consensus_hash !== undefined && - (obj.consensus_hash = base64FromBytes( - message.consensus_hash !== undefined - ? message.consensus_hash - : new Uint8Array() - )); - message.app_hash !== undefined && - (obj.app_hash = base64FromBytes( - message.app_hash !== undefined ? message.app_hash : new Uint8Array() - )); - message.last_results_hash !== undefined && - (obj.last_results_hash = base64FromBytes( - message.last_results_hash !== undefined - ? message.last_results_hash - : new Uint8Array() - )); - message.evidence_hash !== undefined && - (obj.evidence_hash = base64FromBytes( - message.evidence_hash !== undefined - ? message.evidence_hash - : new Uint8Array() - )); - message.proposer_address !== undefined && - (obj.proposer_address = base64FromBytes( - message.proposer_address !== undefined - ? message.proposer_address - : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial
): Header { - const message = { ...baseHeader } as Header; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromPartial(object.version); - } else { - message.version = undefined; - } - if (object.chain_id !== undefined && object.chain_id !== null) { - message.chain_id = object.chain_id; - } else { - message.chain_id = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.last_block_id !== undefined && object.last_block_id !== null) { - message.last_block_id = BlockID.fromPartial(object.last_block_id); - } else { - message.last_block_id = undefined; - } - if ( - object.last_commit_hash !== undefined && - object.last_commit_hash !== null - ) { - message.last_commit_hash = object.last_commit_hash; - } else { - message.last_commit_hash = new Uint8Array(); - } - if (object.data_hash !== undefined && object.data_hash !== null) { - message.data_hash = object.data_hash; - } else { - message.data_hash = new Uint8Array(); - } - if ( - object.validators_hash !== undefined && - object.validators_hash !== null - ) { - message.validators_hash = object.validators_hash; - } else { - message.validators_hash = new Uint8Array(); - } - if ( - object.next_validators_hash !== undefined && - object.next_validators_hash !== null - ) { - message.next_validators_hash = object.next_validators_hash; - } else { - message.next_validators_hash = new Uint8Array(); - } - if (object.consensus_hash !== undefined && object.consensus_hash !== null) { - message.consensus_hash = object.consensus_hash; - } else { - message.consensus_hash = new Uint8Array(); - } - if (object.app_hash !== undefined && object.app_hash !== null) { - message.app_hash = object.app_hash; - } else { - message.app_hash = new Uint8Array(); - } - if ( - object.last_results_hash !== undefined && - object.last_results_hash !== null - ) { - message.last_results_hash = object.last_results_hash; - } else { - message.last_results_hash = new Uint8Array(); - } - if (object.evidence_hash !== undefined && object.evidence_hash !== null) { - message.evidence_hash = object.evidence_hash; - } else { - message.evidence_hash = new Uint8Array(); - } - if ( - object.proposer_address !== undefined && - object.proposer_address !== null - ) { - message.proposer_address = object.proposer_address; - } else { - message.proposer_address = new Uint8Array(); - } - return message; - }, -}; - -const baseData: object = {}; - -export const Data = { - encode(message: Data, writer: Writer = Writer.create()): Writer { - for (const v of message.txs) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Data { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseData } as Data; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Data { - const message = { ...baseData } as Data; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: Data): unknown { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.txs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Data { - const message = { ...baseData } as Data; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(e); - } - } - return message; - }, -}; - -const baseVote: object = { type: 0, height: 0, round: 0, validator_index: 0 }; - -export const Vote = { - encode(message: Vote, writer: Writer = Writer.create()): Writer { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.block_id !== undefined) { - BlockID.encode(message.block_id, writer.uint32(34).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(42).fork() - ).ldelim(); - } - if (message.validator_address.length !== 0) { - writer.uint32(50).bytes(message.validator_address); - } - if (message.validator_index !== 0) { - writer.uint32(56).int32(message.validator_index); - } - if (message.signature.length !== 0) { - writer.uint32(66).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Vote { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVote } as Vote; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32() as any; - break; - case 2: - message.height = longToNumber(reader.int64() as Long); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.block_id = BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 6: - message.validator_address = reader.bytes(); - break; - case 7: - message.validator_index = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Vote { - const message = { ...baseVote } as Vote; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromJSON(object.block_id); - } else { - message.block_id = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = bytesFromBase64(object.validator_address); - } - if ( - object.validator_index !== undefined && - object.validator_index !== null - ) { - message.validator_index = Number(object.validator_index); - } else { - message.validator_index = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: Vote): unknown { - const obj: any = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.block_id !== undefined && - (obj.block_id = message.block_id - ? BlockID.toJSON(message.block_id) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.validator_address !== undefined && - (obj.validator_address = base64FromBytes( - message.validator_address !== undefined - ? message.validator_address - : new Uint8Array() - )); - message.validator_index !== undefined && - (obj.validator_index = message.validator_index); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Vote { - const message = { ...baseVote } as Vote; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromPartial(object.block_id); - } else { - message.block_id = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = new Uint8Array(); - } - if ( - object.validator_index !== undefined && - object.validator_index !== null - ) { - message.validator_index = object.validator_index; - } else { - message.validator_index = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseCommit: object = { height: 0, round: 0 }; - -export const Commit = { - encode(message: Commit, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(16).int32(message.round); - } - if (message.block_id !== undefined) { - BlockID.encode(message.block_id, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.signatures) { - CommitSig.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Commit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommit } as Commit; - message.signatures = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.block_id = BlockID.decode(reader, reader.uint32()); - break; - case 4: - message.signatures.push(CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Commit { - const message = { ...baseCommit } as Commit; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromJSON(object.block_id); - } else { - message.block_id = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Commit): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.block_id !== undefined && - (obj.block_id = message.block_id - ? BlockID.toJSON(message.block_id) - : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map((e) => - e ? CommitSig.toJSON(e) : undefined - ); - } else { - obj.signatures = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Commit { - const message = { ...baseCommit } as Commit; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromPartial(object.block_id); - } else { - message.block_id = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCommitSig: object = { block_id_flag: 0 }; - -export const CommitSig = { - encode(message: CommitSig, writer: Writer = Writer.create()): Writer { - if (message.block_id_flag !== 0) { - writer.uint32(8).int32(message.block_id_flag); - } - if (message.validator_address.length !== 0) { - writer.uint32(18).bytes(message.validator_address); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(26).fork() - ).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(34).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CommitSig { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommitSig } as CommitSig; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_id_flag = reader.int32() as any; - break; - case 2: - message.validator_address = reader.bytes(); - break; - case 3: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CommitSig { - const message = { ...baseCommitSig } as CommitSig; - if (object.block_id_flag !== undefined && object.block_id_flag !== null) { - message.block_id_flag = blockIDFlagFromJSON(object.block_id_flag); - } else { - message.block_id_flag = 0; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = bytesFromBase64(object.validator_address); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: CommitSig): unknown { - const obj: any = {}; - message.block_id_flag !== undefined && - (obj.block_id_flag = blockIDFlagToJSON(message.block_id_flag)); - message.validator_address !== undefined && - (obj.validator_address = base64FromBytes( - message.validator_address !== undefined - ? message.validator_address - : new Uint8Array() - )); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): CommitSig { - const message = { ...baseCommitSig } as CommitSig; - if (object.block_id_flag !== undefined && object.block_id_flag !== null) { - message.block_id_flag = object.block_id_flag; - } else { - message.block_id_flag = 0; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = new Uint8Array(); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseProposal: object = { type: 0, height: 0, round: 0, pol_round: 0 }; - -export const Proposal = { - encode(message: Proposal, writer: Writer = Writer.create()): Writer { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.pol_round !== 0) { - writer.uint32(32).int32(message.pol_round); - } - if (message.block_id !== undefined) { - BlockID.encode(message.block_id, writer.uint32(42).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(50).fork() - ).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(58).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Proposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProposal } as Proposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32() as any; - break; - case 2: - message.height = longToNumber(reader.int64() as Long); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.pol_round = reader.int32(); - break; - case 5: - message.block_id = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Proposal { - const message = { ...baseProposal } as Proposal; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.pol_round !== undefined && object.pol_round !== null) { - message.pol_round = Number(object.pol_round); - } else { - message.pol_round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromJSON(object.block_id); - } else { - message.block_id = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: Proposal): unknown { - const obj: any = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.pol_round !== undefined && (obj.pol_round = message.pol_round); - message.block_id !== undefined && - (obj.block_id = message.block_id - ? BlockID.toJSON(message.block_id) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Proposal { - const message = { ...baseProposal } as Proposal; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.pol_round !== undefined && object.pol_round !== null) { - message.pol_round = object.pol_round; - } else { - message.pol_round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromPartial(object.block_id); - } else { - message.block_id = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseSignedHeader: object = {}; - -export const SignedHeader = { - encode(message: SignedHeader, writer: Writer = Writer.create()): Writer { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.commit !== undefined) { - Commit.encode(message.commit, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SignedHeader { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSignedHeader } as SignedHeader; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SignedHeader { - const message = { ...baseSignedHeader } as SignedHeader; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromJSON(object.commit); - } else { - message.commit = undefined; - } - return message; - }, - - toJSON(message: SignedHeader): unknown { - const obj: any = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.commit !== undefined && - (obj.commit = message.commit ? Commit.toJSON(message.commit) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): SignedHeader { - const message = { ...baseSignedHeader } as SignedHeader; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromPartial(object.commit); - } else { - message.commit = undefined; - } - return message; - }, -}; - -const baseLightBlock: object = {}; - -export const LightBlock = { - encode(message: LightBlock, writer: Writer = Writer.create()): Writer { - if (message.signed_header !== undefined) { - SignedHeader.encode( - message.signed_header, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.validator_set !== undefined) { - ValidatorSet.encode( - message.validator_set, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): LightBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLightBlock } as LightBlock; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signed_header = SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validator_set = ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LightBlock { - const message = { ...baseLightBlock } as LightBlock; - if (object.signed_header !== undefined && object.signed_header !== null) { - message.signed_header = SignedHeader.fromJSON(object.signed_header); - } else { - message.signed_header = undefined; - } - if (object.validator_set !== undefined && object.validator_set !== null) { - message.validator_set = ValidatorSet.fromJSON(object.validator_set); - } else { - message.validator_set = undefined; - } - return message; - }, - - toJSON(message: LightBlock): unknown { - const obj: any = {}; - message.signed_header !== undefined && - (obj.signed_header = message.signed_header - ? SignedHeader.toJSON(message.signed_header) - : undefined); - message.validator_set !== undefined && - (obj.validator_set = message.validator_set - ? ValidatorSet.toJSON(message.validator_set) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): LightBlock { - const message = { ...baseLightBlock } as LightBlock; - if (object.signed_header !== undefined && object.signed_header !== null) { - message.signed_header = SignedHeader.fromPartial(object.signed_header); - } else { - message.signed_header = undefined; - } - if (object.validator_set !== undefined && object.validator_set !== null) { - message.validator_set = ValidatorSet.fromPartial(object.validator_set); - } else { - message.validator_set = undefined; - } - return message; - }, -}; - -const baseBlockMeta: object = { block_size: 0, num_txs: 0 }; - -export const BlockMeta = { - encode(message: BlockMeta, writer: Writer = Writer.create()): Writer { - if (message.block_id !== undefined) { - BlockID.encode(message.block_id, writer.uint32(10).fork()).ldelim(); - } - if (message.block_size !== 0) { - writer.uint32(16).int64(message.block_size); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(26).fork()).ldelim(); - } - if (message.num_txs !== 0) { - writer.uint32(32).int64(message.num_txs); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockMeta { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockMeta } as BlockMeta; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_id = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.block_size = longToNumber(reader.int64() as Long); - break; - case 3: - message.header = Header.decode(reader, reader.uint32()); - break; - case 4: - message.num_txs = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockMeta { - const message = { ...baseBlockMeta } as BlockMeta; - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromJSON(object.block_id); - } else { - message.block_id = undefined; - } - if (object.block_size !== undefined && object.block_size !== null) { - message.block_size = Number(object.block_size); - } else { - message.block_size = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.num_txs !== undefined && object.num_txs !== null) { - message.num_txs = Number(object.num_txs); - } else { - message.num_txs = 0; - } - return message; - }, - - toJSON(message: BlockMeta): unknown { - const obj: any = {}; - message.block_id !== undefined && - (obj.block_id = message.block_id - ? BlockID.toJSON(message.block_id) - : undefined); - message.block_size !== undefined && (obj.block_size = message.block_size); - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.num_txs !== undefined && (obj.num_txs = message.num_txs); - return obj; - }, - - fromPartial(object: DeepPartial): BlockMeta { - const message = { ...baseBlockMeta } as BlockMeta; - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromPartial(object.block_id); - } else { - message.block_id = undefined; - } - if (object.block_size !== undefined && object.block_size !== null) { - message.block_size = object.block_size; - } else { - message.block_size = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.num_txs !== undefined && object.num_txs !== null) { - message.num_txs = object.num_txs; - } else { - message.num_txs = 0; - } - return message; - }, -}; - -const baseTxProof: object = {}; - -export const TxProof = { - encode(message: TxProof, writer: Writer = Writer.create()): Writer { - if (message.root_hash.length !== 0) { - writer.uint32(10).bytes(message.root_hash); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxProof } as TxProof; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.root_hash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxProof { - const message = { ...baseTxProof } as TxProof; - if (object.root_hash !== undefined && object.root_hash !== null) { - message.root_hash = bytesFromBase64(object.root_hash); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: TxProof): unknown { - const obj: any = {}; - message.root_hash !== undefined && - (obj.root_hash = base64FromBytes( - message.root_hash !== undefined ? message.root_hash : new Uint8Array() - )); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): TxProof { - const message = { ...baseTxProof } as TxProof; - if (object.root_hash !== undefined && object.root_hash !== null) { - message.root_hash = object.root_hash; - } else { - message.root_hash = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.d.ts deleted file mode 100644 index 0654161ff2..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { PublicKey } from "../../tendermint/crypto/keys"; -export declare const protobufPackage = "tendermint.types"; -export interface ValidatorSet { - validators: Validator[]; - proposer: Validator | undefined; - totalVotingPower: number; -} -export interface Validator { - address: Uint8Array; - pubKey: PublicKey | undefined; - votingPower: number; - proposerPriority: number; -} -export interface SimpleValidator { - pubKey: PublicKey | undefined; - votingPower: number; -} -export declare const ValidatorSet: { - encode(message: ValidatorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ValidatorSet; - fromJSON(object: any): ValidatorSet; - toJSON(message: ValidatorSet): unknown; - fromPartial(object: DeepPartial): ValidatorSet; -}; -export declare const Validator: { - encode(message: Validator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Validator; - fromJSON(object: any): Validator; - toJSON(message: Validator): unknown; - fromPartial(object: DeepPartial): Validator; -}; -export declare const SimpleValidator: { - encode(message: SimpleValidator, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SimpleValidator; - fromJSON(object: any): SimpleValidator; - toJSON(message: SimpleValidator): unknown; - fromPartial(object: DeepPartial): SimpleValidator; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.js deleted file mode 100644 index 1bd1e4f815..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.js +++ /dev/null @@ -1,333 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { PublicKey } from "../../tendermint/crypto/keys"; -export const protobufPackage = "tendermint.types"; -const baseValidatorSet = { totalVotingPower: 0 }; -export const ValidatorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.validators) { - Validator.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.proposer !== undefined) { - Validator.encode(message.proposer, writer.uint32(18).fork()).ldelim(); - } - if (message.totalVotingPower !== 0) { - writer.uint32(24).int64(message.totalVotingPower); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSet }; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.totalVotingPower = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidatorSet }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromJSON(object.proposer); - } - else { - message.proposer = undefined; - } - if (object.totalVotingPower !== undefined && - object.totalVotingPower !== null) { - message.totalVotingPower = Number(object.totalVotingPower); - } - else { - message.totalVotingPower = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => e ? Validator.toJSON(e) : undefined); - } - else { - obj.validators = []; - } - message.proposer !== undefined && - (obj.proposer = message.proposer - ? Validator.toJSON(message.proposer) - : undefined); - message.totalVotingPower !== undefined && - (obj.totalVotingPower = message.totalVotingPower); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidatorSet }; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromPartial(object.proposer); - } - else { - message.proposer = undefined; - } - if (object.totalVotingPower !== undefined && - object.totalVotingPower !== null) { - message.totalVotingPower = object.totalVotingPower; - } - else { - message.totalVotingPower = 0; - } - return message; - }, -}; -const baseValidator = { votingPower: 0, proposerPriority: 0 }; -export const Validator = { - encode(message, writer = Writer.create()) { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.votingPower !== 0) { - writer.uint32(24).int64(message.votingPower); - } - if (message.proposerPriority !== 0) { - writer.uint32(32).int64(message.proposerPriority); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.votingPower = longToNumber(reader.int64()); - break; - case 4: - message.proposerPriority = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseValidator }; - if (object.address !== undefined && object.address !== null) { - message.address = bytesFromBase64(object.address); - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = Number(object.votingPower); - } - else { - message.votingPower = 0; - } - if (object.proposerPriority !== undefined && - object.proposerPriority !== null) { - message.proposerPriority = Number(object.proposerPriority); - } - else { - message.proposerPriority = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && - (obj.address = base64FromBytes(message.address !== undefined ? message.address : new Uint8Array())); - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.votingPower !== undefined && - (obj.votingPower = message.votingPower); - message.proposerPriority !== undefined && - (obj.proposerPriority = message.proposerPriority); - return obj; - }, - fromPartial(object) { - const message = { ...baseValidator }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = new Uint8Array(); - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = object.votingPower; - } - else { - message.votingPower = 0; - } - if (object.proposerPriority !== undefined && - object.proposerPriority !== null) { - message.proposerPriority = object.proposerPriority; - } - else { - message.proposerPriority = 0; - } - return message; - }, -}; -const baseSimpleValidator = { votingPower: 0 }; -export const SimpleValidator = { - encode(message, writer = Writer.create()) { - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.votingPower !== 0) { - writer.uint32(16).int64(message.votingPower); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimpleValidator }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.votingPower = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSimpleValidator }; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromJSON(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = Number(object.votingPower); - } - else { - message.votingPower = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pubKey !== undefined && - (obj.pubKey = message.pubKey - ? PublicKey.toJSON(message.pubKey) - : undefined); - message.votingPower !== undefined && - (obj.votingPower = message.votingPower); - return obj; - }, - fromPartial(object) { - const message = { ...baseSimpleValidator }; - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = PublicKey.fromPartial(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.votingPower !== undefined && object.votingPower !== null) { - message.votingPower = object.votingPower; - } - else { - message.votingPower = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.ts deleted file mode 100644 index 8c3581c198..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/types/validator.ts +++ /dev/null @@ -1,382 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { PublicKey } from "../../tendermint/crypto/keys"; - -export const protobufPackage = "tendermint.types"; - -export interface ValidatorSet { - validators: Validator[]; - proposer: Validator | undefined; - total_voting_power: number; -} - -export interface Validator { - address: Uint8Array; - pub_key: PublicKey | undefined; - voting_power: number; - proposer_priority: number; -} - -export interface SimpleValidator { - pub_key: PublicKey | undefined; - voting_power: number; -} - -const baseValidatorSet: object = { total_voting_power: 0 }; - -export const ValidatorSet = { - encode(message: ValidatorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.proposer !== undefined) { - Validator.encode(message.proposer, writer.uint32(18).fork()).ldelim(); - } - if (message.total_voting_power !== 0) { - writer.uint32(24).int64(message.total_voting_power); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.total_voting_power = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorSet { - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromJSON(object.proposer); - } else { - message.proposer = undefined; - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = Number(object.total_voting_power); - } else { - message.total_voting_power = 0; - } - return message; - }, - - toJSON(message: ValidatorSet): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.proposer !== undefined && - (obj.proposer = message.proposer - ? Validator.toJSON(message.proposer) - : undefined); - message.total_voting_power !== undefined && - (obj.total_voting_power = message.total_voting_power); - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorSet { - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromPartial(object.proposer); - } else { - message.proposer = undefined; - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = object.total_voting_power; - } else { - message.total_voting_power = 0; - } - return message; - }, -}; - -const baseValidator: object = { voting_power: 0, proposer_priority: 0 }; - -export const Validator = { - encode(message: Validator, writer: Writer = Writer.create()): Writer { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.pub_key !== undefined) { - PublicKey.encode(message.pub_key, writer.uint32(18).fork()).ldelim(); - } - if (message.voting_power !== 0) { - writer.uint32(24).int64(message.voting_power); - } - if (message.proposer_priority !== 0) { - writer.uint32(32).int64(message.proposer_priority); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Validator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator } as Validator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pub_key = PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.voting_power = longToNumber(reader.int64() as Long); - break; - case 4: - message.proposer_priority = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = bytesFromBase64(object.address); - } - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = PublicKey.fromJSON(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.voting_power !== undefined && object.voting_power !== null) { - message.voting_power = Number(object.voting_power); - } else { - message.voting_power = 0; - } - if ( - object.proposer_priority !== undefined && - object.proposer_priority !== null - ) { - message.proposer_priority = Number(object.proposer_priority); - } else { - message.proposer_priority = 0; - } - return message; - }, - - toJSON(message: Validator): unknown { - const obj: any = {}; - message.address !== undefined && - (obj.address = base64FromBytes( - message.address !== undefined ? message.address : new Uint8Array() - )); - message.pub_key !== undefined && - (obj.pub_key = message.pub_key - ? PublicKey.toJSON(message.pub_key) - : undefined); - message.voting_power !== undefined && - (obj.voting_power = message.voting_power); - message.proposer_priority !== undefined && - (obj.proposer_priority = message.proposer_priority); - return obj; - }, - - fromPartial(object: DeepPartial): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = new Uint8Array(); - } - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = PublicKey.fromPartial(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.voting_power !== undefined && object.voting_power !== null) { - message.voting_power = object.voting_power; - } else { - message.voting_power = 0; - } - if ( - object.proposer_priority !== undefined && - object.proposer_priority !== null - ) { - message.proposer_priority = object.proposer_priority; - } else { - message.proposer_priority = 0; - } - return message; - }, -}; - -const baseSimpleValidator: object = { voting_power: 0 }; - -export const SimpleValidator = { - encode(message: SimpleValidator, writer: Writer = Writer.create()): Writer { - if (message.pub_key !== undefined) { - PublicKey.encode(message.pub_key, writer.uint32(10).fork()).ldelim(); - } - if (message.voting_power !== 0) { - writer.uint32(16).int64(message.voting_power); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SimpleValidator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimpleValidator } as SimpleValidator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pub_key = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.voting_power = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SimpleValidator { - const message = { ...baseSimpleValidator } as SimpleValidator; - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = PublicKey.fromJSON(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.voting_power !== undefined && object.voting_power !== null) { - message.voting_power = Number(object.voting_power); - } else { - message.voting_power = 0; - } - return message; - }, - - toJSON(message: SimpleValidator): unknown { - const obj: any = {}; - message.pub_key !== undefined && - (obj.pub_key = message.pub_key - ? PublicKey.toJSON(message.pub_key) - : undefined); - message.voting_power !== undefined && - (obj.voting_power = message.voting_power); - return obj; - }, - - fromPartial(object: DeepPartial): SimpleValidator { - const message = { ...baseSimpleValidator } as SimpleValidator; - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = PublicKey.fromPartial(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.voting_power !== undefined && object.voting_power !== null) { - message.voting_power = object.voting_power; - } else { - message.voting_power = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.d.ts deleted file mode 100644 index 3158f17931..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "tendermint.version"; -/** - * App includes the protocol and software version for the application. - * This information is included in ResponseInfo. The App.Protocol can be - * updated in ResponseEndBlock. - */ -export interface App { - protocol: number; - software: string; -} -/** - * 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. - */ -export interface Consensus { - block: number; - app: number; -} -export declare const App: { - encode(message: App, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): App; - fromJSON(object: any): App; - toJSON(message: App): unknown; - fromPartial(object: DeepPartial): App; -}; -export declare const Consensus: { - encode(message: Consensus, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Consensus; - fromJSON(object: any): Consensus; - toJSON(message: Consensus): unknown; - fromPartial(object: DeepPartial): Consensus; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.js deleted file mode 100644 index 39e0693d19..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.js +++ /dev/null @@ -1,165 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "tendermint.version"; -const baseApp = { protocol: 0, software: "" }; -export const App = { - encode(message, writer = Writer.create()) { - if (message.protocol !== 0) { - writer.uint32(8).uint64(message.protocol); - } - if (message.software !== "") { - writer.uint32(18).string(message.software); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseApp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocol = longToNumber(reader.uint64()); - break; - case 2: - message.software = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseApp }; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = Number(object.protocol); - } - else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = String(object.software); - } - else { - message.software = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.protocol !== undefined && (obj.protocol = message.protocol); - message.software !== undefined && (obj.software = message.software); - return obj; - }, - fromPartial(object) { - const message = { ...baseApp }; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = object.protocol; - } - else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = object.software; - } - else { - message.software = ""; - } - return message; - }, -}; -const baseConsensus = { block: 0, app: 0 }; -export const Consensus = { - encode(message, writer = Writer.create()) { - if (message.block !== 0) { - writer.uint32(8).uint64(message.block); - } - if (message.app !== 0) { - writer.uint32(16).uint64(message.app); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensus }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = longToNumber(reader.uint64()); - break; - case 2: - message.app = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseConsensus }; - if (object.block !== undefined && object.block !== null) { - message.block = Number(object.block); - } - else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = Number(object.app); - } - else { - message.app = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.block !== undefined && (obj.block = message.block); - message.app !== undefined && (obj.app = message.app); - return obj; - }, - fromPartial(object) { - const message = { ...baseConsensus }; - if (object.block !== undefined && object.block !== null) { - message.block = object.block; - } - else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = object.app; - } - else { - message.app = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.ts deleted file mode 100644 index 4bc6ad8232..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.version"; - -/** - * App includes the protocol and software version for the application. - * This information is included in ResponseInfo. The App.Protocol can be - * updated in ResponseEndBlock. - */ -export interface App { - protocol: number; - software: string; -} - -/** - * 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. - */ -export interface Consensus { - block: number; - app: number; -} - -const baseApp: object = { protocol: 0, software: "" }; - -export const App = { - encode(message: App, writer: Writer = Writer.create()): Writer { - if (message.protocol !== 0) { - writer.uint32(8).uint64(message.protocol); - } - if (message.software !== "") { - writer.uint32(18).string(message.software); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): App { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseApp } as App; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocol = longToNumber(reader.uint64() as Long); - break; - case 2: - message.software = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): App { - const message = { ...baseApp } as App; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = Number(object.protocol); - } else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = String(object.software); - } else { - message.software = ""; - } - return message; - }, - - toJSON(message: App): unknown { - const obj: any = {}; - message.protocol !== undefined && (obj.protocol = message.protocol); - message.software !== undefined && (obj.software = message.software); - return obj; - }, - - fromPartial(object: DeepPartial): App { - const message = { ...baseApp } as App; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = object.protocol; - } else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = object.software; - } else { - message.software = ""; - } - return message; - }, -}; - -const baseConsensus: object = { block: 0, app: 0 }; - -export const Consensus = { - encode(message: Consensus, writer: Writer = Writer.create()): Writer { - if (message.block !== 0) { - writer.uint32(8).uint64(message.block); - } - if (message.app !== 0) { - writer.uint32(16).uint64(message.app); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Consensus { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensus } as Consensus; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = longToNumber(reader.uint64() as Long); - break; - case 2: - message.app = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Consensus { - const message = { ...baseConsensus } as Consensus; - if (object.block !== undefined && object.block !== null) { - message.block = Number(object.block); - } else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = Number(object.app); - } else { - message.app = 0; - } - return message; - }, - - toJSON(message: Consensus): unknown { - const obj: any = {}; - message.block !== undefined && (obj.block = message.block); - message.app !== undefined && (obj.app = message.app); - return obj; - }, - - fromPartial(object: DeepPartial): Consensus { - const message = { ...baseConsensus } as Consensus; - if (object.block !== undefined && object.block !== null) { - message.block = object.block; - } else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = object.app; - } else { - message.app = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/package.json b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/package.json deleted file mode 100755 index c7a239aa05..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmos-staking-v1beta1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmos.staking.v1beta1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/cosmos-sdk/x/staking/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/index.ts deleted file mode 100755 index 5e5b0b6017..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/index.ts +++ /dev/null @@ -1,283 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { Tx } from "./module/types/cosmos/tx/v1beta1/tx" -import { TxRaw } from "./module/types/cosmos/tx/v1beta1/tx" -import { SignDoc } from "./module/types/cosmos/tx/v1beta1/tx" -import { TxBody } from "./module/types/cosmos/tx/v1beta1/tx" -import { AuthInfo } from "./module/types/cosmos/tx/v1beta1/tx" -import { SignerInfo } from "./module/types/cosmos/tx/v1beta1/tx" -import { ModeInfo } from "./module/types/cosmos/tx/v1beta1/tx" -import { ModeInfo_Single } from "./module/types/cosmos/tx/v1beta1/tx" -import { ModeInfo_Multi } from "./module/types/cosmos/tx/v1beta1/tx" -import { Fee } from "./module/types/cosmos/tx/v1beta1/tx" - - -export { Tx, TxRaw, SignDoc, TxBody, AuthInfo, SignerInfo, ModeInfo, ModeInfo_Single, ModeInfo_Multi, Fee }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Simulate: {}, - GetTx: {}, - BroadcastTx: {}, - GetTxsEvent: {}, - GetBlockWithTxs: {}, - - _Structure: { - Tx: getStructure(Tx.fromPartial({})), - TxRaw: getStructure(TxRaw.fromPartial({})), - SignDoc: getStructure(SignDoc.fromPartial({})), - TxBody: getStructure(TxBody.fromPartial({})), - AuthInfo: getStructure(AuthInfo.fromPartial({})), - SignerInfo: getStructure(SignerInfo.fromPartial({})), - ModeInfo: getStructure(ModeInfo.fromPartial({})), - ModeInfo_Single: getStructure(ModeInfo_Single.fromPartial({})), - ModeInfo_Multi: getStructure(ModeInfo_Multi.fromPartial({})), - Fee: getStructure(Fee.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getSimulate: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Simulate[JSON.stringify(params)] ?? {} - }, - getGetTx: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetTx[JSON.stringify(params)] ?? {} - }, - getBroadcastTx: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.BroadcastTx[JSON.stringify(params)] ?? {} - }, - getGetTxsEvent: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetTxsEvent[JSON.stringify(params)] ?? {} - }, - getGetBlockWithTxs: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetBlockWithTxs[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.tx.v1beta1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async ServiceSimulate({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.serviceSimulate({...key})).data - - - commit('QUERY', { query: 'Simulate', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'ServiceSimulate', payload: { options: { all }, params: {...key},query }}) - return getters['getSimulate']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:ServiceSimulate API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async ServiceGetTx({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.serviceGetTx( key.hash)).data - - - commit('QUERY', { query: 'GetTx', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'ServiceGetTx', payload: { options: { all }, params: {...key},query }}) - return getters['getGetTx']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:ServiceGetTx API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async ServiceBroadcastTx({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.serviceBroadcastTx({...key})).data - - - commit('QUERY', { query: 'BroadcastTx', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'ServiceBroadcastTx', payload: { options: { all }, params: {...key},query }}) - return getters['getBroadcastTx']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:ServiceBroadcastTx API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async ServiceGetTxsEvent({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.serviceGetTxsEvent(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.serviceGetTxsEvent({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'GetTxsEvent', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'ServiceGetTxsEvent', payload: { options: { all }, params: {...key},query }}) - return getters['getGetTxsEvent']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:ServiceGetTxsEvent API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async ServiceGetBlockWithTxs({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.serviceGetBlockWithTxs( key.height, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.serviceGetBlockWithTxs( key.height, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'GetBlockWithTxs', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'ServiceGetBlockWithTxs', payload: { options: { all }, params: {...key},query }}) - return getters['getGetBlockWithTxs']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:ServiceGetBlockWithTxs API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/index.ts deleted file mode 100755 index 67d4b093f0..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; - - -const types = [ - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/rest.ts deleted file mode 100644 index 3ad4ded324..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/rest.ts +++ /dev/null @@ -1,1284 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* Event allows application developers to attach additional information to -ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. -Later, transactions may be queried using these events. -*/ -export interface AbciEvent { - type?: string; - attributes?: AbciEventAttribute[]; -} - -/** - * EventAttribute is a single key-value pair, associated with an event. - */ -export interface AbciEventAttribute { - /** @format byte */ - key?: string; - - /** @format byte */ - value?: string; - index?: boolean; -} - -/** - * Result is the union of ResponseFormat and ResponseCheckTx. - */ -export interface Abciv1Beta1Result { - /** - * Data is any data returned from message or handler execution. It MUST be - * length prefixed in order to separate data from multiple message executions. - * @format byte - */ - data?: string; - - /** Log contains the log information from message or handler execution. */ - log?: string; - - /** - * Events contains a slice of Event objects that were emitted during message - * or handler execution. - */ - events?: AbciEvent[]; -} - -export interface CryptoPublicKey { - /** @format byte */ - ed25519?: string; - - /** @format byte */ - secp256k1?: string; -} - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -export interface TenderminttypesData { - /** - * 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. - */ - txs?: string[]; -} - -export interface TenderminttypesEvidence { - /** DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. */ - duplicate_vote_evidence?: TypesDuplicateVoteEvidence; - - /** LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. */ - light_client_attack_evidence?: TypesLightClientAttackEvidence; -} - -export interface TenderminttypesValidator { - /** @format byte */ - address?: string; - pub_key?: CryptoPublicKey; - - /** @format int64 */ - voting_power?: string; - - /** @format int64 */ - proposer_priority?: string; -} - -export interface TypesBlock { - /** Header defines the structure of a Tendermint block header. */ - header?: TypesHeader; - data?: TenderminttypesData; - evidence?: TypesEvidenceList; - - /** Commit contains the evidence that a block was committed by a set of validators. */ - last_commit?: TypesCommit; -} - -export interface TypesBlockID { - /** @format byte */ - hash?: string; - part_set_header?: TypesPartSetHeader; -} - -export enum TypesBlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = "BLOCK_ID_FLAG_UNKNOWN", - BLOCK_ID_FLAG_ABSENT = "BLOCK_ID_FLAG_ABSENT", - BLOCK_ID_FLAG_COMMIT = "BLOCK_ID_FLAG_COMMIT", - BLOCK_ID_FLAG_NIL = "BLOCK_ID_FLAG_NIL", -} - -/** - * Commit contains the evidence that a block was committed by a set of validators. - */ -export interface TypesCommit { - /** @format int64 */ - height?: string; - - /** @format int32 */ - round?: number; - block_id?: TypesBlockID; - signatures?: TypesCommitSig[]; -} - -/** - * CommitSig is a part of the Vote included in a Commit. - */ -export interface TypesCommitSig { - block_id_flag?: TypesBlockIDFlag; - - /** @format byte */ - validator_address?: string; - - /** @format date-time */ - timestamp?: string; - - /** @format byte */ - signature?: string; -} - -/** - * DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. - */ -export interface TypesDuplicateVoteEvidence { - /** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ - vote_a?: TypesVote; - - /** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ - vote_b?: TypesVote; - - /** @format int64 */ - total_voting_power?: string; - - /** @format int64 */ - validator_power?: string; - - /** @format date-time */ - timestamp?: string; -} - -export interface TypesEvidenceList { - evidence?: TenderminttypesEvidence[]; -} - -/** - * Header defines the structure of a Tendermint block header. - */ -export interface TypesHeader { - /** - * 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. - */ - version?: VersionConsensus; - chain_id?: string; - - /** @format int64 */ - height?: string; - - /** @format date-time */ - time?: string; - last_block_id?: TypesBlockID; - - /** @format byte */ - last_commit_hash?: string; - - /** @format byte */ - data_hash?: string; - - /** @format byte */ - validators_hash?: string; - - /** @format byte */ - next_validators_hash?: string; - - /** @format byte */ - consensus_hash?: string; - - /** @format byte */ - app_hash?: string; - - /** @format byte */ - last_results_hash?: string; - - /** @format byte */ - evidence_hash?: string; - - /** @format byte */ - proposer_address?: string; -} - -export interface TypesLightBlock { - signed_header?: TypesSignedHeader; - validator_set?: TypesValidatorSet; -} - -/** - * LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. - */ -export interface TypesLightClientAttackEvidence { - conflicting_block?: TypesLightBlock; - - /** @format int64 */ - common_height?: string; - byzantine_validators?: TenderminttypesValidator[]; - - /** @format int64 */ - total_voting_power?: string; - - /** @format date-time */ - timestamp?: string; -} - -export interface TypesPartSetHeader { - /** @format int64 */ - total?: number; - - /** @format byte */ - hash?: string; -} - -export interface TypesSignedHeader { - /** Header defines the structure of a Tendermint block header. */ - header?: TypesHeader; - - /** Commit contains the evidence that a block was committed by a set of validators. */ - commit?: TypesCommit; -} - -/** -* SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals -*/ -export enum TypesSignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = "SIGNED_MSG_TYPE_UNKNOWN", - SIGNED_MSG_TYPE_PREVOTE = "SIGNED_MSG_TYPE_PREVOTE", - SIGNED_MSG_TYPE_PRECOMMIT = "SIGNED_MSG_TYPE_PRECOMMIT", - SIGNED_MSG_TYPE_PROPOSAL = "SIGNED_MSG_TYPE_PROPOSAL", -} - -export interface TypesValidatorSet { - validators?: TenderminttypesValidator[]; - proposer?: TenderminttypesValidator; - - /** @format int64 */ - total_voting_power?: string; -} - -/** -* Vote represents a prevote, precommit, or commit vote from validators for -consensus. -*/ -export interface TypesVote { - /** - * SignedMsgType is a type of signed message in the consensus. - * - * - SIGNED_MSG_TYPE_PREVOTE: Votes - * - SIGNED_MSG_TYPE_PROPOSAL: Proposals - */ - type?: TypesSignedMsgType; - - /** @format int64 */ - height?: string; - - /** @format int32 */ - round?: number; - block_id?: TypesBlockID; - - /** @format date-time */ - timestamp?: string; - - /** @format byte */ - validator_address?: string; - - /** @format int32 */ - validator_index?: number; - - /** @format byte */ - signature?: string; -} - -/** - * ABCIMessageLog defines a structure containing an indexed tx ABCI message log. - */ -export interface V1Beta1ABCIMessageLog { - /** @format int64 */ - msg_index?: number; - log?: string; - - /** - * Events contains a slice of Event objects that were emitted during some - * execution. - */ - events?: V1Beta1StringEvent[]; -} - -/** -* Attribute defines an attribute wrapper where the key and value are -strings instead of raw bytes. -*/ -export interface V1Beta1Attribute { - key?: string; - value?: string; -} - -/** -* AuthInfo describes the fee and signer modes that are used to sign a -transaction. -*/ -export interface V1Beta1AuthInfo { - /** - * 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. - */ - signer_infos?: V1Beta1SignerInfo[]; - - /** - * Fee is the fee and gas limit for the transaction. The first signer is the - * primary signer and the one which pays the fee. The fee can be calculated - * based on the cost of evaluating the body and doing signature verification - * of the signers. This can be estimated via simulation. - */ - fee?: V1Beta1Fee; -} - -/** -* 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. -*/ -export enum V1Beta1BroadcastMode { - BROADCAST_MODE_UNSPECIFIED = "BROADCAST_MODE_UNSPECIFIED", - BROADCAST_MODE_BLOCK = "BROADCAST_MODE_BLOCK", - BROADCAST_MODE_SYNC = "BROADCAST_MODE_SYNC", - BROADCAST_MODE_ASYNC = "BROADCAST_MODE_ASYNC", -} - -/** -* BroadcastTxRequest is the request type for the Service.BroadcastTxRequest -RPC method. -*/ -export interface V1Beta1BroadcastTxRequest { - /** - * tx_bytes is the raw transaction. - * @format byte - */ - tx_bytes?: string; - - /** - * 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. - */ - mode?: V1Beta1BroadcastMode; -} - -/** -* BroadcastTxResponse is the response type for the -Service.BroadcastTx method. -*/ -export interface V1Beta1BroadcastTxResponse { - /** tx_response is the queried TxResponses. */ - tx_response?: V1Beta1TxResponse; -} - -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** -* 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. -*/ -export interface V1Beta1CompactBitArray { - /** @format int64 */ - extra_bits_stored?: number; - - /** @format byte */ - elems?: string; -} - -/** -* Fee includes the amount of coins paid in fees and the maximum -gas to be used by the transaction. The ratio yields an effective "gasprice", -which must be above some miminum to be accepted into the mempool. -*/ -export interface V1Beta1Fee { - amount?: V1Beta1Coin[]; - - /** @format uint64 */ - gas_limit?: string; - - /** - * 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. - */ - payer?: string; - granter?: string; -} - -/** - * GasInfo defines tx execution gas context. - */ -export interface V1Beta1GasInfo { - /** - * GasWanted is the maximum units of work we allow this tx to perform. - * @format uint64 - */ - gas_wanted?: string; - - /** - * GasUsed is the amount of gas actually consumed. - * @format uint64 - */ - gas_used?: string; -} - -/** -* GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. - -Since: cosmos-sdk 0.45.2 -*/ -export interface V1Beta1GetBlockWithTxsResponse { - /** txs are the transactions in the block. */ - txs?: V1Beta1Tx[]; - block_id?: TypesBlockID; - block?: TypesBlock; - - /** pagination defines a pagination for the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * GetTxResponse is the response type for the Service.GetTx method. - */ -export interface V1Beta1GetTxResponse { - /** tx is the queried transaction. */ - tx?: V1Beta1Tx; - - /** tx_response is the queried TxResponses. */ - tx_response?: V1Beta1TxResponse; -} - -/** -* GetTxsEventResponse is the response type for the Service.TxsByEvents -RPC method. -*/ -export interface V1Beta1GetTxsEventResponse { - /** txs is the list of queried transactions. */ - txs?: V1Beta1Tx[]; - - /** tx_responses is the list of queried TxResponses. */ - tx_responses?: V1Beta1TxResponse[]; - - /** pagination defines a pagination for the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * ModeInfo describes the signing mode of a single or nested multisig signer. - */ -export interface V1Beta1ModeInfo { - single?: V1Beta1ModeInfoSingle; - multi?: V1Beta1ModeInfoMulti; -} - -export interface V1Beta1ModeInfoMulti { - /** - * 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. - */ - bitarray?: V1Beta1CompactBitArray; - mode_infos?: V1Beta1ModeInfo[]; -} - -export interface V1Beta1ModeInfoSingle { - /** - * 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 - */ - mode?: V1Beta1SignMode; -} - -/** -* - 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 -*/ -export enum V1Beta1OrderBy { - ORDER_BY_UNSPECIFIED = "ORDER_BY_UNSPECIFIED", - ORDER_BY_ASC = "ORDER_BY_ASC", - ORDER_BY_DESC = "ORDER_BY_DESC", -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - 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; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -/** -* 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 -*/ -export enum V1Beta1SignMode { - SIGN_MODE_UNSPECIFIED = "SIGN_MODE_UNSPECIFIED", - SIGN_MODE_DIRECT = "SIGN_MODE_DIRECT", - SIGN_MODE_TEXTUAL = "SIGN_MODE_TEXTUAL", - SIGN_MODE_LEGACY_AMINO_JSON = "SIGN_MODE_LEGACY_AMINO_JSON", - SIGNMODEEIP191 = "SIGN_MODE_EIP_191", -} - -/** -* SignerInfo describes the public key and signing mode of a single top-level -signer. -*/ -export interface V1Beta1SignerInfo { - /** - * 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. - */ - public_key?: ProtobufAny; - - /** ModeInfo describes the signing mode of a single or nested multisig signer. */ - mode_info?: V1Beta1ModeInfo; - - /** - * 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. - * @format uint64 - */ - sequence?: string; -} - -/** -* SimulateRequest is the request type for the Service.Simulate -RPC method. -*/ -export interface V1Beta1SimulateRequest { - /** - * tx is the transaction to simulate. - * Deprecated. Send raw tx bytes instead. - */ - tx?: V1Beta1Tx; - - /** - * tx_bytes is the raw transaction. - * - * Since: cosmos-sdk 0.43 - * @format byte - */ - tx_bytes?: string; -} - -/** -* SimulateResponse is the response type for the -Service.SimulateRPC method. -*/ -export interface V1Beta1SimulateResponse { - /** gas_info is the information about gas used in the simulation. */ - gas_info?: V1Beta1GasInfo; - - /** result is the result of the simulation. */ - result?: Abciv1Beta1Result; -} - -/** -* StringEvent defines en Event object wrapper where all the attributes -contain key/value pairs that are strings instead of raw bytes. -*/ -export interface V1Beta1StringEvent { - type?: string; - attributes?: V1Beta1Attribute[]; -} - -/** - * Tx is the standard type used for broadcasting transactions. - */ -export interface V1Beta1Tx { - /** TxBody is the body of a transaction that all signers sign over. */ - body?: V1Beta1TxBody; - - /** - * AuthInfo describes the fee and signer modes that are used to sign a - * transaction. - */ - auth_info?: V1Beta1AuthInfo; - - /** - * signatures is a list of signatures that matches the length and order of - * AuthInfo's signer_infos to allow connecting signature meta information like - * public key and signing mode by position. - */ - signatures?: string[]; -} - -/** - * TxBody is the body of a transaction that all signers sign over. - */ -export interface V1Beta1TxBody { - /** - * 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. - */ - messages?: ProtobufAny[]; - - /** - * 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). - */ - memo?: string; - - /** @format uint64 */ - timeout_height?: string; - extension_options?: ProtobufAny[]; - non_critical_extension_options?: ProtobufAny[]; -} - -/** -* TxResponse defines a structure containing relevant tx data and metadata. The -tags are stringified and the log is JSON decoded. -*/ -export interface V1Beta1TxResponse { - /** @format int64 */ - height?: string; - - /** The transaction hash. */ - txhash?: string; - codespace?: string; - - /** - * Response code. - * @format int64 - */ - code?: number; - - /** Result bytes, if any. */ - data?: string; - - /** - * The output of the application's logger (raw string). May be - * non-deterministic. - */ - raw_log?: string; - - /** The output of the application's logger (typed). May be non-deterministic. */ - logs?: V1Beta1ABCIMessageLog[]; - - /** Additional information. May be non-deterministic. */ - info?: string; - - /** - * Amount of gas requested for transaction. - * @format int64 - */ - gas_wanted?: string; - - /** - * Amount of gas consumed by transaction. - * @format int64 - */ - gas_used?: string; - - /** The request transaction bytes. */ - tx?: ProtobufAny; - - /** - * Time of the previous block. For heights > 1, it's the weighted median of - * the timestamps of the valid votes in the block.LastCommit. For height == 1, - * it's genesis time. - */ - timestamp?: string; - - /** - * 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. - * - * Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - */ - events?: AbciEvent[]; -} - -/** -* 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. -*/ -export interface VersionConsensus { - /** @format uint64 */ - block?: string; - - /** @format uint64 */ - app?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/tx/v1beta1/service.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Service - * @name ServiceSimulate - * @summary Simulate simulates executing a transaction for estimating gas usage. - * @request POST:/cosmos/tx/v1beta1/simulate - */ - serviceSimulate = (body: V1Beta1SimulateRequest, params: RequestParams = {}) => - this.request({ - path: `/cosmos/tx/v1beta1/simulate`, - method: "POST", - body: body, - type: ContentType.Json, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Service - * @name ServiceGetTxsEvent - * @summary GetTxsEvent fetches txs by event. - * @request GET:/cosmos/tx/v1beta1/txs - */ - serviceGetTxsEvent = ( - query?: { - events?: string[]; - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - order_by?: "ORDER_BY_UNSPECIFIED" | "ORDER_BY_ASC" | "ORDER_BY_DESC"; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/tx/v1beta1/txs`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Service - * @name ServiceBroadcastTx - * @summary BroadcastTx broadcast transaction. - * @request POST:/cosmos/tx/v1beta1/txs - */ - serviceBroadcastTx = (body: V1Beta1BroadcastTxRequest, params: RequestParams = {}) => - this.request({ - path: `/cosmos/tx/v1beta1/txs`, - method: "POST", - body: body, - type: ContentType.Json, - format: "json", - ...params, - }); - - /** - * @description Since: cosmos-sdk 0.45.2 - * - * @tags Service - * @name ServiceGetBlockWithTxs - * @summary GetBlockWithTxs fetches a block with decoded txs. - * @request GET:/cosmos/tx/v1beta1/txs/block/{height} - */ - serviceGetBlockWithTxs = ( - height: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/cosmos/tx/v1beta1/txs/block/${height}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Service - * @name ServiceGetTx - * @summary GetTx fetches a tx by hash. - * @request GET:/cosmos/tx/v1beta1/txs/{hash} - */ - serviceGetTx = (hash: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/tx/v1beta1/txs/${hash}`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.ts deleted file mode 100644 index 3498e6b9c0..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/base/abci/v1beta1/abci.ts +++ /dev/null @@ -1,1281 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { Event } from "../../../../tendermint/abci/types"; - -export const protobufPackage = "cosmos.base.abci.v1beta1"; - -/** - * TxResponse defines a structure containing relevant tx data and metadata. The - * tags are stringified and the log is JSON decoded. - */ -export interface TxResponse { - /** The block height */ - height: number; - /** The transaction hash. */ - txhash: string; - /** Namespace for the Code */ - codespace: string; - /** Response code. */ - code: number; - /** Result bytes, if any. */ - data: string; - /** - * The output of the application's logger (raw string). May be - * non-deterministic. - */ - raw_log: string; - /** The output of the application's logger (typed). May be non-deterministic. */ - logs: ABCIMessageLog[]; - /** Additional information. May be non-deterministic. */ - info: string; - /** Amount of gas requested for transaction. */ - gas_wanted: number; - /** Amount of gas consumed by transaction. */ - gas_used: number; - /** The request transaction bytes. */ - tx: Any | undefined; - /** - * Time of the previous block. For heights > 1, it's the weighted median of - * the timestamps of the valid votes in the block.LastCommit. For height == 1, - * it's genesis time. - */ - timestamp: string; - /** - * 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. - * - * Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - */ - events: Event[]; -} - -/** ABCIMessageLog defines a structure containing an indexed tx ABCI message log. */ -export interface ABCIMessageLog { - msg_index: number; - log: string; - /** - * Events contains a slice of Event objects that were emitted during some - * execution. - */ - events: StringEvent[]; -} - -/** - * StringEvent defines en Event object wrapper where all the attributes - * contain key/value pairs that are strings instead of raw bytes. - */ -export interface StringEvent { - type: string; - attributes: Attribute[]; -} - -/** - * Attribute defines an attribute wrapper where the key and value are - * strings instead of raw bytes. - */ -export interface Attribute { - key: string; - value: string; -} - -/** GasInfo defines tx execution gas context. */ -export interface GasInfo { - /** GasWanted is the maximum units of work we allow this tx to perform. */ - gas_wanted: number; - /** GasUsed is the amount of gas actually consumed. */ - gas_used: number; -} - -/** Result is the union of ResponseFormat and ResponseCheckTx. */ -export interface Result { - /** - * Data is any data returned from message or handler execution. It MUST be - * length prefixed in order to separate data from multiple message executions. - */ - data: Uint8Array; - /** Log contains the log information from message or handler execution. */ - log: string; - /** - * Events contains a slice of Event objects that were emitted during message - * or handler execution. - */ - events: Event[]; -} - -/** - * SimulationResponse defines the response generated when a transaction is - * successfully simulated. - */ -export interface SimulationResponse { - gas_info: GasInfo | undefined; - result: Result | undefined; -} - -/** - * MsgData defines the data returned in a Result object during message - * execution. - */ -export interface MsgData { - msg_type: string; - data: Uint8Array; -} - -/** - * TxMsgData defines a list of MsgData. A transaction will have a MsgData object - * for each message. - */ -export interface TxMsgData { - data: MsgData[]; -} - -/** SearchTxsResult defines a structure for querying txs pageable */ -export interface SearchTxsResult { - /** Count of all txs */ - total_count: number; - /** Count of txs in current page */ - count: number; - /** Index of current page, start from 1 */ - page_number: number; - /** Count of total pages */ - page_total: number; - /** Max count txs per page */ - limit: number; - /** List of txs in current page */ - txs: TxResponse[]; -} - -const baseTxResponse: object = { - height: 0, - txhash: "", - codespace: "", - code: 0, - data: "", - raw_log: "", - info: "", - gas_wanted: 0, - gas_used: 0, - timestamp: "", -}; - -export const TxResponse = { - encode(message: TxResponse, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.txhash !== "") { - writer.uint32(18).string(message.txhash); - } - if (message.codespace !== "") { - writer.uint32(26).string(message.codespace); - } - if (message.code !== 0) { - writer.uint32(32).uint32(message.code); - } - if (message.data !== "") { - writer.uint32(42).string(message.data); - } - if (message.raw_log !== "") { - writer.uint32(50).string(message.raw_log); - } - for (const v of message.logs) { - ABCIMessageLog.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.info !== "") { - writer.uint32(66).string(message.info); - } - if (message.gas_wanted !== 0) { - writer.uint32(72).int64(message.gas_wanted); - } - if (message.gas_used !== 0) { - writer.uint32(80).int64(message.gas_used); - } - if (message.tx !== undefined) { - Any.encode(message.tx, writer.uint32(90).fork()).ldelim(); - } - if (message.timestamp !== "") { - writer.uint32(98).string(message.timestamp); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(106).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxResponse } as TxResponse; - message.logs = []; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.txhash = reader.string(); - break; - case 3: - message.codespace = reader.string(); - break; - case 4: - message.code = reader.uint32(); - break; - case 5: - message.data = reader.string(); - break; - case 6: - message.raw_log = reader.string(); - break; - case 7: - message.logs.push(ABCIMessageLog.decode(reader, reader.uint32())); - break; - case 8: - message.info = reader.string(); - break; - case 9: - message.gas_wanted = longToNumber(reader.int64() as Long); - break; - case 10: - message.gas_used = longToNumber(reader.int64() as Long); - break; - case 11: - message.tx = Any.decode(reader, reader.uint32()); - break; - case 12: - message.timestamp = reader.string(); - break; - case 13: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxResponse { - const message = { ...baseTxResponse } as TxResponse; - message.logs = []; - message.events = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.txhash !== undefined && object.txhash !== null) { - message.txhash = String(object.txhash); - } else { - message.txhash = ""; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } else { - message.codespace = ""; - } - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = String(object.data); - } else { - message.data = ""; - } - if (object.raw_log !== undefined && object.raw_log !== null) { - message.raw_log = String(object.raw_log); - } else { - message.raw_log = ""; - } - if (object.logs !== undefined && object.logs !== null) { - for (const e of object.logs) { - message.logs.push(ABCIMessageLog.fromJSON(e)); - } - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - if (object.gas_wanted !== undefined && object.gas_wanted !== null) { - message.gas_wanted = Number(object.gas_wanted); - } else { - message.gas_wanted = 0; - } - if (object.gas_used !== undefined && object.gas_used !== null) { - message.gas_used = Number(object.gas_used); - } else { - message.gas_used = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = Any.fromJSON(object.tx); - } else { - message.tx = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = String(object.timestamp); - } else { - message.timestamp = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: TxResponse): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.txhash !== undefined && (obj.txhash = message.txhash); - message.codespace !== undefined && (obj.codespace = message.codespace); - message.code !== undefined && (obj.code = message.code); - message.data !== undefined && (obj.data = message.data); - message.raw_log !== undefined && (obj.raw_log = message.raw_log); - if (message.logs) { - obj.logs = message.logs.map((e) => - e ? ABCIMessageLog.toJSON(e) : undefined - ); - } else { - obj.logs = []; - } - message.info !== undefined && (obj.info = message.info); - message.gas_wanted !== undefined && (obj.gas_wanted = message.gas_wanted); - message.gas_used !== undefined && (obj.gas_used = message.gas_used); - message.tx !== undefined && - (obj.tx = message.tx ? Any.toJSON(message.tx) : undefined); - message.timestamp !== undefined && (obj.timestamp = message.timestamp); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): TxResponse { - const message = { ...baseTxResponse } as TxResponse; - message.logs = []; - message.events = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.txhash !== undefined && object.txhash !== null) { - message.txhash = object.txhash; - } else { - message.txhash = ""; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } else { - message.codespace = ""; - } - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = ""; - } - if (object.raw_log !== undefined && object.raw_log !== null) { - message.raw_log = object.raw_log; - } else { - message.raw_log = ""; - } - if (object.logs !== undefined && object.logs !== null) { - for (const e of object.logs) { - message.logs.push(ABCIMessageLog.fromPartial(e)); - } - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - if (object.gas_wanted !== undefined && object.gas_wanted !== null) { - message.gas_wanted = object.gas_wanted; - } else { - message.gas_wanted = 0; - } - if (object.gas_used !== undefined && object.gas_used !== null) { - message.gas_used = object.gas_used; - } else { - message.gas_used = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = Any.fromPartial(object.tx); - } else { - message.tx = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; - -const baseABCIMessageLog: object = { msg_index: 0, log: "" }; - -export const ABCIMessageLog = { - encode(message: ABCIMessageLog, writer: Writer = Writer.create()): Writer { - if (message.msg_index !== 0) { - writer.uint32(8).uint32(message.msg_index); - } - if (message.log !== "") { - writer.uint32(18).string(message.log); - } - for (const v of message.events) { - StringEvent.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ABCIMessageLog { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseABCIMessageLog } as ABCIMessageLog; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msg_index = reader.uint32(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - message.events.push(StringEvent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ABCIMessageLog { - const message = { ...baseABCIMessageLog } as ABCIMessageLog; - message.events = []; - if (object.msg_index !== undefined && object.msg_index !== null) { - message.msg_index = Number(object.msg_index); - } else { - message.msg_index = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(StringEvent.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ABCIMessageLog): unknown { - const obj: any = {}; - message.msg_index !== undefined && (obj.msg_index = message.msg_index); - message.log !== undefined && (obj.log = message.log); - if (message.events) { - obj.events = message.events.map((e) => - e ? StringEvent.toJSON(e) : undefined - ); - } else { - obj.events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ABCIMessageLog { - const message = { ...baseABCIMessageLog } as ABCIMessageLog; - message.events = []; - if (object.msg_index !== undefined && object.msg_index !== null) { - message.msg_index = object.msg_index; - } else { - message.msg_index = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(StringEvent.fromPartial(e)); - } - } - return message; - }, -}; - -const baseStringEvent: object = { type: "" }; - -export const StringEvent = { - encode(message: StringEvent, writer: Writer = Writer.create()): Writer { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - for (const v of message.attributes) { - Attribute.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): StringEvent { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseStringEvent } as StringEvent; - message.attributes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.attributes.push(Attribute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): StringEvent { - const message = { ...baseStringEvent } as StringEvent; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(Attribute.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: StringEvent): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); - } else { - obj.attributes = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): StringEvent { - const message = { ...baseStringEvent } as StringEvent; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(Attribute.fromPartial(e)); - } - } - return message; - }, -}; - -const baseAttribute: object = { key: "", value: "" }; - -export const Attribute = { - encode(message: Attribute, writer: Writer = Writer.create()): Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Attribute { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAttribute } as Attribute; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Attribute { - const message = { ...baseAttribute } as Attribute; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = String(object.value); - } else { - message.value = ""; - } - return message; - }, - - toJSON(message: Attribute): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - - fromPartial(object: DeepPartial): Attribute { - const message = { ...baseAttribute } as Attribute; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = ""; - } - return message; - }, -}; - -const baseGasInfo: object = { gas_wanted: 0, gas_used: 0 }; - -export const GasInfo = { - encode(message: GasInfo, writer: Writer = Writer.create()): Writer { - if (message.gas_wanted !== 0) { - writer.uint32(8).uint64(message.gas_wanted); - } - if (message.gas_used !== 0) { - writer.uint32(16).uint64(message.gas_used); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GasInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGasInfo } as GasInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gas_wanted = longToNumber(reader.uint64() as Long); - break; - case 2: - message.gas_used = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GasInfo { - const message = { ...baseGasInfo } as GasInfo; - if (object.gas_wanted !== undefined && object.gas_wanted !== null) { - message.gas_wanted = Number(object.gas_wanted); - } else { - message.gas_wanted = 0; - } - if (object.gas_used !== undefined && object.gas_used !== null) { - message.gas_used = Number(object.gas_used); - } else { - message.gas_used = 0; - } - return message; - }, - - toJSON(message: GasInfo): unknown { - const obj: any = {}; - message.gas_wanted !== undefined && (obj.gas_wanted = message.gas_wanted); - message.gas_used !== undefined && (obj.gas_used = message.gas_used); - return obj; - }, - - fromPartial(object: DeepPartial): GasInfo { - const message = { ...baseGasInfo } as GasInfo; - if (object.gas_wanted !== undefined && object.gas_wanted !== null) { - message.gas_wanted = object.gas_wanted; - } else { - message.gas_wanted = 0; - } - if (object.gas_used !== undefined && object.gas_used !== null) { - message.gas_used = object.gas_used; - } else { - message.gas_used = 0; - } - return message; - }, -}; - -const baseResult: object = { log: "" }; - -export const Result = { - encode(message: Result, writer: Writer = Writer.create()): Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(18).string(message.log); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Result { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResult } as Result; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Result { - const message = { ...baseResult } as Result; - message.events = []; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Result): unknown { - const obj: any = {}; - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.log !== undefined && (obj.log = message.log); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Result { - const message = { ...baseResult } as Result; - message.events = []; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSimulationResponse: object = {}; - -export const SimulationResponse = { - encode( - message: SimulationResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.gas_info !== undefined) { - GasInfo.encode(message.gas_info, writer.uint32(10).fork()).ldelim(); - } - if (message.result !== undefined) { - Result.encode(message.result, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SimulationResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimulationResponse } as SimulationResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gas_info = GasInfo.decode(reader, reader.uint32()); - break; - case 2: - message.result = Result.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SimulationResponse { - const message = { ...baseSimulationResponse } as SimulationResponse; - if (object.gas_info !== undefined && object.gas_info !== null) { - message.gas_info = GasInfo.fromJSON(object.gas_info); - } else { - message.gas_info = undefined; - } - if (object.result !== undefined && object.result !== null) { - message.result = Result.fromJSON(object.result); - } else { - message.result = undefined; - } - return message; - }, - - toJSON(message: SimulationResponse): unknown { - const obj: any = {}; - message.gas_info !== undefined && - (obj.gas_info = message.gas_info - ? GasInfo.toJSON(message.gas_info) - : undefined); - message.result !== undefined && - (obj.result = message.result ? Result.toJSON(message.result) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): SimulationResponse { - const message = { ...baseSimulationResponse } as SimulationResponse; - if (object.gas_info !== undefined && object.gas_info !== null) { - message.gas_info = GasInfo.fromPartial(object.gas_info); - } else { - message.gas_info = undefined; - } - if (object.result !== undefined && object.result !== null) { - message.result = Result.fromPartial(object.result); - } else { - message.result = undefined; - } - return message; - }, -}; - -const baseMsgData: object = { msg_type: "" }; - -export const MsgData = { - encode(message: MsgData, writer: Writer = Writer.create()): Writer { - if (message.msg_type !== "") { - writer.uint32(10).string(message.msg_type); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgData { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgData } as MsgData; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msg_type = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgData { - const message = { ...baseMsgData } as MsgData; - if (object.msg_type !== undefined && object.msg_type !== null) { - message.msg_type = String(object.msg_type); - } else { - message.msg_type = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: MsgData): unknown { - const obj: any = {}; - message.msg_type !== undefined && (obj.msg_type = message.msg_type); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): MsgData { - const message = { ...baseMsgData } as MsgData; - if (object.msg_type !== undefined && object.msg_type !== null) { - message.msg_type = object.msg_type; - } else { - message.msg_type = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseTxMsgData: object = {}; - -export const TxMsgData = { - encode(message: TxMsgData, writer: Writer = Writer.create()): Writer { - for (const v of message.data) { - MsgData.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxMsgData { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxMsgData } as TxMsgData; - message.data = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data.push(MsgData.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxMsgData { - const message = { ...baseTxMsgData } as TxMsgData; - message.data = []; - if (object.data !== undefined && object.data !== null) { - for (const e of object.data) { - message.data.push(MsgData.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: TxMsgData): unknown { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map((e) => (e ? MsgData.toJSON(e) : undefined)); - } else { - obj.data = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): TxMsgData { - const message = { ...baseTxMsgData } as TxMsgData; - message.data = []; - if (object.data !== undefined && object.data !== null) { - for (const e of object.data) { - message.data.push(MsgData.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSearchTxsResult: object = { - total_count: 0, - count: 0, - page_number: 0, - page_total: 0, - limit: 0, -}; - -export const SearchTxsResult = { - encode(message: SearchTxsResult, writer: Writer = Writer.create()): Writer { - if (message.total_count !== 0) { - writer.uint32(8).uint64(message.total_count); - } - if (message.count !== 0) { - writer.uint32(16).uint64(message.count); - } - if (message.page_number !== 0) { - writer.uint32(24).uint64(message.page_number); - } - if (message.page_total !== 0) { - writer.uint32(32).uint64(message.page_total); - } - if (message.limit !== 0) { - writer.uint32(40).uint64(message.limit); - } - for (const v of message.txs) { - TxResponse.encode(v!, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SearchTxsResult { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSearchTxsResult } as SearchTxsResult; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total_count = longToNumber(reader.uint64() as Long); - break; - case 2: - message.count = longToNumber(reader.uint64() as Long); - break; - case 3: - message.page_number = longToNumber(reader.uint64() as Long); - break; - case 4: - message.page_total = longToNumber(reader.uint64() as Long); - break; - case 5: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 6: - message.txs.push(TxResponse.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SearchTxsResult { - const message = { ...baseSearchTxsResult } as SearchTxsResult; - message.txs = []; - if (object.total_count !== undefined && object.total_count !== null) { - message.total_count = Number(object.total_count); - } else { - message.total_count = 0; - } - if (object.count !== undefined && object.count !== null) { - message.count = Number(object.count); - } else { - message.count = 0; - } - if (object.page_number !== undefined && object.page_number !== null) { - message.page_number = Number(object.page_number); - } else { - message.page_number = 0; - } - if (object.page_total !== undefined && object.page_total !== null) { - message.page_total = Number(object.page_total); - } else { - message.page_total = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(TxResponse.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SearchTxsResult): unknown { - const obj: any = {}; - message.total_count !== undefined && - (obj.total_count = message.total_count); - message.count !== undefined && (obj.count = message.count); - message.page_number !== undefined && - (obj.page_number = message.page_number); - message.page_total !== undefined && (obj.page_total = message.page_total); - message.limit !== undefined && (obj.limit = message.limit); - if (message.txs) { - obj.txs = message.txs.map((e) => (e ? TxResponse.toJSON(e) : undefined)); - } else { - obj.txs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SearchTxsResult { - const message = { ...baseSearchTxsResult } as SearchTxsResult; - message.txs = []; - if (object.total_count !== undefined && object.total_count !== null) { - message.total_count = object.total_count; - } else { - message.total_count = 0; - } - if (object.count !== undefined && object.count !== null) { - message.count = object.count; - } else { - message.count = 0; - } - if (object.page_number !== undefined && object.page_number !== null) { - message.page_number = object.page_number; - } else { - message.page_number = 0; - } - if (object.page_total !== undefined && object.page_total !== null) { - message.page_total = object.page_total; - } else { - message.page_total = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(TxResponse.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 9c87ac0c9c..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - 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; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { - offset: 0, - limit: 0, - count_total: false, - reverse: false, -}; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } else { - message.reverse = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - 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; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } else { - message.reverse = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98406..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/crypto/multisig/v1beta1/multisig.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/crypto/multisig/v1beta1/multisig.ts deleted file mode 100644 index f076f4a9b0..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/crypto/multisig/v1beta1/multisig.ts +++ /dev/null @@ -1,212 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.crypto.multisig.v1beta1"; - -/** - * MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. - * See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers - * signed and with which modes. - */ -export interface MultiSignature { - signatures: Uint8Array[]; -} - -/** - * 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. - */ -export interface CompactBitArray { - extra_bits_stored: number; - elems: Uint8Array; -} - -const baseMultiSignature: object = {}; - -export const MultiSignature = { - encode(message: MultiSignature, writer: Writer = Writer.create()): Writer { - for (const v of message.signatures) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MultiSignature { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMultiSignature } as MultiSignature; - message.signatures = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signatures.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MultiSignature { - const message = { ...baseMultiSignature } as MultiSignature; - message.signatures = []; - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: MultiSignature): unknown { - const obj: any = {}; - if (message.signatures) { - obj.signatures = message.signatures.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.signatures = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MultiSignature { - const message = { ...baseMultiSignature } as MultiSignature; - message.signatures = []; - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(e); - } - } - return message; - }, -}; - -const baseCompactBitArray: object = { extra_bits_stored: 0 }; - -export const CompactBitArray = { - encode(message: CompactBitArray, writer: Writer = Writer.create()): Writer { - if (message.extra_bits_stored !== 0) { - writer.uint32(8).uint32(message.extra_bits_stored); - } - if (message.elems.length !== 0) { - writer.uint32(18).bytes(message.elems); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CompactBitArray { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCompactBitArray } as CompactBitArray; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.extra_bits_stored = reader.uint32(); - break; - case 2: - message.elems = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CompactBitArray { - const message = { ...baseCompactBitArray } as CompactBitArray; - if ( - object.extra_bits_stored !== undefined && - object.extra_bits_stored !== null - ) { - message.extra_bits_stored = Number(object.extra_bits_stored); - } else { - message.extra_bits_stored = 0; - } - if (object.elems !== undefined && object.elems !== null) { - message.elems = bytesFromBase64(object.elems); - } - return message; - }, - - toJSON(message: CompactBitArray): unknown { - const obj: any = {}; - message.extra_bits_stored !== undefined && - (obj.extra_bits_stored = message.extra_bits_stored); - message.elems !== undefined && - (obj.elems = base64FromBytes( - message.elems !== undefined ? message.elems : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): CompactBitArray { - const message = { ...baseCompactBitArray } as CompactBitArray; - if ( - object.extra_bits_stored !== undefined && - object.extra_bits_stored !== null - ) { - message.extra_bits_stored = object.extra_bits_stored; - } else { - message.extra_bits_stored = 0; - } - if (object.elems !== undefined && object.elems !== null) { - message.elems = object.elems; - } else { - message.elems = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/tx/signing/v1beta1/signing.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/tx/signing/v1beta1/signing.ts deleted file mode 100644 index 511bbd8233..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/tx/signing/v1beta1/signing.ts +++ /dev/null @@ -1,660 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { CompactBitArray } from "../../../../cosmos/crypto/multisig/v1beta1/multisig"; - -export const protobufPackage = "cosmos.tx.signing.v1beta1"; - -/** SignMode represents a signing mode with its own security guarantees. */ -export enum SignMode { - /** - * SIGN_MODE_UNSPECIFIED - SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - * rejected - */ - SIGN_MODE_UNSPECIFIED = 0, - /** - * SIGN_MODE_DIRECT - SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - * verified with raw bytes from Tx - */ - SIGN_MODE_DIRECT = 1, - /** - * 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_TEXTUAL = 2, - /** - * 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_LEGACY_AMINO_JSON = 127, - /** - * 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 - */ - SIGN_MODE_EIP_191 = 191, - UNRECOGNIZED = -1, -} - -export function signModeFromJSON(object: any): SignMode { - switch (object) { - case 0: - case "SIGN_MODE_UNSPECIFIED": - return SignMode.SIGN_MODE_UNSPECIFIED; - case 1: - case "SIGN_MODE_DIRECT": - return SignMode.SIGN_MODE_DIRECT; - case 2: - case "SIGN_MODE_TEXTUAL": - return SignMode.SIGN_MODE_TEXTUAL; - case 127: - case "SIGN_MODE_LEGACY_AMINO_JSON": - return SignMode.SIGN_MODE_LEGACY_AMINO_JSON; - case 191: - case "SIGN_MODE_EIP_191": - return SignMode.SIGN_MODE_EIP_191; - case -1: - case "UNRECOGNIZED": - default: - return SignMode.UNRECOGNIZED; - } -} - -export function signModeToJSON(object: SignMode): string { - switch (object) { - case SignMode.SIGN_MODE_UNSPECIFIED: - return "SIGN_MODE_UNSPECIFIED"; - case SignMode.SIGN_MODE_DIRECT: - return "SIGN_MODE_DIRECT"; - case SignMode.SIGN_MODE_TEXTUAL: - return "SIGN_MODE_TEXTUAL"; - case SignMode.SIGN_MODE_LEGACY_AMINO_JSON: - return "SIGN_MODE_LEGACY_AMINO_JSON"; - case SignMode.SIGN_MODE_EIP_191: - return "SIGN_MODE_EIP_191"; - default: - return "UNKNOWN"; - } -} - -/** SignatureDescriptors wraps multiple SignatureDescriptor's. */ -export interface SignatureDescriptors { - /** signatures are the signature descriptors */ - signatures: SignatureDescriptor[]; -} - -/** - * SignatureDescriptor is a convenience type which represents the full data for - * a signature including the public key of the signer, signing modes and the - * signature itself. It is primarily used for coordinating signatures between - * clients. - */ -export interface SignatureDescriptor { - /** public_key is the public key of the signer */ - public_key: Any | undefined; - data: SignatureDescriptor_Data | undefined; - /** - * 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. - */ - sequence: number; -} - -/** Data represents signature data */ -export interface SignatureDescriptor_Data { - /** single represents a single signer */ - single: SignatureDescriptor_Data_Single | undefined; - /** multi represents a multisig signer */ - multi: SignatureDescriptor_Data_Multi | undefined; -} - -/** Single is the signature data for a single signer */ -export interface SignatureDescriptor_Data_Single { - /** mode is the signing mode of the single signer */ - mode: SignMode; - /** signature is the raw signature bytes */ - signature: Uint8Array; -} - -/** Multi is the signature data for a multisig public key */ -export interface SignatureDescriptor_Data_Multi { - /** bitarray specifies which keys within the multisig are signing */ - bitarray: CompactBitArray | undefined; - /** signatures is the signatures of the multi-signature */ - signatures: SignatureDescriptor_Data[]; -} - -const baseSignatureDescriptors: object = {}; - -export const SignatureDescriptors = { - encode( - message: SignatureDescriptors, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.signatures) { - SignatureDescriptor.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SignatureDescriptors { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSignatureDescriptors } as SignatureDescriptors; - message.signatures = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signatures.push( - SignatureDescriptor.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SignatureDescriptors { - const message = { ...baseSignatureDescriptors } as SignatureDescriptors; - message.signatures = []; - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(SignatureDescriptor.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SignatureDescriptors): unknown { - const obj: any = {}; - if (message.signatures) { - obj.signatures = message.signatures.map((e) => - e ? SignatureDescriptor.toJSON(e) : undefined - ); - } else { - obj.signatures = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SignatureDescriptors { - const message = { ...baseSignatureDescriptors } as SignatureDescriptors; - message.signatures = []; - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(SignatureDescriptor.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSignatureDescriptor: object = { sequence: 0 }; - -export const SignatureDescriptor = { - encode( - message: SignatureDescriptor, - writer: Writer = Writer.create() - ): Writer { - if (message.public_key !== undefined) { - Any.encode(message.public_key, writer.uint32(10).fork()).ldelim(); - } - if (message.data !== undefined) { - SignatureDescriptor_Data.encode( - message.data, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SignatureDescriptor { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSignatureDescriptor } as SignatureDescriptor; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.public_key = Any.decode(reader, reader.uint32()); - break; - case 2: - message.data = SignatureDescriptor_Data.decode( - reader, - reader.uint32() - ); - break; - case 3: - message.sequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SignatureDescriptor { - const message = { ...baseSignatureDescriptor } as SignatureDescriptor; - if (object.public_key !== undefined && object.public_key !== null) { - message.public_key = Any.fromJSON(object.public_key); - } else { - message.public_key = undefined; - } - if (object.data !== undefined && object.data !== null) { - message.data = SignatureDescriptor_Data.fromJSON(object.data); - } else { - message.data = undefined; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - return message; - }, - - toJSON(message: SignatureDescriptor): unknown { - const obj: any = {}; - message.public_key !== undefined && - (obj.public_key = message.public_key - ? Any.toJSON(message.public_key) - : undefined); - message.data !== undefined && - (obj.data = message.data - ? SignatureDescriptor_Data.toJSON(message.data) - : undefined); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - - fromPartial(object: DeepPartial): SignatureDescriptor { - const message = { ...baseSignatureDescriptor } as SignatureDescriptor; - if (object.public_key !== undefined && object.public_key !== null) { - message.public_key = Any.fromPartial(object.public_key); - } else { - message.public_key = undefined; - } - if (object.data !== undefined && object.data !== null) { - message.data = SignatureDescriptor_Data.fromPartial(object.data); - } else { - message.data = undefined; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - return message; - }, -}; - -const baseSignatureDescriptor_Data: object = {}; - -export const SignatureDescriptor_Data = { - encode( - message: SignatureDescriptor_Data, - writer: Writer = Writer.create() - ): Writer { - if (message.single !== undefined) { - SignatureDescriptor_Data_Single.encode( - message.single, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.multi !== undefined) { - SignatureDescriptor_Data_Multi.encode( - message.multi, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): SignatureDescriptor_Data { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSignatureDescriptor_Data, - } as SignatureDescriptor_Data; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.single = SignatureDescriptor_Data_Single.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.multi = SignatureDescriptor_Data_Multi.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SignatureDescriptor_Data { - const message = { - ...baseSignatureDescriptor_Data, - } as SignatureDescriptor_Data; - if (object.single !== undefined && object.single !== null) { - message.single = SignatureDescriptor_Data_Single.fromJSON(object.single); - } else { - message.single = undefined; - } - if (object.multi !== undefined && object.multi !== null) { - message.multi = SignatureDescriptor_Data_Multi.fromJSON(object.multi); - } else { - message.multi = undefined; - } - return message; - }, - - toJSON(message: SignatureDescriptor_Data): unknown { - const obj: any = {}; - message.single !== undefined && - (obj.single = message.single - ? SignatureDescriptor_Data_Single.toJSON(message.single) - : undefined); - message.multi !== undefined && - (obj.multi = message.multi - ? SignatureDescriptor_Data_Multi.toJSON(message.multi) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): SignatureDescriptor_Data { - const message = { - ...baseSignatureDescriptor_Data, - } as SignatureDescriptor_Data; - if (object.single !== undefined && object.single !== null) { - message.single = SignatureDescriptor_Data_Single.fromPartial( - object.single - ); - } else { - message.single = undefined; - } - if (object.multi !== undefined && object.multi !== null) { - message.multi = SignatureDescriptor_Data_Multi.fromPartial(object.multi); - } else { - message.multi = undefined; - } - return message; - }, -}; - -const baseSignatureDescriptor_Data_Single: object = { mode: 0 }; - -export const SignatureDescriptor_Data_Single = { - encode( - message: SignatureDescriptor_Data_Single, - writer: Writer = Writer.create() - ): Writer { - if (message.mode !== 0) { - writer.uint32(8).int32(message.mode); - } - if (message.signature.length !== 0) { - writer.uint32(18).bytes(message.signature); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): SignatureDescriptor_Data_Single { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSignatureDescriptor_Data_Single, - } as SignatureDescriptor_Data_Single; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mode = reader.int32() as any; - break; - case 2: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SignatureDescriptor_Data_Single { - const message = { - ...baseSignatureDescriptor_Data_Single, - } as SignatureDescriptor_Data_Single; - if (object.mode !== undefined && object.mode !== null) { - message.mode = signModeFromJSON(object.mode); - } else { - message.mode = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: SignatureDescriptor_Data_Single): unknown { - const obj: any = {}; - message.mode !== undefined && (obj.mode = signModeToJSON(message.mode)); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): SignatureDescriptor_Data_Single { - const message = { - ...baseSignatureDescriptor_Data_Single, - } as SignatureDescriptor_Data_Single; - if (object.mode !== undefined && object.mode !== null) { - message.mode = object.mode; - } else { - message.mode = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseSignatureDescriptor_Data_Multi: object = {}; - -export const SignatureDescriptor_Data_Multi = { - encode( - message: SignatureDescriptor_Data_Multi, - writer: Writer = Writer.create() - ): Writer { - if (message.bitarray !== undefined) { - CompactBitArray.encode( - message.bitarray, - writer.uint32(10).fork() - ).ldelim(); - } - for (const v of message.signatures) { - SignatureDescriptor_Data.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): SignatureDescriptor_Data_Multi { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSignatureDescriptor_Data_Multi, - } as SignatureDescriptor_Data_Multi; - message.signatures = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bitarray = CompactBitArray.decode(reader, reader.uint32()); - break; - case 2: - message.signatures.push( - SignatureDescriptor_Data.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SignatureDescriptor_Data_Multi { - const message = { - ...baseSignatureDescriptor_Data_Multi, - } as SignatureDescriptor_Data_Multi; - message.signatures = []; - if (object.bitarray !== undefined && object.bitarray !== null) { - message.bitarray = CompactBitArray.fromJSON(object.bitarray); - } else { - message.bitarray = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(SignatureDescriptor_Data.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SignatureDescriptor_Data_Multi): unknown { - const obj: any = {}; - message.bitarray !== undefined && - (obj.bitarray = message.bitarray - ? CompactBitArray.toJSON(message.bitarray) - : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map((e) => - e ? SignatureDescriptor_Data.toJSON(e) : undefined - ); - } else { - obj.signatures = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SignatureDescriptor_Data_Multi { - const message = { - ...baseSignatureDescriptor_Data_Multi, - } as SignatureDescriptor_Data_Multi; - message.signatures = []; - if (object.bitarray !== undefined && object.bitarray !== null) { - message.bitarray = CompactBitArray.fromPartial(object.bitarray); - } else { - message.bitarray = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(SignatureDescriptor_Data.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/tx/v1beta1/service.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/tx/v1beta1/service.ts deleted file mode 100644 index b8141c3364..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/tx/v1beta1/service.ts +++ /dev/null @@ -1,1230 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; -import { Tx } from "../../../cosmos/tx/v1beta1/tx"; -import { - TxResponse, - GasInfo, - Result, -} from "../../../cosmos/base/abci/v1beta1/abci"; -import { BlockID } from "../../../tendermint/types/types"; -import { Block } from "../../../tendermint/types/block"; - -export const protobufPackage = "cosmos.tx.v1beta1"; - -/** OrderBy defines the sorting order */ -export enum OrderBy { - /** ORDER_BY_UNSPECIFIED - ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. */ - ORDER_BY_UNSPECIFIED = 0, - /** ORDER_BY_ASC - ORDER_BY_ASC defines ascending order */ - ORDER_BY_ASC = 1, - /** ORDER_BY_DESC - ORDER_BY_DESC defines descending order */ - ORDER_BY_DESC = 2, - UNRECOGNIZED = -1, -} - -export function orderByFromJSON(object: any): OrderBy { - switch (object) { - case 0: - case "ORDER_BY_UNSPECIFIED": - return OrderBy.ORDER_BY_UNSPECIFIED; - case 1: - case "ORDER_BY_ASC": - return OrderBy.ORDER_BY_ASC; - case 2: - case "ORDER_BY_DESC": - return OrderBy.ORDER_BY_DESC; - case -1: - case "UNRECOGNIZED": - default: - return OrderBy.UNRECOGNIZED; - } -} - -export function orderByToJSON(object: OrderBy): string { - switch (object) { - case OrderBy.ORDER_BY_UNSPECIFIED: - return "ORDER_BY_UNSPECIFIED"; - case OrderBy.ORDER_BY_ASC: - return "ORDER_BY_ASC"; - case OrderBy.ORDER_BY_DESC: - return "ORDER_BY_DESC"; - default: - return "UNKNOWN"; - } -} - -/** BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. */ -export enum BroadcastMode { - /** BROADCAST_MODE_UNSPECIFIED - zero-value for mode ordering */ - BROADCAST_MODE_UNSPECIFIED = 0, - /** - * 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_BLOCK = 1, - /** - * BROADCAST_MODE_SYNC - BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for - * a CheckTx execution response only. - */ - BROADCAST_MODE_SYNC = 2, - /** - * BROADCAST_MODE_ASYNC - BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - * immediately. - */ - BROADCAST_MODE_ASYNC = 3, - UNRECOGNIZED = -1, -} - -export function broadcastModeFromJSON(object: any): BroadcastMode { - switch (object) { - case 0: - case "BROADCAST_MODE_UNSPECIFIED": - return BroadcastMode.BROADCAST_MODE_UNSPECIFIED; - case 1: - case "BROADCAST_MODE_BLOCK": - return BroadcastMode.BROADCAST_MODE_BLOCK; - case 2: - case "BROADCAST_MODE_SYNC": - return BroadcastMode.BROADCAST_MODE_SYNC; - case 3: - case "BROADCAST_MODE_ASYNC": - return BroadcastMode.BROADCAST_MODE_ASYNC; - case -1: - case "UNRECOGNIZED": - default: - return BroadcastMode.UNRECOGNIZED; - } -} - -export function broadcastModeToJSON(object: BroadcastMode): string { - switch (object) { - case BroadcastMode.BROADCAST_MODE_UNSPECIFIED: - return "BROADCAST_MODE_UNSPECIFIED"; - case BroadcastMode.BROADCAST_MODE_BLOCK: - return "BROADCAST_MODE_BLOCK"; - case BroadcastMode.BROADCAST_MODE_SYNC: - return "BROADCAST_MODE_SYNC"; - case BroadcastMode.BROADCAST_MODE_ASYNC: - return "BROADCAST_MODE_ASYNC"; - default: - return "UNKNOWN"; - } -} - -/** - * GetTxsEventRequest is the request type for the Service.TxsByEvents - * RPC method. - */ -export interface GetTxsEventRequest { - /** events is the list of transaction event type. */ - events: string[]; - /** pagination defines a pagination for the request. */ - pagination: PageRequest | undefined; - order_by: OrderBy; -} - -/** - * GetTxsEventResponse is the response type for the Service.TxsByEvents - * RPC method. - */ -export interface GetTxsEventResponse { - /** txs is the list of queried transactions. */ - txs: Tx[]; - /** tx_responses is the list of queried TxResponses. */ - tx_responses: TxResponse[]; - /** pagination defines a pagination for the response. */ - pagination: PageResponse | undefined; -} - -/** - * BroadcastTxRequest is the request type for the Service.BroadcastTxRequest - * RPC method. - */ -export interface BroadcastTxRequest { - /** tx_bytes is the raw transaction. */ - tx_bytes: Uint8Array; - mode: BroadcastMode; -} - -/** - * BroadcastTxResponse is the response type for the - * Service.BroadcastTx method. - */ -export interface BroadcastTxResponse { - /** tx_response is the queried TxResponses. */ - tx_response: TxResponse | undefined; -} - -/** - * SimulateRequest is the request type for the Service.Simulate - * RPC method. - */ -export interface SimulateRequest { - /** - * tx is the transaction to simulate. - * Deprecated. Send raw tx bytes instead. - * - * @deprecated - */ - tx: Tx | undefined; - /** - * tx_bytes is the raw transaction. - * - * Since: cosmos-sdk 0.43 - */ - tx_bytes: Uint8Array; -} - -/** - * SimulateResponse is the response type for the - * Service.SimulateRPC method. - */ -export interface SimulateResponse { - /** gas_info is the information about gas used in the simulation. */ - gas_info: GasInfo | undefined; - /** result is the result of the simulation. */ - result: Result | undefined; -} - -/** - * GetTxRequest is the request type for the Service.GetTx - * RPC method. - */ -export interface GetTxRequest { - /** hash is the tx hash to query, encoded as a hex string. */ - hash: string; -} - -/** GetTxResponse is the response type for the Service.GetTx method. */ -export interface GetTxResponse { - /** tx is the queried transaction. */ - tx: Tx | undefined; - /** tx_response is the queried TxResponses. */ - tx_response: TxResponse | undefined; -} - -/** - * GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs - * RPC method. - * - * Since: cosmos-sdk 0.45.2 - */ -export interface GetBlockWithTxsRequest { - /** height is the height of the block to query. */ - height: number; - /** pagination defines a pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. - * - * Since: cosmos-sdk 0.45.2 - */ -export interface GetBlockWithTxsResponse { - /** txs are the transactions in the block. */ - txs: Tx[]; - block_id: BlockID | undefined; - block: Block | undefined; - /** pagination defines a pagination for the response. */ - pagination: PageResponse | undefined; -} - -const baseGetTxsEventRequest: object = { events: "", order_by: 0 }; - -export const GetTxsEventRequest = { - encode( - message: GetTxsEventRequest, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.events) { - writer.uint32(10).string(v!); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - if (message.order_by !== 0) { - writer.uint32(24).int32(message.order_by); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GetTxsEventRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGetTxsEventRequest } as GetTxsEventRequest; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.events.push(reader.string()); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - case 3: - message.order_by = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetTxsEventRequest { - const message = { ...baseGetTxsEventRequest } as GetTxsEventRequest; - message.events = []; - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(String(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - if (object.order_by !== undefined && object.order_by !== null) { - message.order_by = orderByFromJSON(object.order_by); - } else { - message.order_by = 0; - } - return message; - }, - - toJSON(message: GetTxsEventRequest): unknown { - const obj: any = {}; - if (message.events) { - obj.events = message.events.map((e) => e); - } else { - obj.events = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - message.order_by !== undefined && - (obj.order_by = orderByToJSON(message.order_by)); - return obj; - }, - - fromPartial(object: DeepPartial): GetTxsEventRequest { - const message = { ...baseGetTxsEventRequest } as GetTxsEventRequest; - message.events = []; - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(e); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - if (object.order_by !== undefined && object.order_by !== null) { - message.order_by = object.order_by; - } else { - message.order_by = 0; - } - return message; - }, -}; - -const baseGetTxsEventResponse: object = {}; - -export const GetTxsEventResponse = { - encode( - message: GetTxsEventResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.txs) { - Tx.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.tx_responses) { - TxResponse.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GetTxsEventResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGetTxsEventResponse } as GetTxsEventResponse; - message.txs = []; - message.tx_responses = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(Tx.decode(reader, reader.uint32())); - break; - case 2: - message.tx_responses.push(TxResponse.decode(reader, reader.uint32())); - break; - case 3: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetTxsEventResponse { - const message = { ...baseGetTxsEventResponse } as GetTxsEventResponse; - message.txs = []; - message.tx_responses = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(Tx.fromJSON(e)); - } - } - if (object.tx_responses !== undefined && object.tx_responses !== null) { - for (const e of object.tx_responses) { - message.tx_responses.push(TxResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: GetTxsEventResponse): unknown { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map((e) => (e ? Tx.toJSON(e) : undefined)); - } else { - obj.txs = []; - } - if (message.tx_responses) { - obj.tx_responses = message.tx_responses.map((e) => - e ? TxResponse.toJSON(e) : undefined - ); - } else { - obj.tx_responses = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GetTxsEventResponse { - const message = { ...baseGetTxsEventResponse } as GetTxsEventResponse; - message.txs = []; - message.tx_responses = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(Tx.fromPartial(e)); - } - } - if (object.tx_responses !== undefined && object.tx_responses !== null) { - for (const e of object.tx_responses) { - message.tx_responses.push(TxResponse.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseBroadcastTxRequest: object = { mode: 0 }; - -export const BroadcastTxRequest = { - encode( - message: BroadcastTxRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.tx_bytes.length !== 0) { - writer.uint32(10).bytes(message.tx_bytes); - } - if (message.mode !== 0) { - writer.uint32(16).int32(message.mode); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BroadcastTxRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBroadcastTxRequest } as BroadcastTxRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx_bytes = reader.bytes(); - break; - case 2: - message.mode = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BroadcastTxRequest { - const message = { ...baseBroadcastTxRequest } as BroadcastTxRequest; - if (object.tx_bytes !== undefined && object.tx_bytes !== null) { - message.tx_bytes = bytesFromBase64(object.tx_bytes); - } - if (object.mode !== undefined && object.mode !== null) { - message.mode = broadcastModeFromJSON(object.mode); - } else { - message.mode = 0; - } - return message; - }, - - toJSON(message: BroadcastTxRequest): unknown { - const obj: any = {}; - message.tx_bytes !== undefined && - (obj.tx_bytes = base64FromBytes( - message.tx_bytes !== undefined ? message.tx_bytes : new Uint8Array() - )); - message.mode !== undefined && - (obj.mode = broadcastModeToJSON(message.mode)); - return obj; - }, - - fromPartial(object: DeepPartial): BroadcastTxRequest { - const message = { ...baseBroadcastTxRequest } as BroadcastTxRequest; - if (object.tx_bytes !== undefined && object.tx_bytes !== null) { - message.tx_bytes = object.tx_bytes; - } else { - message.tx_bytes = new Uint8Array(); - } - if (object.mode !== undefined && object.mode !== null) { - message.mode = object.mode; - } else { - message.mode = 0; - } - return message; - }, -}; - -const baseBroadcastTxResponse: object = {}; - -export const BroadcastTxResponse = { - encode( - message: BroadcastTxResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.tx_response !== undefined) { - TxResponse.encode(message.tx_response, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BroadcastTxResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBroadcastTxResponse } as BroadcastTxResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx_response = TxResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BroadcastTxResponse { - const message = { ...baseBroadcastTxResponse } as BroadcastTxResponse; - if (object.tx_response !== undefined && object.tx_response !== null) { - message.tx_response = TxResponse.fromJSON(object.tx_response); - } else { - message.tx_response = undefined; - } - return message; - }, - - toJSON(message: BroadcastTxResponse): unknown { - const obj: any = {}; - message.tx_response !== undefined && - (obj.tx_response = message.tx_response - ? TxResponse.toJSON(message.tx_response) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): BroadcastTxResponse { - const message = { ...baseBroadcastTxResponse } as BroadcastTxResponse; - if (object.tx_response !== undefined && object.tx_response !== null) { - message.tx_response = TxResponse.fromPartial(object.tx_response); - } else { - message.tx_response = undefined; - } - return message; - }, -}; - -const baseSimulateRequest: object = {}; - -export const SimulateRequest = { - encode(message: SimulateRequest, writer: Writer = Writer.create()): Writer { - if (message.tx !== undefined) { - Tx.encode(message.tx, writer.uint32(10).fork()).ldelim(); - } - if (message.tx_bytes.length !== 0) { - writer.uint32(18).bytes(message.tx_bytes); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SimulateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimulateRequest } as SimulateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = Tx.decode(reader, reader.uint32()); - break; - case 2: - message.tx_bytes = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SimulateRequest { - const message = { ...baseSimulateRequest } as SimulateRequest; - if (object.tx !== undefined && object.tx !== null) { - message.tx = Tx.fromJSON(object.tx); - } else { - message.tx = undefined; - } - if (object.tx_bytes !== undefined && object.tx_bytes !== null) { - message.tx_bytes = bytesFromBase64(object.tx_bytes); - } - return message; - }, - - toJSON(message: SimulateRequest): unknown { - const obj: any = {}; - message.tx !== undefined && - (obj.tx = message.tx ? Tx.toJSON(message.tx) : undefined); - message.tx_bytes !== undefined && - (obj.tx_bytes = base64FromBytes( - message.tx_bytes !== undefined ? message.tx_bytes : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): SimulateRequest { - const message = { ...baseSimulateRequest } as SimulateRequest; - if (object.tx !== undefined && object.tx !== null) { - message.tx = Tx.fromPartial(object.tx); - } else { - message.tx = undefined; - } - if (object.tx_bytes !== undefined && object.tx_bytes !== null) { - message.tx_bytes = object.tx_bytes; - } else { - message.tx_bytes = new Uint8Array(); - } - return message; - }, -}; - -const baseSimulateResponse: object = {}; - -export const SimulateResponse = { - encode(message: SimulateResponse, writer: Writer = Writer.create()): Writer { - if (message.gas_info !== undefined) { - GasInfo.encode(message.gas_info, writer.uint32(10).fork()).ldelim(); - } - if (message.result !== undefined) { - Result.encode(message.result, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SimulateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimulateResponse } as SimulateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gas_info = GasInfo.decode(reader, reader.uint32()); - break; - case 2: - message.result = Result.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SimulateResponse { - const message = { ...baseSimulateResponse } as SimulateResponse; - if (object.gas_info !== undefined && object.gas_info !== null) { - message.gas_info = GasInfo.fromJSON(object.gas_info); - } else { - message.gas_info = undefined; - } - if (object.result !== undefined && object.result !== null) { - message.result = Result.fromJSON(object.result); - } else { - message.result = undefined; - } - return message; - }, - - toJSON(message: SimulateResponse): unknown { - const obj: any = {}; - message.gas_info !== undefined && - (obj.gas_info = message.gas_info - ? GasInfo.toJSON(message.gas_info) - : undefined); - message.result !== undefined && - (obj.result = message.result ? Result.toJSON(message.result) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): SimulateResponse { - const message = { ...baseSimulateResponse } as SimulateResponse; - if (object.gas_info !== undefined && object.gas_info !== null) { - message.gas_info = GasInfo.fromPartial(object.gas_info); - } else { - message.gas_info = undefined; - } - if (object.result !== undefined && object.result !== null) { - message.result = Result.fromPartial(object.result); - } else { - message.result = undefined; - } - return message; - }, -}; - -const baseGetTxRequest: object = { hash: "" }; - -export const GetTxRequest = { - encode(message: GetTxRequest, writer: Writer = Writer.create()): Writer { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GetTxRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGetTxRequest } as GetTxRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetTxRequest { - const message = { ...baseGetTxRequest } as GetTxRequest; - if (object.hash !== undefined && object.hash !== null) { - message.hash = String(object.hash); - } else { - message.hash = ""; - } - return message; - }, - - toJSON(message: GetTxRequest): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = message.hash); - return obj; - }, - - fromPartial(object: DeepPartial): GetTxRequest { - const message = { ...baseGetTxRequest } as GetTxRequest; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = ""; - } - return message; - }, -}; - -const baseGetTxResponse: object = {}; - -export const GetTxResponse = { - encode(message: GetTxResponse, writer: Writer = Writer.create()): Writer { - if (message.tx !== undefined) { - Tx.encode(message.tx, writer.uint32(10).fork()).ldelim(); - } - if (message.tx_response !== undefined) { - TxResponse.encode(message.tx_response, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GetTxResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGetTxResponse } as GetTxResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = Tx.decode(reader, reader.uint32()); - break; - case 2: - message.tx_response = TxResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetTxResponse { - const message = { ...baseGetTxResponse } as GetTxResponse; - if (object.tx !== undefined && object.tx !== null) { - message.tx = Tx.fromJSON(object.tx); - } else { - message.tx = undefined; - } - if (object.tx_response !== undefined && object.tx_response !== null) { - message.tx_response = TxResponse.fromJSON(object.tx_response); - } else { - message.tx_response = undefined; - } - return message; - }, - - toJSON(message: GetTxResponse): unknown { - const obj: any = {}; - message.tx !== undefined && - (obj.tx = message.tx ? Tx.toJSON(message.tx) : undefined); - message.tx_response !== undefined && - (obj.tx_response = message.tx_response - ? TxResponse.toJSON(message.tx_response) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GetTxResponse { - const message = { ...baseGetTxResponse } as GetTxResponse; - if (object.tx !== undefined && object.tx !== null) { - message.tx = Tx.fromPartial(object.tx); - } else { - message.tx = undefined; - } - if (object.tx_response !== undefined && object.tx_response !== null) { - message.tx_response = TxResponse.fromPartial(object.tx_response); - } else { - message.tx_response = undefined; - } - return message; - }, -}; - -const baseGetBlockWithTxsRequest: object = { height: 0 }; - -export const GetBlockWithTxsRequest = { - encode( - message: GetBlockWithTxsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GetBlockWithTxsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGetBlockWithTxsRequest } as GetBlockWithTxsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetBlockWithTxsRequest { - const message = { ...baseGetBlockWithTxsRequest } as GetBlockWithTxsRequest; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: GetBlockWithTxsRequest): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GetBlockWithTxsRequest { - const message = { ...baseGetBlockWithTxsRequest } as GetBlockWithTxsRequest; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseGetBlockWithTxsResponse: object = {}; - -export const GetBlockWithTxsResponse = { - encode( - message: GetBlockWithTxsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.txs) { - Tx.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.block_id !== undefined) { - BlockID.encode(message.block_id, writer.uint32(18).fork()).ldelim(); - } - if (message.block !== undefined) { - Block.encode(message.block, writer.uint32(26).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GetBlockWithTxsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGetBlockWithTxsResponse, - } as GetBlockWithTxsResponse; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(Tx.decode(reader, reader.uint32())); - break; - case 2: - message.block_id = BlockID.decode(reader, reader.uint32()); - break; - case 3: - message.block = Block.decode(reader, reader.uint32()); - break; - case 4: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetBlockWithTxsResponse { - const message = { - ...baseGetBlockWithTxsResponse, - } as GetBlockWithTxsResponse; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(Tx.fromJSON(e)); - } - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromJSON(object.block_id); - } else { - message.block_id = undefined; - } - if (object.block !== undefined && object.block !== null) { - message.block = Block.fromJSON(object.block); - } else { - message.block = undefined; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: GetBlockWithTxsResponse): unknown { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map((e) => (e ? Tx.toJSON(e) : undefined)); - } else { - obj.txs = []; - } - message.block_id !== undefined && - (obj.block_id = message.block_id - ? BlockID.toJSON(message.block_id) - : undefined); - message.block !== undefined && - (obj.block = message.block ? Block.toJSON(message.block) : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GetBlockWithTxsResponse { - const message = { - ...baseGetBlockWithTxsResponse, - } as GetBlockWithTxsResponse; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(Tx.fromPartial(e)); - } - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromPartial(object.block_id); - } else { - message.block_id = undefined; - } - if (object.block !== undefined && object.block !== null) { - message.block = Block.fromPartial(object.block); - } else { - message.block = undefined; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -/** Service defines a gRPC service for interacting with transactions. */ -export interface Service { - /** Simulate simulates executing a transaction for estimating gas usage. */ - Simulate(request: SimulateRequest): Promise; - /** GetTx fetches a tx by hash. */ - GetTx(request: GetTxRequest): Promise; - /** BroadcastTx broadcast transaction. */ - BroadcastTx(request: BroadcastTxRequest): Promise; - /** GetTxsEvent fetches txs by event. */ - GetTxsEvent(request: GetTxsEventRequest): Promise; - /** - * GetBlockWithTxs fetches a block with decoded txs. - * - * Since: cosmos-sdk 0.45.2 - */ - GetBlockWithTxs( - request: GetBlockWithTxsRequest - ): Promise; -} - -export class ServiceClientImpl implements Service { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Simulate(request: SimulateRequest): Promise { - const data = SimulateRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.tx.v1beta1.Service", - "Simulate", - data - ); - return promise.then((data) => SimulateResponse.decode(new Reader(data))); - } - - GetTx(request: GetTxRequest): Promise { - const data = GetTxRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.tx.v1beta1.Service", - "GetTx", - data - ); - return promise.then((data) => GetTxResponse.decode(new Reader(data))); - } - - BroadcastTx(request: BroadcastTxRequest): Promise { - const data = BroadcastTxRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.tx.v1beta1.Service", - "BroadcastTx", - data - ); - return promise.then((data) => BroadcastTxResponse.decode(new Reader(data))); - } - - GetTxsEvent(request: GetTxsEventRequest): Promise { - const data = GetTxsEventRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.tx.v1beta1.Service", - "GetTxsEvent", - data - ); - return promise.then((data) => GetTxsEventResponse.decode(new Reader(data))); - } - - GetBlockWithTxs( - request: GetBlockWithTxsRequest - ): Promise { - const data = GetBlockWithTxsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.tx.v1beta1.Service", - "GetBlockWithTxs", - data - ); - return promise.then((data) => - GetBlockWithTxsResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/tx/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/tx/v1beta1/tx.ts deleted file mode 100644 index 90aba55a50..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/cosmos/tx/v1beta1/tx.ts +++ /dev/null @@ -1,1274 +0,0 @@ -/* eslint-disable */ -import { - SignMode, - signModeFromJSON, - signModeToJSON, -} from "../../../cosmos/tx/signing/v1beta1/signing"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -import { CompactBitArray } from "../../../cosmos/crypto/multisig/v1beta1/multisig"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.tx.v1beta1"; - -/** Tx is the standard type used for broadcasting transactions. */ -export interface Tx { - /** body is the processable content of the transaction */ - body: TxBody | undefined; - /** - * auth_info is the authorization related content of the transaction, - * specifically signers, signer modes and fee - */ - auth_info: AuthInfo | undefined; - /** - * signatures is a list of signatures that matches the length and order of - * AuthInfo's signer_infos to allow connecting signature meta information like - * public key and signing mode by position. - */ - signatures: Uint8Array[]; -} - -/** - * TxRaw is a variant of Tx that pins the signer's exact binary representation - * of body and auth_info. This is used for signing, broadcasting and - * verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and - * the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used - * as the transaction ID. - */ -export interface TxRaw { - /** - * body_bytes is a protobuf serialization of a TxBody that matches the - * representation in SignDoc. - */ - body_bytes: Uint8Array; - /** - * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - * representation in SignDoc. - */ - auth_info_bytes: Uint8Array; - /** - * signatures is a list of signatures that matches the length and order of - * AuthInfo's signer_infos to allow connecting signature meta information like - * public key and signing mode by position. - */ - signatures: Uint8Array[]; -} - -/** SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. */ -export interface SignDoc { - /** - * body_bytes is protobuf serialization of a TxBody that matches the - * representation in TxRaw. - */ - body_bytes: Uint8Array; - /** - * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - * representation in TxRaw. - */ - auth_info_bytes: Uint8Array; - /** - * chain_id is the unique identifier of the chain this transaction targets. - * It prevents signed transactions from being used on another chain by an - * attacker - */ - chain_id: string; - /** account_number is the account number of the account in state */ - account_number: number; -} - -/** TxBody is the body of a transaction that all signers sign over. */ -export interface TxBody { - /** - * 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. - */ - messages: Any[]; - /** - * 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). - */ - memo: string; - /** - * timeout is the block height after which this transaction will not - * be processed by the chain - */ - timeout_height: number; - /** - * 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 - */ - extension_options: Any[]; - /** - * 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 - */ - non_critical_extension_options: Any[]; -} - -/** - * AuthInfo describes the fee and signer modes that are used to sign a - * transaction. - */ -export interface AuthInfo { - /** - * 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. - */ - signer_infos: SignerInfo[]; - /** - * Fee is the fee and gas limit for the transaction. The first signer is the - * primary signer and the one which pays the fee. The fee can be calculated - * based on the cost of evaluating the body and doing signature verification - * of the signers. This can be estimated via simulation. - */ - fee: Fee | undefined; -} - -/** - * SignerInfo describes the public key and signing mode of a single top-level - * signer. - */ -export interface SignerInfo { - /** - * 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. - */ - public_key: Any | undefined; - /** - * mode_info describes the signing mode of the signer and is a nested - * structure to support nested multisig pubkey's - */ - mode_info: ModeInfo | undefined; - /** - * 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. - */ - sequence: number; -} - -/** ModeInfo describes the signing mode of a single or nested multisig signer. */ -export interface ModeInfo { - /** single represents a single signer */ - single: ModeInfo_Single | undefined; - /** multi represents a nested multisig signer */ - multi: ModeInfo_Multi | undefined; -} - -/** - * 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 - */ -export interface ModeInfo_Single { - /** mode is the signing mode of the single signer */ - mode: SignMode; -} - -/** Multi is the mode info for a multisig public key */ -export interface ModeInfo_Multi { - /** bitarray specifies which keys within the multisig are signing */ - bitarray: CompactBitArray | undefined; - /** - * mode_infos is the corresponding modes of the signers of the multisig - * which could include nested multisig public keys - */ - mode_infos: ModeInfo[]; -} - -/** - * Fee includes the amount of coins paid in fees and the maximum - * gas to be used by the transaction. The ratio yields an effective "gasprice", - * which must be above some miminum to be accepted into the mempool. - */ -export interface Fee { - /** amount is the amount of coins to be paid as a fee */ - amount: Coin[]; - /** - * gas_limit is the maximum gas that can be used in transaction processing - * before an out of gas error occurs - */ - gas_limit: number; - /** - * 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. - */ - payer: string; - /** - * 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 - */ - granter: string; -} - -const baseTx: object = {}; - -export const Tx = { - encode(message: Tx, writer: Writer = Writer.create()): Writer { - if (message.body !== undefined) { - TxBody.encode(message.body, writer.uint32(10).fork()).ldelim(); - } - if (message.auth_info !== undefined) { - AuthInfo.encode(message.auth_info, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.signatures) { - writer.uint32(26).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Tx { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTx } as Tx; - message.signatures = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.body = TxBody.decode(reader, reader.uint32()); - break; - case 2: - message.auth_info = AuthInfo.decode(reader, reader.uint32()); - break; - case 3: - message.signatures.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Tx { - const message = { ...baseTx } as Tx; - message.signatures = []; - if (object.body !== undefined && object.body !== null) { - message.body = TxBody.fromJSON(object.body); - } else { - message.body = undefined; - } - if (object.auth_info !== undefined && object.auth_info !== null) { - message.auth_info = AuthInfo.fromJSON(object.auth_info); - } else { - message.auth_info = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: Tx): unknown { - const obj: any = {}; - message.body !== undefined && - (obj.body = message.body ? TxBody.toJSON(message.body) : undefined); - message.auth_info !== undefined && - (obj.auth_info = message.auth_info - ? AuthInfo.toJSON(message.auth_info) - : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.signatures = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Tx { - const message = { ...baseTx } as Tx; - message.signatures = []; - if (object.body !== undefined && object.body !== null) { - message.body = TxBody.fromPartial(object.body); - } else { - message.body = undefined; - } - if (object.auth_info !== undefined && object.auth_info !== null) { - message.auth_info = AuthInfo.fromPartial(object.auth_info); - } else { - message.auth_info = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(e); - } - } - return message; - }, -}; - -const baseTxRaw: object = {}; - -export const TxRaw = { - encode(message: TxRaw, writer: Writer = Writer.create()): Writer { - if (message.body_bytes.length !== 0) { - writer.uint32(10).bytes(message.body_bytes); - } - if (message.auth_info_bytes.length !== 0) { - writer.uint32(18).bytes(message.auth_info_bytes); - } - for (const v of message.signatures) { - writer.uint32(26).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxRaw { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxRaw } as TxRaw; - message.signatures = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.body_bytes = reader.bytes(); - break; - case 2: - message.auth_info_bytes = reader.bytes(); - break; - case 3: - message.signatures.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxRaw { - const message = { ...baseTxRaw } as TxRaw; - message.signatures = []; - if (object.body_bytes !== undefined && object.body_bytes !== null) { - message.body_bytes = bytesFromBase64(object.body_bytes); - } - if ( - object.auth_info_bytes !== undefined && - object.auth_info_bytes !== null - ) { - message.auth_info_bytes = bytesFromBase64(object.auth_info_bytes); - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: TxRaw): unknown { - const obj: any = {}; - message.body_bytes !== undefined && - (obj.body_bytes = base64FromBytes( - message.body_bytes !== undefined ? message.body_bytes : new Uint8Array() - )); - message.auth_info_bytes !== undefined && - (obj.auth_info_bytes = base64FromBytes( - message.auth_info_bytes !== undefined - ? message.auth_info_bytes - : new Uint8Array() - )); - if (message.signatures) { - obj.signatures = message.signatures.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.signatures = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): TxRaw { - const message = { ...baseTxRaw } as TxRaw; - message.signatures = []; - if (object.body_bytes !== undefined && object.body_bytes !== null) { - message.body_bytes = object.body_bytes; - } else { - message.body_bytes = new Uint8Array(); - } - if ( - object.auth_info_bytes !== undefined && - object.auth_info_bytes !== null - ) { - message.auth_info_bytes = object.auth_info_bytes; - } else { - message.auth_info_bytes = new Uint8Array(); - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(e); - } - } - return message; - }, -}; - -const baseSignDoc: object = { chain_id: "", account_number: 0 }; - -export const SignDoc = { - encode(message: SignDoc, writer: Writer = Writer.create()): Writer { - if (message.body_bytes.length !== 0) { - writer.uint32(10).bytes(message.body_bytes); - } - if (message.auth_info_bytes.length !== 0) { - writer.uint32(18).bytes(message.auth_info_bytes); - } - if (message.chain_id !== "") { - writer.uint32(26).string(message.chain_id); - } - if (message.account_number !== 0) { - writer.uint32(32).uint64(message.account_number); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SignDoc { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSignDoc } as SignDoc; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.body_bytes = reader.bytes(); - break; - case 2: - message.auth_info_bytes = reader.bytes(); - break; - case 3: - message.chain_id = reader.string(); - break; - case 4: - message.account_number = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SignDoc { - const message = { ...baseSignDoc } as SignDoc; - if (object.body_bytes !== undefined && object.body_bytes !== null) { - message.body_bytes = bytesFromBase64(object.body_bytes); - } - if ( - object.auth_info_bytes !== undefined && - object.auth_info_bytes !== null - ) { - message.auth_info_bytes = bytesFromBase64(object.auth_info_bytes); - } - if (object.chain_id !== undefined && object.chain_id !== null) { - message.chain_id = String(object.chain_id); - } else { - message.chain_id = ""; - } - if (object.account_number !== undefined && object.account_number !== null) { - message.account_number = Number(object.account_number); - } else { - message.account_number = 0; - } - return message; - }, - - toJSON(message: SignDoc): unknown { - const obj: any = {}; - message.body_bytes !== undefined && - (obj.body_bytes = base64FromBytes( - message.body_bytes !== undefined ? message.body_bytes : new Uint8Array() - )); - message.auth_info_bytes !== undefined && - (obj.auth_info_bytes = base64FromBytes( - message.auth_info_bytes !== undefined - ? message.auth_info_bytes - : new Uint8Array() - )); - message.chain_id !== undefined && (obj.chain_id = message.chain_id); - message.account_number !== undefined && - (obj.account_number = message.account_number); - return obj; - }, - - fromPartial(object: DeepPartial): SignDoc { - const message = { ...baseSignDoc } as SignDoc; - if (object.body_bytes !== undefined && object.body_bytes !== null) { - message.body_bytes = object.body_bytes; - } else { - message.body_bytes = new Uint8Array(); - } - if ( - object.auth_info_bytes !== undefined && - object.auth_info_bytes !== null - ) { - message.auth_info_bytes = object.auth_info_bytes; - } else { - message.auth_info_bytes = new Uint8Array(); - } - if (object.chain_id !== undefined && object.chain_id !== null) { - message.chain_id = object.chain_id; - } else { - message.chain_id = ""; - } - if (object.account_number !== undefined && object.account_number !== null) { - message.account_number = object.account_number; - } else { - message.account_number = 0; - } - return message; - }, -}; - -const baseTxBody: object = { memo: "", timeout_height: 0 }; - -export const TxBody = { - encode(message: TxBody, writer: Writer = Writer.create()): Writer { - for (const v of message.messages) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.memo !== "") { - writer.uint32(18).string(message.memo); - } - if (message.timeout_height !== 0) { - writer.uint32(24).uint64(message.timeout_height); - } - for (const v of message.extension_options) { - Any.encode(v!, writer.uint32(8186).fork()).ldelim(); - } - for (const v of message.non_critical_extension_options) { - Any.encode(v!, writer.uint32(16378).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxBody { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxBody } as TxBody; - message.messages = []; - message.extension_options = []; - message.non_critical_extension_options = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messages.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.memo = reader.string(); - break; - case 3: - message.timeout_height = longToNumber(reader.uint64() as Long); - break; - case 1023: - message.extension_options.push(Any.decode(reader, reader.uint32())); - break; - case 2047: - message.non_critical_extension_options.push( - Any.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxBody { - const message = { ...baseTxBody } as TxBody; - message.messages = []; - message.extension_options = []; - message.non_critical_extension_options = []; - if (object.messages !== undefined && object.messages !== null) { - for (const e of object.messages) { - message.messages.push(Any.fromJSON(e)); - } - } - if (object.memo !== undefined && object.memo !== null) { - message.memo = String(object.memo); - } else { - message.memo = ""; - } - if (object.timeout_height !== undefined && object.timeout_height !== null) { - message.timeout_height = Number(object.timeout_height); - } else { - message.timeout_height = 0; - } - if ( - object.extension_options !== undefined && - object.extension_options !== null - ) { - for (const e of object.extension_options) { - message.extension_options.push(Any.fromJSON(e)); - } - } - if ( - object.non_critical_extension_options !== undefined && - object.non_critical_extension_options !== null - ) { - for (const e of object.non_critical_extension_options) { - message.non_critical_extension_options.push(Any.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: TxBody): unknown { - const obj: any = {}; - if (message.messages) { - obj.messages = message.messages.map((e) => - e ? Any.toJSON(e) : undefined - ); - } else { - obj.messages = []; - } - message.memo !== undefined && (obj.memo = message.memo); - message.timeout_height !== undefined && - (obj.timeout_height = message.timeout_height); - if (message.extension_options) { - obj.extension_options = message.extension_options.map((e) => - e ? Any.toJSON(e) : undefined - ); - } else { - obj.extension_options = []; - } - if (message.non_critical_extension_options) { - obj.non_critical_extension_options = message.non_critical_extension_options.map( - (e) => (e ? Any.toJSON(e) : undefined) - ); - } else { - obj.non_critical_extension_options = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): TxBody { - const message = { ...baseTxBody } as TxBody; - message.messages = []; - message.extension_options = []; - message.non_critical_extension_options = []; - if (object.messages !== undefined && object.messages !== null) { - for (const e of object.messages) { - message.messages.push(Any.fromPartial(e)); - } - } - if (object.memo !== undefined && object.memo !== null) { - message.memo = object.memo; - } else { - message.memo = ""; - } - if (object.timeout_height !== undefined && object.timeout_height !== null) { - message.timeout_height = object.timeout_height; - } else { - message.timeout_height = 0; - } - if ( - object.extension_options !== undefined && - object.extension_options !== null - ) { - for (const e of object.extension_options) { - message.extension_options.push(Any.fromPartial(e)); - } - } - if ( - object.non_critical_extension_options !== undefined && - object.non_critical_extension_options !== null - ) { - for (const e of object.non_critical_extension_options) { - message.non_critical_extension_options.push(Any.fromPartial(e)); - } - } - return message; - }, -}; - -const baseAuthInfo: object = {}; - -export const AuthInfo = { - encode(message: AuthInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.signer_infos) { - SignerInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fee !== undefined) { - Fee.encode(message.fee, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): AuthInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAuthInfo } as AuthInfo; - message.signer_infos = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signer_infos.push(SignerInfo.decode(reader, reader.uint32())); - break; - case 2: - message.fee = Fee.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): AuthInfo { - const message = { ...baseAuthInfo } as AuthInfo; - message.signer_infos = []; - if (object.signer_infos !== undefined && object.signer_infos !== null) { - for (const e of object.signer_infos) { - message.signer_infos.push(SignerInfo.fromJSON(e)); - } - } - if (object.fee !== undefined && object.fee !== null) { - message.fee = Fee.fromJSON(object.fee); - } else { - message.fee = undefined; - } - return message; - }, - - toJSON(message: AuthInfo): unknown { - const obj: any = {}; - if (message.signer_infos) { - obj.signer_infos = message.signer_infos.map((e) => - e ? SignerInfo.toJSON(e) : undefined - ); - } else { - obj.signer_infos = []; - } - message.fee !== undefined && - (obj.fee = message.fee ? Fee.toJSON(message.fee) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): AuthInfo { - const message = { ...baseAuthInfo } as AuthInfo; - message.signer_infos = []; - if (object.signer_infos !== undefined && object.signer_infos !== null) { - for (const e of object.signer_infos) { - message.signer_infos.push(SignerInfo.fromPartial(e)); - } - } - if (object.fee !== undefined && object.fee !== null) { - message.fee = Fee.fromPartial(object.fee); - } else { - message.fee = undefined; - } - return message; - }, -}; - -const baseSignerInfo: object = { sequence: 0 }; - -export const SignerInfo = { - encode(message: SignerInfo, writer: Writer = Writer.create()): Writer { - if (message.public_key !== undefined) { - Any.encode(message.public_key, writer.uint32(10).fork()).ldelim(); - } - if (message.mode_info !== undefined) { - ModeInfo.encode(message.mode_info, writer.uint32(18).fork()).ldelim(); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SignerInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSignerInfo } as SignerInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.public_key = Any.decode(reader, reader.uint32()); - break; - case 2: - message.mode_info = ModeInfo.decode(reader, reader.uint32()); - break; - case 3: - message.sequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SignerInfo { - const message = { ...baseSignerInfo } as SignerInfo; - if (object.public_key !== undefined && object.public_key !== null) { - message.public_key = Any.fromJSON(object.public_key); - } else { - message.public_key = undefined; - } - if (object.mode_info !== undefined && object.mode_info !== null) { - message.mode_info = ModeInfo.fromJSON(object.mode_info); - } else { - message.mode_info = undefined; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - return message; - }, - - toJSON(message: SignerInfo): unknown { - const obj: any = {}; - message.public_key !== undefined && - (obj.public_key = message.public_key - ? Any.toJSON(message.public_key) - : undefined); - message.mode_info !== undefined && - (obj.mode_info = message.mode_info - ? ModeInfo.toJSON(message.mode_info) - : undefined); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - - fromPartial(object: DeepPartial): SignerInfo { - const message = { ...baseSignerInfo } as SignerInfo; - if (object.public_key !== undefined && object.public_key !== null) { - message.public_key = Any.fromPartial(object.public_key); - } else { - message.public_key = undefined; - } - if (object.mode_info !== undefined && object.mode_info !== null) { - message.mode_info = ModeInfo.fromPartial(object.mode_info); - } else { - message.mode_info = undefined; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - return message; - }, -}; - -const baseModeInfo: object = {}; - -export const ModeInfo = { - encode(message: ModeInfo, writer: Writer = Writer.create()): Writer { - if (message.single !== undefined) { - ModeInfo_Single.encode(message.single, writer.uint32(10).fork()).ldelim(); - } - if (message.multi !== undefined) { - ModeInfo_Multi.encode(message.multi, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ModeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseModeInfo } as ModeInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.single = ModeInfo_Single.decode(reader, reader.uint32()); - break; - case 2: - message.multi = ModeInfo_Multi.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ModeInfo { - const message = { ...baseModeInfo } as ModeInfo; - if (object.single !== undefined && object.single !== null) { - message.single = ModeInfo_Single.fromJSON(object.single); - } else { - message.single = undefined; - } - if (object.multi !== undefined && object.multi !== null) { - message.multi = ModeInfo_Multi.fromJSON(object.multi); - } else { - message.multi = undefined; - } - return message; - }, - - toJSON(message: ModeInfo): unknown { - const obj: any = {}; - message.single !== undefined && - (obj.single = message.single - ? ModeInfo_Single.toJSON(message.single) - : undefined); - message.multi !== undefined && - (obj.multi = message.multi - ? ModeInfo_Multi.toJSON(message.multi) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ModeInfo { - const message = { ...baseModeInfo } as ModeInfo; - if (object.single !== undefined && object.single !== null) { - message.single = ModeInfo_Single.fromPartial(object.single); - } else { - message.single = undefined; - } - if (object.multi !== undefined && object.multi !== null) { - message.multi = ModeInfo_Multi.fromPartial(object.multi); - } else { - message.multi = undefined; - } - return message; - }, -}; - -const baseModeInfo_Single: object = { mode: 0 }; - -export const ModeInfo_Single = { - encode(message: ModeInfo_Single, writer: Writer = Writer.create()): Writer { - if (message.mode !== 0) { - writer.uint32(8).int32(message.mode); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ModeInfo_Single { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseModeInfo_Single } as ModeInfo_Single; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mode = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ModeInfo_Single { - const message = { ...baseModeInfo_Single } as ModeInfo_Single; - if (object.mode !== undefined && object.mode !== null) { - message.mode = signModeFromJSON(object.mode); - } else { - message.mode = 0; - } - return message; - }, - - toJSON(message: ModeInfo_Single): unknown { - const obj: any = {}; - message.mode !== undefined && (obj.mode = signModeToJSON(message.mode)); - return obj; - }, - - fromPartial(object: DeepPartial): ModeInfo_Single { - const message = { ...baseModeInfo_Single } as ModeInfo_Single; - if (object.mode !== undefined && object.mode !== null) { - message.mode = object.mode; - } else { - message.mode = 0; - } - return message; - }, -}; - -const baseModeInfo_Multi: object = {}; - -export const ModeInfo_Multi = { - encode(message: ModeInfo_Multi, writer: Writer = Writer.create()): Writer { - if (message.bitarray !== undefined) { - CompactBitArray.encode( - message.bitarray, - writer.uint32(10).fork() - ).ldelim(); - } - for (const v of message.mode_infos) { - ModeInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ModeInfo_Multi { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseModeInfo_Multi } as ModeInfo_Multi; - message.mode_infos = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bitarray = CompactBitArray.decode(reader, reader.uint32()); - break; - case 2: - message.mode_infos.push(ModeInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ModeInfo_Multi { - const message = { ...baseModeInfo_Multi } as ModeInfo_Multi; - message.mode_infos = []; - if (object.bitarray !== undefined && object.bitarray !== null) { - message.bitarray = CompactBitArray.fromJSON(object.bitarray); - } else { - message.bitarray = undefined; - } - if (object.mode_infos !== undefined && object.mode_infos !== null) { - for (const e of object.mode_infos) { - message.mode_infos.push(ModeInfo.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ModeInfo_Multi): unknown { - const obj: any = {}; - message.bitarray !== undefined && - (obj.bitarray = message.bitarray - ? CompactBitArray.toJSON(message.bitarray) - : undefined); - if (message.mode_infos) { - obj.mode_infos = message.mode_infos.map((e) => - e ? ModeInfo.toJSON(e) : undefined - ); - } else { - obj.mode_infos = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ModeInfo_Multi { - const message = { ...baseModeInfo_Multi } as ModeInfo_Multi; - message.mode_infos = []; - if (object.bitarray !== undefined && object.bitarray !== null) { - message.bitarray = CompactBitArray.fromPartial(object.bitarray); - } else { - message.bitarray = undefined; - } - if (object.mode_infos !== undefined && object.mode_infos !== null) { - for (const e of object.mode_infos) { - message.mode_infos.push(ModeInfo.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFee: object = { gas_limit: 0, payer: "", granter: "" }; - -export const Fee = { - encode(message: Fee, writer: Writer = Writer.create()): Writer { - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.gas_limit !== 0) { - writer.uint32(16).uint64(message.gas_limit); - } - if (message.payer !== "") { - writer.uint32(26).string(message.payer); - } - if (message.granter !== "") { - writer.uint32(34).string(message.granter); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Fee { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFee } as Fee; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.gas_limit = longToNumber(reader.uint64() as Long); - break; - case 3: - message.payer = reader.string(); - break; - case 4: - message.granter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Fee { - const message = { ...baseFee } as Fee; - message.amount = []; - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - if (object.gas_limit !== undefined && object.gas_limit !== null) { - message.gas_limit = Number(object.gas_limit); - } else { - message.gas_limit = 0; - } - if (object.payer !== undefined && object.payer !== null) { - message.payer = String(object.payer); - } else { - message.payer = ""; - } - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } else { - message.granter = ""; - } - return message; - }, - - toJSON(message: Fee): unknown { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.amount = []; - } - message.gas_limit !== undefined && (obj.gas_limit = message.gas_limit); - message.payer !== undefined && (obj.payer = message.payer); - message.granter !== undefined && (obj.granter = message.granter); - return obj; - }, - - fromPartial(object: DeepPartial): Fee { - const message = { ...baseFee } as Fee; - message.amount = []; - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - if (object.gas_limit !== undefined && object.gas_limit !== null) { - message.gas_limit = object.gas_limit; - } else { - message.gas_limit = 0; - } - if (object.payer !== undefined && object.payer !== null) { - message.payer = object.payer; - } else { - message.payer = ""; - } - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } else { - message.granter = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/any.ts deleted file mode 100644 index 233eae465d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - type_url: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { type_url: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.type_url !== "") { - writer.uint32(10).string(message.type_url); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = String(object.type_url); - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.type_url !== undefined && (obj.type_url = message.type_url); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = object.type_url; - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/duration.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/duration.ts deleted file mode 100644 index fffd5b14ef..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/duration.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (duration.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} - -const baseDuration: object = { seconds: 0, nanos: 0 }; - -export const Duration = { - encode(message: Duration, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Duration { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration } as Duration; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Duration): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 11864afc86..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/abci/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/abci/types.ts deleted file mode 100644 index c765beeaab..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/abci/types.ts +++ /dev/null @@ -1,5656 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { Header } from "../../tendermint/types/types"; -import { ProofOps } from "../../tendermint/crypto/proof"; -import { - EvidenceParams, - ValidatorParams, - VersionParams, -} from "../../tendermint/types/params"; -import { PublicKey } from "../../tendermint/crypto/keys"; - -export const protobufPackage = "tendermint.abci"; - -export enum CheckTxType { - NEW = 0, - RECHECK = 1, - UNRECOGNIZED = -1, -} - -export function checkTxTypeFromJSON(object: any): CheckTxType { - switch (object) { - case 0: - case "NEW": - return CheckTxType.NEW; - case 1: - case "RECHECK": - return CheckTxType.RECHECK; - case -1: - case "UNRECOGNIZED": - default: - return CheckTxType.UNRECOGNIZED; - } -} - -export function checkTxTypeToJSON(object: CheckTxType): string { - switch (object) { - case CheckTxType.NEW: - return "NEW"; - case CheckTxType.RECHECK: - return "RECHECK"; - default: - return "UNKNOWN"; - } -} - -export enum EvidenceType { - UNKNOWN = 0, - DUPLICATE_VOTE = 1, - LIGHT_CLIENT_ATTACK = 2, - UNRECOGNIZED = -1, -} - -export function evidenceTypeFromJSON(object: any): EvidenceType { - switch (object) { - case 0: - case "UNKNOWN": - return EvidenceType.UNKNOWN; - case 1: - case "DUPLICATE_VOTE": - return EvidenceType.DUPLICATE_VOTE; - case 2: - case "LIGHT_CLIENT_ATTACK": - return EvidenceType.LIGHT_CLIENT_ATTACK; - case -1: - case "UNRECOGNIZED": - default: - return EvidenceType.UNRECOGNIZED; - } -} - -export function evidenceTypeToJSON(object: EvidenceType): string { - switch (object) { - case EvidenceType.UNKNOWN: - return "UNKNOWN"; - case EvidenceType.DUPLICATE_VOTE: - return "DUPLICATE_VOTE"; - case EvidenceType.LIGHT_CLIENT_ATTACK: - return "LIGHT_CLIENT_ATTACK"; - default: - return "UNKNOWN"; - } -} - -export interface Request { - echo: RequestEcho | undefined; - flush: RequestFlush | undefined; - info: RequestInfo | undefined; - set_option: RequestSetOption | undefined; - init_chain: RequestInitChain | undefined; - query: RequestQuery | undefined; - begin_block: RequestBeginBlock | undefined; - check_tx: RequestCheckTx | undefined; - deliver_tx: RequestDeliverTx | undefined; - end_block: RequestEndBlock | undefined; - commit: RequestCommit | undefined; - list_snapshots: RequestListSnapshots | undefined; - offer_snapshot: RequestOfferSnapshot | undefined; - load_snapshot_chunk: RequestLoadSnapshotChunk | undefined; - apply_snapshot_chunk: RequestApplySnapshotChunk | undefined; -} - -export interface RequestEcho { - message: string; -} - -export interface RequestFlush {} - -export interface RequestInfo { - version: string; - block_version: number; - p2p_version: number; -} - -/** nondeterministic */ -export interface RequestSetOption { - key: string; - value: string; -} - -export interface RequestInitChain { - time: Date | undefined; - chain_id: string; - consensus_params: ConsensusParams | undefined; - validators: ValidatorUpdate[]; - app_state_bytes: Uint8Array; - initial_height: number; -} - -export interface RequestQuery { - data: Uint8Array; - path: string; - height: number; - prove: boolean; -} - -export interface RequestBeginBlock { - hash: Uint8Array; - header: Header | undefined; - last_commit_info: LastCommitInfo | undefined; - byzantine_validators: Evidence[]; -} - -export interface RequestCheckTx { - tx: Uint8Array; - type: CheckTxType; -} - -export interface RequestDeliverTx { - tx: Uint8Array; -} - -export interface RequestEndBlock { - height: number; -} - -export interface RequestCommit {} - -/** lists available snapshots */ -export interface RequestListSnapshots {} - -/** offers a snapshot to the application */ -export interface RequestOfferSnapshot { - /** snapshot offered by peers */ - snapshot: Snapshot | undefined; - /** light client-verified app hash for snapshot height */ - app_hash: Uint8Array; -} - -/** loads a snapshot chunk */ -export interface RequestLoadSnapshotChunk { - height: number; - format: number; - chunk: number; -} - -/** Applies a snapshot chunk */ -export interface RequestApplySnapshotChunk { - index: number; - chunk: Uint8Array; - sender: string; -} - -export interface Response { - exception: ResponseException | undefined; - echo: ResponseEcho | undefined; - flush: ResponseFlush | undefined; - info: ResponseInfo | undefined; - set_option: ResponseSetOption | undefined; - init_chain: ResponseInitChain | undefined; - query: ResponseQuery | undefined; - begin_block: ResponseBeginBlock | undefined; - check_tx: ResponseCheckTx | undefined; - deliver_tx: ResponseDeliverTx | undefined; - end_block: ResponseEndBlock | undefined; - commit: ResponseCommit | undefined; - list_snapshots: ResponseListSnapshots | undefined; - offer_snapshot: ResponseOfferSnapshot | undefined; - load_snapshot_chunk: ResponseLoadSnapshotChunk | undefined; - apply_snapshot_chunk: ResponseApplySnapshotChunk | undefined; -} - -/** nondeterministic */ -export interface ResponseException { - error: string; -} - -export interface ResponseEcho { - message: string; -} - -export interface ResponseFlush {} - -export interface ResponseInfo { - data: string; - version: string; - app_version: number; - last_block_height: number; - last_block_app_hash: Uint8Array; -} - -/** nondeterministic */ -export interface ResponseSetOption { - code: number; - /** bytes data = 2; */ - log: string; - info: string; -} - -export interface ResponseInitChain { - consensus_params: ConsensusParams | undefined; - validators: ValidatorUpdate[]; - app_hash: Uint8Array; -} - -export interface ResponseQuery { - code: number; - /** bytes data = 2; // use "value" instead. */ - log: string; - /** nondeterministic */ - info: string; - index: number; - key: Uint8Array; - value: Uint8Array; - proof_ops: ProofOps | undefined; - height: number; - codespace: string; -} - -export interface ResponseBeginBlock { - events: Event[]; -} - -export interface ResponseCheckTx { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gas_wanted: number; - gas_used: number; - events: Event[]; - codespace: string; -} - -export interface ResponseDeliverTx { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gas_wanted: number; - gas_used: number; - events: Event[]; - codespace: string; -} - -export interface ResponseEndBlock { - validator_updates: ValidatorUpdate[]; - consensus_param_updates: ConsensusParams | undefined; - events: Event[]; -} - -export interface ResponseCommit { - /** reserve 1 */ - data: Uint8Array; - retain_height: number; -} - -export interface ResponseListSnapshots { - snapshots: Snapshot[]; -} - -export interface ResponseOfferSnapshot { - result: ResponseOfferSnapshot_Result; -} - -export enum ResponseOfferSnapshot_Result { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - UNKNOWN = 0, - /** ACCEPT - Snapshot accepted, apply chunks */ - ACCEPT = 1, - /** ABORT - Abort all snapshot restoration */ - ABORT = 2, - /** REJECT - Reject this specific snapshot, try others */ - REJECT = 3, - /** REJECT_FORMAT - Reject all snapshots of this format, try others */ - REJECT_FORMAT = 4, - /** REJECT_SENDER - Reject all snapshots from the sender(s), try others */ - REJECT_SENDER = 5, - UNRECOGNIZED = -1, -} - -export function responseOfferSnapshot_ResultFromJSON( - object: any -): ResponseOfferSnapshot_Result { - switch (object) { - case 0: - case "UNKNOWN": - return ResponseOfferSnapshot_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseOfferSnapshot_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseOfferSnapshot_Result.ABORT; - case 3: - case "REJECT": - return ResponseOfferSnapshot_Result.REJECT; - case 4: - case "REJECT_FORMAT": - return ResponseOfferSnapshot_Result.REJECT_FORMAT; - case 5: - case "REJECT_SENDER": - return ResponseOfferSnapshot_Result.REJECT_SENDER; - case -1: - case "UNRECOGNIZED": - default: - return ResponseOfferSnapshot_Result.UNRECOGNIZED; - } -} - -export function responseOfferSnapshot_ResultToJSON( - object: ResponseOfferSnapshot_Result -): string { - switch (object) { - case ResponseOfferSnapshot_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseOfferSnapshot_Result.ACCEPT: - return "ACCEPT"; - case ResponseOfferSnapshot_Result.ABORT: - return "ABORT"; - case ResponseOfferSnapshot_Result.REJECT: - return "REJECT"; - case ResponseOfferSnapshot_Result.REJECT_FORMAT: - return "REJECT_FORMAT"; - case ResponseOfferSnapshot_Result.REJECT_SENDER: - return "REJECT_SENDER"; - default: - return "UNKNOWN"; - } -} - -export interface ResponseLoadSnapshotChunk { - chunk: Uint8Array; -} - -export interface ResponseApplySnapshotChunk { - result: ResponseApplySnapshotChunk_Result; - /** Chunks to refetch and reapply */ - refetch_chunks: number[]; - /** Chunk senders to reject and ban */ - reject_senders: string[]; -} - -export enum ResponseApplySnapshotChunk_Result { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - UNKNOWN = 0, - /** ACCEPT - Chunk successfully accepted */ - ACCEPT = 1, - /** ABORT - Abort all snapshot restoration */ - ABORT = 2, - /** RETRY - Retry chunk (combine with refetch and reject) */ - RETRY = 3, - /** RETRY_SNAPSHOT - Retry snapshot (combine with refetch and reject) */ - RETRY_SNAPSHOT = 4, - /** REJECT_SNAPSHOT - Reject this snapshot, try others */ - REJECT_SNAPSHOT = 5, - UNRECOGNIZED = -1, -} - -export function responseApplySnapshotChunk_ResultFromJSON( - object: any -): ResponseApplySnapshotChunk_Result { - switch (object) { - case 0: - case "UNKNOWN": - return ResponseApplySnapshotChunk_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseApplySnapshotChunk_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseApplySnapshotChunk_Result.ABORT; - case 3: - case "RETRY": - return ResponseApplySnapshotChunk_Result.RETRY; - case 4: - case "RETRY_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT; - case 5: - case "REJECT_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT; - case -1: - case "UNRECOGNIZED": - default: - return ResponseApplySnapshotChunk_Result.UNRECOGNIZED; - } -} - -export function responseApplySnapshotChunk_ResultToJSON( - object: ResponseApplySnapshotChunk_Result -): string { - switch (object) { - case ResponseApplySnapshotChunk_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseApplySnapshotChunk_Result.ACCEPT: - return "ACCEPT"; - case ResponseApplySnapshotChunk_Result.ABORT: - return "ABORT"; - case ResponseApplySnapshotChunk_Result.RETRY: - return "RETRY"; - case ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT: - return "RETRY_SNAPSHOT"; - case ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT: - return "REJECT_SNAPSHOT"; - default: - return "UNKNOWN"; - } -} - -/** - * ConsensusParams contains all consensus-relevant parameters - * that can be adjusted by the abci app - */ -export interface ConsensusParams { - block: BlockParams | undefined; - evidence: EvidenceParams | undefined; - validator: ValidatorParams | undefined; - version: VersionParams | undefined; -} - -/** BlockParams contains limits on the block size. */ -export interface BlockParams { - /** Note: must be greater than 0 */ - max_bytes: number; - /** Note: must be greater or equal to -1 */ - max_gas: number; -} - -export interface LastCommitInfo { - round: number; - votes: VoteInfo[]; -} - -/** - * Event allows application developers to attach additional information to - * ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. - * Later, transactions may be queried using these events. - */ -export interface Event { - type: string; - attributes: EventAttribute[]; -} - -/** EventAttribute is a single key-value pair, associated with an event. */ -export interface EventAttribute { - key: Uint8Array; - value: Uint8Array; - /** nondeterministic */ - index: boolean; -} - -/** - * TxResult contains results of executing the transaction. - * - * One usage is indexing transaction results. - */ -export interface TxResult { - height: number; - index: number; - tx: Uint8Array; - result: ResponseDeliverTx | undefined; -} - -/** Validator */ -export interface Validator { - /** The first 20 bytes of SHA256(public key) */ - address: Uint8Array; - /** PubKey pub_key = 2 [(gogoproto.nullable)=false]; */ - power: number; -} - -/** ValidatorUpdate */ -export interface ValidatorUpdate { - pub_key: PublicKey | undefined; - power: number; -} - -/** VoteInfo */ -export interface VoteInfo { - validator: Validator | undefined; - signed_last_block: boolean; -} - -export interface Evidence { - type: EvidenceType; - /** The offending validator */ - validator: Validator | undefined; - /** The height when the offense occurred */ - height: number; - /** The corresponding time where the offense occurred */ - time: Date | undefined; - /** - * Total voting power of the validator set in case the ABCI application does - * not store historical validators. - * https://github.com/tendermint/tendermint/issues/4581 - */ - total_voting_power: number; -} - -export interface Snapshot { - /** The height at which the snapshot was taken */ - height: number; - /** The application-specific snapshot format */ - format: number; - /** Number of chunks in the snapshot */ - chunks: number; - /** Arbitrary snapshot hash, equal only if identical */ - hash: Uint8Array; - /** Arbitrary application metadata */ - metadata: Uint8Array; -} - -const baseRequest: object = {}; - -export const Request = { - encode(message: Request, writer: Writer = Writer.create()): Writer { - if (message.echo !== undefined) { - RequestEcho.encode(message.echo, writer.uint32(10).fork()).ldelim(); - } - if (message.flush !== undefined) { - RequestFlush.encode(message.flush, writer.uint32(18).fork()).ldelim(); - } - if (message.info !== undefined) { - RequestInfo.encode(message.info, writer.uint32(26).fork()).ldelim(); - } - if (message.set_option !== undefined) { - RequestSetOption.encode( - message.set_option, - writer.uint32(34).fork() - ).ldelim(); - } - if (message.init_chain !== undefined) { - RequestInitChain.encode( - message.init_chain, - writer.uint32(42).fork() - ).ldelim(); - } - if (message.query !== undefined) { - RequestQuery.encode(message.query, writer.uint32(50).fork()).ldelim(); - } - if (message.begin_block !== undefined) { - RequestBeginBlock.encode( - message.begin_block, - writer.uint32(58).fork() - ).ldelim(); - } - if (message.check_tx !== undefined) { - RequestCheckTx.encode( - message.check_tx, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.deliver_tx !== undefined) { - RequestDeliverTx.encode( - message.deliver_tx, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.end_block !== undefined) { - RequestEndBlock.encode( - message.end_block, - writer.uint32(82).fork() - ).ldelim(); - } - if (message.commit !== undefined) { - RequestCommit.encode(message.commit, writer.uint32(90).fork()).ldelim(); - } - if (message.list_snapshots !== undefined) { - RequestListSnapshots.encode( - message.list_snapshots, - writer.uint32(98).fork() - ).ldelim(); - } - if (message.offer_snapshot !== undefined) { - RequestOfferSnapshot.encode( - message.offer_snapshot, - writer.uint32(106).fork() - ).ldelim(); - } - if (message.load_snapshot_chunk !== undefined) { - RequestLoadSnapshotChunk.encode( - message.load_snapshot_chunk, - writer.uint32(114).fork() - ).ldelim(); - } - if (message.apply_snapshot_chunk !== undefined) { - RequestApplySnapshotChunk.encode( - message.apply_snapshot_chunk, - writer.uint32(122).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Request { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequest } as Request; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.echo = RequestEcho.decode(reader, reader.uint32()); - break; - case 2: - message.flush = RequestFlush.decode(reader, reader.uint32()); - break; - case 3: - message.info = RequestInfo.decode(reader, reader.uint32()); - break; - case 4: - message.set_option = RequestSetOption.decode(reader, reader.uint32()); - break; - case 5: - message.init_chain = RequestInitChain.decode(reader, reader.uint32()); - break; - case 6: - message.query = RequestQuery.decode(reader, reader.uint32()); - break; - case 7: - message.begin_block = RequestBeginBlock.decode( - reader, - reader.uint32() - ); - break; - case 8: - message.check_tx = RequestCheckTx.decode(reader, reader.uint32()); - break; - case 9: - message.deliver_tx = RequestDeliverTx.decode(reader, reader.uint32()); - break; - case 10: - message.end_block = RequestEndBlock.decode(reader, reader.uint32()); - break; - case 11: - message.commit = RequestCommit.decode(reader, reader.uint32()); - break; - case 12: - message.list_snapshots = RequestListSnapshots.decode( - reader, - reader.uint32() - ); - break; - case 13: - message.offer_snapshot = RequestOfferSnapshot.decode( - reader, - reader.uint32() - ); - break; - case 14: - message.load_snapshot_chunk = RequestLoadSnapshotChunk.decode( - reader, - reader.uint32() - ); - break; - case 15: - message.apply_snapshot_chunk = RequestApplySnapshotChunk.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Request { - const message = { ...baseRequest } as Request; - if (object.echo !== undefined && object.echo !== null) { - message.echo = RequestEcho.fromJSON(object.echo); - } else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = RequestFlush.fromJSON(object.flush); - } else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = RequestInfo.fromJSON(object.info); - } else { - message.info = undefined; - } - if (object.set_option !== undefined && object.set_option !== null) { - message.set_option = RequestSetOption.fromJSON(object.set_option); - } else { - message.set_option = undefined; - } - if (object.init_chain !== undefined && object.init_chain !== null) { - message.init_chain = RequestInitChain.fromJSON(object.init_chain); - } else { - message.init_chain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = RequestQuery.fromJSON(object.query); - } else { - message.query = undefined; - } - if (object.begin_block !== undefined && object.begin_block !== null) { - message.begin_block = RequestBeginBlock.fromJSON(object.begin_block); - } else { - message.begin_block = undefined; - } - if (object.check_tx !== undefined && object.check_tx !== null) { - message.check_tx = RequestCheckTx.fromJSON(object.check_tx); - } else { - message.check_tx = undefined; - } - if (object.deliver_tx !== undefined && object.deliver_tx !== null) { - message.deliver_tx = RequestDeliverTx.fromJSON(object.deliver_tx); - } else { - message.deliver_tx = undefined; - } - if (object.end_block !== undefined && object.end_block !== null) { - message.end_block = RequestEndBlock.fromJSON(object.end_block); - } else { - message.end_block = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = RequestCommit.fromJSON(object.commit); - } else { - message.commit = undefined; - } - if (object.list_snapshots !== undefined && object.list_snapshots !== null) { - message.list_snapshots = RequestListSnapshots.fromJSON( - object.list_snapshots - ); - } else { - message.list_snapshots = undefined; - } - if (object.offer_snapshot !== undefined && object.offer_snapshot !== null) { - message.offer_snapshot = RequestOfferSnapshot.fromJSON( - object.offer_snapshot - ); - } else { - message.offer_snapshot = undefined; - } - if ( - object.load_snapshot_chunk !== undefined && - object.load_snapshot_chunk !== null - ) { - message.load_snapshot_chunk = RequestLoadSnapshotChunk.fromJSON( - object.load_snapshot_chunk - ); - } else { - message.load_snapshot_chunk = undefined; - } - if ( - object.apply_snapshot_chunk !== undefined && - object.apply_snapshot_chunk !== null - ) { - message.apply_snapshot_chunk = RequestApplySnapshotChunk.fromJSON( - object.apply_snapshot_chunk - ); - } else { - message.apply_snapshot_chunk = undefined; - } - return message; - }, - - toJSON(message: Request): unknown { - const obj: any = {}; - message.echo !== undefined && - (obj.echo = message.echo ? RequestEcho.toJSON(message.echo) : undefined); - message.flush !== undefined && - (obj.flush = message.flush - ? RequestFlush.toJSON(message.flush) - : undefined); - message.info !== undefined && - (obj.info = message.info ? RequestInfo.toJSON(message.info) : undefined); - message.set_option !== undefined && - (obj.set_option = message.set_option - ? RequestSetOption.toJSON(message.set_option) - : undefined); - message.init_chain !== undefined && - (obj.init_chain = message.init_chain - ? RequestInitChain.toJSON(message.init_chain) - : undefined); - message.query !== undefined && - (obj.query = message.query - ? RequestQuery.toJSON(message.query) - : undefined); - message.begin_block !== undefined && - (obj.begin_block = message.begin_block - ? RequestBeginBlock.toJSON(message.begin_block) - : undefined); - message.check_tx !== undefined && - (obj.check_tx = message.check_tx - ? RequestCheckTx.toJSON(message.check_tx) - : undefined); - message.deliver_tx !== undefined && - (obj.deliver_tx = message.deliver_tx - ? RequestDeliverTx.toJSON(message.deliver_tx) - : undefined); - message.end_block !== undefined && - (obj.end_block = message.end_block - ? RequestEndBlock.toJSON(message.end_block) - : undefined); - message.commit !== undefined && - (obj.commit = message.commit - ? RequestCommit.toJSON(message.commit) - : undefined); - message.list_snapshots !== undefined && - (obj.list_snapshots = message.list_snapshots - ? RequestListSnapshots.toJSON(message.list_snapshots) - : undefined); - message.offer_snapshot !== undefined && - (obj.offer_snapshot = message.offer_snapshot - ? RequestOfferSnapshot.toJSON(message.offer_snapshot) - : undefined); - message.load_snapshot_chunk !== undefined && - (obj.load_snapshot_chunk = message.load_snapshot_chunk - ? RequestLoadSnapshotChunk.toJSON(message.load_snapshot_chunk) - : undefined); - message.apply_snapshot_chunk !== undefined && - (obj.apply_snapshot_chunk = message.apply_snapshot_chunk - ? RequestApplySnapshotChunk.toJSON(message.apply_snapshot_chunk) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Request { - const message = { ...baseRequest } as Request; - if (object.echo !== undefined && object.echo !== null) { - message.echo = RequestEcho.fromPartial(object.echo); - } else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = RequestFlush.fromPartial(object.flush); - } else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = RequestInfo.fromPartial(object.info); - } else { - message.info = undefined; - } - if (object.set_option !== undefined && object.set_option !== null) { - message.set_option = RequestSetOption.fromPartial(object.set_option); - } else { - message.set_option = undefined; - } - if (object.init_chain !== undefined && object.init_chain !== null) { - message.init_chain = RequestInitChain.fromPartial(object.init_chain); - } else { - message.init_chain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = RequestQuery.fromPartial(object.query); - } else { - message.query = undefined; - } - if (object.begin_block !== undefined && object.begin_block !== null) { - message.begin_block = RequestBeginBlock.fromPartial(object.begin_block); - } else { - message.begin_block = undefined; - } - if (object.check_tx !== undefined && object.check_tx !== null) { - message.check_tx = RequestCheckTx.fromPartial(object.check_tx); - } else { - message.check_tx = undefined; - } - if (object.deliver_tx !== undefined && object.deliver_tx !== null) { - message.deliver_tx = RequestDeliverTx.fromPartial(object.deliver_tx); - } else { - message.deliver_tx = undefined; - } - if (object.end_block !== undefined && object.end_block !== null) { - message.end_block = RequestEndBlock.fromPartial(object.end_block); - } else { - message.end_block = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = RequestCommit.fromPartial(object.commit); - } else { - message.commit = undefined; - } - if (object.list_snapshots !== undefined && object.list_snapshots !== null) { - message.list_snapshots = RequestListSnapshots.fromPartial( - object.list_snapshots - ); - } else { - message.list_snapshots = undefined; - } - if (object.offer_snapshot !== undefined && object.offer_snapshot !== null) { - message.offer_snapshot = RequestOfferSnapshot.fromPartial( - object.offer_snapshot - ); - } else { - message.offer_snapshot = undefined; - } - if ( - object.load_snapshot_chunk !== undefined && - object.load_snapshot_chunk !== null - ) { - message.load_snapshot_chunk = RequestLoadSnapshotChunk.fromPartial( - object.load_snapshot_chunk - ); - } else { - message.load_snapshot_chunk = undefined; - } - if ( - object.apply_snapshot_chunk !== undefined && - object.apply_snapshot_chunk !== null - ) { - message.apply_snapshot_chunk = RequestApplySnapshotChunk.fromPartial( - object.apply_snapshot_chunk - ); - } else { - message.apply_snapshot_chunk = undefined; - } - return message; - }, -}; - -const baseRequestEcho: object = { message: "" }; - -export const RequestEcho = { - encode(message: RequestEcho, writer: Writer = Writer.create()): Writer { - if (message.message !== "") { - writer.uint32(10).string(message.message); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestEcho { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestEcho } as RequestEcho; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestEcho { - const message = { ...baseRequestEcho } as RequestEcho; - if (object.message !== undefined && object.message !== null) { - message.message = String(object.message); - } else { - message.message = ""; - } - return message; - }, - - toJSON(message: RequestEcho): unknown { - const obj: any = {}; - message.message !== undefined && (obj.message = message.message); - return obj; - }, - - fromPartial(object: DeepPartial): RequestEcho { - const message = { ...baseRequestEcho } as RequestEcho; - if (object.message !== undefined && object.message !== null) { - message.message = object.message; - } else { - message.message = ""; - } - return message; - }, -}; - -const baseRequestFlush: object = {}; - -export const RequestFlush = { - encode(_: RequestFlush, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestFlush { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestFlush } as RequestFlush; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): RequestFlush { - const message = { ...baseRequestFlush } as RequestFlush; - return message; - }, - - toJSON(_: RequestFlush): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): RequestFlush { - const message = { ...baseRequestFlush } as RequestFlush; - return message; - }, -}; - -const baseRequestInfo: object = { - version: "", - block_version: 0, - p2p_version: 0, -}; - -export const RequestInfo = { - encode(message: RequestInfo, writer: Writer = Writer.create()): Writer { - if (message.version !== "") { - writer.uint32(10).string(message.version); - } - if (message.block_version !== 0) { - writer.uint32(16).uint64(message.block_version); - } - if (message.p2p_version !== 0) { - writer.uint32(24).uint64(message.p2p_version); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestInfo } as RequestInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; - case 2: - message.block_version = longToNumber(reader.uint64() as Long); - break; - case 3: - message.p2p_version = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestInfo { - const message = { ...baseRequestInfo } as RequestInfo; - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } else { - message.version = ""; - } - if (object.block_version !== undefined && object.block_version !== null) { - message.block_version = Number(object.block_version); - } else { - message.block_version = 0; - } - if (object.p2p_version !== undefined && object.p2p_version !== null) { - message.p2p_version = Number(object.p2p_version); - } else { - message.p2p_version = 0; - } - return message; - }, - - toJSON(message: RequestInfo): unknown { - const obj: any = {}; - message.version !== undefined && (obj.version = message.version); - message.block_version !== undefined && - (obj.block_version = message.block_version); - message.p2p_version !== undefined && - (obj.p2p_version = message.p2p_version); - return obj; - }, - - fromPartial(object: DeepPartial): RequestInfo { - const message = { ...baseRequestInfo } as RequestInfo; - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } else { - message.version = ""; - } - if (object.block_version !== undefined && object.block_version !== null) { - message.block_version = object.block_version; - } else { - message.block_version = 0; - } - if (object.p2p_version !== undefined && object.p2p_version !== null) { - message.p2p_version = object.p2p_version; - } else { - message.p2p_version = 0; - } - return message; - }, -}; - -const baseRequestSetOption: object = { key: "", value: "" }; - -export const RequestSetOption = { - encode(message: RequestSetOption, writer: Writer = Writer.create()): Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestSetOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestSetOption } as RequestSetOption; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestSetOption { - const message = { ...baseRequestSetOption } as RequestSetOption; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = String(object.value); - } else { - message.value = ""; - } - return message; - }, - - toJSON(message: RequestSetOption): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - - fromPartial(object: DeepPartial): RequestSetOption { - const message = { ...baseRequestSetOption } as RequestSetOption; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = ""; - } - return message; - }, -}; - -const baseRequestInitChain: object = { chain_id: "", initial_height: 0 }; - -export const RequestInitChain = { - encode(message: RequestInitChain, writer: Writer = Writer.create()): Writer { - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(10).fork() - ).ldelim(); - } - if (message.chain_id !== "") { - writer.uint32(18).string(message.chain_id); - } - if (message.consensus_params !== undefined) { - ConsensusParams.encode( - message.consensus_params, - writer.uint32(26).fork() - ).ldelim(); - } - for (const v of message.validators) { - ValidatorUpdate.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.app_state_bytes.length !== 0) { - writer.uint32(42).bytes(message.app_state_bytes); - } - if (message.initial_height !== 0) { - writer.uint32(48).int64(message.initial_height); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestInitChain { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestInitChain } as RequestInitChain; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 2: - message.chain_id = reader.string(); - break; - case 3: - message.consensus_params = ConsensusParams.decode( - reader, - reader.uint32() - ); - break; - case 4: - message.validators.push( - ValidatorUpdate.decode(reader, reader.uint32()) - ); - break; - case 5: - message.app_state_bytes = reader.bytes(); - break; - case 6: - message.initial_height = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestInitChain { - const message = { ...baseRequestInitChain } as RequestInitChain; - message.validators = []; - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.chain_id !== undefined && object.chain_id !== null) { - message.chain_id = String(object.chain_id); - } else { - message.chain_id = ""; - } - if ( - object.consensus_params !== undefined && - object.consensus_params !== null - ) { - message.consensus_params = ConsensusParams.fromJSON( - object.consensus_params - ); - } else { - message.consensus_params = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromJSON(e)); - } - } - if ( - object.app_state_bytes !== undefined && - object.app_state_bytes !== null - ) { - message.app_state_bytes = bytesFromBase64(object.app_state_bytes); - } - if (object.initial_height !== undefined && object.initial_height !== null) { - message.initial_height = Number(object.initial_height); - } else { - message.initial_height = 0; - } - return message; - }, - - toJSON(message: RequestInitChain): unknown { - const obj: any = {}; - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.chain_id !== undefined && (obj.chain_id = message.chain_id); - message.consensus_params !== undefined && - (obj.consensus_params = message.consensus_params - ? ConsensusParams.toJSON(message.consensus_params) - : undefined); - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? ValidatorUpdate.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.app_state_bytes !== undefined && - (obj.app_state_bytes = base64FromBytes( - message.app_state_bytes !== undefined - ? message.app_state_bytes - : new Uint8Array() - )); - message.initial_height !== undefined && - (obj.initial_height = message.initial_height); - return obj; - }, - - fromPartial(object: DeepPartial): RequestInitChain { - const message = { ...baseRequestInitChain } as RequestInitChain; - message.validators = []; - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.chain_id !== undefined && object.chain_id !== null) { - message.chain_id = object.chain_id; - } else { - message.chain_id = ""; - } - if ( - object.consensus_params !== undefined && - object.consensus_params !== null - ) { - message.consensus_params = ConsensusParams.fromPartial( - object.consensus_params - ); - } else { - message.consensus_params = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromPartial(e)); - } - } - if ( - object.app_state_bytes !== undefined && - object.app_state_bytes !== null - ) { - message.app_state_bytes = object.app_state_bytes; - } else { - message.app_state_bytes = new Uint8Array(); - } - if (object.initial_height !== undefined && object.initial_height !== null) { - message.initial_height = object.initial_height; - } else { - message.initial_height = 0; - } - return message; - }, -}; - -const baseRequestQuery: object = { path: "", height: 0, prove: false }; - -export const RequestQuery = { - encode(message: RequestQuery, writer: Writer = Writer.create()): Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.prove === true) { - writer.uint32(32).bool(message.prove); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestQuery { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestQuery } as RequestQuery; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.prove = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestQuery { - const message = { ...baseRequestQuery } as RequestQuery; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.prove !== undefined && object.prove !== null) { - message.prove = Boolean(object.prove); - } else { - message.prove = false; - } - return message; - }, - - toJSON(message: RequestQuery): unknown { - const obj: any = {}; - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.path !== undefined && (obj.path = message.path); - message.height !== undefined && (obj.height = message.height); - message.prove !== undefined && (obj.prove = message.prove); - return obj; - }, - - fromPartial(object: DeepPartial): RequestQuery { - const message = { ...baseRequestQuery } as RequestQuery; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.prove !== undefined && object.prove !== null) { - message.prove = object.prove; - } else { - message.prove = false; - } - return message; - }, -}; - -const baseRequestBeginBlock: object = {}; - -export const RequestBeginBlock = { - encode(message: RequestBeginBlock, writer: Writer = Writer.create()): Writer { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(18).fork()).ldelim(); - } - if (message.last_commit_info !== undefined) { - LastCommitInfo.encode( - message.last_commit_info, - writer.uint32(26).fork() - ).ldelim(); - } - for (const v of message.byzantine_validators) { - Evidence.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestBeginBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestBeginBlock } as RequestBeginBlock; - message.byzantine_validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.header = Header.decode(reader, reader.uint32()); - break; - case 3: - message.last_commit_info = LastCommitInfo.decode( - reader, - reader.uint32() - ); - break; - case 4: - message.byzantine_validators.push( - Evidence.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestBeginBlock { - const message = { ...baseRequestBeginBlock } as RequestBeginBlock; - message.byzantine_validators = []; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if ( - object.last_commit_info !== undefined && - object.last_commit_info !== null - ) { - message.last_commit_info = LastCommitInfo.fromJSON( - object.last_commit_info - ); - } else { - message.last_commit_info = undefined; - } - if ( - object.byzantine_validators !== undefined && - object.byzantine_validators !== null - ) { - for (const e of object.byzantine_validators) { - message.byzantine_validators.push(Evidence.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: RequestBeginBlock): unknown { - const obj: any = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.last_commit_info !== undefined && - (obj.last_commit_info = message.last_commit_info - ? LastCommitInfo.toJSON(message.last_commit_info) - : undefined); - if (message.byzantine_validators) { - obj.byzantine_validators = message.byzantine_validators.map((e) => - e ? Evidence.toJSON(e) : undefined - ); - } else { - obj.byzantine_validators = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): RequestBeginBlock { - const message = { ...baseRequestBeginBlock } as RequestBeginBlock; - message.byzantine_validators = []; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if ( - object.last_commit_info !== undefined && - object.last_commit_info !== null - ) { - message.last_commit_info = LastCommitInfo.fromPartial( - object.last_commit_info - ); - } else { - message.last_commit_info = undefined; - } - if ( - object.byzantine_validators !== undefined && - object.byzantine_validators !== null - ) { - for (const e of object.byzantine_validators) { - message.byzantine_validators.push(Evidence.fromPartial(e)); - } - } - return message; - }, -}; - -const baseRequestCheckTx: object = { type: 0 }; - -export const RequestCheckTx = { - encode(message: RequestCheckTx, writer: Writer = Writer.create()): Writer { - if (message.tx.length !== 0) { - writer.uint32(10).bytes(message.tx); - } - if (message.type !== 0) { - writer.uint32(16).int32(message.type); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestCheckTx { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestCheckTx } as RequestCheckTx; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = reader.bytes(); - break; - case 2: - message.type = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestCheckTx { - const message = { ...baseRequestCheckTx } as RequestCheckTx; - if (object.tx !== undefined && object.tx !== null) { - message.tx = bytesFromBase64(object.tx); - } - if (object.type !== undefined && object.type !== null) { - message.type = checkTxTypeFromJSON(object.type); - } else { - message.type = 0; - } - return message; - }, - - toJSON(message: RequestCheckTx): unknown { - const obj: any = {}; - message.tx !== undefined && - (obj.tx = base64FromBytes( - message.tx !== undefined ? message.tx : new Uint8Array() - )); - message.type !== undefined && (obj.type = checkTxTypeToJSON(message.type)); - return obj; - }, - - fromPartial(object: DeepPartial): RequestCheckTx { - const message = { ...baseRequestCheckTx } as RequestCheckTx; - if (object.tx !== undefined && object.tx !== null) { - message.tx = object.tx; - } else { - message.tx = new Uint8Array(); - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - return message; - }, -}; - -const baseRequestDeliverTx: object = {}; - -export const RequestDeliverTx = { - encode(message: RequestDeliverTx, writer: Writer = Writer.create()): Writer { - if (message.tx.length !== 0) { - writer.uint32(10).bytes(message.tx); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestDeliverTx { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestDeliverTx } as RequestDeliverTx; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestDeliverTx { - const message = { ...baseRequestDeliverTx } as RequestDeliverTx; - if (object.tx !== undefined && object.tx !== null) { - message.tx = bytesFromBase64(object.tx); - } - return message; - }, - - toJSON(message: RequestDeliverTx): unknown { - const obj: any = {}; - message.tx !== undefined && - (obj.tx = base64FromBytes( - message.tx !== undefined ? message.tx : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): RequestDeliverTx { - const message = { ...baseRequestDeliverTx } as RequestDeliverTx; - if (object.tx !== undefined && object.tx !== null) { - message.tx = object.tx; - } else { - message.tx = new Uint8Array(); - } - return message; - }, -}; - -const baseRequestEndBlock: object = { height: 0 }; - -export const RequestEndBlock = { - encode(message: RequestEndBlock, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestEndBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestEndBlock } as RequestEndBlock; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestEndBlock { - const message = { ...baseRequestEndBlock } as RequestEndBlock; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - return message; - }, - - toJSON(message: RequestEndBlock): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - return obj; - }, - - fromPartial(object: DeepPartial): RequestEndBlock { - const message = { ...baseRequestEndBlock } as RequestEndBlock; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - return message; - }, -}; - -const baseRequestCommit: object = {}; - -export const RequestCommit = { - encode(_: RequestCommit, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestCommit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestCommit } as RequestCommit; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): RequestCommit { - const message = { ...baseRequestCommit } as RequestCommit; - return message; - }, - - toJSON(_: RequestCommit): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): RequestCommit { - const message = { ...baseRequestCommit } as RequestCommit; - return message; - }, -}; - -const baseRequestListSnapshots: object = {}; - -export const RequestListSnapshots = { - encode(_: RequestListSnapshots, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestListSnapshots { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestListSnapshots } as RequestListSnapshots; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): RequestListSnapshots { - const message = { ...baseRequestListSnapshots } as RequestListSnapshots; - return message; - }, - - toJSON(_: RequestListSnapshots): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): RequestListSnapshots { - const message = { ...baseRequestListSnapshots } as RequestListSnapshots; - return message; - }, -}; - -const baseRequestOfferSnapshot: object = {}; - -export const RequestOfferSnapshot = { - encode( - message: RequestOfferSnapshot, - writer: Writer = Writer.create() - ): Writer { - if (message.snapshot !== undefined) { - Snapshot.encode(message.snapshot, writer.uint32(10).fork()).ldelim(); - } - if (message.app_hash.length !== 0) { - writer.uint32(18).bytes(message.app_hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RequestOfferSnapshot { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRequestOfferSnapshot } as RequestOfferSnapshot; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshot = Snapshot.decode(reader, reader.uint32()); - break; - case 2: - message.app_hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestOfferSnapshot { - const message = { ...baseRequestOfferSnapshot } as RequestOfferSnapshot; - if (object.snapshot !== undefined && object.snapshot !== null) { - message.snapshot = Snapshot.fromJSON(object.snapshot); - } else { - message.snapshot = undefined; - } - if (object.app_hash !== undefined && object.app_hash !== null) { - message.app_hash = bytesFromBase64(object.app_hash); - } - return message; - }, - - toJSON(message: RequestOfferSnapshot): unknown { - const obj: any = {}; - message.snapshot !== undefined && - (obj.snapshot = message.snapshot - ? Snapshot.toJSON(message.snapshot) - : undefined); - message.app_hash !== undefined && - (obj.app_hash = base64FromBytes( - message.app_hash !== undefined ? message.app_hash : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): RequestOfferSnapshot { - const message = { ...baseRequestOfferSnapshot } as RequestOfferSnapshot; - if (object.snapshot !== undefined && object.snapshot !== null) { - message.snapshot = Snapshot.fromPartial(object.snapshot); - } else { - message.snapshot = undefined; - } - if (object.app_hash !== undefined && object.app_hash !== null) { - message.app_hash = object.app_hash; - } else { - message.app_hash = new Uint8Array(); - } - return message; - }, -}; - -const baseRequestLoadSnapshotChunk: object = { height: 0, format: 0, chunk: 0 }; - -export const RequestLoadSnapshotChunk = { - encode( - message: RequestLoadSnapshotChunk, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== 0) { - writer.uint32(8).uint64(message.height); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - if (message.chunk !== 0) { - writer.uint32(24).uint32(message.chunk); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): RequestLoadSnapshotChunk { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseRequestLoadSnapshotChunk, - } as RequestLoadSnapshotChunk; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.uint64() as Long); - break; - case 2: - message.format = reader.uint32(); - break; - case 3: - message.chunk = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestLoadSnapshotChunk { - const message = { - ...baseRequestLoadSnapshotChunk, - } as RequestLoadSnapshotChunk; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = Number(object.format); - } else { - message.format = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = Number(object.chunk); - } else { - message.chunk = 0; - } - return message; - }, - - toJSON(message: RequestLoadSnapshotChunk): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.format !== undefined && (obj.format = message.format); - message.chunk !== undefined && (obj.chunk = message.chunk); - return obj; - }, - - fromPartial( - object: DeepPartial - ): RequestLoadSnapshotChunk { - const message = { - ...baseRequestLoadSnapshotChunk, - } as RequestLoadSnapshotChunk; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = object.format; - } else { - message.format = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = object.chunk; - } else { - message.chunk = 0; - } - return message; - }, -}; - -const baseRequestApplySnapshotChunk: object = { index: 0, sender: "" }; - -export const RequestApplySnapshotChunk = { - encode( - message: RequestApplySnapshotChunk, - writer: Writer = Writer.create() - ): Writer { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.chunk.length !== 0) { - writer.uint32(18).bytes(message.chunk); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): RequestApplySnapshotChunk { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseRequestApplySnapshotChunk, - } as RequestApplySnapshotChunk; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.chunk = reader.bytes(); - break; - case 3: - message.sender = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RequestApplySnapshotChunk { - const message = { - ...baseRequestApplySnapshotChunk, - } as RequestApplySnapshotChunk; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = bytesFromBase64(object.chunk); - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - return message; - }, - - toJSON(message: RequestApplySnapshotChunk): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = message.index); - message.chunk !== undefined && - (obj.chunk = base64FromBytes( - message.chunk !== undefined ? message.chunk : new Uint8Array() - )); - message.sender !== undefined && (obj.sender = message.sender); - return obj; - }, - - fromPartial( - object: DeepPartial - ): RequestApplySnapshotChunk { - const message = { - ...baseRequestApplySnapshotChunk, - } as RequestApplySnapshotChunk; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = object.chunk; - } else { - message.chunk = new Uint8Array(); - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - return message; - }, -}; - -const baseResponse: object = {}; - -export const Response = { - encode(message: Response, writer: Writer = Writer.create()): Writer { - if (message.exception !== undefined) { - ResponseException.encode( - message.exception, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.echo !== undefined) { - ResponseEcho.encode(message.echo, writer.uint32(18).fork()).ldelim(); - } - if (message.flush !== undefined) { - ResponseFlush.encode(message.flush, writer.uint32(26).fork()).ldelim(); - } - if (message.info !== undefined) { - ResponseInfo.encode(message.info, writer.uint32(34).fork()).ldelim(); - } - if (message.set_option !== undefined) { - ResponseSetOption.encode( - message.set_option, - writer.uint32(42).fork() - ).ldelim(); - } - if (message.init_chain !== undefined) { - ResponseInitChain.encode( - message.init_chain, - writer.uint32(50).fork() - ).ldelim(); - } - if (message.query !== undefined) { - ResponseQuery.encode(message.query, writer.uint32(58).fork()).ldelim(); - } - if (message.begin_block !== undefined) { - ResponseBeginBlock.encode( - message.begin_block, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.check_tx !== undefined) { - ResponseCheckTx.encode( - message.check_tx, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.deliver_tx !== undefined) { - ResponseDeliverTx.encode( - message.deliver_tx, - writer.uint32(82).fork() - ).ldelim(); - } - if (message.end_block !== undefined) { - ResponseEndBlock.encode( - message.end_block, - writer.uint32(90).fork() - ).ldelim(); - } - if (message.commit !== undefined) { - ResponseCommit.encode(message.commit, writer.uint32(98).fork()).ldelim(); - } - if (message.list_snapshots !== undefined) { - ResponseListSnapshots.encode( - message.list_snapshots, - writer.uint32(106).fork() - ).ldelim(); - } - if (message.offer_snapshot !== undefined) { - ResponseOfferSnapshot.encode( - message.offer_snapshot, - writer.uint32(114).fork() - ).ldelim(); - } - if (message.load_snapshot_chunk !== undefined) { - ResponseLoadSnapshotChunk.encode( - message.load_snapshot_chunk, - writer.uint32(122).fork() - ).ldelim(); - } - if (message.apply_snapshot_chunk !== undefined) { - ResponseApplySnapshotChunk.encode( - message.apply_snapshot_chunk, - writer.uint32(130).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Response { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponse } as Response; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exception = ResponseException.decode(reader, reader.uint32()); - break; - case 2: - message.echo = ResponseEcho.decode(reader, reader.uint32()); - break; - case 3: - message.flush = ResponseFlush.decode(reader, reader.uint32()); - break; - case 4: - message.info = ResponseInfo.decode(reader, reader.uint32()); - break; - case 5: - message.set_option = ResponseSetOption.decode( - reader, - reader.uint32() - ); - break; - case 6: - message.init_chain = ResponseInitChain.decode( - reader, - reader.uint32() - ); - break; - case 7: - message.query = ResponseQuery.decode(reader, reader.uint32()); - break; - case 8: - message.begin_block = ResponseBeginBlock.decode( - reader, - reader.uint32() - ); - break; - case 9: - message.check_tx = ResponseCheckTx.decode(reader, reader.uint32()); - break; - case 10: - message.deliver_tx = ResponseDeliverTx.decode( - reader, - reader.uint32() - ); - break; - case 11: - message.end_block = ResponseEndBlock.decode(reader, reader.uint32()); - break; - case 12: - message.commit = ResponseCommit.decode(reader, reader.uint32()); - break; - case 13: - message.list_snapshots = ResponseListSnapshots.decode( - reader, - reader.uint32() - ); - break; - case 14: - message.offer_snapshot = ResponseOfferSnapshot.decode( - reader, - reader.uint32() - ); - break; - case 15: - message.load_snapshot_chunk = ResponseLoadSnapshotChunk.decode( - reader, - reader.uint32() - ); - break; - case 16: - message.apply_snapshot_chunk = ResponseApplySnapshotChunk.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Response { - const message = { ...baseResponse } as Response; - if (object.exception !== undefined && object.exception !== null) { - message.exception = ResponseException.fromJSON(object.exception); - } else { - message.exception = undefined; - } - if (object.echo !== undefined && object.echo !== null) { - message.echo = ResponseEcho.fromJSON(object.echo); - } else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = ResponseFlush.fromJSON(object.flush); - } else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = ResponseInfo.fromJSON(object.info); - } else { - message.info = undefined; - } - if (object.set_option !== undefined && object.set_option !== null) { - message.set_option = ResponseSetOption.fromJSON(object.set_option); - } else { - message.set_option = undefined; - } - if (object.init_chain !== undefined && object.init_chain !== null) { - message.init_chain = ResponseInitChain.fromJSON(object.init_chain); - } else { - message.init_chain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = ResponseQuery.fromJSON(object.query); - } else { - message.query = undefined; - } - if (object.begin_block !== undefined && object.begin_block !== null) { - message.begin_block = ResponseBeginBlock.fromJSON(object.begin_block); - } else { - message.begin_block = undefined; - } - if (object.check_tx !== undefined && object.check_tx !== null) { - message.check_tx = ResponseCheckTx.fromJSON(object.check_tx); - } else { - message.check_tx = undefined; - } - if (object.deliver_tx !== undefined && object.deliver_tx !== null) { - message.deliver_tx = ResponseDeliverTx.fromJSON(object.deliver_tx); - } else { - message.deliver_tx = undefined; - } - if (object.end_block !== undefined && object.end_block !== null) { - message.end_block = ResponseEndBlock.fromJSON(object.end_block); - } else { - message.end_block = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = ResponseCommit.fromJSON(object.commit); - } else { - message.commit = undefined; - } - if (object.list_snapshots !== undefined && object.list_snapshots !== null) { - message.list_snapshots = ResponseListSnapshots.fromJSON( - object.list_snapshots - ); - } else { - message.list_snapshots = undefined; - } - if (object.offer_snapshot !== undefined && object.offer_snapshot !== null) { - message.offer_snapshot = ResponseOfferSnapshot.fromJSON( - object.offer_snapshot - ); - } else { - message.offer_snapshot = undefined; - } - if ( - object.load_snapshot_chunk !== undefined && - object.load_snapshot_chunk !== null - ) { - message.load_snapshot_chunk = ResponseLoadSnapshotChunk.fromJSON( - object.load_snapshot_chunk - ); - } else { - message.load_snapshot_chunk = undefined; - } - if ( - object.apply_snapshot_chunk !== undefined && - object.apply_snapshot_chunk !== null - ) { - message.apply_snapshot_chunk = ResponseApplySnapshotChunk.fromJSON( - object.apply_snapshot_chunk - ); - } else { - message.apply_snapshot_chunk = undefined; - } - return message; - }, - - toJSON(message: Response): unknown { - const obj: any = {}; - message.exception !== undefined && - (obj.exception = message.exception - ? ResponseException.toJSON(message.exception) - : undefined); - message.echo !== undefined && - (obj.echo = message.echo ? ResponseEcho.toJSON(message.echo) : undefined); - message.flush !== undefined && - (obj.flush = message.flush - ? ResponseFlush.toJSON(message.flush) - : undefined); - message.info !== undefined && - (obj.info = message.info ? ResponseInfo.toJSON(message.info) : undefined); - message.set_option !== undefined && - (obj.set_option = message.set_option - ? ResponseSetOption.toJSON(message.set_option) - : undefined); - message.init_chain !== undefined && - (obj.init_chain = message.init_chain - ? ResponseInitChain.toJSON(message.init_chain) - : undefined); - message.query !== undefined && - (obj.query = message.query - ? ResponseQuery.toJSON(message.query) - : undefined); - message.begin_block !== undefined && - (obj.begin_block = message.begin_block - ? ResponseBeginBlock.toJSON(message.begin_block) - : undefined); - message.check_tx !== undefined && - (obj.check_tx = message.check_tx - ? ResponseCheckTx.toJSON(message.check_tx) - : undefined); - message.deliver_tx !== undefined && - (obj.deliver_tx = message.deliver_tx - ? ResponseDeliverTx.toJSON(message.deliver_tx) - : undefined); - message.end_block !== undefined && - (obj.end_block = message.end_block - ? ResponseEndBlock.toJSON(message.end_block) - : undefined); - message.commit !== undefined && - (obj.commit = message.commit - ? ResponseCommit.toJSON(message.commit) - : undefined); - message.list_snapshots !== undefined && - (obj.list_snapshots = message.list_snapshots - ? ResponseListSnapshots.toJSON(message.list_snapshots) - : undefined); - message.offer_snapshot !== undefined && - (obj.offer_snapshot = message.offer_snapshot - ? ResponseOfferSnapshot.toJSON(message.offer_snapshot) - : undefined); - message.load_snapshot_chunk !== undefined && - (obj.load_snapshot_chunk = message.load_snapshot_chunk - ? ResponseLoadSnapshotChunk.toJSON(message.load_snapshot_chunk) - : undefined); - message.apply_snapshot_chunk !== undefined && - (obj.apply_snapshot_chunk = message.apply_snapshot_chunk - ? ResponseApplySnapshotChunk.toJSON(message.apply_snapshot_chunk) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Response { - const message = { ...baseResponse } as Response; - if (object.exception !== undefined && object.exception !== null) { - message.exception = ResponseException.fromPartial(object.exception); - } else { - message.exception = undefined; - } - if (object.echo !== undefined && object.echo !== null) { - message.echo = ResponseEcho.fromPartial(object.echo); - } else { - message.echo = undefined; - } - if (object.flush !== undefined && object.flush !== null) { - message.flush = ResponseFlush.fromPartial(object.flush); - } else { - message.flush = undefined; - } - if (object.info !== undefined && object.info !== null) { - message.info = ResponseInfo.fromPartial(object.info); - } else { - message.info = undefined; - } - if (object.set_option !== undefined && object.set_option !== null) { - message.set_option = ResponseSetOption.fromPartial(object.set_option); - } else { - message.set_option = undefined; - } - if (object.init_chain !== undefined && object.init_chain !== null) { - message.init_chain = ResponseInitChain.fromPartial(object.init_chain); - } else { - message.init_chain = undefined; - } - if (object.query !== undefined && object.query !== null) { - message.query = ResponseQuery.fromPartial(object.query); - } else { - message.query = undefined; - } - if (object.begin_block !== undefined && object.begin_block !== null) { - message.begin_block = ResponseBeginBlock.fromPartial(object.begin_block); - } else { - message.begin_block = undefined; - } - if (object.check_tx !== undefined && object.check_tx !== null) { - message.check_tx = ResponseCheckTx.fromPartial(object.check_tx); - } else { - message.check_tx = undefined; - } - if (object.deliver_tx !== undefined && object.deliver_tx !== null) { - message.deliver_tx = ResponseDeliverTx.fromPartial(object.deliver_tx); - } else { - message.deliver_tx = undefined; - } - if (object.end_block !== undefined && object.end_block !== null) { - message.end_block = ResponseEndBlock.fromPartial(object.end_block); - } else { - message.end_block = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = ResponseCommit.fromPartial(object.commit); - } else { - message.commit = undefined; - } - if (object.list_snapshots !== undefined && object.list_snapshots !== null) { - message.list_snapshots = ResponseListSnapshots.fromPartial( - object.list_snapshots - ); - } else { - message.list_snapshots = undefined; - } - if (object.offer_snapshot !== undefined && object.offer_snapshot !== null) { - message.offer_snapshot = ResponseOfferSnapshot.fromPartial( - object.offer_snapshot - ); - } else { - message.offer_snapshot = undefined; - } - if ( - object.load_snapshot_chunk !== undefined && - object.load_snapshot_chunk !== null - ) { - message.load_snapshot_chunk = ResponseLoadSnapshotChunk.fromPartial( - object.load_snapshot_chunk - ); - } else { - message.load_snapshot_chunk = undefined; - } - if ( - object.apply_snapshot_chunk !== undefined && - object.apply_snapshot_chunk !== null - ) { - message.apply_snapshot_chunk = ResponseApplySnapshotChunk.fromPartial( - object.apply_snapshot_chunk - ); - } else { - message.apply_snapshot_chunk = undefined; - } - return message; - }, -}; - -const baseResponseException: object = { error: "" }; - -export const ResponseException = { - encode(message: ResponseException, writer: Writer = Writer.create()): Writer { - if (message.error !== "") { - writer.uint32(10).string(message.error); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseException { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseException } as ResponseException; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseException { - const message = { ...baseResponseException } as ResponseException; - if (object.error !== undefined && object.error !== null) { - message.error = String(object.error); - } else { - message.error = ""; - } - return message; - }, - - toJSON(message: ResponseException): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = message.error); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseException { - const message = { ...baseResponseException } as ResponseException; - if (object.error !== undefined && object.error !== null) { - message.error = object.error; - } else { - message.error = ""; - } - return message; - }, -}; - -const baseResponseEcho: object = { message: "" }; - -export const ResponseEcho = { - encode(message: ResponseEcho, writer: Writer = Writer.create()): Writer { - if (message.message !== "") { - writer.uint32(10).string(message.message); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseEcho { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseEcho } as ResponseEcho; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseEcho { - const message = { ...baseResponseEcho } as ResponseEcho; - if (object.message !== undefined && object.message !== null) { - message.message = String(object.message); - } else { - message.message = ""; - } - return message; - }, - - toJSON(message: ResponseEcho): unknown { - const obj: any = {}; - message.message !== undefined && (obj.message = message.message); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseEcho { - const message = { ...baseResponseEcho } as ResponseEcho; - if (object.message !== undefined && object.message !== null) { - message.message = object.message; - } else { - message.message = ""; - } - return message; - }, -}; - -const baseResponseFlush: object = {}; - -export const ResponseFlush = { - encode(_: ResponseFlush, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseFlush { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseFlush } as ResponseFlush; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): ResponseFlush { - const message = { ...baseResponseFlush } as ResponseFlush; - return message; - }, - - toJSON(_: ResponseFlush): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): ResponseFlush { - const message = { ...baseResponseFlush } as ResponseFlush; - return message; - }, -}; - -const baseResponseInfo: object = { - data: "", - version: "", - app_version: 0, - last_block_height: 0, -}; - -export const ResponseInfo = { - encode(message: ResponseInfo, writer: Writer = Writer.create()): Writer { - if (message.data !== "") { - writer.uint32(10).string(message.data); - } - if (message.version !== "") { - writer.uint32(18).string(message.version); - } - if (message.app_version !== 0) { - writer.uint32(24).uint64(message.app_version); - } - if (message.last_block_height !== 0) { - writer.uint32(32).int64(message.last_block_height); - } - if (message.last_block_app_hash.length !== 0) { - writer.uint32(42).bytes(message.last_block_app_hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseInfo } as ResponseInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.string(); - break; - case 2: - message.version = reader.string(); - break; - case 3: - message.app_version = longToNumber(reader.uint64() as Long); - break; - case 4: - message.last_block_height = longToNumber(reader.int64() as Long); - break; - case 5: - message.last_block_app_hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseInfo { - const message = { ...baseResponseInfo } as ResponseInfo; - if (object.data !== undefined && object.data !== null) { - message.data = String(object.data); - } else { - message.data = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } else { - message.version = ""; - } - if (object.app_version !== undefined && object.app_version !== null) { - message.app_version = Number(object.app_version); - } else { - message.app_version = 0; - } - if ( - object.last_block_height !== undefined && - object.last_block_height !== null - ) { - message.last_block_height = Number(object.last_block_height); - } else { - message.last_block_height = 0; - } - if ( - object.last_block_app_hash !== undefined && - object.last_block_app_hash !== null - ) { - message.last_block_app_hash = bytesFromBase64(object.last_block_app_hash); - } - return message; - }, - - toJSON(message: ResponseInfo): unknown { - const obj: any = {}; - message.data !== undefined && (obj.data = message.data); - message.version !== undefined && (obj.version = message.version); - message.app_version !== undefined && - (obj.app_version = message.app_version); - message.last_block_height !== undefined && - (obj.last_block_height = message.last_block_height); - message.last_block_app_hash !== undefined && - (obj.last_block_app_hash = base64FromBytes( - message.last_block_app_hash !== undefined - ? message.last_block_app_hash - : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseInfo { - const message = { ...baseResponseInfo } as ResponseInfo; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } else { - message.version = ""; - } - if (object.app_version !== undefined && object.app_version !== null) { - message.app_version = object.app_version; - } else { - message.app_version = 0; - } - if ( - object.last_block_height !== undefined && - object.last_block_height !== null - ) { - message.last_block_height = object.last_block_height; - } else { - message.last_block_height = 0; - } - if ( - object.last_block_app_hash !== undefined && - object.last_block_app_hash !== null - ) { - message.last_block_app_hash = object.last_block_app_hash; - } else { - message.last_block_app_hash = new Uint8Array(); - } - return message; - }, -}; - -const baseResponseSetOption: object = { code: 0, log: "", info: "" }; - -export const ResponseSetOption = { - encode(message: ResponseSetOption, writer: Writer = Writer.create()): Writer { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseSetOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseSetOption } as ResponseSetOption; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseSetOption { - const message = { ...baseResponseSetOption } as ResponseSetOption; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - return message; - }, - - toJSON(message: ResponseSetOption): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = message.code); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseSetOption { - const message = { ...baseResponseSetOption } as ResponseSetOption; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - return message; - }, -}; - -const baseResponseInitChain: object = {}; - -export const ResponseInitChain = { - encode(message: ResponseInitChain, writer: Writer = Writer.create()): Writer { - if (message.consensus_params !== undefined) { - ConsensusParams.encode( - message.consensus_params, - writer.uint32(10).fork() - ).ldelim(); - } - for (const v of message.validators) { - ValidatorUpdate.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.app_hash.length !== 0) { - writer.uint32(26).bytes(message.app_hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseInitChain { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseInitChain } as ResponseInitChain; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensus_params = ConsensusParams.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.validators.push( - ValidatorUpdate.decode(reader, reader.uint32()) - ); - break; - case 3: - message.app_hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseInitChain { - const message = { ...baseResponseInitChain } as ResponseInitChain; - message.validators = []; - if ( - object.consensus_params !== undefined && - object.consensus_params !== null - ) { - message.consensus_params = ConsensusParams.fromJSON( - object.consensus_params - ); - } else { - message.consensus_params = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromJSON(e)); - } - } - if (object.app_hash !== undefined && object.app_hash !== null) { - message.app_hash = bytesFromBase64(object.app_hash); - } - return message; - }, - - toJSON(message: ResponseInitChain): unknown { - const obj: any = {}; - message.consensus_params !== undefined && - (obj.consensus_params = message.consensus_params - ? ConsensusParams.toJSON(message.consensus_params) - : undefined); - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? ValidatorUpdate.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.app_hash !== undefined && - (obj.app_hash = base64FromBytes( - message.app_hash !== undefined ? message.app_hash : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseInitChain { - const message = { ...baseResponseInitChain } as ResponseInitChain; - message.validators = []; - if ( - object.consensus_params !== undefined && - object.consensus_params !== null - ) { - message.consensus_params = ConsensusParams.fromPartial( - object.consensus_params - ); - } else { - message.consensus_params = undefined; - } - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(ValidatorUpdate.fromPartial(e)); - } - } - if (object.app_hash !== undefined && object.app_hash !== null) { - message.app_hash = object.app_hash; - } else { - message.app_hash = new Uint8Array(); - } - return message; - }, -}; - -const baseResponseQuery: object = { - code: 0, - log: "", - info: "", - index: 0, - height: 0, - codespace: "", -}; - -export const ResponseQuery = { - encode(message: ResponseQuery, writer: Writer = Writer.create()): Writer { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.index !== 0) { - writer.uint32(40).int64(message.index); - } - if (message.key.length !== 0) { - writer.uint32(50).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(58).bytes(message.value); - } - if (message.proof_ops !== undefined) { - ProofOps.encode(message.proof_ops, writer.uint32(66).fork()).ldelim(); - } - if (message.height !== 0) { - writer.uint32(72).int64(message.height); - } - if (message.codespace !== "") { - writer.uint32(82).string(message.codespace); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseQuery { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseQuery } as ResponseQuery; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.index = longToNumber(reader.int64() as Long); - break; - case 6: - message.key = reader.bytes(); - break; - case 7: - message.value = reader.bytes(); - break; - case 8: - message.proof_ops = ProofOps.decode(reader, reader.uint32()); - break; - case 9: - message.height = longToNumber(reader.int64() as Long); - break; - case 10: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseQuery { - const message = { ...baseResponseQuery } as ResponseQuery; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.proof_ops !== undefined && object.proof_ops !== null) { - message.proof_ops = ProofOps.fromJSON(object.proof_ops); - } else { - message.proof_ops = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } else { - message.codespace = ""; - } - return message; - }, - - toJSON(message: ResponseQuery): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = message.code); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.index !== undefined && (obj.index = message.index); - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - message.proof_ops !== undefined && - (obj.proof_ops = message.proof_ops - ? ProofOps.toJSON(message.proof_ops) - : undefined); - message.height !== undefined && (obj.height = message.height); - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseQuery { - const message = { ...baseResponseQuery } as ResponseQuery; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } else { - message.code = 0; - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - if (object.proof_ops !== undefined && object.proof_ops !== null) { - message.proof_ops = ProofOps.fromPartial(object.proof_ops); - } else { - message.proof_ops = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } else { - message.codespace = ""; - } - return message; - }, -}; - -const baseResponseBeginBlock: object = {}; - -export const ResponseBeginBlock = { - encode( - message: ResponseBeginBlock, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.events) { - Event.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseBeginBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseBeginBlock } as ResponseBeginBlock; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseBeginBlock { - const message = { ...baseResponseBeginBlock } as ResponseBeginBlock; - message.events = []; - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ResponseBeginBlock): unknown { - const obj: any = {}; - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ResponseBeginBlock { - const message = { ...baseResponseBeginBlock } as ResponseBeginBlock; - message.events = []; - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; - -const baseResponseCheckTx: object = { - code: 0, - log: "", - info: "", - gas_wanted: 0, - gas_used: 0, - codespace: "", -}; - -export const ResponseCheckTx = { - encode(message: ResponseCheckTx, writer: Writer = Writer.create()): Writer { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.gas_wanted !== 0) { - writer.uint32(40).int64(message.gas_wanted); - } - if (message.gas_used !== 0) { - writer.uint32(48).int64(message.gas_used); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.codespace !== "") { - writer.uint32(66).string(message.codespace); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseCheckTx { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseCheckTx } as ResponseCheckTx; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gas_wanted = longToNumber(reader.int64() as Long); - break; - case 6: - message.gas_used = longToNumber(reader.int64() as Long); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseCheckTx { - const message = { ...baseResponseCheckTx } as ResponseCheckTx; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - if (object.gas_wanted !== undefined && object.gas_wanted !== null) { - message.gas_wanted = Number(object.gas_wanted); - } else { - message.gas_wanted = 0; - } - if (object.gas_used !== undefined && object.gas_used !== null) { - message.gas_used = Number(object.gas_used); - } else { - message.gas_used = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } else { - message.codespace = ""; - } - return message; - }, - - toJSON(message: ResponseCheckTx): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = message.code); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.gas_wanted !== undefined && (obj.gas_wanted = message.gas_wanted); - message.gas_used !== undefined && (obj.gas_used = message.gas_used); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseCheckTx { - const message = { ...baseResponseCheckTx } as ResponseCheckTx; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - if (object.gas_wanted !== undefined && object.gas_wanted !== null) { - message.gas_wanted = object.gas_wanted; - } else { - message.gas_wanted = 0; - } - if (object.gas_used !== undefined && object.gas_used !== null) { - message.gas_used = object.gas_used; - } else { - message.gas_used = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } else { - message.codespace = ""; - } - return message; - }, -}; - -const baseResponseDeliverTx: object = { - code: 0, - log: "", - info: "", - gas_wanted: 0, - gas_used: 0, - codespace: "", -}; - -export const ResponseDeliverTx = { - encode(message: ResponseDeliverTx, writer: Writer = Writer.create()): Writer { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.gas_wanted !== 0) { - writer.uint32(40).int64(message.gas_wanted); - } - if (message.gas_used !== 0) { - writer.uint32(48).int64(message.gas_used); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.codespace !== "") { - writer.uint32(66).string(message.codespace); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseDeliverTx { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseDeliverTx } as ResponseDeliverTx; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gas_wanted = longToNumber(reader.int64() as Long); - break; - case 6: - message.gas_used = longToNumber(reader.int64() as Long); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseDeliverTx { - const message = { ...baseResponseDeliverTx } as ResponseDeliverTx; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = Number(object.code); - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.log !== undefined && object.log !== null) { - message.log = String(object.log); - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - if (object.gas_wanted !== undefined && object.gas_wanted !== null) { - message.gas_wanted = Number(object.gas_wanted); - } else { - message.gas_wanted = 0; - } - if (object.gas_used !== undefined && object.gas_used !== null) { - message.gas_used = Number(object.gas_used); - } else { - message.gas_used = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = String(object.codespace); - } else { - message.codespace = ""; - } - return message; - }, - - toJSON(message: ResponseDeliverTx): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = message.code); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.gas_wanted !== undefined && (obj.gas_wanted = message.gas_wanted); - message.gas_used !== undefined && (obj.gas_used = message.gas_used); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseDeliverTx { - const message = { ...baseResponseDeliverTx } as ResponseDeliverTx; - message.events = []; - if (object.code !== undefined && object.code !== null) { - message.code = object.code; - } else { - message.code = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.log !== undefined && object.log !== null) { - message.log = object.log; - } else { - message.log = ""; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - if (object.gas_wanted !== undefined && object.gas_wanted !== null) { - message.gas_wanted = object.gas_wanted; - } else { - message.gas_wanted = 0; - } - if (object.gas_used !== undefined && object.gas_used !== null) { - message.gas_used = object.gas_used; - } else { - message.gas_used = 0; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - if (object.codespace !== undefined && object.codespace !== null) { - message.codespace = object.codespace; - } else { - message.codespace = ""; - } - return message; - }, -}; - -const baseResponseEndBlock: object = {}; - -export const ResponseEndBlock = { - encode(message: ResponseEndBlock, writer: Writer = Writer.create()): Writer { - for (const v of message.validator_updates) { - ValidatorUpdate.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.consensus_param_updates !== undefined) { - ConsensusParams.encode( - message.consensus_param_updates, - writer.uint32(18).fork() - ).ldelim(); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseEndBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseEndBlock } as ResponseEndBlock; - message.validator_updates = []; - message.events = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_updates.push( - ValidatorUpdate.decode(reader, reader.uint32()) - ); - break; - case 2: - message.consensus_param_updates = ConsensusParams.decode( - reader, - reader.uint32() - ); - break; - case 3: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseEndBlock { - const message = { ...baseResponseEndBlock } as ResponseEndBlock; - message.validator_updates = []; - message.events = []; - if ( - object.validator_updates !== undefined && - object.validator_updates !== null - ) { - for (const e of object.validator_updates) { - message.validator_updates.push(ValidatorUpdate.fromJSON(e)); - } - } - if ( - object.consensus_param_updates !== undefined && - object.consensus_param_updates !== null - ) { - message.consensus_param_updates = ConsensusParams.fromJSON( - object.consensus_param_updates - ); - } else { - message.consensus_param_updates = undefined; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ResponseEndBlock): unknown { - const obj: any = {}; - if (message.validator_updates) { - obj.validator_updates = message.validator_updates.map((e) => - e ? ValidatorUpdate.toJSON(e) : undefined - ); - } else { - obj.validator_updates = []; - } - message.consensus_param_updates !== undefined && - (obj.consensus_param_updates = message.consensus_param_updates - ? ConsensusParams.toJSON(message.consensus_param_updates) - : undefined); - if (message.events) { - obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); - } else { - obj.events = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ResponseEndBlock { - const message = { ...baseResponseEndBlock } as ResponseEndBlock; - message.validator_updates = []; - message.events = []; - if ( - object.validator_updates !== undefined && - object.validator_updates !== null - ) { - for (const e of object.validator_updates) { - message.validator_updates.push(ValidatorUpdate.fromPartial(e)); - } - } - if ( - object.consensus_param_updates !== undefined && - object.consensus_param_updates !== null - ) { - message.consensus_param_updates = ConsensusParams.fromPartial( - object.consensus_param_updates - ); - } else { - message.consensus_param_updates = undefined; - } - if (object.events !== undefined && object.events !== null) { - for (const e of object.events) { - message.events.push(Event.fromPartial(e)); - } - } - return message; - }, -}; - -const baseResponseCommit: object = { retain_height: 0 }; - -export const ResponseCommit = { - encode(message: ResponseCommit, writer: Writer = Writer.create()): Writer { - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.retain_height !== 0) { - writer.uint32(24).int64(message.retain_height); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseCommit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseCommit } as ResponseCommit; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.data = reader.bytes(); - break; - case 3: - message.retain_height = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseCommit { - const message = { ...baseResponseCommit } as ResponseCommit; - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.retain_height !== undefined && object.retain_height !== null) { - message.retain_height = Number(object.retain_height); - } else { - message.retain_height = 0; - } - return message; - }, - - toJSON(message: ResponseCommit): unknown { - const obj: any = {}; - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.retain_height !== undefined && - (obj.retain_height = message.retain_height); - return obj; - }, - - fromPartial(object: DeepPartial): ResponseCommit { - const message = { ...baseResponseCommit } as ResponseCommit; - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.retain_height !== undefined && object.retain_height !== null) { - message.retain_height = object.retain_height; - } else { - message.retain_height = 0; - } - return message; - }, -}; - -const baseResponseListSnapshots: object = {}; - -export const ResponseListSnapshots = { - encode( - message: ResponseListSnapshots, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.snapshots) { - Snapshot.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseListSnapshots { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseListSnapshots } as ResponseListSnapshots; - message.snapshots = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshots.push(Snapshot.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseListSnapshots { - const message = { ...baseResponseListSnapshots } as ResponseListSnapshots; - message.snapshots = []; - if (object.snapshots !== undefined && object.snapshots !== null) { - for (const e of object.snapshots) { - message.snapshots.push(Snapshot.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ResponseListSnapshots): unknown { - const obj: any = {}; - if (message.snapshots) { - obj.snapshots = message.snapshots.map((e) => - e ? Snapshot.toJSON(e) : undefined - ); - } else { - obj.snapshots = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ResponseListSnapshots { - const message = { ...baseResponseListSnapshots } as ResponseListSnapshots; - message.snapshots = []; - if (object.snapshots !== undefined && object.snapshots !== null) { - for (const e of object.snapshots) { - message.snapshots.push(Snapshot.fromPartial(e)); - } - } - return message; - }, -}; - -const baseResponseOfferSnapshot: object = { result: 0 }; - -export const ResponseOfferSnapshot = { - encode( - message: ResponseOfferSnapshot, - writer: Writer = Writer.create() - ): Writer { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ResponseOfferSnapshot { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseResponseOfferSnapshot } as ResponseOfferSnapshot; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseOfferSnapshot { - const message = { ...baseResponseOfferSnapshot } as ResponseOfferSnapshot; - if (object.result !== undefined && object.result !== null) { - message.result = responseOfferSnapshot_ResultFromJSON(object.result); - } else { - message.result = 0; - } - return message; - }, - - toJSON(message: ResponseOfferSnapshot): unknown { - const obj: any = {}; - message.result !== undefined && - (obj.result = responseOfferSnapshot_ResultToJSON(message.result)); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ResponseOfferSnapshot { - const message = { ...baseResponseOfferSnapshot } as ResponseOfferSnapshot; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } else { - message.result = 0; - } - return message; - }, -}; - -const baseResponseLoadSnapshotChunk: object = {}; - -export const ResponseLoadSnapshotChunk = { - encode( - message: ResponseLoadSnapshotChunk, - writer: Writer = Writer.create() - ): Writer { - if (message.chunk.length !== 0) { - writer.uint32(10).bytes(message.chunk); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ResponseLoadSnapshotChunk { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseResponseLoadSnapshotChunk, - } as ResponseLoadSnapshotChunk; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.chunk = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseLoadSnapshotChunk { - const message = { - ...baseResponseLoadSnapshotChunk, - } as ResponseLoadSnapshotChunk; - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = bytesFromBase64(object.chunk); - } - return message; - }, - - toJSON(message: ResponseLoadSnapshotChunk): unknown { - const obj: any = {}; - message.chunk !== undefined && - (obj.chunk = base64FromBytes( - message.chunk !== undefined ? message.chunk : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ResponseLoadSnapshotChunk { - const message = { - ...baseResponseLoadSnapshotChunk, - } as ResponseLoadSnapshotChunk; - if (object.chunk !== undefined && object.chunk !== null) { - message.chunk = object.chunk; - } else { - message.chunk = new Uint8Array(); - } - return message; - }, -}; - -const baseResponseApplySnapshotChunk: object = { - result: 0, - refetch_chunks: 0, - reject_senders: "", -}; - -export const ResponseApplySnapshotChunk = { - encode( - message: ResponseApplySnapshotChunk, - writer: Writer = Writer.create() - ): Writer { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - writer.uint32(18).fork(); - for (const v of message.refetch_chunks) { - writer.uint32(v); - } - writer.ldelim(); - for (const v of message.reject_senders) { - writer.uint32(26).string(v!); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ResponseApplySnapshotChunk { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseResponseApplySnapshotChunk, - } as ResponseApplySnapshotChunk; - message.refetch_chunks = []; - message.reject_senders = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32() as any; - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.refetch_chunks.push(reader.uint32()); - } - } else { - message.refetch_chunks.push(reader.uint32()); - } - break; - case 3: - message.reject_senders.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ResponseApplySnapshotChunk { - const message = { - ...baseResponseApplySnapshotChunk, - } as ResponseApplySnapshotChunk; - message.refetch_chunks = []; - message.reject_senders = []; - if (object.result !== undefined && object.result !== null) { - message.result = responseApplySnapshotChunk_ResultFromJSON(object.result); - } else { - message.result = 0; - } - if (object.refetch_chunks !== undefined && object.refetch_chunks !== null) { - for (const e of object.refetch_chunks) { - message.refetch_chunks.push(Number(e)); - } - } - if (object.reject_senders !== undefined && object.reject_senders !== null) { - for (const e of object.reject_senders) { - message.reject_senders.push(String(e)); - } - } - return message; - }, - - toJSON(message: ResponseApplySnapshotChunk): unknown { - const obj: any = {}; - message.result !== undefined && - (obj.result = responseApplySnapshotChunk_ResultToJSON(message.result)); - if (message.refetch_chunks) { - obj.refetch_chunks = message.refetch_chunks.map((e) => e); - } else { - obj.refetch_chunks = []; - } - if (message.reject_senders) { - obj.reject_senders = message.reject_senders.map((e) => e); - } else { - obj.reject_senders = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ResponseApplySnapshotChunk { - const message = { - ...baseResponseApplySnapshotChunk, - } as ResponseApplySnapshotChunk; - message.refetch_chunks = []; - message.reject_senders = []; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } else { - message.result = 0; - } - if (object.refetch_chunks !== undefined && object.refetch_chunks !== null) { - for (const e of object.refetch_chunks) { - message.refetch_chunks.push(e); - } - } - if (object.reject_senders !== undefined && object.reject_senders !== null) { - for (const e of object.reject_senders) { - message.reject_senders.push(e); - } - } - return message; - }, -}; - -const baseConsensusParams: object = {}; - -export const ConsensusParams = { - encode(message: ConsensusParams, writer: Writer = Writer.create()): Writer { - if (message.block !== undefined) { - BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceParams.encode( - message.evidence, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.validator !== undefined) { - ValidatorParams.encode( - message.validator, - writer.uint32(26).fork() - ).ldelim(); - } - if (message.version !== undefined) { - VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ConsensusParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensusParams } as ConsensusParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = VersionParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsensusParams { - const message = { ...baseConsensusParams } as ConsensusParams; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromJSON(object.block); - } else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromJSON(object.evidence); - } else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromJSON(object.validator); - } else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromJSON(object.version); - } else { - message.version = undefined; - } - return message; - }, - - toJSON(message: ConsensusParams): unknown { - const obj: any = {}; - message.block !== undefined && - (obj.block = message.block - ? BlockParams.toJSON(message.block) - : undefined); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? EvidenceParams.toJSON(message.evidence) - : undefined); - message.validator !== undefined && - (obj.validator = message.validator - ? ValidatorParams.toJSON(message.validator) - : undefined); - message.version !== undefined && - (obj.version = message.version - ? VersionParams.toJSON(message.version) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ConsensusParams { - const message = { ...baseConsensusParams } as ConsensusParams; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromPartial(object.block); - } else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromPartial(object.evidence); - } else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromPartial(object.validator); - } else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromPartial(object.version); - } else { - message.version = undefined; - } - return message; - }, -}; - -const baseBlockParams: object = { max_bytes: 0, max_gas: 0 }; - -export const BlockParams = { - encode(message: BlockParams, writer: Writer = Writer.create()): Writer { - if (message.max_bytes !== 0) { - writer.uint32(8).int64(message.max_bytes); - } - if (message.max_gas !== 0) { - writer.uint32(16).int64(message.max_gas); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockParams } as BlockParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_bytes = longToNumber(reader.int64() as Long); - break; - case 2: - message.max_gas = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockParams { - const message = { ...baseBlockParams } as BlockParams; - if (object.max_bytes !== undefined && object.max_bytes !== null) { - message.max_bytes = Number(object.max_bytes); - } else { - message.max_bytes = 0; - } - if (object.max_gas !== undefined && object.max_gas !== null) { - message.max_gas = Number(object.max_gas); - } else { - message.max_gas = 0; - } - return message; - }, - - toJSON(message: BlockParams): unknown { - const obj: any = {}; - message.max_bytes !== undefined && (obj.max_bytes = message.max_bytes); - message.max_gas !== undefined && (obj.max_gas = message.max_gas); - return obj; - }, - - fromPartial(object: DeepPartial): BlockParams { - const message = { ...baseBlockParams } as BlockParams; - if (object.max_bytes !== undefined && object.max_bytes !== null) { - message.max_bytes = object.max_bytes; - } else { - message.max_bytes = 0; - } - if (object.max_gas !== undefined && object.max_gas !== null) { - message.max_gas = object.max_gas; - } else { - message.max_gas = 0; - } - return message; - }, -}; - -const baseLastCommitInfo: object = { round: 0 }; - -export const LastCommitInfo = { - encode(message: LastCommitInfo, writer: Writer = Writer.create()): Writer { - if (message.round !== 0) { - writer.uint32(8).int32(message.round); - } - for (const v of message.votes) { - VoteInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): LastCommitInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLastCommitInfo } as LastCommitInfo; - message.votes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.round = reader.int32(); - break; - case 2: - message.votes.push(VoteInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LastCommitInfo { - const message = { ...baseLastCommitInfo } as LastCommitInfo; - message.votes = []; - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(VoteInfo.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: LastCommitInfo): unknown { - const obj: any = {}; - message.round !== undefined && (obj.round = message.round); - if (message.votes) { - obj.votes = message.votes.map((e) => - e ? VoteInfo.toJSON(e) : undefined - ); - } else { - obj.votes = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): LastCommitInfo { - const message = { ...baseLastCommitInfo } as LastCommitInfo; - message.votes = []; - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.votes !== undefined && object.votes !== null) { - for (const e of object.votes) { - message.votes.push(VoteInfo.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEvent: object = { type: "" }; - -export const Event = { - encode(message: Event, writer: Writer = Writer.create()): Writer { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - for (const v of message.attributes) { - EventAttribute.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Event { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvent } as Event; - message.attributes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.attributes.push( - EventAttribute.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Event { - const message = { ...baseEvent } as Event; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(EventAttribute.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Event): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? EventAttribute.toJSON(e) : undefined - ); - } else { - obj.attributes = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Event { - const message = { ...baseEvent } as Event; - message.attributes = []; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = ""; - } - if (object.attributes !== undefined && object.attributes !== null) { - for (const e of object.attributes) { - message.attributes.push(EventAttribute.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEventAttribute: object = { index: false }; - -export const EventAttribute = { - encode(message: EventAttribute, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (message.index === true) { - writer.uint32(24).bool(message.index); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EventAttribute { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEventAttribute } as EventAttribute; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.index = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EventAttribute { - const message = { ...baseEventAttribute } as EventAttribute; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.index !== undefined && object.index !== null) { - message.index = Boolean(object.index); - } else { - message.index = false; - } - return message; - }, - - toJSON(message: EventAttribute): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - message.index !== undefined && (obj.index = message.index); - return obj; - }, - - fromPartial(object: DeepPartial): EventAttribute { - const message = { ...baseEventAttribute } as EventAttribute; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = false; - } - return message; - }, -}; - -const baseTxResult: object = { height: 0, index: 0 }; - -export const TxResult = { - encode(message: TxResult, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.index !== 0) { - writer.uint32(16).uint32(message.index); - } - if (message.tx.length !== 0) { - writer.uint32(26).bytes(message.tx); - } - if (message.result !== undefined) { - ResponseDeliverTx.encode( - message.result, - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxResult { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxResult } as TxResult; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.index = reader.uint32(); - break; - case 3: - message.tx = reader.bytes(); - break; - case 4: - message.result = ResponseDeliverTx.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxResult { - const message = { ...baseTxResult } as TxResult; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = bytesFromBase64(object.tx); - } - if (object.result !== undefined && object.result !== null) { - message.result = ResponseDeliverTx.fromJSON(object.result); - } else { - message.result = undefined; - } - return message; - }, - - toJSON(message: TxResult): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.index !== undefined && (obj.index = message.index); - message.tx !== undefined && - (obj.tx = base64FromBytes( - message.tx !== undefined ? message.tx : new Uint8Array() - )); - message.result !== undefined && - (obj.result = message.result - ? ResponseDeliverTx.toJSON(message.result) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): TxResult { - const message = { ...baseTxResult } as TxResult; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.tx !== undefined && object.tx !== null) { - message.tx = object.tx; - } else { - message.tx = new Uint8Array(); - } - if (object.result !== undefined && object.result !== null) { - message.result = ResponseDeliverTx.fromPartial(object.result); - } else { - message.result = undefined; - } - return message; - }, -}; - -const baseValidator: object = { power: 0 }; - -export const Validator = { - encode(message: Validator, writer: Writer = Writer.create()): Writer { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.power !== 0) { - writer.uint32(24).int64(message.power); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Validator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator } as Validator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 3: - message.power = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = bytesFromBase64(object.address); - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } else { - message.power = 0; - } - return message; - }, - - toJSON(message: Validator): unknown { - const obj: any = {}; - message.address !== undefined && - (obj.address = base64FromBytes( - message.address !== undefined ? message.address : new Uint8Array() - )); - message.power !== undefined && (obj.power = message.power); - return obj; - }, - - fromPartial(object: DeepPartial): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = new Uint8Array(); - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } else { - message.power = 0; - } - return message; - }, -}; - -const baseValidatorUpdate: object = { power: 0 }; - -export const ValidatorUpdate = { - encode(message: ValidatorUpdate, writer: Writer = Writer.create()): Writer { - if (message.pub_key !== undefined) { - PublicKey.encode(message.pub_key, writer.uint32(10).fork()).ldelim(); - } - if (message.power !== 0) { - writer.uint32(16).int64(message.power); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorUpdate { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorUpdate } as ValidatorUpdate; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pub_key = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.power = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorUpdate { - const message = { ...baseValidatorUpdate } as ValidatorUpdate; - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = PublicKey.fromJSON(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = Number(object.power); - } else { - message.power = 0; - } - return message; - }, - - toJSON(message: ValidatorUpdate): unknown { - const obj: any = {}; - message.pub_key !== undefined && - (obj.pub_key = message.pub_key - ? PublicKey.toJSON(message.pub_key) - : undefined); - message.power !== undefined && (obj.power = message.power); - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorUpdate { - const message = { ...baseValidatorUpdate } as ValidatorUpdate; - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = PublicKey.fromPartial(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.power !== undefined && object.power !== null) { - message.power = object.power; - } else { - message.power = 0; - } - return message; - }, -}; - -const baseVoteInfo: object = { signed_last_block: false }; - -export const VoteInfo = { - encode(message: VoteInfo, writer: Writer = Writer.create()): Writer { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - if (message.signed_last_block === true) { - writer.uint32(16).bool(message.signed_last_block); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): VoteInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVoteInfo } as VoteInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 2: - message.signed_last_block = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): VoteInfo { - const message = { ...baseVoteInfo } as VoteInfo; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } else { - message.validator = undefined; - } - if ( - object.signed_last_block !== undefined && - object.signed_last_block !== null - ) { - message.signed_last_block = Boolean(object.signed_last_block); - } else { - message.signed_last_block = false; - } - return message; - }, - - toJSON(message: VoteInfo): unknown { - const obj: any = {}; - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - message.signed_last_block !== undefined && - (obj.signed_last_block = message.signed_last_block); - return obj; - }, - - fromPartial(object: DeepPartial): VoteInfo { - const message = { ...baseVoteInfo } as VoteInfo; - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } else { - message.validator = undefined; - } - if ( - object.signed_last_block !== undefined && - object.signed_last_block !== null - ) { - message.signed_last_block = object.signed_last_block; - } else { - message.signed_last_block = false; - } - return message; - }, -}; - -const baseEvidence: object = { type: 0, height: 0, total_voting_power: 0 }; - -export const Evidence = { - encode(message: Evidence, writer: Writer = Writer.create()): Writer { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(34).fork() - ).ldelim(); - } - if (message.total_voting_power !== 0) { - writer.uint32(40).int64(message.total_voting_power); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Evidence { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvidence } as Evidence; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32() as any; - break; - case 2: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 5: - message.total_voting_power = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Evidence { - const message = { ...baseEvidence } as Evidence; - if (object.type !== undefined && object.type !== null) { - message.type = evidenceTypeFromJSON(object.type); - } else { - message.type = 0; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromJSON(object.validator); - } else { - message.validator = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = Number(object.total_voting_power); - } else { - message.total_voting_power = 0; - } - return message; - }, - - toJSON(message: Evidence): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = evidenceTypeToJSON(message.type)); - message.validator !== undefined && - (obj.validator = message.validator - ? Validator.toJSON(message.validator) - : undefined); - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.total_voting_power !== undefined && - (obj.total_voting_power = message.total_voting_power); - return obj; - }, - - fromPartial(object: DeepPartial): Evidence { - const message = { ...baseEvidence } as Evidence; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = Validator.fromPartial(object.validator); - } else { - message.validator = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = object.total_voting_power; - } else { - message.total_voting_power = 0; - } - return message; - }, -}; - -const baseSnapshot: object = { height: 0, format: 0, chunks: 0 }; - -export const Snapshot = { - encode(message: Snapshot, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).uint64(message.height); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - if (message.chunks !== 0) { - writer.uint32(24).uint32(message.chunks); - } - if (message.hash.length !== 0) { - writer.uint32(34).bytes(message.hash); - } - if (message.metadata.length !== 0) { - writer.uint32(42).bytes(message.metadata); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Snapshot { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSnapshot } as Snapshot; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.uint64() as Long); - break; - case 2: - message.format = reader.uint32(); - break; - case 3: - message.chunks = reader.uint32(); - break; - case 4: - message.hash = reader.bytes(); - break; - case 5: - message.metadata = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Snapshot { - const message = { ...baseSnapshot } as Snapshot; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = Number(object.format); - } else { - message.format = 0; - } - if (object.chunks !== undefined && object.chunks !== null) { - message.chunks = Number(object.chunks); - } else { - message.chunks = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = bytesFromBase64(object.metadata); - } - return message; - }, - - toJSON(message: Snapshot): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.format !== undefined && (obj.format = message.format); - message.chunks !== undefined && (obj.chunks = message.chunks); - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - message.metadata !== undefined && - (obj.metadata = base64FromBytes( - message.metadata !== undefined ? message.metadata : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Snapshot { - const message = { ...baseSnapshot } as Snapshot; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.format !== undefined && object.format !== null) { - message.format = object.format; - } else { - message.format = 0; - } - if (object.chunks !== undefined && object.chunks !== null) { - message.chunks = object.chunks; - } else { - message.chunks = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = object.metadata; - } else { - message.metadata = new Uint8Array(); - } - return message; - }, -}; - -export interface ABCIApplication { - Echo(request: RequestEcho): Promise; - Flush(request: RequestFlush): Promise; - Info(request: RequestInfo): Promise; - SetOption(request: RequestSetOption): Promise; - DeliverTx(request: RequestDeliverTx): Promise; - CheckTx(request: RequestCheckTx): Promise; - Query(request: RequestQuery): Promise; - Commit(request: RequestCommit): Promise; - InitChain(request: RequestInitChain): Promise; - BeginBlock(request: RequestBeginBlock): Promise; - EndBlock(request: RequestEndBlock): Promise; - ListSnapshots(request: RequestListSnapshots): Promise; - OfferSnapshot(request: RequestOfferSnapshot): Promise; - LoadSnapshotChunk( - request: RequestLoadSnapshotChunk - ): Promise; - ApplySnapshotChunk( - request: RequestApplySnapshotChunk - ): Promise; -} - -export class ABCIApplicationClientImpl implements ABCIApplication { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Echo(request: RequestEcho): Promise { - const data = RequestEcho.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "Echo", - data - ); - return promise.then((data) => ResponseEcho.decode(new Reader(data))); - } - - Flush(request: RequestFlush): Promise { - const data = RequestFlush.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "Flush", - data - ); - return promise.then((data) => ResponseFlush.decode(new Reader(data))); - } - - Info(request: RequestInfo): Promise { - const data = RequestInfo.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "Info", - data - ); - return promise.then((data) => ResponseInfo.decode(new Reader(data))); - } - - SetOption(request: RequestSetOption): Promise { - const data = RequestSetOption.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "SetOption", - data - ); - return promise.then((data) => ResponseSetOption.decode(new Reader(data))); - } - - DeliverTx(request: RequestDeliverTx): Promise { - const data = RequestDeliverTx.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "DeliverTx", - data - ); - return promise.then((data) => ResponseDeliverTx.decode(new Reader(data))); - } - - CheckTx(request: RequestCheckTx): Promise { - const data = RequestCheckTx.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "CheckTx", - data - ); - return promise.then((data) => ResponseCheckTx.decode(new Reader(data))); - } - - Query(request: RequestQuery): Promise { - const data = RequestQuery.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "Query", - data - ); - return promise.then((data) => ResponseQuery.decode(new Reader(data))); - } - - Commit(request: RequestCommit): Promise { - const data = RequestCommit.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "Commit", - data - ); - return promise.then((data) => ResponseCommit.decode(new Reader(data))); - } - - InitChain(request: RequestInitChain): Promise { - const data = RequestInitChain.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "InitChain", - data - ); - return promise.then((data) => ResponseInitChain.decode(new Reader(data))); - } - - BeginBlock(request: RequestBeginBlock): Promise { - const data = RequestBeginBlock.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "BeginBlock", - data - ); - return promise.then((data) => ResponseBeginBlock.decode(new Reader(data))); - } - - EndBlock(request: RequestEndBlock): Promise { - const data = RequestEndBlock.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "EndBlock", - data - ); - return promise.then((data) => ResponseEndBlock.decode(new Reader(data))); - } - - ListSnapshots(request: RequestListSnapshots): Promise { - const data = RequestListSnapshots.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "ListSnapshots", - data - ); - return promise.then((data) => - ResponseListSnapshots.decode(new Reader(data)) - ); - } - - OfferSnapshot(request: RequestOfferSnapshot): Promise { - const data = RequestOfferSnapshot.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "OfferSnapshot", - data - ); - return promise.then((data) => - ResponseOfferSnapshot.decode(new Reader(data)) - ); - } - - LoadSnapshotChunk( - request: RequestLoadSnapshotChunk - ): Promise { - const data = RequestLoadSnapshotChunk.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "LoadSnapshotChunk", - data - ); - return promise.then((data) => - ResponseLoadSnapshotChunk.decode(new Reader(data)) - ); - } - - ApplySnapshotChunk( - request: RequestApplySnapshotChunk - ): Promise { - const data = RequestApplySnapshotChunk.encode(request).finish(); - const promise = this.rpc.request( - "tendermint.abci.ABCIApplication", - "ApplySnapshotChunk", - data - ); - return promise.then((data) => - ResponseApplySnapshotChunk.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/crypto/keys.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/crypto/keys.ts deleted file mode 100644 index 450db2a15d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/crypto/keys.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.crypto"; - -/** PublicKey defines the keys available for use with Tendermint Validators */ -export interface PublicKey { - ed25519: Uint8Array | undefined; - secp256k1: Uint8Array | undefined; -} - -const basePublicKey: object = {}; - -export const PublicKey = { - encode(message: PublicKey, writer: Writer = Writer.create()): Writer { - if (message.ed25519 !== undefined) { - writer.uint32(10).bytes(message.ed25519); - } - if (message.secp256k1 !== undefined) { - writer.uint32(18).bytes(message.secp256k1); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PublicKey { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePublicKey } as PublicKey; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ed25519 = reader.bytes(); - break; - case 2: - message.secp256k1 = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PublicKey { - const message = { ...basePublicKey } as PublicKey; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = bytesFromBase64(object.ed25519); - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = bytesFromBase64(object.secp256k1); - } - return message; - }, - - toJSON(message: PublicKey): unknown { - const obj: any = {}; - message.ed25519 !== undefined && - (obj.ed25519 = - message.ed25519 !== undefined - ? base64FromBytes(message.ed25519) - : undefined); - message.secp256k1 !== undefined && - (obj.secp256k1 = - message.secp256k1 !== undefined - ? base64FromBytes(message.secp256k1) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): PublicKey { - const message = { ...basePublicKey } as PublicKey; - if (object.ed25519 !== undefined && object.ed25519 !== null) { - message.ed25519 = object.ed25519; - } else { - message.ed25519 = undefined; - } - if (object.secp256k1 !== undefined && object.secp256k1 !== null) { - message.secp256k1 = object.secp256k1; - } else { - message.secp256k1 = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/crypto/proof.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/crypto/proof.ts deleted file mode 100644 index db05869473..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/crypto/proof.ts +++ /dev/null @@ -1,529 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.crypto"; - -export interface Proof { - total: number; - index: number; - leaf_hash: Uint8Array; - aunts: Uint8Array[]; -} - -export interface ValueOp { - /** Encoded in ProofOp.Key. */ - key: Uint8Array; - /** To encode in ProofOp.Data */ - proof: Proof | undefined; -} - -export interface DominoOp { - key: string; - input: string; - output: string; -} - -/** - * ProofOp defines an operation used for calculating Merkle root - * The data could be arbitrary format, providing nessecary data - * for example neighbouring node hash - */ -export interface ProofOp { - type: string; - key: Uint8Array; - data: Uint8Array; -} - -/** ProofOps is Merkle proof defined by the list of ProofOps */ -export interface ProofOps { - ops: ProofOp[]; -} - -const baseProof: object = { total: 0, index: 0 }; - -export const Proof = { - encode(message: Proof, writer: Writer = Writer.create()): Writer { - if (message.total !== 0) { - writer.uint32(8).int64(message.total); - } - if (message.index !== 0) { - writer.uint32(16).int64(message.index); - } - if (message.leaf_hash.length !== 0) { - writer.uint32(26).bytes(message.leaf_hash); - } - for (const v of message.aunts) { - writer.uint32(34).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Proof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProof } as Proof; - message.aunts = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = longToNumber(reader.int64() as Long); - break; - case 2: - message.index = longToNumber(reader.int64() as Long); - break; - case 3: - message.leaf_hash = reader.bytes(); - break; - case 4: - message.aunts.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Proof { - const message = { ...baseProof } as Proof; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.leaf_hash !== undefined && object.leaf_hash !== null) { - message.leaf_hash = bytesFromBase64(object.leaf_hash); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: Proof): unknown { - const obj: any = {}; - message.total !== undefined && (obj.total = message.total); - message.index !== undefined && (obj.index = message.index); - message.leaf_hash !== undefined && - (obj.leaf_hash = base64FromBytes( - message.leaf_hash !== undefined ? message.leaf_hash : new Uint8Array() - )); - if (message.aunts) { - obj.aunts = message.aunts.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.aunts = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Proof { - const message = { ...baseProof } as Proof; - message.aunts = []; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.leaf_hash !== undefined && object.leaf_hash !== null) { - message.leaf_hash = object.leaf_hash; - } else { - message.leaf_hash = new Uint8Array(); - } - if (object.aunts !== undefined && object.aunts !== null) { - for (const e of object.aunts) { - message.aunts.push(e); - } - } - return message; - }, -}; - -const baseValueOp: object = {}; - -export const ValueOp = { - encode(message: ValueOp, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValueOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValueOp } as ValueOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValueOp { - const message = { ...baseValueOp } as ValueOp; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: ValueOp): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ValueOp { - const message = { ...baseValueOp } as ValueOp; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -const baseDominoOp: object = { key: "", input: "", output: "" }; - -export const DominoOp = { - encode(message: DominoOp, writer: Writer = Writer.create()): Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.input !== "") { - writer.uint32(18).string(message.input); - } - if (message.output !== "") { - writer.uint32(26).string(message.output); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DominoOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDominoOp } as DominoOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.input = reader.string(); - break; - case 3: - message.output = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DominoOp { - const message = { ...baseDominoOp } as DominoOp; - if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); - } else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = String(object.input); - } else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = String(object.output); - } else { - message.output = ""; - } - return message; - }, - - toJSON(message: DominoOp): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.input !== undefined && (obj.input = message.input); - message.output !== undefined && (obj.output = message.output); - return obj; - }, - - fromPartial(object: DeepPartial): DominoOp { - const message = { ...baseDominoOp } as DominoOp; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = ""; - } - if (object.input !== undefined && object.input !== null) { - message.input = object.input; - } else { - message.input = ""; - } - if (object.output !== undefined && object.output !== null) { - message.output = object.output; - } else { - message.output = ""; - } - return message; - }, -}; - -const baseProofOp: object = { type: "" }; - -export const ProofOp = { - encode(message: ProofOp, writer: Writer = Writer.create()): Writer { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - if (message.key.length !== 0) { - writer.uint32(18).bytes(message.key); - } - if (message.data.length !== 0) { - writer.uint32(26).bytes(message.data); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ProofOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOp } as ProofOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.key = reader.bytes(); - break; - case 3: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ProofOp { - const message = { ...baseProofOp } as ProofOp; - if (object.type !== undefined && object.type !== null) { - message.type = String(object.type); - } else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: ProofOp): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): ProofOp { - const message = { ...baseProofOp } as ProofOp; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = ""; - } - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseProofOps: object = {}; - -export const ProofOps = { - encode(message: ProofOps, writer: Writer = Writer.create()): Writer { - for (const v of message.ops) { - ProofOp.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ProofOps { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ops.push(ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ProofOps { - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ProofOps): unknown { - const obj: any = {}; - if (message.ops) { - obj.ops = message.ops.map((e) => (e ? ProofOp.toJSON(e) : undefined)); - } else { - obj.ops = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ProofOps { - const message = { ...baseProofOps } as ProofOps; - message.ops = []; - if (object.ops !== undefined && object.ops !== null) { - for (const e of object.ops) { - message.ops.push(ProofOp.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/block.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/block.ts deleted file mode 100644 index 8c97308fd5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/block.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* eslint-disable */ -import { Header, Data, Commit } from "../../tendermint/types/types"; -import { EvidenceList } from "../../tendermint/types/evidence"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.types"; - -export interface Block { - header: Header | undefined; - data: Data | undefined; - evidence: EvidenceList | undefined; - last_commit: Commit | undefined; -} - -const baseBlock: object = {}; - -export const Block = { - encode(message: Block, writer: Writer = Writer.create()): Writer { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.data !== undefined) { - Data.encode(message.data, writer.uint32(18).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceList.encode(message.evidence, writer.uint32(26).fork()).ldelim(); - } - if (message.last_commit !== undefined) { - Commit.encode(message.last_commit, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Block { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlock } as Block; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.data = Data.decode(reader, reader.uint32()); - break; - case 3: - message.evidence = EvidenceList.decode(reader, reader.uint32()); - break; - case 4: - message.last_commit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Block { - const message = { ...baseBlock } as Block; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.data !== undefined && object.data !== null) { - message.data = Data.fromJSON(object.data); - } else { - message.data = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceList.fromJSON(object.evidence); - } else { - message.evidence = undefined; - } - if (object.last_commit !== undefined && object.last_commit !== null) { - message.last_commit = Commit.fromJSON(object.last_commit); - } else { - message.last_commit = undefined; - } - return message; - }, - - toJSON(message: Block): unknown { - const obj: any = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.data !== undefined && - (obj.data = message.data ? Data.toJSON(message.data) : undefined); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? EvidenceList.toJSON(message.evidence) - : undefined); - message.last_commit !== undefined && - (obj.last_commit = message.last_commit - ? Commit.toJSON(message.last_commit) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Block { - const message = { ...baseBlock } as Block; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.data !== undefined && object.data !== null) { - message.data = Data.fromPartial(object.data); - } else { - message.data = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceList.fromPartial(object.evidence); - } else { - message.evidence = undefined; - } - if (object.last_commit !== undefined && object.last_commit !== null) { - message.last_commit = Commit.fromPartial(object.last_commit); - } else { - message.last_commit = undefined; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/evidence.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/evidence.ts deleted file mode 100644 index 17994953ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/evidence.ts +++ /dev/null @@ -1,611 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Vote, LightBlock } from "../../tendermint/types/types"; -import { Validator } from "../../tendermint/types/validator"; - -export const protobufPackage = "tendermint.types"; - -export interface Evidence { - duplicate_vote_evidence: DuplicateVoteEvidence | undefined; - light_client_attack_evidence: LightClientAttackEvidence | undefined; -} - -/** DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. */ -export interface DuplicateVoteEvidence { - vote_a: Vote | undefined; - vote_b: Vote | undefined; - total_voting_power: number; - validator_power: number; - timestamp: Date | undefined; -} - -/** LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. */ -export interface LightClientAttackEvidence { - conflicting_block: LightBlock | undefined; - common_height: number; - byzantine_validators: Validator[]; - total_voting_power: number; - timestamp: Date | undefined; -} - -export interface EvidenceList { - evidence: Evidence[]; -} - -const baseEvidence: object = {}; - -export const Evidence = { - encode(message: Evidence, writer: Writer = Writer.create()): Writer { - if (message.duplicate_vote_evidence !== undefined) { - DuplicateVoteEvidence.encode( - message.duplicate_vote_evidence, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.light_client_attack_evidence !== undefined) { - LightClientAttackEvidence.encode( - message.light_client_attack_evidence, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Evidence { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvidence } as Evidence; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.duplicate_vote_evidence = DuplicateVoteEvidence.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.light_client_attack_evidence = LightClientAttackEvidence.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Evidence { - const message = { ...baseEvidence } as Evidence; - if ( - object.duplicate_vote_evidence !== undefined && - object.duplicate_vote_evidence !== null - ) { - message.duplicate_vote_evidence = DuplicateVoteEvidence.fromJSON( - object.duplicate_vote_evidence - ); - } else { - message.duplicate_vote_evidence = undefined; - } - if ( - object.light_client_attack_evidence !== undefined && - object.light_client_attack_evidence !== null - ) { - message.light_client_attack_evidence = LightClientAttackEvidence.fromJSON( - object.light_client_attack_evidence - ); - } else { - message.light_client_attack_evidence = undefined; - } - return message; - }, - - toJSON(message: Evidence): unknown { - const obj: any = {}; - message.duplicate_vote_evidence !== undefined && - (obj.duplicate_vote_evidence = message.duplicate_vote_evidence - ? DuplicateVoteEvidence.toJSON(message.duplicate_vote_evidence) - : undefined); - message.light_client_attack_evidence !== undefined && - (obj.light_client_attack_evidence = message.light_client_attack_evidence - ? LightClientAttackEvidence.toJSON(message.light_client_attack_evidence) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Evidence { - const message = { ...baseEvidence } as Evidence; - if ( - object.duplicate_vote_evidence !== undefined && - object.duplicate_vote_evidence !== null - ) { - message.duplicate_vote_evidence = DuplicateVoteEvidence.fromPartial( - object.duplicate_vote_evidence - ); - } else { - message.duplicate_vote_evidence = undefined; - } - if ( - object.light_client_attack_evidence !== undefined && - object.light_client_attack_evidence !== null - ) { - message.light_client_attack_evidence = LightClientAttackEvidence.fromPartial( - object.light_client_attack_evidence - ); - } else { - message.light_client_attack_evidence = undefined; - } - return message; - }, -}; - -const baseDuplicateVoteEvidence: object = { - total_voting_power: 0, - validator_power: 0, -}; - -export const DuplicateVoteEvidence = { - encode( - message: DuplicateVoteEvidence, - writer: Writer = Writer.create() - ): Writer { - if (message.vote_a !== undefined) { - Vote.encode(message.vote_a, writer.uint32(10).fork()).ldelim(); - } - if (message.vote_b !== undefined) { - Vote.encode(message.vote_b, writer.uint32(18).fork()).ldelim(); - } - if (message.total_voting_power !== 0) { - writer.uint32(24).int64(message.total_voting_power); - } - if (message.validator_power !== 0) { - writer.uint32(32).int64(message.validator_power); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(42).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DuplicateVoteEvidence { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuplicateVoteEvidence } as DuplicateVoteEvidence; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.vote_a = Vote.decode(reader, reader.uint32()); - break; - case 2: - message.vote_b = Vote.decode(reader, reader.uint32()); - break; - case 3: - message.total_voting_power = longToNumber(reader.int64() as Long); - break; - case 4: - message.validator_power = longToNumber(reader.int64() as Long); - break; - case 5: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DuplicateVoteEvidence { - const message = { ...baseDuplicateVoteEvidence } as DuplicateVoteEvidence; - if (object.vote_a !== undefined && object.vote_a !== null) { - message.vote_a = Vote.fromJSON(object.vote_a); - } else { - message.vote_a = undefined; - } - if (object.vote_b !== undefined && object.vote_b !== null) { - message.vote_b = Vote.fromJSON(object.vote_b); - } else { - message.vote_b = undefined; - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = Number(object.total_voting_power); - } else { - message.total_voting_power = 0; - } - if ( - object.validator_power !== undefined && - object.validator_power !== null - ) { - message.validator_power = Number(object.validator_power); - } else { - message.validator_power = 0; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - return message; - }, - - toJSON(message: DuplicateVoteEvidence): unknown { - const obj: any = {}; - message.vote_a !== undefined && - (obj.vote_a = message.vote_a ? Vote.toJSON(message.vote_a) : undefined); - message.vote_b !== undefined && - (obj.vote_b = message.vote_b ? Vote.toJSON(message.vote_b) : undefined); - message.total_voting_power !== undefined && - (obj.total_voting_power = message.total_voting_power); - message.validator_power !== undefined && - (obj.validator_power = message.validator_power); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DuplicateVoteEvidence { - const message = { ...baseDuplicateVoteEvidence } as DuplicateVoteEvidence; - if (object.vote_a !== undefined && object.vote_a !== null) { - message.vote_a = Vote.fromPartial(object.vote_a); - } else { - message.vote_a = undefined; - } - if (object.vote_b !== undefined && object.vote_b !== null) { - message.vote_b = Vote.fromPartial(object.vote_b); - } else { - message.vote_b = undefined; - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = object.total_voting_power; - } else { - message.total_voting_power = 0; - } - if ( - object.validator_power !== undefined && - object.validator_power !== null - ) { - message.validator_power = object.validator_power; - } else { - message.validator_power = 0; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - return message; - }, -}; - -const baseLightClientAttackEvidence: object = { - common_height: 0, - total_voting_power: 0, -}; - -export const LightClientAttackEvidence = { - encode( - message: LightClientAttackEvidence, - writer: Writer = Writer.create() - ): Writer { - if (message.conflicting_block !== undefined) { - LightBlock.encode( - message.conflicting_block, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.common_height !== 0) { - writer.uint32(16).int64(message.common_height); - } - for (const v of message.byzantine_validators) { - Validator.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.total_voting_power !== 0) { - writer.uint32(32).int64(message.total_voting_power); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(42).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): LightClientAttackEvidence { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseLightClientAttackEvidence, - } as LightClientAttackEvidence; - message.byzantine_validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.conflicting_block = LightBlock.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.common_height = longToNumber(reader.int64() as Long); - break; - case 3: - message.byzantine_validators.push( - Validator.decode(reader, reader.uint32()) - ); - break; - case 4: - message.total_voting_power = longToNumber(reader.int64() as Long); - break; - case 5: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LightClientAttackEvidence { - const message = { - ...baseLightClientAttackEvidence, - } as LightClientAttackEvidence; - message.byzantine_validators = []; - if ( - object.conflicting_block !== undefined && - object.conflicting_block !== null - ) { - message.conflicting_block = LightBlock.fromJSON(object.conflicting_block); - } else { - message.conflicting_block = undefined; - } - if (object.common_height !== undefined && object.common_height !== null) { - message.common_height = Number(object.common_height); - } else { - message.common_height = 0; - } - if ( - object.byzantine_validators !== undefined && - object.byzantine_validators !== null - ) { - for (const e of object.byzantine_validators) { - message.byzantine_validators.push(Validator.fromJSON(e)); - } - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = Number(object.total_voting_power); - } else { - message.total_voting_power = 0; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - return message; - }, - - toJSON(message: LightClientAttackEvidence): unknown { - const obj: any = {}; - message.conflicting_block !== undefined && - (obj.conflicting_block = message.conflicting_block - ? LightBlock.toJSON(message.conflicting_block) - : undefined); - message.common_height !== undefined && - (obj.common_height = message.common_height); - if (message.byzantine_validators) { - obj.byzantine_validators = message.byzantine_validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.byzantine_validators = []; - } - message.total_voting_power !== undefined && - (obj.total_voting_power = message.total_voting_power); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - return obj; - }, - - fromPartial( - object: DeepPartial - ): LightClientAttackEvidence { - const message = { - ...baseLightClientAttackEvidence, - } as LightClientAttackEvidence; - message.byzantine_validators = []; - if ( - object.conflicting_block !== undefined && - object.conflicting_block !== null - ) { - message.conflicting_block = LightBlock.fromPartial( - object.conflicting_block - ); - } else { - message.conflicting_block = undefined; - } - if (object.common_height !== undefined && object.common_height !== null) { - message.common_height = object.common_height; - } else { - message.common_height = 0; - } - if ( - object.byzantine_validators !== undefined && - object.byzantine_validators !== null - ) { - for (const e of object.byzantine_validators) { - message.byzantine_validators.push(Validator.fromPartial(e)); - } - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = object.total_voting_power; - } else { - message.total_voting_power = 0; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - return message; - }, -}; - -const baseEvidenceList: object = {}; - -export const EvidenceList = { - encode(message: EvidenceList, writer: Writer = Writer.create()): Writer { - for (const v of message.evidence) { - Evidence.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EvidenceList { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvidenceList } as EvidenceList; - message.evidence = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence.push(Evidence.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EvidenceList { - const message = { ...baseEvidenceList } as EvidenceList; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Evidence.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EvidenceList): unknown { - const obj: any = {}; - if (message.evidence) { - obj.evidence = message.evidence.map((e) => - e ? Evidence.toJSON(e) : undefined - ); - } else { - obj.evidence = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EvidenceList { - const message = { ...baseEvidenceList } as EvidenceList; - message.evidence = []; - if (object.evidence !== undefined && object.evidence !== null) { - for (const e of object.evidence) { - message.evidence.push(Evidence.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/params.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/params.ts deleted file mode 100644 index d9b11da654..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/params.ts +++ /dev/null @@ -1,639 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Duration } from "../../google/protobuf/duration"; - -export const protobufPackage = "tendermint.types"; - -/** - * ConsensusParams contains consensus critical parameters that determine the - * validity of blocks. - */ -export interface ConsensusParams { - block: BlockParams | undefined; - evidence: EvidenceParams | undefined; - validator: ValidatorParams | undefined; - version: VersionParams | undefined; -} - -/** BlockParams contains limits on the block size. */ -export interface BlockParams { - /** - * Max block size, in bytes. - * Note: must be greater than 0 - */ - max_bytes: number; - /** - * Max gas per block. - * Note: must be greater or equal to -1 - */ - max_gas: number; - /** - * Minimum time increment between consecutive blocks (in milliseconds) If the - * block header timestamp is ahead of the system clock, decrease this value. - * - * Not exposed to the application. - */ - time_iota_ms: number; -} - -/** EvidenceParams determine how we handle evidence of malfeasance. */ -export interface EvidenceParams { - /** - * Max age of evidence, in blocks. - * - * The basic formula for calculating this is: MaxAgeDuration / {average block - * time}. - */ - max_age_num_blocks: number; - /** - * Max age of evidence, in time. - * - * It should correspond with an app's "unbonding period" or other similar - * mechanism for handling [Nothing-At-Stake - * attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - */ - max_age_duration: Duration | undefined; - /** - * This sets the maximum size of total evidence in bytes that can be committed in a single block. - * and should fall comfortably under the max block bytes. - * Default is 1048576 or 1MB - */ - max_bytes: number; -} - -/** - * ValidatorParams restrict the public key types validators can use. - * NOTE: uses ABCI pubkey naming, not Amino names. - */ -export interface ValidatorParams { - pub_key_types: string[]; -} - -/** VersionParams contains the ABCI application version. */ -export interface VersionParams { - app_version: number; -} - -/** - * HashedParams is a subset of ConsensusParams. - * - * It is hashed into the Header.ConsensusHash. - */ -export interface HashedParams { - block_max_bytes: number; - block_max_gas: number; -} - -const baseConsensusParams: object = {}; - -export const ConsensusParams = { - encode(message: ConsensusParams, writer: Writer = Writer.create()): Writer { - if (message.block !== undefined) { - BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceParams.encode( - message.evidence, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.validator !== undefined) { - ValidatorParams.encode( - message.validator, - writer.uint32(26).fork() - ).ldelim(); - } - if (message.version !== undefined) { - VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ConsensusParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensusParams } as ConsensusParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = VersionParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsensusParams { - const message = { ...baseConsensusParams } as ConsensusParams; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromJSON(object.block); - } else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromJSON(object.evidence); - } else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromJSON(object.validator); - } else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromJSON(object.version); - } else { - message.version = undefined; - } - return message; - }, - - toJSON(message: ConsensusParams): unknown { - const obj: any = {}; - message.block !== undefined && - (obj.block = message.block - ? BlockParams.toJSON(message.block) - : undefined); - message.evidence !== undefined && - (obj.evidence = message.evidence - ? EvidenceParams.toJSON(message.evidence) - : undefined); - message.validator !== undefined && - (obj.validator = message.validator - ? ValidatorParams.toJSON(message.validator) - : undefined); - message.version !== undefined && - (obj.version = message.version - ? VersionParams.toJSON(message.version) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ConsensusParams { - const message = { ...baseConsensusParams } as ConsensusParams; - if (object.block !== undefined && object.block !== null) { - message.block = BlockParams.fromPartial(object.block); - } else { - message.block = undefined; - } - if (object.evidence !== undefined && object.evidence !== null) { - message.evidence = EvidenceParams.fromPartial(object.evidence); - } else { - message.evidence = undefined; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = ValidatorParams.fromPartial(object.validator); - } else { - message.validator = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = VersionParams.fromPartial(object.version); - } else { - message.version = undefined; - } - return message; - }, -}; - -const baseBlockParams: object = { max_bytes: 0, max_gas: 0, time_iota_ms: 0 }; - -export const BlockParams = { - encode(message: BlockParams, writer: Writer = Writer.create()): Writer { - if (message.max_bytes !== 0) { - writer.uint32(8).int64(message.max_bytes); - } - if (message.max_gas !== 0) { - writer.uint32(16).int64(message.max_gas); - } - if (message.time_iota_ms !== 0) { - writer.uint32(24).int64(message.time_iota_ms); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockParams } as BlockParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_bytes = longToNumber(reader.int64() as Long); - break; - case 2: - message.max_gas = longToNumber(reader.int64() as Long); - break; - case 3: - message.time_iota_ms = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockParams { - const message = { ...baseBlockParams } as BlockParams; - if (object.max_bytes !== undefined && object.max_bytes !== null) { - message.max_bytes = Number(object.max_bytes); - } else { - message.max_bytes = 0; - } - if (object.max_gas !== undefined && object.max_gas !== null) { - message.max_gas = Number(object.max_gas); - } else { - message.max_gas = 0; - } - if (object.time_iota_ms !== undefined && object.time_iota_ms !== null) { - message.time_iota_ms = Number(object.time_iota_ms); - } else { - message.time_iota_ms = 0; - } - return message; - }, - - toJSON(message: BlockParams): unknown { - const obj: any = {}; - message.max_bytes !== undefined && (obj.max_bytes = message.max_bytes); - message.max_gas !== undefined && (obj.max_gas = message.max_gas); - message.time_iota_ms !== undefined && - (obj.time_iota_ms = message.time_iota_ms); - return obj; - }, - - fromPartial(object: DeepPartial): BlockParams { - const message = { ...baseBlockParams } as BlockParams; - if (object.max_bytes !== undefined && object.max_bytes !== null) { - message.max_bytes = object.max_bytes; - } else { - message.max_bytes = 0; - } - if (object.max_gas !== undefined && object.max_gas !== null) { - message.max_gas = object.max_gas; - } else { - message.max_gas = 0; - } - if (object.time_iota_ms !== undefined && object.time_iota_ms !== null) { - message.time_iota_ms = object.time_iota_ms; - } else { - message.time_iota_ms = 0; - } - return message; - }, -}; - -const baseEvidenceParams: object = { max_age_num_blocks: 0, max_bytes: 0 }; - -export const EvidenceParams = { - encode(message: EvidenceParams, writer: Writer = Writer.create()): Writer { - if (message.max_age_num_blocks !== 0) { - writer.uint32(8).int64(message.max_age_num_blocks); - } - if (message.max_age_duration !== undefined) { - Duration.encode( - message.max_age_duration, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.max_bytes !== 0) { - writer.uint32(24).int64(message.max_bytes); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EvidenceParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEvidenceParams } as EvidenceParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_age_num_blocks = longToNumber(reader.int64() as Long); - break; - case 2: - message.max_age_duration = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.max_bytes = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EvidenceParams { - const message = { ...baseEvidenceParams } as EvidenceParams; - if ( - object.max_age_num_blocks !== undefined && - object.max_age_num_blocks !== null - ) { - message.max_age_num_blocks = Number(object.max_age_num_blocks); - } else { - message.max_age_num_blocks = 0; - } - if ( - object.max_age_duration !== undefined && - object.max_age_duration !== null - ) { - message.max_age_duration = Duration.fromJSON(object.max_age_duration); - } else { - message.max_age_duration = undefined; - } - if (object.max_bytes !== undefined && object.max_bytes !== null) { - message.max_bytes = Number(object.max_bytes); - } else { - message.max_bytes = 0; - } - return message; - }, - - toJSON(message: EvidenceParams): unknown { - const obj: any = {}; - message.max_age_num_blocks !== undefined && - (obj.max_age_num_blocks = message.max_age_num_blocks); - message.max_age_duration !== undefined && - (obj.max_age_duration = message.max_age_duration - ? Duration.toJSON(message.max_age_duration) - : undefined); - message.max_bytes !== undefined && (obj.max_bytes = message.max_bytes); - return obj; - }, - - fromPartial(object: DeepPartial): EvidenceParams { - const message = { ...baseEvidenceParams } as EvidenceParams; - if ( - object.max_age_num_blocks !== undefined && - object.max_age_num_blocks !== null - ) { - message.max_age_num_blocks = object.max_age_num_blocks; - } else { - message.max_age_num_blocks = 0; - } - if ( - object.max_age_duration !== undefined && - object.max_age_duration !== null - ) { - message.max_age_duration = Duration.fromPartial(object.max_age_duration); - } else { - message.max_age_duration = undefined; - } - if (object.max_bytes !== undefined && object.max_bytes !== null) { - message.max_bytes = object.max_bytes; - } else { - message.max_bytes = 0; - } - return message; - }, -}; - -const baseValidatorParams: object = { pub_key_types: "" }; - -export const ValidatorParams = { - encode(message: ValidatorParams, writer: Writer = Writer.create()): Writer { - for (const v of message.pub_key_types) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorParams } as ValidatorParams; - message.pub_key_types = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pub_key_types.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorParams { - const message = { ...baseValidatorParams } as ValidatorParams; - message.pub_key_types = []; - if (object.pub_key_types !== undefined && object.pub_key_types !== null) { - for (const e of object.pub_key_types) { - message.pub_key_types.push(String(e)); - } - } - return message; - }, - - toJSON(message: ValidatorParams): unknown { - const obj: any = {}; - if (message.pub_key_types) { - obj.pub_key_types = message.pub_key_types.map((e) => e); - } else { - obj.pub_key_types = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorParams { - const message = { ...baseValidatorParams } as ValidatorParams; - message.pub_key_types = []; - if (object.pub_key_types !== undefined && object.pub_key_types !== null) { - for (const e of object.pub_key_types) { - message.pub_key_types.push(e); - } - } - return message; - }, -}; - -const baseVersionParams: object = { app_version: 0 }; - -export const VersionParams = { - encode(message: VersionParams, writer: Writer = Writer.create()): Writer { - if (message.app_version !== 0) { - writer.uint32(8).uint64(message.app_version); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): VersionParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVersionParams } as VersionParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_version = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): VersionParams { - const message = { ...baseVersionParams } as VersionParams; - if (object.app_version !== undefined && object.app_version !== null) { - message.app_version = Number(object.app_version); - } else { - message.app_version = 0; - } - return message; - }, - - toJSON(message: VersionParams): unknown { - const obj: any = {}; - message.app_version !== undefined && - (obj.app_version = message.app_version); - return obj; - }, - - fromPartial(object: DeepPartial): VersionParams { - const message = { ...baseVersionParams } as VersionParams; - if (object.app_version !== undefined && object.app_version !== null) { - message.app_version = object.app_version; - } else { - message.app_version = 0; - } - return message; - }, -}; - -const baseHashedParams: object = { block_max_bytes: 0, block_max_gas: 0 }; - -export const HashedParams = { - encode(message: HashedParams, writer: Writer = Writer.create()): Writer { - if (message.block_max_bytes !== 0) { - writer.uint32(8).int64(message.block_max_bytes); - } - if (message.block_max_gas !== 0) { - writer.uint32(16).int64(message.block_max_gas); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HashedParams { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHashedParams } as HashedParams; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_max_bytes = longToNumber(reader.int64() as Long); - break; - case 2: - message.block_max_gas = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HashedParams { - const message = { ...baseHashedParams } as HashedParams; - if ( - object.block_max_bytes !== undefined && - object.block_max_bytes !== null - ) { - message.block_max_bytes = Number(object.block_max_bytes); - } else { - message.block_max_bytes = 0; - } - if (object.block_max_gas !== undefined && object.block_max_gas !== null) { - message.block_max_gas = Number(object.block_max_gas); - } else { - message.block_max_gas = 0; - } - return message; - }, - - toJSON(message: HashedParams): unknown { - const obj: any = {}; - message.block_max_bytes !== undefined && - (obj.block_max_bytes = message.block_max_bytes); - message.block_max_gas !== undefined && - (obj.block_max_gas = message.block_max_gas); - return obj; - }, - - fromPartial(object: DeepPartial): HashedParams { - const message = { ...baseHashedParams } as HashedParams; - if ( - object.block_max_bytes !== undefined && - object.block_max_bytes !== null - ) { - message.block_max_bytes = object.block_max_bytes; - } else { - message.block_max_bytes = 0; - } - if (object.block_max_gas !== undefined && object.block_max_gas !== null) { - message.block_max_gas = object.block_max_gas; - } else { - message.block_max_gas = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/types.ts deleted file mode 100644 index 59a41a8e5b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/types.ts +++ /dev/null @@ -1,1943 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Proof } from "../../tendermint/crypto/proof"; -import { Consensus } from "../../tendermint/version/types"; -import { ValidatorSet } from "../../tendermint/types/validator"; - -export const protobufPackage = "tendermint.types"; - -/** BlockIdFlag indicates which BlcokID the signature is for */ -export enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0, - BLOCK_ID_FLAG_ABSENT = 1, - BLOCK_ID_FLAG_COMMIT = 2, - BLOCK_ID_FLAG_NIL = 3, - UNRECOGNIZED = -1, -} - -export function blockIDFlagFromJSON(object: any): BlockIDFlag { - switch (object) { - case 0: - case "BLOCK_ID_FLAG_UNKNOWN": - return BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN; - case 1: - case "BLOCK_ID_FLAG_ABSENT": - return BlockIDFlag.BLOCK_ID_FLAG_ABSENT; - case 2: - case "BLOCK_ID_FLAG_COMMIT": - return BlockIDFlag.BLOCK_ID_FLAG_COMMIT; - case 3: - case "BLOCK_ID_FLAG_NIL": - return BlockIDFlag.BLOCK_ID_FLAG_NIL; - case -1: - case "UNRECOGNIZED": - default: - return BlockIDFlag.UNRECOGNIZED; - } -} - -export function blockIDFlagToJSON(object: BlockIDFlag): string { - switch (object) { - case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN: - return "BLOCK_ID_FLAG_UNKNOWN"; - case BlockIDFlag.BLOCK_ID_FLAG_ABSENT: - return "BLOCK_ID_FLAG_ABSENT"; - case BlockIDFlag.BLOCK_ID_FLAG_COMMIT: - return "BLOCK_ID_FLAG_COMMIT"; - case BlockIDFlag.BLOCK_ID_FLAG_NIL: - return "BLOCK_ID_FLAG_NIL"; - default: - return "UNKNOWN"; - } -} - -/** SignedMsgType is a type of signed message in the consensus. */ -export enum SignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = 0, - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SIGNED_MSG_TYPE_PREVOTE = 1, - SIGNED_MSG_TYPE_PRECOMMIT = 2, - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SIGNED_MSG_TYPE_PROPOSAL = 32, - UNRECOGNIZED = -1, -} - -export function signedMsgTypeFromJSON(object: any): SignedMsgType { - switch (object) { - case 0: - case "SIGNED_MSG_TYPE_UNKNOWN": - return SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN; - case 1: - case "SIGNED_MSG_TYPE_PREVOTE": - return SignedMsgType.SIGNED_MSG_TYPE_PREVOTE; - case 2: - case "SIGNED_MSG_TYPE_PRECOMMIT": - return SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT; - case 32: - case "SIGNED_MSG_TYPE_PROPOSAL": - return SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL; - case -1: - case "UNRECOGNIZED": - default: - return SignedMsgType.UNRECOGNIZED; - } -} - -export function signedMsgTypeToJSON(object: SignedMsgType): string { - switch (object) { - case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN: - return "SIGNED_MSG_TYPE_UNKNOWN"; - case SignedMsgType.SIGNED_MSG_TYPE_PREVOTE: - return "SIGNED_MSG_TYPE_PREVOTE"; - case SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT: - return "SIGNED_MSG_TYPE_PRECOMMIT"; - case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL: - return "SIGNED_MSG_TYPE_PROPOSAL"; - default: - return "UNKNOWN"; - } -} - -/** PartsetHeader */ -export interface PartSetHeader { - total: number; - hash: Uint8Array; -} - -export interface Part { - index: number; - bytes: Uint8Array; - proof: Proof | undefined; -} - -/** BlockID */ -export interface BlockID { - hash: Uint8Array; - part_set_header: PartSetHeader | undefined; -} - -/** Header defines the structure of a Tendermint block header. */ -export interface Header { - /** basic block info */ - version: Consensus | undefined; - chain_id: string; - height: number; - time: Date | undefined; - /** prev block info */ - last_block_id: BlockID | undefined; - /** hashes of block data */ - last_commit_hash: Uint8Array; - /** transactions */ - data_hash: Uint8Array; - /** hashes from the app output from the prev block */ - validators_hash: Uint8Array; - /** validators for the next block */ - next_validators_hash: Uint8Array; - /** consensus params for current block */ - consensus_hash: Uint8Array; - /** state after txs from the previous block */ - app_hash: Uint8Array; - /** root hash of all results from the txs from the previous block */ - last_results_hash: Uint8Array; - /** consensus info */ - evidence_hash: Uint8Array; - /** original proposer of the block */ - proposer_address: Uint8Array; -} - -/** Data contains the set of transactions included in the block */ -export interface Data { - /** - * 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. - */ - txs: Uint8Array[]; -} - -/** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ -export interface Vote { - type: SignedMsgType; - height: number; - round: number; - /** zero if vote is nil. */ - block_id: BlockID | undefined; - timestamp: Date | undefined; - validator_address: Uint8Array; - validator_index: number; - signature: Uint8Array; -} - -/** Commit contains the evidence that a block was committed by a set of validators. */ -export interface Commit { - height: number; - round: number; - block_id: BlockID | undefined; - signatures: CommitSig[]; -} - -/** CommitSig is a part of the Vote included in a Commit. */ -export interface CommitSig { - block_id_flag: BlockIDFlag; - validator_address: Uint8Array; - timestamp: Date | undefined; - signature: Uint8Array; -} - -export interface Proposal { - type: SignedMsgType; - height: number; - round: number; - pol_round: number; - block_id: BlockID | undefined; - timestamp: Date | undefined; - signature: Uint8Array; -} - -export interface SignedHeader { - header: Header | undefined; - commit: Commit | undefined; -} - -export interface LightBlock { - signed_header: SignedHeader | undefined; - validator_set: ValidatorSet | undefined; -} - -export interface BlockMeta { - block_id: BlockID | undefined; - block_size: number; - header: Header | undefined; - num_txs: number; -} - -/** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ -export interface TxProof { - root_hash: Uint8Array; - data: Uint8Array; - proof: Proof | undefined; -} - -const basePartSetHeader: object = { total: 0 }; - -export const PartSetHeader = { - encode(message: PartSetHeader, writer: Writer = Writer.create()): Writer { - if (message.total !== 0) { - writer.uint32(8).uint32(message.total); - } - if (message.hash.length !== 0) { - writer.uint32(18).bytes(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PartSetHeader { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePartSetHeader } as PartSetHeader; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.uint32(); - break; - case 2: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PartSetHeader { - const message = { ...basePartSetHeader } as PartSetHeader; - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - - toJSON(message: PartSetHeader): unknown { - const obj: any = {}; - message.total !== undefined && (obj.total = message.total); - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): PartSetHeader { - const message = { ...basePartSetHeader } as PartSetHeader; - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - return message; - }, -}; - -const basePart: object = { index: 0 }; - -export const Part = { - encode(message: Part, writer: Writer = Writer.create()): Writer { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.bytes.length !== 0) { - writer.uint32(18).bytes(message.bytes); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Part { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePart } as Part; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Part { - const message = { ...basePart } as Part; - if (object.index !== undefined && object.index !== null) { - message.index = Number(object.index); - } else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = bytesFromBase64(object.bytes); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: Part): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = message.index); - message.bytes !== undefined && - (obj.bytes = base64FromBytes( - message.bytes !== undefined ? message.bytes : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Part { - const message = { ...basePart } as Part; - if (object.index !== undefined && object.index !== null) { - message.index = object.index; - } else { - message.index = 0; - } - if (object.bytes !== undefined && object.bytes !== null) { - message.bytes = object.bytes; - } else { - message.bytes = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -const baseBlockID: object = {}; - -export const BlockID = { - encode(message: BlockID, writer: Writer = Writer.create()): Writer { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.part_set_header !== undefined) { - PartSetHeader.encode( - message.part_set_header, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockID { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockID } as BlockID; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.part_set_header = PartSetHeader.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockID { - const message = { ...baseBlockID } as BlockID; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - if ( - object.part_set_header !== undefined && - object.part_set_header !== null - ) { - message.part_set_header = PartSetHeader.fromJSON(object.part_set_header); - } else { - message.part_set_header = undefined; - } - return message; - }, - - toJSON(message: BlockID): unknown { - const obj: any = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - message.part_set_header !== undefined && - (obj.part_set_header = message.part_set_header - ? PartSetHeader.toJSON(message.part_set_header) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): BlockID { - const message = { ...baseBlockID } as BlockID; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - if ( - object.part_set_header !== undefined && - object.part_set_header !== null - ) { - message.part_set_header = PartSetHeader.fromPartial( - object.part_set_header - ); - } else { - message.part_set_header = undefined; - } - return message; - }, -}; - -const baseHeader: object = { chain_id: "", height: 0 }; - -export const Header = { - encode(message: Header, writer: Writer = Writer.create()): Writer { - if (message.version !== undefined) { - Consensus.encode(message.version, writer.uint32(10).fork()).ldelim(); - } - if (message.chain_id !== "") { - writer.uint32(18).string(message.chain_id); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(34).fork() - ).ldelim(); - } - if (message.last_block_id !== undefined) { - BlockID.encode(message.last_block_id, writer.uint32(42).fork()).ldelim(); - } - if (message.last_commit_hash.length !== 0) { - writer.uint32(50).bytes(message.last_commit_hash); - } - if (message.data_hash.length !== 0) { - writer.uint32(58).bytes(message.data_hash); - } - if (message.validators_hash.length !== 0) { - writer.uint32(66).bytes(message.validators_hash); - } - if (message.next_validators_hash.length !== 0) { - writer.uint32(74).bytes(message.next_validators_hash); - } - if (message.consensus_hash.length !== 0) { - writer.uint32(82).bytes(message.consensus_hash); - } - if (message.app_hash.length !== 0) { - writer.uint32(90).bytes(message.app_hash); - } - if (message.last_results_hash.length !== 0) { - writer.uint32(98).bytes(message.last_results_hash); - } - if (message.evidence_hash.length !== 0) { - writer.uint32(106).bytes(message.evidence_hash); - } - if (message.proposer_address.length !== 0) { - writer.uint32(114).bytes(message.proposer_address); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Header { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeader } as Header; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chain_id = reader.string(); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 5: - message.last_block_id = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.last_commit_hash = reader.bytes(); - break; - case 7: - message.data_hash = reader.bytes(); - break; - case 8: - message.validators_hash = reader.bytes(); - break; - case 9: - message.next_validators_hash = reader.bytes(); - break; - case 10: - message.consensus_hash = reader.bytes(); - break; - case 11: - message.app_hash = reader.bytes(); - break; - case 12: - message.last_results_hash = reader.bytes(); - break; - case 13: - message.evidence_hash = reader.bytes(); - break; - case 14: - message.proposer_address = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Header { - const message = { ...baseHeader } as Header; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromJSON(object.version); - } else { - message.version = undefined; - } - if (object.chain_id !== undefined && object.chain_id !== null) { - message.chain_id = String(object.chain_id); - } else { - message.chain_id = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.last_block_id !== undefined && object.last_block_id !== null) { - message.last_block_id = BlockID.fromJSON(object.last_block_id); - } else { - message.last_block_id = undefined; - } - if ( - object.last_commit_hash !== undefined && - object.last_commit_hash !== null - ) { - message.last_commit_hash = bytesFromBase64(object.last_commit_hash); - } - if (object.data_hash !== undefined && object.data_hash !== null) { - message.data_hash = bytesFromBase64(object.data_hash); - } - if ( - object.validators_hash !== undefined && - object.validators_hash !== null - ) { - message.validators_hash = bytesFromBase64(object.validators_hash); - } - if ( - object.next_validators_hash !== undefined && - object.next_validators_hash !== null - ) { - message.next_validators_hash = bytesFromBase64( - object.next_validators_hash - ); - } - if (object.consensus_hash !== undefined && object.consensus_hash !== null) { - message.consensus_hash = bytesFromBase64(object.consensus_hash); - } - if (object.app_hash !== undefined && object.app_hash !== null) { - message.app_hash = bytesFromBase64(object.app_hash); - } - if ( - object.last_results_hash !== undefined && - object.last_results_hash !== null - ) { - message.last_results_hash = bytesFromBase64(object.last_results_hash); - } - if (object.evidence_hash !== undefined && object.evidence_hash !== null) { - message.evidence_hash = bytesFromBase64(object.evidence_hash); - } - if ( - object.proposer_address !== undefined && - object.proposer_address !== null - ) { - message.proposer_address = bytesFromBase64(object.proposer_address); - } - return message; - }, - - toJSON(message: Header): unknown { - const obj: any = {}; - message.version !== undefined && - (obj.version = message.version - ? Consensus.toJSON(message.version) - : undefined); - message.chain_id !== undefined && (obj.chain_id = message.chain_id); - message.height !== undefined && (obj.height = message.height); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.last_block_id !== undefined && - (obj.last_block_id = message.last_block_id - ? BlockID.toJSON(message.last_block_id) - : undefined); - message.last_commit_hash !== undefined && - (obj.last_commit_hash = base64FromBytes( - message.last_commit_hash !== undefined - ? message.last_commit_hash - : new Uint8Array() - )); - message.data_hash !== undefined && - (obj.data_hash = base64FromBytes( - message.data_hash !== undefined ? message.data_hash : new Uint8Array() - )); - message.validators_hash !== undefined && - (obj.validators_hash = base64FromBytes( - message.validators_hash !== undefined - ? message.validators_hash - : new Uint8Array() - )); - message.next_validators_hash !== undefined && - (obj.next_validators_hash = base64FromBytes( - message.next_validators_hash !== undefined - ? message.next_validators_hash - : new Uint8Array() - )); - message.consensus_hash !== undefined && - (obj.consensus_hash = base64FromBytes( - message.consensus_hash !== undefined - ? message.consensus_hash - : new Uint8Array() - )); - message.app_hash !== undefined && - (obj.app_hash = base64FromBytes( - message.app_hash !== undefined ? message.app_hash : new Uint8Array() - )); - message.last_results_hash !== undefined && - (obj.last_results_hash = base64FromBytes( - message.last_results_hash !== undefined - ? message.last_results_hash - : new Uint8Array() - )); - message.evidence_hash !== undefined && - (obj.evidence_hash = base64FromBytes( - message.evidence_hash !== undefined - ? message.evidence_hash - : new Uint8Array() - )); - message.proposer_address !== undefined && - (obj.proposer_address = base64FromBytes( - message.proposer_address !== undefined - ? message.proposer_address - : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial
): Header { - const message = { ...baseHeader } as Header; - if (object.version !== undefined && object.version !== null) { - message.version = Consensus.fromPartial(object.version); - } else { - message.version = undefined; - } - if (object.chain_id !== undefined && object.chain_id !== null) { - message.chain_id = object.chain_id; - } else { - message.chain_id = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.last_block_id !== undefined && object.last_block_id !== null) { - message.last_block_id = BlockID.fromPartial(object.last_block_id); - } else { - message.last_block_id = undefined; - } - if ( - object.last_commit_hash !== undefined && - object.last_commit_hash !== null - ) { - message.last_commit_hash = object.last_commit_hash; - } else { - message.last_commit_hash = new Uint8Array(); - } - if (object.data_hash !== undefined && object.data_hash !== null) { - message.data_hash = object.data_hash; - } else { - message.data_hash = new Uint8Array(); - } - if ( - object.validators_hash !== undefined && - object.validators_hash !== null - ) { - message.validators_hash = object.validators_hash; - } else { - message.validators_hash = new Uint8Array(); - } - if ( - object.next_validators_hash !== undefined && - object.next_validators_hash !== null - ) { - message.next_validators_hash = object.next_validators_hash; - } else { - message.next_validators_hash = new Uint8Array(); - } - if (object.consensus_hash !== undefined && object.consensus_hash !== null) { - message.consensus_hash = object.consensus_hash; - } else { - message.consensus_hash = new Uint8Array(); - } - if (object.app_hash !== undefined && object.app_hash !== null) { - message.app_hash = object.app_hash; - } else { - message.app_hash = new Uint8Array(); - } - if ( - object.last_results_hash !== undefined && - object.last_results_hash !== null - ) { - message.last_results_hash = object.last_results_hash; - } else { - message.last_results_hash = new Uint8Array(); - } - if (object.evidence_hash !== undefined && object.evidence_hash !== null) { - message.evidence_hash = object.evidence_hash; - } else { - message.evidence_hash = new Uint8Array(); - } - if ( - object.proposer_address !== undefined && - object.proposer_address !== null - ) { - message.proposer_address = object.proposer_address; - } else { - message.proposer_address = new Uint8Array(); - } - return message; - }, -}; - -const baseData: object = {}; - -export const Data = { - encode(message: Data, writer: Writer = Writer.create()): Writer { - for (const v of message.txs) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Data { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseData } as Data; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Data { - const message = { ...baseData } as Data; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(bytesFromBase64(e)); - } - } - return message; - }, - - toJSON(message: Data): unknown { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map((e) => - base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); - } else { - obj.txs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Data { - const message = { ...baseData } as Data; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(e); - } - } - return message; - }, -}; - -const baseVote: object = { type: 0, height: 0, round: 0, validator_index: 0 }; - -export const Vote = { - encode(message: Vote, writer: Writer = Writer.create()): Writer { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.block_id !== undefined) { - BlockID.encode(message.block_id, writer.uint32(34).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(42).fork() - ).ldelim(); - } - if (message.validator_address.length !== 0) { - writer.uint32(50).bytes(message.validator_address); - } - if (message.validator_index !== 0) { - writer.uint32(56).int32(message.validator_index); - } - if (message.signature.length !== 0) { - writer.uint32(66).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Vote { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVote } as Vote; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32() as any; - break; - case 2: - message.height = longToNumber(reader.int64() as Long); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.block_id = BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 6: - message.validator_address = reader.bytes(); - break; - case 7: - message.validator_index = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Vote { - const message = { ...baseVote } as Vote; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromJSON(object.block_id); - } else { - message.block_id = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = bytesFromBase64(object.validator_address); - } - if ( - object.validator_index !== undefined && - object.validator_index !== null - ) { - message.validator_index = Number(object.validator_index); - } else { - message.validator_index = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: Vote): unknown { - const obj: any = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.block_id !== undefined && - (obj.block_id = message.block_id - ? BlockID.toJSON(message.block_id) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.validator_address !== undefined && - (obj.validator_address = base64FromBytes( - message.validator_address !== undefined - ? message.validator_address - : new Uint8Array() - )); - message.validator_index !== undefined && - (obj.validator_index = message.validator_index); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Vote { - const message = { ...baseVote } as Vote; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromPartial(object.block_id); - } else { - message.block_id = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = new Uint8Array(); - } - if ( - object.validator_index !== undefined && - object.validator_index !== null - ) { - message.validator_index = object.validator_index; - } else { - message.validator_index = 0; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseCommit: object = { height: 0, round: 0 }; - -export const Commit = { - encode(message: Commit, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(16).int32(message.round); - } - if (message.block_id !== undefined) { - BlockID.encode(message.block_id, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.signatures) { - CommitSig.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Commit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommit } as Commit; - message.signatures = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.block_id = BlockID.decode(reader, reader.uint32()); - break; - case 4: - message.signatures.push(CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Commit { - const message = { ...baseCommit } as Commit; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromJSON(object.block_id); - } else { - message.block_id = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Commit): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.block_id !== undefined && - (obj.block_id = message.block_id - ? BlockID.toJSON(message.block_id) - : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map((e) => - e ? CommitSig.toJSON(e) : undefined - ); - } else { - obj.signatures = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Commit { - const message = { ...baseCommit } as Commit; - message.signatures = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromPartial(object.block_id); - } else { - message.block_id = undefined; - } - if (object.signatures !== undefined && object.signatures !== null) { - for (const e of object.signatures) { - message.signatures.push(CommitSig.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCommitSig: object = { block_id_flag: 0 }; - -export const CommitSig = { - encode(message: CommitSig, writer: Writer = Writer.create()): Writer { - if (message.block_id_flag !== 0) { - writer.uint32(8).int32(message.block_id_flag); - } - if (message.validator_address.length !== 0) { - writer.uint32(18).bytes(message.validator_address); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(26).fork() - ).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(34).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CommitSig { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommitSig } as CommitSig; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_id_flag = reader.int32() as any; - break; - case 2: - message.validator_address = reader.bytes(); - break; - case 3: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CommitSig { - const message = { ...baseCommitSig } as CommitSig; - if (object.block_id_flag !== undefined && object.block_id_flag !== null) { - message.block_id_flag = blockIDFlagFromJSON(object.block_id_flag); - } else { - message.block_id_flag = 0; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = bytesFromBase64(object.validator_address); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: CommitSig): unknown { - const obj: any = {}; - message.block_id_flag !== undefined && - (obj.block_id_flag = blockIDFlagToJSON(message.block_id_flag)); - message.validator_address !== undefined && - (obj.validator_address = base64FromBytes( - message.validator_address !== undefined - ? message.validator_address - : new Uint8Array() - )); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): CommitSig { - const message = { ...baseCommitSig } as CommitSig; - if (object.block_id_flag !== undefined && object.block_id_flag !== null) { - message.block_id_flag = object.block_id_flag; - } else { - message.block_id_flag = 0; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = new Uint8Array(); - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseProposal: object = { type: 0, height: 0, round: 0, pol_round: 0 }; - -export const Proposal = { - encode(message: Proposal, writer: Writer = Writer.create()): Writer { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.pol_round !== 0) { - writer.uint32(32).int32(message.pol_round); - } - if (message.block_id !== undefined) { - BlockID.encode(message.block_id, writer.uint32(42).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(50).fork() - ).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(58).bytes(message.signature); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Proposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProposal } as Proposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32() as any; - break; - case 2: - message.height = longToNumber(reader.int64() as Long); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.pol_round = reader.int32(); - break; - case 5: - message.block_id = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Proposal { - const message = { ...baseProposal } as Proposal; - if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = Number(object.round); - } else { - message.round = 0; - } - if (object.pol_round !== undefined && object.pol_round !== null) { - message.pol_round = Number(object.pol_round); - } else { - message.pol_round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromJSON(object.block_id); - } else { - message.block_id = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = fromJsonTimestamp(object.timestamp); - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); - } - return message; - }, - - toJSON(message: Proposal): unknown { - const obj: any = {}; - message.type !== undefined && - (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = message.height); - message.round !== undefined && (obj.round = message.round); - message.pol_round !== undefined && (obj.pol_round = message.pol_round); - message.block_id !== undefined && - (obj.block_id = message.block_id - ? BlockID.toJSON(message.block_id) - : undefined); - message.timestamp !== undefined && - (obj.timestamp = - message.timestamp !== undefined - ? message.timestamp.toISOString() - : null); - message.signature !== undefined && - (obj.signature = base64FromBytes( - message.signature !== undefined ? message.signature : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Proposal { - const message = { ...baseProposal } as Proposal; - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.round !== undefined && object.round !== null) { - message.round = object.round; - } else { - message.round = 0; - } - if (object.pol_round !== undefined && object.pol_round !== null) { - message.pol_round = object.pol_round; - } else { - message.pol_round = 0; - } - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromPartial(object.block_id); - } else { - message.block_id = undefined; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = undefined; - } - if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; - } else { - message.signature = new Uint8Array(); - } - return message; - }, -}; - -const baseSignedHeader: object = {}; - -export const SignedHeader = { - encode(message: SignedHeader, writer: Writer = Writer.create()): Writer { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.commit !== undefined) { - Commit.encode(message.commit, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SignedHeader { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSignedHeader } as SignedHeader; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SignedHeader { - const message = { ...baseSignedHeader } as SignedHeader; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromJSON(object.commit); - } else { - message.commit = undefined; - } - return message; - }, - - toJSON(message: SignedHeader): unknown { - const obj: any = {}; - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.commit !== undefined && - (obj.commit = message.commit ? Commit.toJSON(message.commit) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): SignedHeader { - const message = { ...baseSignedHeader } as SignedHeader; - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.commit !== undefined && object.commit !== null) { - message.commit = Commit.fromPartial(object.commit); - } else { - message.commit = undefined; - } - return message; - }, -}; - -const baseLightBlock: object = {}; - -export const LightBlock = { - encode(message: LightBlock, writer: Writer = Writer.create()): Writer { - if (message.signed_header !== undefined) { - SignedHeader.encode( - message.signed_header, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.validator_set !== undefined) { - ValidatorSet.encode( - message.validator_set, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): LightBlock { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLightBlock } as LightBlock; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signed_header = SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validator_set = ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LightBlock { - const message = { ...baseLightBlock } as LightBlock; - if (object.signed_header !== undefined && object.signed_header !== null) { - message.signed_header = SignedHeader.fromJSON(object.signed_header); - } else { - message.signed_header = undefined; - } - if (object.validator_set !== undefined && object.validator_set !== null) { - message.validator_set = ValidatorSet.fromJSON(object.validator_set); - } else { - message.validator_set = undefined; - } - return message; - }, - - toJSON(message: LightBlock): unknown { - const obj: any = {}; - message.signed_header !== undefined && - (obj.signed_header = message.signed_header - ? SignedHeader.toJSON(message.signed_header) - : undefined); - message.validator_set !== undefined && - (obj.validator_set = message.validator_set - ? ValidatorSet.toJSON(message.validator_set) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): LightBlock { - const message = { ...baseLightBlock } as LightBlock; - if (object.signed_header !== undefined && object.signed_header !== null) { - message.signed_header = SignedHeader.fromPartial(object.signed_header); - } else { - message.signed_header = undefined; - } - if (object.validator_set !== undefined && object.validator_set !== null) { - message.validator_set = ValidatorSet.fromPartial(object.validator_set); - } else { - message.validator_set = undefined; - } - return message; - }, -}; - -const baseBlockMeta: object = { block_size: 0, num_txs: 0 }; - -export const BlockMeta = { - encode(message: BlockMeta, writer: Writer = Writer.create()): Writer { - if (message.block_id !== undefined) { - BlockID.encode(message.block_id, writer.uint32(10).fork()).ldelim(); - } - if (message.block_size !== 0) { - writer.uint32(16).int64(message.block_size); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(26).fork()).ldelim(); - } - if (message.num_txs !== 0) { - writer.uint32(32).int64(message.num_txs); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BlockMeta { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBlockMeta } as BlockMeta; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_id = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.block_size = longToNumber(reader.int64() as Long); - break; - case 3: - message.header = Header.decode(reader, reader.uint32()); - break; - case 4: - message.num_txs = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BlockMeta { - const message = { ...baseBlockMeta } as BlockMeta; - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromJSON(object.block_id); - } else { - message.block_id = undefined; - } - if (object.block_size !== undefined && object.block_size !== null) { - message.block_size = Number(object.block_size); - } else { - message.block_size = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.num_txs !== undefined && object.num_txs !== null) { - message.num_txs = Number(object.num_txs); - } else { - message.num_txs = 0; - } - return message; - }, - - toJSON(message: BlockMeta): unknown { - const obj: any = {}; - message.block_id !== undefined && - (obj.block_id = message.block_id - ? BlockID.toJSON(message.block_id) - : undefined); - message.block_size !== undefined && (obj.block_size = message.block_size); - message.header !== undefined && - (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.num_txs !== undefined && (obj.num_txs = message.num_txs); - return obj; - }, - - fromPartial(object: DeepPartial): BlockMeta { - const message = { ...baseBlockMeta } as BlockMeta; - if (object.block_id !== undefined && object.block_id !== null) { - message.block_id = BlockID.fromPartial(object.block_id); - } else { - message.block_id = undefined; - } - if (object.block_size !== undefined && object.block_size !== null) { - message.block_size = object.block_size; - } else { - message.block_size = 0; - } - if (object.header !== undefined && object.header !== null) { - message.header = Header.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.num_txs !== undefined && object.num_txs !== null) { - message.num_txs = object.num_txs; - } else { - message.num_txs = 0; - } - return message; - }, -}; - -const baseTxProof: object = {}; - -export const TxProof = { - encode(message: TxProof, writer: Writer = Writer.create()): Writer { - if (message.root_hash.length !== 0) { - writer.uint32(10).bytes(message.root_hash); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TxProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTxProof } as TxProof; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.root_hash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TxProof { - const message = { ...baseTxProof } as TxProof; - if (object.root_hash !== undefined && object.root_hash !== null) { - message.root_hash = bytesFromBase64(object.root_hash); - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromJSON(object.proof); - } else { - message.proof = undefined; - } - return message; - }, - - toJSON(message: TxProof): unknown { - const obj: any = {}; - message.root_hash !== undefined && - (obj.root_hash = base64FromBytes( - message.root_hash !== undefined ? message.root_hash : new Uint8Array() - )); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): TxProof { - const message = { ...baseTxProof } as TxProof; - if (object.root_hash !== undefined && object.root_hash !== null) { - message.root_hash = object.root_hash; - } else { - message.root_hash = new Uint8Array(); - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = Proof.fromPartial(object.proof); - } else { - message.proof = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/validator.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/validator.ts deleted file mode 100644 index 8c3581c198..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/types/validator.ts +++ /dev/null @@ -1,382 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { PublicKey } from "../../tendermint/crypto/keys"; - -export const protobufPackage = "tendermint.types"; - -export interface ValidatorSet { - validators: Validator[]; - proposer: Validator | undefined; - total_voting_power: number; -} - -export interface Validator { - address: Uint8Array; - pub_key: PublicKey | undefined; - voting_power: number; - proposer_priority: number; -} - -export interface SimpleValidator { - pub_key: PublicKey | undefined; - voting_power: number; -} - -const baseValidatorSet: object = { total_voting_power: 0 }; - -export const ValidatorSet = { - encode(message: ValidatorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.proposer !== undefined) { - Validator.encode(message.proposer, writer.uint32(18).fork()).ldelim(); - } - if (message.total_voting_power !== 0) { - writer.uint32(24).int64(message.total_voting_power); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ValidatorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.total_voting_power = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ValidatorSet { - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromJSON(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromJSON(object.proposer); - } else { - message.proposer = undefined; - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = Number(object.total_voting_power); - } else { - message.total_voting_power = 0; - } - return message; - }, - - toJSON(message: ValidatorSet): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map((e) => - e ? Validator.toJSON(e) : undefined - ); - } else { - obj.validators = []; - } - message.proposer !== undefined && - (obj.proposer = message.proposer - ? Validator.toJSON(message.proposer) - : undefined); - message.total_voting_power !== undefined && - (obj.total_voting_power = message.total_voting_power); - return obj; - }, - - fromPartial(object: DeepPartial): ValidatorSet { - const message = { ...baseValidatorSet } as ValidatorSet; - message.validators = []; - if (object.validators !== undefined && object.validators !== null) { - for (const e of object.validators) { - message.validators.push(Validator.fromPartial(e)); - } - } - if (object.proposer !== undefined && object.proposer !== null) { - message.proposer = Validator.fromPartial(object.proposer); - } else { - message.proposer = undefined; - } - if ( - object.total_voting_power !== undefined && - object.total_voting_power !== null - ) { - message.total_voting_power = object.total_voting_power; - } else { - message.total_voting_power = 0; - } - return message; - }, -}; - -const baseValidator: object = { voting_power: 0, proposer_priority: 0 }; - -export const Validator = { - encode(message: Validator, writer: Writer = Writer.create()): Writer { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.pub_key !== undefined) { - PublicKey.encode(message.pub_key, writer.uint32(18).fork()).ldelim(); - } - if (message.voting_power !== 0) { - writer.uint32(24).int64(message.voting_power); - } - if (message.proposer_priority !== 0) { - writer.uint32(32).int64(message.proposer_priority); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Validator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseValidator } as Validator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pub_key = PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.voting_power = longToNumber(reader.int64() as Long); - break; - case 4: - message.proposer_priority = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = bytesFromBase64(object.address); - } - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = PublicKey.fromJSON(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.voting_power !== undefined && object.voting_power !== null) { - message.voting_power = Number(object.voting_power); - } else { - message.voting_power = 0; - } - if ( - object.proposer_priority !== undefined && - object.proposer_priority !== null - ) { - message.proposer_priority = Number(object.proposer_priority); - } else { - message.proposer_priority = 0; - } - return message; - }, - - toJSON(message: Validator): unknown { - const obj: any = {}; - message.address !== undefined && - (obj.address = base64FromBytes( - message.address !== undefined ? message.address : new Uint8Array() - )); - message.pub_key !== undefined && - (obj.pub_key = message.pub_key - ? PublicKey.toJSON(message.pub_key) - : undefined); - message.voting_power !== undefined && - (obj.voting_power = message.voting_power); - message.proposer_priority !== undefined && - (obj.proposer_priority = message.proposer_priority); - return obj; - }, - - fromPartial(object: DeepPartial): Validator { - const message = { ...baseValidator } as Validator; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = new Uint8Array(); - } - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = PublicKey.fromPartial(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.voting_power !== undefined && object.voting_power !== null) { - message.voting_power = object.voting_power; - } else { - message.voting_power = 0; - } - if ( - object.proposer_priority !== undefined && - object.proposer_priority !== null - ) { - message.proposer_priority = object.proposer_priority; - } else { - message.proposer_priority = 0; - } - return message; - }, -}; - -const baseSimpleValidator: object = { voting_power: 0 }; - -export const SimpleValidator = { - encode(message: SimpleValidator, writer: Writer = Writer.create()): Writer { - if (message.pub_key !== undefined) { - PublicKey.encode(message.pub_key, writer.uint32(10).fork()).ldelim(); - } - if (message.voting_power !== 0) { - writer.uint32(16).int64(message.voting_power); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SimpleValidator { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSimpleValidator } as SimpleValidator; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pub_key = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.voting_power = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SimpleValidator { - const message = { ...baseSimpleValidator } as SimpleValidator; - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = PublicKey.fromJSON(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.voting_power !== undefined && object.voting_power !== null) { - message.voting_power = Number(object.voting_power); - } else { - message.voting_power = 0; - } - return message; - }, - - toJSON(message: SimpleValidator): unknown { - const obj: any = {}; - message.pub_key !== undefined && - (obj.pub_key = message.pub_key - ? PublicKey.toJSON(message.pub_key) - : undefined); - message.voting_power !== undefined && - (obj.voting_power = message.voting_power); - return obj; - }, - - fromPartial(object: DeepPartial): SimpleValidator { - const message = { ...baseSimpleValidator } as SimpleValidator; - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = PublicKey.fromPartial(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.voting_power !== undefined && object.voting_power !== null) { - message.voting_power = object.voting_power; - } else { - message.voting_power = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/version/types.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/version/types.ts deleted file mode 100644 index 4bc6ad8232..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/module/types/tendermint/version/types.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "tendermint.version"; - -/** - * App includes the protocol and software version for the application. - * This information is included in ResponseInfo. The App.Protocol can be - * updated in ResponseEndBlock. - */ -export interface App { - protocol: number; - software: string; -} - -/** - * 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. - */ -export interface Consensus { - block: number; - app: number; -} - -const baseApp: object = { protocol: 0, software: "" }; - -export const App = { - encode(message: App, writer: Writer = Writer.create()): Writer { - if (message.protocol !== 0) { - writer.uint32(8).uint64(message.protocol); - } - if (message.software !== "") { - writer.uint32(18).string(message.software); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): App { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseApp } as App; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocol = longToNumber(reader.uint64() as Long); - break; - case 2: - message.software = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): App { - const message = { ...baseApp } as App; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = Number(object.protocol); - } else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = String(object.software); - } else { - message.software = ""; - } - return message; - }, - - toJSON(message: App): unknown { - const obj: any = {}; - message.protocol !== undefined && (obj.protocol = message.protocol); - message.software !== undefined && (obj.software = message.software); - return obj; - }, - - fromPartial(object: DeepPartial): App { - const message = { ...baseApp } as App; - if (object.protocol !== undefined && object.protocol !== null) { - message.protocol = object.protocol; - } else { - message.protocol = 0; - } - if (object.software !== undefined && object.software !== null) { - message.software = object.software; - } else { - message.software = ""; - } - return message; - }, -}; - -const baseConsensus: object = { block: 0, app: 0 }; - -export const Consensus = { - encode(message: Consensus, writer: Writer = Writer.create()): Writer { - if (message.block !== 0) { - writer.uint32(8).uint64(message.block); - } - if (message.app !== 0) { - writer.uint32(16).uint64(message.app); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Consensus { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConsensus } as Consensus; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = longToNumber(reader.uint64() as Long); - break; - case 2: - message.app = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Consensus { - const message = { ...baseConsensus } as Consensus; - if (object.block !== undefined && object.block !== null) { - message.block = Number(object.block); - } else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = Number(object.app); - } else { - message.app = 0; - } - return message; - }, - - toJSON(message: Consensus): unknown { - const obj: any = {}; - message.block !== undefined && (obj.block = message.block); - message.app !== undefined && (obj.app = message.app); - return obj; - }, - - fromPartial(object: DeepPartial): Consensus { - const message = { ...baseConsensus } as Consensus; - if (object.block !== undefined && object.block !== null) { - message.block = object.block; - } else { - message.block = 0; - } - if (object.app !== undefined && object.app !== null) { - message.app = object.app; - } else { - message.app = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/package.json b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/package.json deleted file mode 100755 index 7c2c07798d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmos-tx-v1beta1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmos.tx.v1beta1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/cosmos-sdk/types/tx", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.tx.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/index.ts deleted file mode 100755 index 15068df811..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/index.ts +++ /dev/null @@ -1,238 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { Plan } from "./module/types/cosmos/upgrade/v1beta1/upgrade" -import { SoftwareUpgradeProposal } from "./module/types/cosmos/upgrade/v1beta1/upgrade" -import { CancelSoftwareUpgradeProposal } from "./module/types/cosmos/upgrade/v1beta1/upgrade" -import { ModuleVersion } from "./module/types/cosmos/upgrade/v1beta1/upgrade" - - -export { Plan, SoftwareUpgradeProposal, CancelSoftwareUpgradeProposal, ModuleVersion }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - CurrentPlan: {}, - AppliedPlan: {}, - UpgradedConsensusState: {}, - ModuleVersions: {}, - - _Structure: { - Plan: getStructure(Plan.fromPartial({})), - SoftwareUpgradeProposal: getStructure(SoftwareUpgradeProposal.fromPartial({})), - CancelSoftwareUpgradeProposal: getStructure(CancelSoftwareUpgradeProposal.fromPartial({})), - ModuleVersion: getStructure(ModuleVersion.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getCurrentPlan: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.CurrentPlan[JSON.stringify(params)] ?? {} - }, - getAppliedPlan: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.AppliedPlan[JSON.stringify(params)] ?? {} - }, - getUpgradedConsensusState: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.UpgradedConsensusState[JSON.stringify(params)] ?? {} - }, - getModuleVersions: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ModuleVersions[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.upgrade.v1beta1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryCurrentPlan({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryCurrentPlan()).data - - - commit('QUERY', { query: 'CurrentPlan', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryCurrentPlan', payload: { options: { all }, params: {...key},query }}) - return getters['getCurrentPlan']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryCurrentPlan API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryAppliedPlan({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryAppliedPlan( key.name)).data - - - commit('QUERY', { query: 'AppliedPlan', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAppliedPlan', payload: { options: { all }, params: {...key},query }}) - return getters['getAppliedPlan']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryAppliedPlan API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryUpgradedConsensusState({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryUpgradedConsensusState( key.last_height)).data - - - commit('QUERY', { query: 'UpgradedConsensusState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryUpgradedConsensusState', payload: { options: { all }, params: {...key},query }}) - return getters['getUpgradedConsensusState']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryUpgradedConsensusState API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryModuleVersions({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryModuleVersions(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryModuleVersions({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ModuleVersions', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryModuleVersions', payload: { options: { all }, params: {...key},query }}) - return getters['getModuleVersions']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryModuleVersions API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/index.ts deleted file mode 100755 index 67d4b093f0..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; - - -const types = [ - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/rest.ts deleted file mode 100644 index 9af9f25228..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/rest.ts +++ /dev/null @@ -1,493 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* ModuleVersion specifies a module and its consensus version. - -Since: cosmos-sdk 0.43 -*/ -export interface V1Beta1ModuleVersion { - name?: string; - - /** @format uint64 */ - version?: string; -} - -/** - * Plan specifies information about a planned upgrade and when it should occur. - */ -export interface V1Beta1Plan { - /** - * 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. - */ - name?: string; - - /** - * 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. - * @format date-time - */ - time?: string; - - /** - * The height at which the upgrade must be performed. - * Only used if Time is not set. - * @format int64 - */ - height?: string; - info?: string; - - /** - * 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. - */ - upgraded_client_state?: ProtobufAny; -} - -/** -* QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC -method. -*/ -export interface V1Beta1QueryAppliedPlanResponse { - /** - * height is the block height at which the plan was applied. - * @format int64 - */ - height?: string; -} - -/** -* QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC -method. -*/ -export interface V1Beta1QueryCurrentPlanResponse { - /** plan is the current upgrade plan. */ - plan?: V1Beta1Plan; -} - -/** -* QueryModuleVersionsResponse is the response type for the Query/ModuleVersions -RPC method. - -Since: cosmos-sdk 0.43 -*/ -export interface V1Beta1QueryModuleVersionsResponse { - /** module_versions is a list of module names with their consensus versions. */ - module_versions?: V1Beta1ModuleVersion[]; -} - -/** -* QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState -RPC method. -*/ -export interface V1Beta1QueryUpgradedConsensusStateResponse { - /** @format byte */ - upgraded_consensus_state?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/upgrade/v1beta1/query.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryAppliedPlan - * @summary AppliedPlan queries a previously applied upgrade plan by its name. - * @request GET:/cosmos/upgrade/v1beta1/applied_plan/{name} - */ - queryAppliedPlan = (name: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/upgrade/v1beta1/applied_plan/${name}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryCurrentPlan - * @summary CurrentPlan queries the current upgrade plan. - * @request GET:/cosmos/upgrade/v1beta1/current_plan - */ - queryCurrentPlan = (params: RequestParams = {}) => - this.request({ - path: `/cosmos/upgrade/v1beta1/current_plan`, - method: "GET", - format: "json", - ...params, - }); - - /** - * @description Since: cosmos-sdk 0.43 - * - * @tags Query - * @name QueryModuleVersions - * @summary ModuleVersions queries the list of module versions from state. - * @request GET:/cosmos/upgrade/v1beta1/module_versions - */ - queryModuleVersions = (query?: { module_name?: string }, params: RequestParams = {}) => - this.request({ - path: `/cosmos/upgrade/v1beta1/module_versions`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryUpgradedConsensusState - * @summary UpgradedConsensusState queries the consensus state that will serve -as a trusted kernel for the next version of this chain. It will only be -stored at the last height of this chain. -UpgradedConsensusState RPC not supported with legacy querier -This rpc is deprecated now that IBC has its own replacement -(https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - * @request GET:/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height} - */ - queryUpgradedConsensusState = (last_height: string, params: RequestParams = {}) => - this.request({ - path: `/cosmos/upgrade/v1beta1/upgraded_consensus_state/${last_height}`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/cosmos/upgrade/v1beta1/query.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/cosmos/upgrade/v1beta1/query.ts deleted file mode 100644 index 389719f107..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/cosmos/upgrade/v1beta1/query.ts +++ /dev/null @@ -1,806 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Plan, ModuleVersion } from "../../../cosmos/upgrade/v1beta1/upgrade"; - -export const protobufPackage = "cosmos.upgrade.v1beta1"; - -/** - * QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC - * method. - */ -export interface QueryCurrentPlanRequest {} - -/** - * QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC - * method. - */ -export interface QueryCurrentPlanResponse { - /** plan is the current upgrade plan. */ - plan: Plan | undefined; -} - -/** - * QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC - * method. - */ -export interface QueryAppliedPlanRequest { - /** name is the name of the applied plan to query for. */ - name: string; -} - -/** - * QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC - * method. - */ -export interface QueryAppliedPlanResponse { - /** height is the block height at which the plan was applied. */ - height: number; -} - -/** - * QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState - * RPC method. - * - * @deprecated - */ -export interface QueryUpgradedConsensusStateRequest { - /** - * last height of the current chain must be sent in request - * as this is the height under which next consensus state is stored - */ - last_height: number; -} - -/** - * QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState - * RPC method. - * - * @deprecated - */ -export interface QueryUpgradedConsensusStateResponse { - /** Since: cosmos-sdk 0.43 */ - upgraded_consensus_state: Uint8Array; -} - -/** - * QueryModuleVersionsRequest is the request type for the Query/ModuleVersions - * RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryModuleVersionsRequest { - /** - * module_name is a field to query a specific module - * consensus version from state. Leaving this empty will - * fetch the full list of module versions from state - */ - module_name: string; -} - -/** - * QueryModuleVersionsResponse is the response type for the Query/ModuleVersions - * RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryModuleVersionsResponse { - /** module_versions is a list of module names with their consensus versions. */ - module_versions: ModuleVersion[]; -} - -const baseQueryCurrentPlanRequest: object = {}; - -export const QueryCurrentPlanRequest = { - encode(_: QueryCurrentPlanRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryCurrentPlanRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryCurrentPlanRequest, - } as QueryCurrentPlanRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryCurrentPlanRequest { - const message = { - ...baseQueryCurrentPlanRequest, - } as QueryCurrentPlanRequest; - return message; - }, - - toJSON(_: QueryCurrentPlanRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): QueryCurrentPlanRequest { - const message = { - ...baseQueryCurrentPlanRequest, - } as QueryCurrentPlanRequest; - return message; - }, -}; - -const baseQueryCurrentPlanResponse: object = {}; - -export const QueryCurrentPlanResponse = { - encode( - message: QueryCurrentPlanResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryCurrentPlanResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryCurrentPlanResponse, - } as QueryCurrentPlanResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.plan = Plan.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryCurrentPlanResponse { - const message = { - ...baseQueryCurrentPlanResponse, - } as QueryCurrentPlanResponse; - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromJSON(object.plan); - } else { - message.plan = undefined; - } - return message; - }, - - toJSON(message: QueryCurrentPlanResponse): unknown { - const obj: any = {}; - message.plan !== undefined && - (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryCurrentPlanResponse { - const message = { - ...baseQueryCurrentPlanResponse, - } as QueryCurrentPlanResponse; - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromPartial(object.plan); - } else { - message.plan = undefined; - } - return message; - }, -}; - -const baseQueryAppliedPlanRequest: object = { name: "" }; - -export const QueryAppliedPlanRequest = { - encode( - message: QueryAppliedPlanRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryAppliedPlanRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAppliedPlanRequest, - } as QueryAppliedPlanRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAppliedPlanRequest { - const message = { - ...baseQueryAppliedPlanRequest, - } as QueryAppliedPlanRequest; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - return message; - }, - - toJSON(message: QueryAppliedPlanRequest): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAppliedPlanRequest { - const message = { - ...baseQueryAppliedPlanRequest, - } as QueryAppliedPlanRequest; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - return message; - }, -}; - -const baseQueryAppliedPlanResponse: object = { height: 0 }; - -export const QueryAppliedPlanResponse = { - encode( - message: QueryAppliedPlanResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAppliedPlanResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAppliedPlanResponse, - } as QueryAppliedPlanResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAppliedPlanResponse { - const message = { - ...baseQueryAppliedPlanResponse, - } as QueryAppliedPlanResponse; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - return message; - }, - - toJSON(message: QueryAppliedPlanResponse): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAppliedPlanResponse { - const message = { - ...baseQueryAppliedPlanResponse, - } as QueryAppliedPlanResponse; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - return message; - }, -}; - -const baseQueryUpgradedConsensusStateRequest: object = { last_height: 0 }; - -export const QueryUpgradedConsensusStateRequest = { - encode( - message: QueryUpgradedConsensusStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.last_height !== 0) { - writer.uint32(8).int64(message.last_height); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUpgradedConsensusStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUpgradedConsensusStateRequest, - } as QueryUpgradedConsensusStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.last_height = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUpgradedConsensusStateRequest { - const message = { - ...baseQueryUpgradedConsensusStateRequest, - } as QueryUpgradedConsensusStateRequest; - if (object.last_height !== undefined && object.last_height !== null) { - message.last_height = Number(object.last_height); - } else { - message.last_height = 0; - } - return message; - }, - - toJSON(message: QueryUpgradedConsensusStateRequest): unknown { - const obj: any = {}; - message.last_height !== undefined && - (obj.last_height = message.last_height); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUpgradedConsensusStateRequest { - const message = { - ...baseQueryUpgradedConsensusStateRequest, - } as QueryUpgradedConsensusStateRequest; - if (object.last_height !== undefined && object.last_height !== null) { - message.last_height = object.last_height; - } else { - message.last_height = 0; - } - return message; - }, -}; - -const baseQueryUpgradedConsensusStateResponse: object = {}; - -export const QueryUpgradedConsensusStateResponse = { - encode( - message: QueryUpgradedConsensusStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.upgraded_consensus_state.length !== 0) { - writer.uint32(18).bytes(message.upgraded_consensus_state); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUpgradedConsensusStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUpgradedConsensusStateResponse, - } as QueryUpgradedConsensusStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.upgraded_consensus_state = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUpgradedConsensusStateResponse { - const message = { - ...baseQueryUpgradedConsensusStateResponse, - } as QueryUpgradedConsensusStateResponse; - if ( - object.upgraded_consensus_state !== undefined && - object.upgraded_consensus_state !== null - ) { - message.upgraded_consensus_state = bytesFromBase64( - object.upgraded_consensus_state - ); - } - return message; - }, - - toJSON(message: QueryUpgradedConsensusStateResponse): unknown { - const obj: any = {}; - message.upgraded_consensus_state !== undefined && - (obj.upgraded_consensus_state = base64FromBytes( - message.upgraded_consensus_state !== undefined - ? message.upgraded_consensus_state - : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUpgradedConsensusStateResponse { - const message = { - ...baseQueryUpgradedConsensusStateResponse, - } as QueryUpgradedConsensusStateResponse; - if ( - object.upgraded_consensus_state !== undefined && - object.upgraded_consensus_state !== null - ) { - message.upgraded_consensus_state = object.upgraded_consensus_state; - } else { - message.upgraded_consensus_state = new Uint8Array(); - } - return message; - }, -}; - -const baseQueryModuleVersionsRequest: object = { module_name: "" }; - -export const QueryModuleVersionsRequest = { - encode( - message: QueryModuleVersionsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.module_name !== "") { - writer.uint32(10).string(message.module_name); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryModuleVersionsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryModuleVersionsRequest, - } as QueryModuleVersionsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.module_name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryModuleVersionsRequest { - const message = { - ...baseQueryModuleVersionsRequest, - } as QueryModuleVersionsRequest; - if (object.module_name !== undefined && object.module_name !== null) { - message.module_name = String(object.module_name); - } else { - message.module_name = ""; - } - return message; - }, - - toJSON(message: QueryModuleVersionsRequest): unknown { - const obj: any = {}; - message.module_name !== undefined && - (obj.module_name = message.module_name); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryModuleVersionsRequest { - const message = { - ...baseQueryModuleVersionsRequest, - } as QueryModuleVersionsRequest; - if (object.module_name !== undefined && object.module_name !== null) { - message.module_name = object.module_name; - } else { - message.module_name = ""; - } - return message; - }, -}; - -const baseQueryModuleVersionsResponse: object = {}; - -export const QueryModuleVersionsResponse = { - encode( - message: QueryModuleVersionsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.module_versions) { - ModuleVersion.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryModuleVersionsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryModuleVersionsResponse, - } as QueryModuleVersionsResponse; - message.module_versions = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.module_versions.push( - ModuleVersion.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryModuleVersionsResponse { - const message = { - ...baseQueryModuleVersionsResponse, - } as QueryModuleVersionsResponse; - message.module_versions = []; - if ( - object.module_versions !== undefined && - object.module_versions !== null - ) { - for (const e of object.module_versions) { - message.module_versions.push(ModuleVersion.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryModuleVersionsResponse): unknown { - const obj: any = {}; - if (message.module_versions) { - obj.module_versions = message.module_versions.map((e) => - e ? ModuleVersion.toJSON(e) : undefined - ); - } else { - obj.module_versions = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryModuleVersionsResponse { - const message = { - ...baseQueryModuleVersionsResponse, - } as QueryModuleVersionsResponse; - message.module_versions = []; - if ( - object.module_versions !== undefined && - object.module_versions !== null - ) { - for (const e of object.module_versions) { - message.module_versions.push(ModuleVersion.fromPartial(e)); - } - } - return message; - }, -}; - -/** Query defines the gRPC upgrade querier service. */ -export interface Query { - /** CurrentPlan queries the current upgrade plan. */ - CurrentPlan( - request: QueryCurrentPlanRequest - ): Promise; - /** AppliedPlan queries a previously applied upgrade plan by its name. */ - AppliedPlan( - request: QueryAppliedPlanRequest - ): Promise; - /** - * UpgradedConsensusState queries the consensus state that will serve - * as a trusted kernel for the next version of this chain. It will only be - * stored at the last height of this chain. - * UpgradedConsensusState RPC not supported with legacy querier - * This rpc is deprecated now that IBC has its own replacement - * (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - * - * @deprecated - */ - UpgradedConsensusState( - request: QueryUpgradedConsensusStateRequest - ): Promise; - /** - * ModuleVersions queries the list of module versions from state. - * - * Since: cosmos-sdk 0.43 - */ - ModuleVersions( - request: QueryModuleVersionsRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - CurrentPlan( - request: QueryCurrentPlanRequest - ): Promise { - const data = QueryCurrentPlanRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.upgrade.v1beta1.Query", - "CurrentPlan", - data - ); - return promise.then((data) => - QueryCurrentPlanResponse.decode(new Reader(data)) - ); - } - - AppliedPlan( - request: QueryAppliedPlanRequest - ): Promise { - const data = QueryAppliedPlanRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.upgrade.v1beta1.Query", - "AppliedPlan", - data - ); - return promise.then((data) => - QueryAppliedPlanResponse.decode(new Reader(data)) - ); - } - - UpgradedConsensusState( - request: QueryUpgradedConsensusStateRequest - ): Promise { - const data = QueryUpgradedConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.upgrade.v1beta1.Query", - "UpgradedConsensusState", - data - ); - return promise.then((data) => - QueryUpgradedConsensusStateResponse.decode(new Reader(data)) - ); - } - - ModuleVersions( - request: QueryModuleVersionsRequest - ): Promise { - const data = QueryModuleVersionsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.upgrade.v1beta1.Query", - "ModuleVersions", - data - ); - return promise.then((data) => - QueryModuleVersionsResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/cosmos/upgrade/v1beta1/upgrade.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/cosmos/upgrade/v1beta1/upgrade.ts deleted file mode 100644 index 5d33e73e0b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/cosmos/upgrade/v1beta1/upgrade.ts +++ /dev/null @@ -1,543 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; - -export const protobufPackage = "cosmos.upgrade.v1beta1"; - -/** Plan specifies information about a planned upgrade and when it should occur. */ -export interface Plan { - /** - * 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. - */ - name: string; - /** - * 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. - * - * @deprecated - */ - time: Date | undefined; - /** - * The height at which the upgrade must be performed. - * Only used if Time is not set. - */ - height: number; - /** - * Any application specific upgrade info to be included on-chain - * such as a git commit that validators could automatically upgrade to - */ - info: string; - /** - * 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. - * - * @deprecated - */ - upgraded_client_state: Any | undefined; -} - -/** - * SoftwareUpgradeProposal is a gov Content type for initiating a software - * upgrade. - */ -export interface SoftwareUpgradeProposal { - title: string; - description: string; - plan: Plan | undefined; -} - -/** - * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software - * upgrade. - */ -export interface CancelSoftwareUpgradeProposal { - title: string; - description: string; -} - -/** - * ModuleVersion specifies a module and its consensus version. - * - * Since: cosmos-sdk 0.43 - */ -export interface ModuleVersion { - /** name of the app module */ - name: string; - /** consensus version of the app module */ - version: number; -} - -const basePlan: object = { name: "", height: 0, info: "" }; - -export const Plan = { - encode(message: Plan, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.upgraded_client_state !== undefined) { - Any.encode( - message.upgraded_client_state, - writer.uint32(42).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Plan { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePlan } as Plan; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.upgraded_client_state = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Plan { - const message = { ...basePlan } as Plan; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - if ( - object.upgraded_client_state !== undefined && - object.upgraded_client_state !== null - ) { - message.upgraded_client_state = Any.fromJSON( - object.upgraded_client_state - ); - } else { - message.upgraded_client_state = undefined; - } - return message; - }, - - toJSON(message: Plan): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.height !== undefined && (obj.height = message.height); - message.info !== undefined && (obj.info = message.info); - message.upgraded_client_state !== undefined && - (obj.upgraded_client_state = message.upgraded_client_state - ? Any.toJSON(message.upgraded_client_state) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Plan { - const message = { ...basePlan } as Plan; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - if ( - object.upgraded_client_state !== undefined && - object.upgraded_client_state !== null - ) { - message.upgraded_client_state = Any.fromPartial( - object.upgraded_client_state - ); - } else { - message.upgraded_client_state = undefined; - } - return message; - }, -}; - -const baseSoftwareUpgradeProposal: object = { title: "", description: "" }; - -export const SoftwareUpgradeProposal = { - encode( - message: SoftwareUpgradeProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SoftwareUpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SoftwareUpgradeProposal { - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromJSON(object.plan); - } else { - message.plan = undefined; - } - return message; - }, - - toJSON(message: SoftwareUpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.plan !== undefined && - (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): SoftwareUpgradeProposal { - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromPartial(object.plan); - } else { - message.plan = undefined; - } - return message; - }, -}; - -const baseCancelSoftwareUpgradeProposal: object = { - title: "", - description: "", -}; - -export const CancelSoftwareUpgradeProposal = { - encode( - message: CancelSoftwareUpgradeProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): CancelSoftwareUpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CancelSoftwareUpgradeProposal { - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - return message; - }, - - toJSON(message: CancelSoftwareUpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - return obj; - }, - - fromPartial( - object: DeepPartial - ): CancelSoftwareUpgradeProposal { - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - return message; - }, -}; - -const baseModuleVersion: object = { name: "", version: 0 }; - -export const ModuleVersion = { - encode(message: ModuleVersion, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.version !== 0) { - writer.uint32(16).uint64(message.version); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ModuleVersion { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseModuleVersion } as ModuleVersion; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.version = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ModuleVersion { - const message = { ...baseModuleVersion } as ModuleVersion; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = Number(object.version); - } else { - message.version = 0; - } - return message; - }, - - toJSON(message: ModuleVersion): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.version !== undefined && (obj.version = message.version); - return obj; - }, - - fromPartial(object: DeepPartial): ModuleVersion { - const message = { ...baseModuleVersion } as ModuleVersion; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } else { - message.version = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/protobuf/any.ts deleted file mode 100644 index 233eae465d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - type_url: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { type_url: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.type_url !== "") { - writer.uint32(10).string(message.type_url); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = String(object.type_url); - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.type_url !== undefined && (obj.type_url = message.type_url); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = object.type_url; - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 11864afc86..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/package.json b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/package.json deleted file mode 100755 index 46ed6861c1..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmos-upgrade-v1beta1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmos.upgrade.v1beta1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/cosmos-sdk/x/upgrade/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.upgrade.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.d.ts deleted file mode 100644 index b0e63ab0f9..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { BaseVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; -import { ContinuousVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; -import { DelayedVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; -import { Period } from "./module/types/cosmos/vesting/v1beta1/vesting"; -import { PeriodicVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; -import { PermanentLockedAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; -export { BaseVestingAccount, ContinuousVestingAccount, DelayedVestingAccount, Period, PeriodicVestingAccount, PermanentLockedAccount }; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.js deleted file mode 100644 index ebf8da9499..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.js +++ /dev/null @@ -1,142 +0,0 @@ -import { txClient, queryClient, MissingWalletError, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { BaseVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; -import { ContinuousVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; -import { DelayedVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; -import { Period } from "./module/types/cosmos/vesting/v1beta1/vesting"; -import { PeriodicVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; -import { PermanentLockedAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; -export { BaseVestingAccount, ContinuousVestingAccount, DelayedVestingAccount, Period, PeriodicVestingAccount, PermanentLockedAccount }; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - _Structure: { - BaseVestingAccount: getStructure(BaseVestingAccount.fromPartial({})), - ContinuousVestingAccount: getStructure(ContinuousVestingAccount.fromPartial({})), - DelayedVestingAccount: getStructure(DelayedVestingAccount.fromPartial({})), - Period: getStructure(Period.fromPartial({})), - PeriodicVestingAccount: getStructure(PeriodicVestingAccount.fromPartial({})), - PermanentLockedAccount: getStructure(PermanentLockedAccount.fromPartial({})), - }, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.vesting.v1beta1 initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - async sendMsgCreateVestingAccount({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgCreateVestingAccount(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgCreateVestingAccount:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgCreateVestingAccount:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async MsgCreateVestingAccount({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgCreateVestingAccount(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgCreateVestingAccount:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgCreateVestingAccount:Create', 'Could not create message: ' + e.message); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.ts deleted file mode 100755 index 99efaad038..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { BaseVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting" -import { ContinuousVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting" -import { DelayedVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting" -import { Period } from "./module/types/cosmos/vesting/v1beta1/vesting" -import { PeriodicVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting" -import { PermanentLockedAccount } from "./module/types/cosmos/vesting/v1beta1/vesting" - - -export { BaseVestingAccount, ContinuousVestingAccount, DelayedVestingAccount, Period, PeriodicVestingAccount, PermanentLockedAccount }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - - _Structure: { - BaseVestingAccount: getStructure(BaseVestingAccount.fromPartial({})), - ContinuousVestingAccount: getStructure(ContinuousVestingAccount.fromPartial({})), - DelayedVestingAccount: getStructure(DelayedVestingAccount.fromPartial({})), - Period: getStructure(Period.fromPartial({})), - PeriodicVestingAccount: getStructure(PeriodicVestingAccount.fromPartial({})), - PermanentLockedAccount: getStructure(PermanentLockedAccount.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: cosmos.vesting.v1beta1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - async sendMsgCreateVestingAccount({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateVestingAccount(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateVestingAccount:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgCreateVestingAccount:Send Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgCreateVestingAccount({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateVestingAccount(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateVestingAccount:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgCreateVestingAccount:Create Could not create message: ' + e.message) - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.d.ts deleted file mode 100644 index 502e49bf00..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; - msgCreateVestingAccount: (data: MsgCreateVestingAccount) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.js deleted file mode 100644 index 283238d29d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.js +++ /dev/null @@ -1,34 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; -const types = [ - ["/cosmos.vesting.v1beta1.MsgCreateVestingAccount", MsgCreateVestingAccount], -]; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - msgCreateVestingAccount: (data) => ({ typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", value: MsgCreateVestingAccount.fromPartial(data) }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.ts deleted file mode 100755 index 1ae2ff58b4..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.ts +++ /dev/null @@ -1,60 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; - - -const types = [ - ["/cosmos.vesting.v1beta1.MsgCreateVestingAccount", MsgCreateVestingAccount], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgCreateVestingAccount: (data: MsgCreateVestingAccount): EncodeObject => ({ typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", value: MsgCreateVestingAccount.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.d.ts deleted file mode 100644 index c13ad648d3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.d.ts +++ /dev/null @@ -1,196 +0,0 @@ -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} -/** - * MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. - */ -export declare type V1Beta1MsgCreateVestingAccountResponse = object; -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title cosmos/vesting/v1beta1/tx.proto - * @version version not set - */ -export declare class Api extends HttpClient { -} -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.js deleted file mode 100644 index 9409326231..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.js +++ /dev/null @@ -1,137 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title cosmos/vesting/v1beta1/tx.proto - * @version version not set - */ -export class Api extends HttpClient { -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.ts deleted file mode 100644 index 5ec60ced09..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/rest.ts +++ /dev/null @@ -1,347 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** - * MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. - */ -export type V1Beta1MsgCreateVestingAccountResponse = object; - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title cosmos/vesting/v1beta1/tx.proto - * @version version not set - */ -export class Api extends HttpClient {} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.d.ts deleted file mode 100644 index 8e04916cc0..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -export declare const protobufPackage = "cosmos.auth.v1beta1"; -/** - * BaseAccount defines a base account type. It contains all the necessary fields - * for basic account functionality. Any custom account type should extend this - * type for additional functionality (e.g. vesting). - */ -export interface BaseAccount { - address: string; - pubKey: Any | undefined; - accountNumber: number; - sequence: number; -} -/** ModuleAccount defines an account for modules that holds coins on a pool. */ -export interface ModuleAccount { - baseAccount: BaseAccount | undefined; - name: string; - permissions: string[]; -} -/** Params defines the parameters for the auth module. */ -export interface Params { - maxMemoCharacters: number; - txSigLimit: number; - txSizeCostPerByte: number; - sigVerifyCostEd25519: number; - sigVerifyCostSecp256k1: number; -} -export declare const BaseAccount: { - encode(message: BaseAccount, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BaseAccount; - fromJSON(object: any): BaseAccount; - toJSON(message: BaseAccount): unknown; - fromPartial(object: DeepPartial): BaseAccount; -}; -export declare const ModuleAccount: { - encode(message: ModuleAccount, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ModuleAccount; - fromJSON(object: any): ModuleAccount; - toJSON(message: ModuleAccount): unknown; - fromPartial(object: DeepPartial): ModuleAccount; -}; -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.js deleted file mode 100644 index 415f810ce9..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.js +++ /dev/null @@ -1,379 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -export const protobufPackage = "cosmos.auth.v1beta1"; -const baseBaseAccount = { address: "", accountNumber: 0, sequence: 0 }; -export const BaseAccount = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pubKey !== undefined) { - Any.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.accountNumber !== 0) { - writer.uint32(24).uint64(message.accountNumber); - } - if (message.sequence !== 0) { - writer.uint32(32).uint64(message.sequence); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBaseAccount }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pubKey = Any.decode(reader, reader.uint32()); - break; - case 3: - message.accountNumber = longToNumber(reader.uint64()); - break; - case 4: - message.sequence = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBaseAccount }; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = Any.fromJSON(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.accountNumber !== undefined && object.accountNumber !== null) { - message.accountNumber = Number(object.accountNumber); - } - else { - message.accountNumber = 0; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } - else { - message.sequence = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.pubKey !== undefined && - (obj.pubKey = message.pubKey ? Any.toJSON(message.pubKey) : undefined); - message.accountNumber !== undefined && - (obj.accountNumber = message.accountNumber); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - fromPartial(object) { - const message = { ...baseBaseAccount }; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.pubKey !== undefined && object.pubKey !== null) { - message.pubKey = Any.fromPartial(object.pubKey); - } - else { - message.pubKey = undefined; - } - if (object.accountNumber !== undefined && object.accountNumber !== null) { - message.accountNumber = object.accountNumber; - } - else { - message.accountNumber = 0; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } - else { - message.sequence = 0; - } - return message; - }, -}; -const baseModuleAccount = { name: "", permissions: "" }; -export const ModuleAccount = { - encode(message, writer = Writer.create()) { - if (message.baseAccount !== undefined) { - BaseAccount.encode(message.baseAccount, writer.uint32(10).fork()).ldelim(); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - for (const v of message.permissions) { - writer.uint32(26).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseModuleAccount }; - message.permissions = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseAccount = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.permissions.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseModuleAccount }; - message.permissions = []; - if (object.baseAccount !== undefined && object.baseAccount !== null) { - message.baseAccount = BaseAccount.fromJSON(object.baseAccount); - } - else { - message.baseAccount = undefined; - } - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.permissions !== undefined && object.permissions !== null) { - for (const e of object.permissions) { - message.permissions.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.baseAccount !== undefined && - (obj.baseAccount = message.baseAccount - ? BaseAccount.toJSON(message.baseAccount) - : undefined); - message.name !== undefined && (obj.name = message.name); - if (message.permissions) { - obj.permissions = message.permissions.map((e) => e); - } - else { - obj.permissions = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseModuleAccount }; - message.permissions = []; - if (object.baseAccount !== undefined && object.baseAccount !== null) { - message.baseAccount = BaseAccount.fromPartial(object.baseAccount); - } - else { - message.baseAccount = undefined; - } - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.permissions !== undefined && object.permissions !== null) { - for (const e of object.permissions) { - message.permissions.push(e); - } - } - return message; - }, -}; -const baseParams = { - maxMemoCharacters: 0, - txSigLimit: 0, - txSizeCostPerByte: 0, - sigVerifyCostEd25519: 0, - sigVerifyCostSecp256k1: 0, -}; -export const Params = { - encode(message, writer = Writer.create()) { - if (message.maxMemoCharacters !== 0) { - writer.uint32(8).uint64(message.maxMemoCharacters); - } - if (message.txSigLimit !== 0) { - writer.uint32(16).uint64(message.txSigLimit); - } - if (message.txSizeCostPerByte !== 0) { - writer.uint32(24).uint64(message.txSizeCostPerByte); - } - if (message.sigVerifyCostEd25519 !== 0) { - writer.uint32(32).uint64(message.sigVerifyCostEd25519); - } - if (message.sigVerifyCostSecp256k1 !== 0) { - writer.uint32(40).uint64(message.sigVerifyCostSecp256k1); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxMemoCharacters = longToNumber(reader.uint64()); - break; - case 2: - message.txSigLimit = longToNumber(reader.uint64()); - break; - case 3: - message.txSizeCostPerByte = longToNumber(reader.uint64()); - break; - case 4: - message.sigVerifyCostEd25519 = longToNumber(reader.uint64()); - break; - case 5: - message.sigVerifyCostSecp256k1 = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - if (object.maxMemoCharacters !== undefined && - object.maxMemoCharacters !== null) { - message.maxMemoCharacters = Number(object.maxMemoCharacters); - } - else { - message.maxMemoCharacters = 0; - } - if (object.txSigLimit !== undefined && object.txSigLimit !== null) { - message.txSigLimit = Number(object.txSigLimit); - } - else { - message.txSigLimit = 0; - } - if (object.txSizeCostPerByte !== undefined && - object.txSizeCostPerByte !== null) { - message.txSizeCostPerByte = Number(object.txSizeCostPerByte); - } - else { - message.txSizeCostPerByte = 0; - } - if (object.sigVerifyCostEd25519 !== undefined && - object.sigVerifyCostEd25519 !== null) { - message.sigVerifyCostEd25519 = Number(object.sigVerifyCostEd25519); - } - else { - message.sigVerifyCostEd25519 = 0; - } - if (object.sigVerifyCostSecp256k1 !== undefined && - object.sigVerifyCostSecp256k1 !== null) { - message.sigVerifyCostSecp256k1 = Number(object.sigVerifyCostSecp256k1); - } - else { - message.sigVerifyCostSecp256k1 = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.maxMemoCharacters !== undefined && - (obj.maxMemoCharacters = message.maxMemoCharacters); - message.txSigLimit !== undefined && (obj.txSigLimit = message.txSigLimit); - message.txSizeCostPerByte !== undefined && - (obj.txSizeCostPerByte = message.txSizeCostPerByte); - message.sigVerifyCostEd25519 !== undefined && - (obj.sigVerifyCostEd25519 = message.sigVerifyCostEd25519); - message.sigVerifyCostSecp256k1 !== undefined && - (obj.sigVerifyCostSecp256k1 = message.sigVerifyCostSecp256k1); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - if (object.maxMemoCharacters !== undefined && - object.maxMemoCharacters !== null) { - message.maxMemoCharacters = object.maxMemoCharacters; - } - else { - message.maxMemoCharacters = 0; - } - if (object.txSigLimit !== undefined && object.txSigLimit !== null) { - message.txSigLimit = object.txSigLimit; - } - else { - message.txSigLimit = 0; - } - if (object.txSizeCostPerByte !== undefined && - object.txSizeCostPerByte !== null) { - message.txSizeCostPerByte = object.txSizeCostPerByte; - } - else { - message.txSizeCostPerByte = 0; - } - if (object.sigVerifyCostEd25519 !== undefined && - object.sigVerifyCostEd25519 !== null) { - message.sigVerifyCostEd25519 = object.sigVerifyCostEd25519; - } - else { - message.sigVerifyCostEd25519 = 0; - } - if (object.sigVerifyCostSecp256k1 !== undefined && - object.sigVerifyCostSecp256k1 !== null) { - message.sigVerifyCostSecp256k1 = object.sigVerifyCostSecp256k1; - } - else { - message.sigVerifyCostSecp256k1 = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.ts deleted file mode 100644 index c7448a2592..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/auth/v1beta1/auth.ts +++ /dev/null @@ -1,441 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; - -export const protobufPackage = "cosmos.auth.v1beta1"; - -/** - * BaseAccount defines a base account type. It contains all the necessary fields - * for basic account functionality. Any custom account type should extend this - * type for additional functionality (e.g. vesting). - */ -export interface BaseAccount { - address: string; - pub_key: Any | undefined; - account_number: number; - sequence: number; -} - -/** ModuleAccount defines an account for modules that holds coins on a pool. */ -export interface ModuleAccount { - base_account: BaseAccount | undefined; - name: string; - permissions: string[]; -} - -/** Params defines the parameters for the auth module. */ -export interface Params { - max_memo_characters: number; - tx_sig_limit: number; - tx_size_cost_per_byte: number; - sig_verify_cost_ed25519: number; - sig_verify_cost_secp256k1: number; -} - -const baseBaseAccount: object = { address: "", account_number: 0, sequence: 0 }; - -export const BaseAccount = { - encode(message: BaseAccount, writer: Writer = Writer.create()): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pub_key !== undefined) { - Any.encode(message.pub_key, writer.uint32(18).fork()).ldelim(); - } - if (message.account_number !== 0) { - writer.uint32(24).uint64(message.account_number); - } - if (message.sequence !== 0) { - writer.uint32(32).uint64(message.sequence); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BaseAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBaseAccount } as BaseAccount; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pub_key = Any.decode(reader, reader.uint32()); - break; - case 3: - message.account_number = longToNumber(reader.uint64() as Long); - break; - case 4: - message.sequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BaseAccount { - const message = { ...baseBaseAccount } as BaseAccount; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = Any.fromJSON(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.account_number !== undefined && object.account_number !== null) { - message.account_number = Number(object.account_number); - } else { - message.account_number = 0; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - return message; - }, - - toJSON(message: BaseAccount): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pub_key !== undefined && - (obj.pub_key = message.pub_key ? Any.toJSON(message.pub_key) : undefined); - message.account_number !== undefined && - (obj.account_number = message.account_number); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - - fromPartial(object: DeepPartial): BaseAccount { - const message = { ...baseBaseAccount } as BaseAccount; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.pub_key !== undefined && object.pub_key !== null) { - message.pub_key = Any.fromPartial(object.pub_key); - } else { - message.pub_key = undefined; - } - if (object.account_number !== undefined && object.account_number !== null) { - message.account_number = object.account_number; - } else { - message.account_number = 0; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - return message; - }, -}; - -const baseModuleAccount: object = { name: "", permissions: "" }; - -export const ModuleAccount = { - encode(message: ModuleAccount, writer: Writer = Writer.create()): Writer { - if (message.base_account !== undefined) { - BaseAccount.encode( - message.base_account, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - for (const v of message.permissions) { - writer.uint32(26).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ModuleAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseModuleAccount } as ModuleAccount; - message.permissions = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.base_account = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.permissions.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ModuleAccount { - const message = { ...baseModuleAccount } as ModuleAccount; - message.permissions = []; - if (object.base_account !== undefined && object.base_account !== null) { - message.base_account = BaseAccount.fromJSON(object.base_account); - } else { - message.base_account = undefined; - } - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.permissions !== undefined && object.permissions !== null) { - for (const e of object.permissions) { - message.permissions.push(String(e)); - } - } - return message; - }, - - toJSON(message: ModuleAccount): unknown { - const obj: any = {}; - message.base_account !== undefined && - (obj.base_account = message.base_account - ? BaseAccount.toJSON(message.base_account) - : undefined); - message.name !== undefined && (obj.name = message.name); - if (message.permissions) { - obj.permissions = message.permissions.map((e) => e); - } else { - obj.permissions = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ModuleAccount { - const message = { ...baseModuleAccount } as ModuleAccount; - message.permissions = []; - if (object.base_account !== undefined && object.base_account !== null) { - message.base_account = BaseAccount.fromPartial(object.base_account); - } else { - message.base_account = undefined; - } - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.permissions !== undefined && object.permissions !== null) { - for (const e of object.permissions) { - message.permissions.push(e); - } - } - return message; - }, -}; - -const baseParams: object = { - max_memo_characters: 0, - tx_sig_limit: 0, - tx_size_cost_per_byte: 0, - sig_verify_cost_ed25519: 0, - sig_verify_cost_secp256k1: 0, -}; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.max_memo_characters !== 0) { - writer.uint32(8).uint64(message.max_memo_characters); - } - if (message.tx_sig_limit !== 0) { - writer.uint32(16).uint64(message.tx_sig_limit); - } - if (message.tx_size_cost_per_byte !== 0) { - writer.uint32(24).uint64(message.tx_size_cost_per_byte); - } - if (message.sig_verify_cost_ed25519 !== 0) { - writer.uint32(32).uint64(message.sig_verify_cost_ed25519); - } - if (message.sig_verify_cost_secp256k1 !== 0) { - writer.uint32(40).uint64(message.sig_verify_cost_secp256k1); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_memo_characters = longToNumber(reader.uint64() as Long); - break; - case 2: - message.tx_sig_limit = longToNumber(reader.uint64() as Long); - break; - case 3: - message.tx_size_cost_per_byte = longToNumber(reader.uint64() as Long); - break; - case 4: - message.sig_verify_cost_ed25519 = longToNumber( - reader.uint64() as Long - ); - break; - case 5: - message.sig_verify_cost_secp256k1 = longToNumber( - reader.uint64() as Long - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if ( - object.max_memo_characters !== undefined && - object.max_memo_characters !== null - ) { - message.max_memo_characters = Number(object.max_memo_characters); - } else { - message.max_memo_characters = 0; - } - if (object.tx_sig_limit !== undefined && object.tx_sig_limit !== null) { - message.tx_sig_limit = Number(object.tx_sig_limit); - } else { - message.tx_sig_limit = 0; - } - if ( - object.tx_size_cost_per_byte !== undefined && - object.tx_size_cost_per_byte !== null - ) { - message.tx_size_cost_per_byte = Number(object.tx_size_cost_per_byte); - } else { - message.tx_size_cost_per_byte = 0; - } - if ( - object.sig_verify_cost_ed25519 !== undefined && - object.sig_verify_cost_ed25519 !== null - ) { - message.sig_verify_cost_ed25519 = Number(object.sig_verify_cost_ed25519); - } else { - message.sig_verify_cost_ed25519 = 0; - } - if ( - object.sig_verify_cost_secp256k1 !== undefined && - object.sig_verify_cost_secp256k1 !== null - ) { - message.sig_verify_cost_secp256k1 = Number( - object.sig_verify_cost_secp256k1 - ); - } else { - message.sig_verify_cost_secp256k1 = 0; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.max_memo_characters !== undefined && - (obj.max_memo_characters = message.max_memo_characters); - message.tx_sig_limit !== undefined && - (obj.tx_sig_limit = message.tx_sig_limit); - message.tx_size_cost_per_byte !== undefined && - (obj.tx_size_cost_per_byte = message.tx_size_cost_per_byte); - message.sig_verify_cost_ed25519 !== undefined && - (obj.sig_verify_cost_ed25519 = message.sig_verify_cost_ed25519); - message.sig_verify_cost_secp256k1 !== undefined && - (obj.sig_verify_cost_secp256k1 = message.sig_verify_cost_secp256k1); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if ( - object.max_memo_characters !== undefined && - object.max_memo_characters !== null - ) { - message.max_memo_characters = object.max_memo_characters; - } else { - message.max_memo_characters = 0; - } - if (object.tx_sig_limit !== undefined && object.tx_sig_limit !== null) { - message.tx_sig_limit = object.tx_sig_limit; - } else { - message.tx_sig_limit = 0; - } - if ( - object.tx_size_cost_per_byte !== undefined && - object.tx_size_cost_per_byte !== null - ) { - message.tx_size_cost_per_byte = object.tx_size_cost_per_byte; - } else { - message.tx_size_cost_per_byte = 0; - } - if ( - object.sig_verify_cost_ed25519 !== undefined && - object.sig_verify_cost_ed25519 !== null - ) { - message.sig_verify_cost_ed25519 = object.sig_verify_cost_ed25519; - } else { - message.sig_verify_cost_ed25519 = 0; - } - if ( - object.sig_verify_cost_secp256k1 !== undefined && - object.sig_verify_cost_secp256k1 !== null - ) { - message.sig_verify_cost_secp256k1 = object.sig_verify_cost_secp256k1; - } else { - message.sig_verify_cost_secp256k1 = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac6a3..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb30cd..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98406..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.d.ts deleted file mode 100644 index 1d0ddeef47..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.vesting.v1beta1"; -/** - * MsgCreateVestingAccount defines a message that enables creating a vesting - * account. - */ -export interface MsgCreateVestingAccount { - fromAddress: string; - toAddress: string; - amount: Coin[]; - endTime: number; - delayed: boolean; -} -/** MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. */ -export interface MsgCreateVestingAccountResponse { -} -export declare const MsgCreateVestingAccount: { - encode(message: MsgCreateVestingAccount, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgCreateVestingAccount; - fromJSON(object: any): MsgCreateVestingAccount; - toJSON(message: MsgCreateVestingAccount): unknown; - fromPartial(object: DeepPartial): MsgCreateVestingAccount; -}; -export declare const MsgCreateVestingAccountResponse: { - encode(_: MsgCreateVestingAccountResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgCreateVestingAccountResponse; - fromJSON(_: any): MsgCreateVestingAccountResponse; - toJSON(_: MsgCreateVestingAccountResponse): unknown; - fromPartial(_: DeepPartial): MsgCreateVestingAccountResponse; -}; -/** Msg defines the bank Msg service. */ -export interface Msg { - /** - * CreateVestingAccount defines a method that enables creating a vesting - * account. - */ - CreateVestingAccount(request: MsgCreateVestingAccount): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - CreateVestingAccount(request: MsgCreateVestingAccount): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.js deleted file mode 100644 index 1c0cafecd1..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.js +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.vesting.v1beta1"; -const baseMsgCreateVestingAccount = { - fromAddress: "", - toAddress: "", - endTime: 0, - delayed: false, -}; -export const MsgCreateVestingAccount = { - encode(message, writer = Writer.create()) { - if (message.fromAddress !== "") { - writer.uint32(10).string(message.fromAddress); - } - if (message.toAddress !== "") { - writer.uint32(18).string(message.toAddress); - } - for (const v of message.amount) { - Coin.encode(v, writer.uint32(26).fork()).ldelim(); - } - if (message.endTime !== 0) { - writer.uint32(32).int64(message.endTime); - } - if (message.delayed === true) { - writer.uint32(40).bool(message.delayed); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreateVestingAccount, - }; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.endTime = longToNumber(reader.int64()); - break; - case 5: - message.delayed = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgCreateVestingAccount, - }; - message.amount = []; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = String(object.fromAddress); - } - else { - message.fromAddress = ""; - } - if (object.toAddress !== undefined && object.toAddress !== null) { - message.toAddress = String(object.toAddress); - } - else { - message.toAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - if (object.endTime !== undefined && object.endTime !== null) { - message.endTime = Number(object.endTime); - } - else { - message.endTime = 0; - } - if (object.delayed !== undefined && object.delayed !== null) { - message.delayed = Boolean(object.delayed); - } - else { - message.delayed = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.fromAddress !== undefined && - (obj.fromAddress = message.fromAddress); - message.toAddress !== undefined && (obj.toAddress = message.toAddress); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.amount = []; - } - message.endTime !== undefined && (obj.endTime = message.endTime); - message.delayed !== undefined && (obj.delayed = message.delayed); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgCreateVestingAccount, - }; - message.amount = []; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = object.fromAddress; - } - else { - message.fromAddress = ""; - } - if (object.toAddress !== undefined && object.toAddress !== null) { - message.toAddress = object.toAddress; - } - else { - message.toAddress = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - if (object.endTime !== undefined && object.endTime !== null) { - message.endTime = object.endTime; - } - else { - message.endTime = 0; - } - if (object.delayed !== undefined && object.delayed !== null) { - message.delayed = object.delayed; - } - else { - message.delayed = false; - } - return message; - }, -}; -const baseMsgCreateVestingAccountResponse = {}; -export const MsgCreateVestingAccountResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreateVestingAccountResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgCreateVestingAccountResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgCreateVestingAccountResponse, - }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - CreateVestingAccount(request) { - const data = MsgCreateVestingAccount.encode(request).finish(); - const promise = this.rpc.request("cosmos.vesting.v1beta1.Msg", "CreateVestingAccount", data); - return promise.then((data) => MsgCreateVestingAccountResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.ts deleted file mode 100644 index 85c2c5cd2e..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/tx.ts +++ /dev/null @@ -1,292 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.vesting.v1beta1"; - -/** - * MsgCreateVestingAccount defines a message that enables creating a vesting - * account. - */ -export interface MsgCreateVestingAccount { - from_address: string; - to_address: string; - amount: Coin[]; - end_time: number; - delayed: boolean; -} - -/** MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. */ -export interface MsgCreateVestingAccountResponse {} - -const baseMsgCreateVestingAccount: object = { - from_address: "", - to_address: "", - end_time: 0, - delayed: false, -}; - -export const MsgCreateVestingAccount = { - encode( - message: MsgCreateVestingAccount, - writer: Writer = Writer.create() - ): Writer { - if (message.from_address !== "") { - writer.uint32(10).string(message.from_address); - } - if (message.to_address !== "") { - writer.uint32(18).string(message.to_address); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.end_time !== 0) { - writer.uint32(32).int64(message.end_time); - } - if (message.delayed === true) { - writer.uint32(40).bool(message.delayed); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgCreateVestingAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreateVestingAccount, - } as MsgCreateVestingAccount; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.from_address = reader.string(); - break; - case 2: - message.to_address = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.end_time = longToNumber(reader.int64() as Long); - break; - case 5: - message.delayed = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgCreateVestingAccount { - const message = { - ...baseMsgCreateVestingAccount, - } as MsgCreateVestingAccount; - message.amount = []; - if (object.from_address !== undefined && object.from_address !== null) { - message.from_address = String(object.from_address); - } else { - message.from_address = ""; - } - if (object.to_address !== undefined && object.to_address !== null) { - message.to_address = String(object.to_address); - } else { - message.to_address = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - if (object.end_time !== undefined && object.end_time !== null) { - message.end_time = Number(object.end_time); - } else { - message.end_time = 0; - } - if (object.delayed !== undefined && object.delayed !== null) { - message.delayed = Boolean(object.delayed); - } else { - message.delayed = false; - } - return message; - }, - - toJSON(message: MsgCreateVestingAccount): unknown { - const obj: any = {}; - message.from_address !== undefined && - (obj.from_address = message.from_address); - message.to_address !== undefined && (obj.to_address = message.to_address); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.amount = []; - } - message.end_time !== undefined && (obj.end_time = message.end_time); - message.delayed !== undefined && (obj.delayed = message.delayed); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgCreateVestingAccount { - const message = { - ...baseMsgCreateVestingAccount, - } as MsgCreateVestingAccount; - message.amount = []; - if (object.from_address !== undefined && object.from_address !== null) { - message.from_address = object.from_address; - } else { - message.from_address = ""; - } - if (object.to_address !== undefined && object.to_address !== null) { - message.to_address = object.to_address; - } else { - message.to_address = ""; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - if (object.end_time !== undefined && object.end_time !== null) { - message.end_time = object.end_time; - } else { - message.end_time = 0; - } - if (object.delayed !== undefined && object.delayed !== null) { - message.delayed = object.delayed; - } else { - message.delayed = false; - } - return message; - }, -}; - -const baseMsgCreateVestingAccountResponse: object = {}; - -export const MsgCreateVestingAccountResponse = { - encode( - _: MsgCreateVestingAccountResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgCreateVestingAccountResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreateVestingAccountResponse, - } as MsgCreateVestingAccountResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgCreateVestingAccountResponse { - const message = { - ...baseMsgCreateVestingAccountResponse, - } as MsgCreateVestingAccountResponse; - return message; - }, - - toJSON(_: MsgCreateVestingAccountResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgCreateVestingAccountResponse { - const message = { - ...baseMsgCreateVestingAccountResponse, - } as MsgCreateVestingAccountResponse; - return message; - }, -}; - -/** Msg defines the bank Msg service. */ -export interface Msg { - /** - * CreateVestingAccount defines a method that enables creating a vesting - * account. - */ - CreateVestingAccount( - request: MsgCreateVestingAccount - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - CreateVestingAccount( - request: MsgCreateVestingAccount - ): Promise { - const data = MsgCreateVestingAccount.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.vesting.v1beta1.Msg", - "CreateVestingAccount", - data - ); - return promise.then((data) => - MsgCreateVestingAccountResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.d.ts deleted file mode 100644 index 09ab050543..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { BaseAccount } from "../../../cosmos/auth/v1beta1/auth"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmos.vesting.v1beta1"; -/** - * BaseVestingAccount implements the VestingAccount interface. It contains all - * the necessary fields needed for any vesting account implementation. - */ -export interface BaseVestingAccount { - baseAccount: BaseAccount | undefined; - originalVesting: Coin[]; - delegatedFree: Coin[]; - delegatedVesting: Coin[]; - endTime: number; -} -/** - * ContinuousVestingAccount implements the VestingAccount interface. It - * continuously vests by unlocking coins linearly with respect to time. - */ -export interface ContinuousVestingAccount { - baseVestingAccount: BaseVestingAccount | undefined; - startTime: number; -} -/** - * DelayedVestingAccount implements the VestingAccount interface. It vests all - * coins after a specific time, but non prior. In other words, it keeps them - * locked until a specified time. - */ -export interface DelayedVestingAccount { - baseVestingAccount: BaseVestingAccount | undefined; -} -/** Period defines a length of time and amount of coins that will vest. */ -export interface Period { - length: number; - amount: Coin[]; -} -/** - * PeriodicVestingAccount implements the VestingAccount interface. It - * periodically vests by unlocking coins during each specified period. - */ -export interface PeriodicVestingAccount { - baseVestingAccount: BaseVestingAccount | undefined; - startTime: number; - vestingPeriods: Period[]; -} -/** - * PermanentLockedAccount implements the VestingAccount interface. It does - * not ever release coins, locking them indefinitely. Coins in this account can - * still be used for delegating and for governance votes even while locked. - * - * Since: cosmos-sdk 0.43 - */ -export interface PermanentLockedAccount { - baseVestingAccount: BaseVestingAccount | undefined; -} -export declare const BaseVestingAccount: { - encode(message: BaseVestingAccount, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BaseVestingAccount; - fromJSON(object: any): BaseVestingAccount; - toJSON(message: BaseVestingAccount): unknown; - fromPartial(object: DeepPartial): BaseVestingAccount; -}; -export declare const ContinuousVestingAccount: { - encode(message: ContinuousVestingAccount, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ContinuousVestingAccount; - fromJSON(object: any): ContinuousVestingAccount; - toJSON(message: ContinuousVestingAccount): unknown; - fromPartial(object: DeepPartial): ContinuousVestingAccount; -}; -export declare const DelayedVestingAccount: { - encode(message: DelayedVestingAccount, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DelayedVestingAccount; - fromJSON(object: any): DelayedVestingAccount; - toJSON(message: DelayedVestingAccount): unknown; - fromPartial(object: DeepPartial): DelayedVestingAccount; -}; -export declare const Period: { - encode(message: Period, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Period; - fromJSON(object: any): Period; - toJSON(message: Period): unknown; - fromPartial(object: DeepPartial): Period; -}; -export declare const PeriodicVestingAccount: { - encode(message: PeriodicVestingAccount, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PeriodicVestingAccount; - fromJSON(object: any): PeriodicVestingAccount; - toJSON(message: PeriodicVestingAccount): unknown; - fromPartial(object: DeepPartial): PeriodicVestingAccount; -}; -export declare const PermanentLockedAccount: { - encode(message: PermanentLockedAccount, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PermanentLockedAccount; - fromJSON(object: any): PermanentLockedAccount; - toJSON(message: PermanentLockedAccount): unknown; - fromPartial(object: DeepPartial): PermanentLockedAccount; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.js deleted file mode 100644 index 448b0a5ff4..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.js +++ /dev/null @@ -1,548 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { BaseAccount } from "../../../cosmos/auth/v1beta1/auth"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export const protobufPackage = "cosmos.vesting.v1beta1"; -const baseBaseVestingAccount = { endTime: 0 }; -export const BaseVestingAccount = { - encode(message, writer = Writer.create()) { - if (message.baseAccount !== undefined) { - BaseAccount.encode(message.baseAccount, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.originalVesting) { - Coin.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.delegatedFree) { - Coin.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.delegatedVesting) { - Coin.encode(v, writer.uint32(34).fork()).ldelim(); - } - if (message.endTime !== 0) { - writer.uint32(40).int64(message.endTime); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBaseVestingAccount }; - message.originalVesting = []; - message.delegatedFree = []; - message.delegatedVesting = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseAccount = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.originalVesting.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.delegatedFree.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.delegatedVesting.push(Coin.decode(reader, reader.uint32())); - break; - case 5: - message.endTime = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBaseVestingAccount }; - message.originalVesting = []; - message.delegatedFree = []; - message.delegatedVesting = []; - if (object.baseAccount !== undefined && object.baseAccount !== null) { - message.baseAccount = BaseAccount.fromJSON(object.baseAccount); - } - else { - message.baseAccount = undefined; - } - if (object.originalVesting !== undefined && - object.originalVesting !== null) { - for (const e of object.originalVesting) { - message.originalVesting.push(Coin.fromJSON(e)); - } - } - if (object.delegatedFree !== undefined && object.delegatedFree !== null) { - for (const e of object.delegatedFree) { - message.delegatedFree.push(Coin.fromJSON(e)); - } - } - if (object.delegatedVesting !== undefined && - object.delegatedVesting !== null) { - for (const e of object.delegatedVesting) { - message.delegatedVesting.push(Coin.fromJSON(e)); - } - } - if (object.endTime !== undefined && object.endTime !== null) { - message.endTime = Number(object.endTime); - } - else { - message.endTime = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.baseAccount !== undefined && - (obj.baseAccount = message.baseAccount - ? BaseAccount.toJSON(message.baseAccount) - : undefined); - if (message.originalVesting) { - obj.originalVesting = message.originalVesting.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.originalVesting = []; - } - if (message.delegatedFree) { - obj.delegatedFree = message.delegatedFree.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.delegatedFree = []; - } - if (message.delegatedVesting) { - obj.delegatedVesting = message.delegatedVesting.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.delegatedVesting = []; - } - message.endTime !== undefined && (obj.endTime = message.endTime); - return obj; - }, - fromPartial(object) { - const message = { ...baseBaseVestingAccount }; - message.originalVesting = []; - message.delegatedFree = []; - message.delegatedVesting = []; - if (object.baseAccount !== undefined && object.baseAccount !== null) { - message.baseAccount = BaseAccount.fromPartial(object.baseAccount); - } - else { - message.baseAccount = undefined; - } - if (object.originalVesting !== undefined && - object.originalVesting !== null) { - for (const e of object.originalVesting) { - message.originalVesting.push(Coin.fromPartial(e)); - } - } - if (object.delegatedFree !== undefined && object.delegatedFree !== null) { - for (const e of object.delegatedFree) { - message.delegatedFree.push(Coin.fromPartial(e)); - } - } - if (object.delegatedVesting !== undefined && - object.delegatedVesting !== null) { - for (const e of object.delegatedVesting) { - message.delegatedVesting.push(Coin.fromPartial(e)); - } - } - if (object.endTime !== undefined && object.endTime !== null) { - message.endTime = object.endTime; - } - else { - message.endTime = 0; - } - return message; - }, -}; -const baseContinuousVestingAccount = { startTime: 0 }; -export const ContinuousVestingAccount = { - encode(message, writer = Writer.create()) { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); - } - if (message.startTime !== 0) { - writer.uint32(16).int64(message.startTime); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseContinuousVestingAccount, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - case 2: - message.startTime = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseContinuousVestingAccount, - }; - if (object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null) { - message.baseVestingAccount = BaseVestingAccount.fromJSON(object.baseVestingAccount); - } - else { - message.baseVestingAccount = undefined; - } - if (object.startTime !== undefined && object.startTime !== null) { - message.startTime = Number(object.startTime); - } - else { - message.startTime = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.baseVestingAccount !== undefined && - (obj.baseVestingAccount = message.baseVestingAccount - ? BaseVestingAccount.toJSON(message.baseVestingAccount) - : undefined); - message.startTime !== undefined && (obj.startTime = message.startTime); - return obj; - }, - fromPartial(object) { - const message = { - ...baseContinuousVestingAccount, - }; - if (object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null) { - message.baseVestingAccount = BaseVestingAccount.fromPartial(object.baseVestingAccount); - } - else { - message.baseVestingAccount = undefined; - } - if (object.startTime !== undefined && object.startTime !== null) { - message.startTime = object.startTime; - } - else { - message.startTime = 0; - } - return message; - }, -}; -const baseDelayedVestingAccount = {}; -export const DelayedVestingAccount = { - encode(message, writer = Writer.create()) { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelayedVestingAccount }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDelayedVestingAccount }; - if (object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null) { - message.baseVestingAccount = BaseVestingAccount.fromJSON(object.baseVestingAccount); - } - else { - message.baseVestingAccount = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.baseVestingAccount !== undefined && - (obj.baseVestingAccount = message.baseVestingAccount - ? BaseVestingAccount.toJSON(message.baseVestingAccount) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseDelayedVestingAccount }; - if (object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null) { - message.baseVestingAccount = BaseVestingAccount.fromPartial(object.baseVestingAccount); - } - else { - message.baseVestingAccount = undefined; - } - return message; - }, -}; -const basePeriod = { length: 0 }; -export const Period = { - encode(message, writer = Writer.create()) { - if (message.length !== 0) { - writer.uint32(8).int64(message.length); - } - for (const v of message.amount) { - Coin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePeriod }; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.length = longToNumber(reader.int64()); - break; - case 2: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePeriod }; - message.amount = []; - if (object.length !== undefined && object.length !== null) { - message.length = Number(object.length); - } - else { - message.length = 0; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.length !== undefined && (obj.length = message.length); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.amount = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...basePeriod }; - message.amount = []; - if (object.length !== undefined && object.length !== null) { - message.length = object.length; - } - else { - message.length = 0; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const basePeriodicVestingAccount = { startTime: 0 }; -export const PeriodicVestingAccount = { - encode(message, writer = Writer.create()) { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); - } - if (message.startTime !== 0) { - writer.uint32(16).int64(message.startTime); - } - for (const v of message.vestingPeriods) { - Period.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePeriodicVestingAccount }; - message.vestingPeriods = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - case 2: - message.startTime = longToNumber(reader.int64()); - break; - case 3: - message.vestingPeriods.push(Period.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePeriodicVestingAccount }; - message.vestingPeriods = []; - if (object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null) { - message.baseVestingAccount = BaseVestingAccount.fromJSON(object.baseVestingAccount); - } - else { - message.baseVestingAccount = undefined; - } - if (object.startTime !== undefined && object.startTime !== null) { - message.startTime = Number(object.startTime); - } - else { - message.startTime = 0; - } - if (object.vestingPeriods !== undefined && object.vestingPeriods !== null) { - for (const e of object.vestingPeriods) { - message.vestingPeriods.push(Period.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.baseVestingAccount !== undefined && - (obj.baseVestingAccount = message.baseVestingAccount - ? BaseVestingAccount.toJSON(message.baseVestingAccount) - : undefined); - message.startTime !== undefined && (obj.startTime = message.startTime); - if (message.vestingPeriods) { - obj.vestingPeriods = message.vestingPeriods.map((e) => e ? Period.toJSON(e) : undefined); - } - else { - obj.vestingPeriods = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...basePeriodicVestingAccount }; - message.vestingPeriods = []; - if (object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null) { - message.baseVestingAccount = BaseVestingAccount.fromPartial(object.baseVestingAccount); - } - else { - message.baseVestingAccount = undefined; - } - if (object.startTime !== undefined && object.startTime !== null) { - message.startTime = object.startTime; - } - else { - message.startTime = 0; - } - if (object.vestingPeriods !== undefined && object.vestingPeriods !== null) { - for (const e of object.vestingPeriods) { - message.vestingPeriods.push(Period.fromPartial(e)); - } - } - return message; - }, -}; -const basePermanentLockedAccount = {}; -export const PermanentLockedAccount = { - encode(message, writer = Writer.create()) { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePermanentLockedAccount }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePermanentLockedAccount }; - if (object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null) { - message.baseVestingAccount = BaseVestingAccount.fromJSON(object.baseVestingAccount); - } - else { - message.baseVestingAccount = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.baseVestingAccount !== undefined && - (obj.baseVestingAccount = message.baseVestingAccount - ? BaseVestingAccount.toJSON(message.baseVestingAccount) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...basePermanentLockedAccount }; - if (object.baseVestingAccount !== undefined && - object.baseVestingAccount !== null) { - message.baseVestingAccount = BaseVestingAccount.fromPartial(object.baseVestingAccount); - } - else { - message.baseVestingAccount = undefined; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.ts deleted file mode 100644 index 510336dcee..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos/vesting/v1beta1/vesting.ts +++ /dev/null @@ -1,738 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { BaseAccount } from "../../../cosmos/auth/v1beta1/auth"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "cosmos.vesting.v1beta1"; - -/** - * BaseVestingAccount implements the VestingAccount interface. It contains all - * the necessary fields needed for any vesting account implementation. - */ -export interface BaseVestingAccount { - base_account: BaseAccount | undefined; - original_vesting: Coin[]; - delegated_free: Coin[]; - delegated_vesting: Coin[]; - end_time: number; -} - -/** - * ContinuousVestingAccount implements the VestingAccount interface. It - * continuously vests by unlocking coins linearly with respect to time. - */ -export interface ContinuousVestingAccount { - base_vesting_account: BaseVestingAccount | undefined; - start_time: number; -} - -/** - * DelayedVestingAccount implements the VestingAccount interface. It vests all - * coins after a specific time, but non prior. In other words, it keeps them - * locked until a specified time. - */ -export interface DelayedVestingAccount { - base_vesting_account: BaseVestingAccount | undefined; -} - -/** Period defines a length of time and amount of coins that will vest. */ -export interface Period { - length: number; - amount: Coin[]; -} - -/** - * PeriodicVestingAccount implements the VestingAccount interface. It - * periodically vests by unlocking coins during each specified period. - */ -export interface PeriodicVestingAccount { - base_vesting_account: BaseVestingAccount | undefined; - start_time: number; - vesting_periods: Period[]; -} - -/** - * PermanentLockedAccount implements the VestingAccount interface. It does - * not ever release coins, locking them indefinitely. Coins in this account can - * still be used for delegating and for governance votes even while locked. - * - * Since: cosmos-sdk 0.43 - */ -export interface PermanentLockedAccount { - base_vesting_account: BaseVestingAccount | undefined; -} - -const baseBaseVestingAccount: object = { end_time: 0 }; - -export const BaseVestingAccount = { - encode( - message: BaseVestingAccount, - writer: Writer = Writer.create() - ): Writer { - if (message.base_account !== undefined) { - BaseAccount.encode( - message.base_account, - writer.uint32(10).fork() - ).ldelim(); - } - for (const v of message.original_vesting) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.delegated_free) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.delegated_vesting) { - Coin.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.end_time !== 0) { - writer.uint32(40).int64(message.end_time); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BaseVestingAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBaseVestingAccount } as BaseVestingAccount; - message.original_vesting = []; - message.delegated_free = []; - message.delegated_vesting = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.base_account = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.original_vesting.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.delegated_free.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.delegated_vesting.push(Coin.decode(reader, reader.uint32())); - break; - case 5: - message.end_time = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BaseVestingAccount { - const message = { ...baseBaseVestingAccount } as BaseVestingAccount; - message.original_vesting = []; - message.delegated_free = []; - message.delegated_vesting = []; - if (object.base_account !== undefined && object.base_account !== null) { - message.base_account = BaseAccount.fromJSON(object.base_account); - } else { - message.base_account = undefined; - } - if ( - object.original_vesting !== undefined && - object.original_vesting !== null - ) { - for (const e of object.original_vesting) { - message.original_vesting.push(Coin.fromJSON(e)); - } - } - if (object.delegated_free !== undefined && object.delegated_free !== null) { - for (const e of object.delegated_free) { - message.delegated_free.push(Coin.fromJSON(e)); - } - } - if ( - object.delegated_vesting !== undefined && - object.delegated_vesting !== null - ) { - for (const e of object.delegated_vesting) { - message.delegated_vesting.push(Coin.fromJSON(e)); - } - } - if (object.end_time !== undefined && object.end_time !== null) { - message.end_time = Number(object.end_time); - } else { - message.end_time = 0; - } - return message; - }, - - toJSON(message: BaseVestingAccount): unknown { - const obj: any = {}; - message.base_account !== undefined && - (obj.base_account = message.base_account - ? BaseAccount.toJSON(message.base_account) - : undefined); - if (message.original_vesting) { - obj.original_vesting = message.original_vesting.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.original_vesting = []; - } - if (message.delegated_free) { - obj.delegated_free = message.delegated_free.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.delegated_free = []; - } - if (message.delegated_vesting) { - obj.delegated_vesting = message.delegated_vesting.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.delegated_vesting = []; - } - message.end_time !== undefined && (obj.end_time = message.end_time); - return obj; - }, - - fromPartial(object: DeepPartial): BaseVestingAccount { - const message = { ...baseBaseVestingAccount } as BaseVestingAccount; - message.original_vesting = []; - message.delegated_free = []; - message.delegated_vesting = []; - if (object.base_account !== undefined && object.base_account !== null) { - message.base_account = BaseAccount.fromPartial(object.base_account); - } else { - message.base_account = undefined; - } - if ( - object.original_vesting !== undefined && - object.original_vesting !== null - ) { - for (const e of object.original_vesting) { - message.original_vesting.push(Coin.fromPartial(e)); - } - } - if (object.delegated_free !== undefined && object.delegated_free !== null) { - for (const e of object.delegated_free) { - message.delegated_free.push(Coin.fromPartial(e)); - } - } - if ( - object.delegated_vesting !== undefined && - object.delegated_vesting !== null - ) { - for (const e of object.delegated_vesting) { - message.delegated_vesting.push(Coin.fromPartial(e)); - } - } - if (object.end_time !== undefined && object.end_time !== null) { - message.end_time = object.end_time; - } else { - message.end_time = 0; - } - return message; - }, -}; - -const baseContinuousVestingAccount: object = { start_time: 0 }; - -export const ContinuousVestingAccount = { - encode( - message: ContinuousVestingAccount, - writer: Writer = Writer.create() - ): Writer { - if (message.base_vesting_account !== undefined) { - BaseVestingAccount.encode( - message.base_vesting_account, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.start_time !== 0) { - writer.uint32(16).int64(message.start_time); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ContinuousVestingAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseContinuousVestingAccount, - } as ContinuousVestingAccount; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.base_vesting_account = BaseVestingAccount.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.start_time = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ContinuousVestingAccount { - const message = { - ...baseContinuousVestingAccount, - } as ContinuousVestingAccount; - if ( - object.base_vesting_account !== undefined && - object.base_vesting_account !== null - ) { - message.base_vesting_account = BaseVestingAccount.fromJSON( - object.base_vesting_account - ); - } else { - message.base_vesting_account = undefined; - } - if (object.start_time !== undefined && object.start_time !== null) { - message.start_time = Number(object.start_time); - } else { - message.start_time = 0; - } - return message; - }, - - toJSON(message: ContinuousVestingAccount): unknown { - const obj: any = {}; - message.base_vesting_account !== undefined && - (obj.base_vesting_account = message.base_vesting_account - ? BaseVestingAccount.toJSON(message.base_vesting_account) - : undefined); - message.start_time !== undefined && (obj.start_time = message.start_time); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ContinuousVestingAccount { - const message = { - ...baseContinuousVestingAccount, - } as ContinuousVestingAccount; - if ( - object.base_vesting_account !== undefined && - object.base_vesting_account !== null - ) { - message.base_vesting_account = BaseVestingAccount.fromPartial( - object.base_vesting_account - ); - } else { - message.base_vesting_account = undefined; - } - if (object.start_time !== undefined && object.start_time !== null) { - message.start_time = object.start_time; - } else { - message.start_time = 0; - } - return message; - }, -}; - -const baseDelayedVestingAccount: object = {}; - -export const DelayedVestingAccount = { - encode( - message: DelayedVestingAccount, - writer: Writer = Writer.create() - ): Writer { - if (message.base_vesting_account !== undefined) { - BaseVestingAccount.encode( - message.base_vesting_account, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DelayedVestingAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDelayedVestingAccount } as DelayedVestingAccount; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.base_vesting_account = BaseVestingAccount.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DelayedVestingAccount { - const message = { ...baseDelayedVestingAccount } as DelayedVestingAccount; - if ( - object.base_vesting_account !== undefined && - object.base_vesting_account !== null - ) { - message.base_vesting_account = BaseVestingAccount.fromJSON( - object.base_vesting_account - ); - } else { - message.base_vesting_account = undefined; - } - return message; - }, - - toJSON(message: DelayedVestingAccount): unknown { - const obj: any = {}; - message.base_vesting_account !== undefined && - (obj.base_vesting_account = message.base_vesting_account - ? BaseVestingAccount.toJSON(message.base_vesting_account) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DelayedVestingAccount { - const message = { ...baseDelayedVestingAccount } as DelayedVestingAccount; - if ( - object.base_vesting_account !== undefined && - object.base_vesting_account !== null - ) { - message.base_vesting_account = BaseVestingAccount.fromPartial( - object.base_vesting_account - ); - } else { - message.base_vesting_account = undefined; - } - return message; - }, -}; - -const basePeriod: object = { length: 0 }; - -export const Period = { - encode(message: Period, writer: Writer = Writer.create()): Writer { - if (message.length !== 0) { - writer.uint32(8).int64(message.length); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Period { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePeriod } as Period; - message.amount = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.length = longToNumber(reader.int64() as Long); - break; - case 2: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Period { - const message = { ...basePeriod } as Period; - message.amount = []; - if (object.length !== undefined && object.length !== null) { - message.length = Number(object.length); - } else { - message.length = 0; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Period): unknown { - const obj: any = {}; - message.length !== undefined && (obj.length = message.length); - if (message.amount) { - obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.amount = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Period { - const message = { ...basePeriod } as Period; - message.amount = []; - if (object.length !== undefined && object.length !== null) { - message.length = object.length; - } else { - message.length = 0; - } - if (object.amount !== undefined && object.amount !== null) { - for (const e of object.amount) { - message.amount.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const basePeriodicVestingAccount: object = { start_time: 0 }; - -export const PeriodicVestingAccount = { - encode( - message: PeriodicVestingAccount, - writer: Writer = Writer.create() - ): Writer { - if (message.base_vesting_account !== undefined) { - BaseVestingAccount.encode( - message.base_vesting_account, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.start_time !== 0) { - writer.uint32(16).int64(message.start_time); - } - for (const v of message.vesting_periods) { - Period.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PeriodicVestingAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePeriodicVestingAccount } as PeriodicVestingAccount; - message.vesting_periods = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.base_vesting_account = BaseVestingAccount.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.start_time = longToNumber(reader.int64() as Long); - break; - case 3: - message.vesting_periods.push(Period.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PeriodicVestingAccount { - const message = { ...basePeriodicVestingAccount } as PeriodicVestingAccount; - message.vesting_periods = []; - if ( - object.base_vesting_account !== undefined && - object.base_vesting_account !== null - ) { - message.base_vesting_account = BaseVestingAccount.fromJSON( - object.base_vesting_account - ); - } else { - message.base_vesting_account = undefined; - } - if (object.start_time !== undefined && object.start_time !== null) { - message.start_time = Number(object.start_time); - } else { - message.start_time = 0; - } - if ( - object.vesting_periods !== undefined && - object.vesting_periods !== null - ) { - for (const e of object.vesting_periods) { - message.vesting_periods.push(Period.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: PeriodicVestingAccount): unknown { - const obj: any = {}; - message.base_vesting_account !== undefined && - (obj.base_vesting_account = message.base_vesting_account - ? BaseVestingAccount.toJSON(message.base_vesting_account) - : undefined); - message.start_time !== undefined && (obj.start_time = message.start_time); - if (message.vesting_periods) { - obj.vesting_periods = message.vesting_periods.map((e) => - e ? Period.toJSON(e) : undefined - ); - } else { - obj.vesting_periods = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): PeriodicVestingAccount { - const message = { ...basePeriodicVestingAccount } as PeriodicVestingAccount; - message.vesting_periods = []; - if ( - object.base_vesting_account !== undefined && - object.base_vesting_account !== null - ) { - message.base_vesting_account = BaseVestingAccount.fromPartial( - object.base_vesting_account - ); - } else { - message.base_vesting_account = undefined; - } - if (object.start_time !== undefined && object.start_time !== null) { - message.start_time = object.start_time; - } else { - message.start_time = 0; - } - if ( - object.vesting_periods !== undefined && - object.vesting_periods !== null - ) { - for (const e of object.vesting_periods) { - message.vesting_periods.push(Period.fromPartial(e)); - } - } - return message; - }, -}; - -const basePermanentLockedAccount: object = {}; - -export const PermanentLockedAccount = { - encode( - message: PermanentLockedAccount, - writer: Writer = Writer.create() - ): Writer { - if (message.base_vesting_account !== undefined) { - BaseVestingAccount.encode( - message.base_vesting_account, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PermanentLockedAccount { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePermanentLockedAccount } as PermanentLockedAccount; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.base_vesting_account = BaseVestingAccount.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PermanentLockedAccount { - const message = { ...basePermanentLockedAccount } as PermanentLockedAccount; - if ( - object.base_vesting_account !== undefined && - object.base_vesting_account !== null - ) { - message.base_vesting_account = BaseVestingAccount.fromJSON( - object.base_vesting_account - ); - } else { - message.base_vesting_account = undefined; - } - return message; - }, - - toJSON(message: PermanentLockedAccount): unknown { - const obj: any = {}; - message.base_vesting_account !== undefined && - (obj.base_vesting_account = message.base_vesting_account - ? BaseVestingAccount.toJSON(message.base_vesting_account) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): PermanentLockedAccount { - const message = { ...basePermanentLockedAccount } as PermanentLockedAccount; - if ( - object.base_vesting_account !== undefined && - object.base_vesting_account !== null - ) { - message.base_vesting_account = BaseVestingAccount.fromPartial( - object.base_vesting_account - ); - } else { - message.base_vesting_account = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.d.ts deleted file mode 100644 index ac37814871..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.js deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30bdc6..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index bb088caa2a..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809039..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.ts deleted file mode 100644 index 233eae465d..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - type_url: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { type_url: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.type_url !== "") { - writer.uint32(10).string(message.type_url); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = String(object.type_url); - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.type_url !== undefined && (obj.type_url = message.type_url); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = object.type_url; - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index a3076569af..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,1022 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 252725808b..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4144 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } - else { - message.proto3Optional = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } - else { - message.proto3Optional = false; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/package.json b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/package.json deleted file mode 100755 index 08ba70cff8..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "cosmos-vesting-v1beta1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module cosmos.vesting.v1beta1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/cosmos-sdk/x/auth/vesting/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/vuex-root b/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/index.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/index.d.ts deleted file mode 100644 index de2ce99db8..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { DenomTrace } from "./module/types/ibc/applications/transfer/v1/transfer"; -import { Params } from "./module/types/ibc/applications/transfer/v1/transfer"; -export { DenomTrace, Params }; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/index.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/index.js deleted file mode 100644 index bbe0de6838..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/index.js +++ /dev/null @@ -1,222 +0,0 @@ -import { txClient, queryClient, MissingWalletError, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { DenomTrace } from "./module/types/ibc/applications/transfer/v1/transfer"; -import { Params } from "./module/types/ibc/applications/transfer/v1/transfer"; -export { DenomTrace, Params }; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - DenomTrace: {}, - DenomTraces: {}, - Params: {}, - DenomHash: {}, - _Structure: { - DenomTrace: getStructure(DenomTrace.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - }, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getDenomTrace: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DenomTrace[JSON.stringify(params)] ?? {}; - }, - getDenomTraces: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DenomTraces[JSON.stringify(params)] ?? {}; - }, - getParams: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Params[JSON.stringify(params)] ?? {}; - }, - getDenomHash: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DenomHash[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: ibc.applications.transfer.v1 initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - async QueryDenomTrace({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDenomTrace(key.hash)).data; - commit('QUERY', { query: 'DenomTrace', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDenomTrace', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDenomTrace']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDenomTrace', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDenomTraces({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDenomTraces(query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryDenomTraces({ ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'DenomTraces', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDenomTraces', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDenomTraces']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDenomTraces', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryParams()).data; - commit('QUERY', { query: 'Params', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDenomHash({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDenomHash(key.trace)).data; - commit('QUERY', { query: 'DenomHash', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDenomHash', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDenomHash']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDenomHash', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async sendMsgTransfer({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgTransfer(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgTransfer:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgTransfer:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async MsgTransfer({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgTransfer(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgTransfer:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgTransfer:Create', 'Could not create message: ' + e.message); - } - } - }, - } -}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/index.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/index.ts deleted file mode 100755 index a16eabee6f..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/index.ts +++ /dev/null @@ -1,265 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { DenomTrace } from "./module/types/ibc/applications/transfer/v1/transfer" -import { Params } from "./module/types/ibc/applications/transfer/v1/transfer" - - -export { DenomTrace, Params }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - DenomTrace: {}, - DenomTraces: {}, - Params: {}, - DenomHash: {}, - - _Structure: { - DenomTrace: getStructure(DenomTrace.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getDenomTrace: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DenomTrace[JSON.stringify(params)] ?? {} - }, - getDenomTraces: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DenomTraces[JSON.stringify(params)] ?? {} - }, - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - getDenomHash: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DenomHash[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: ibc.applications.transfer.v1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new SpVuexError('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryDenomTrace({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDenomTrace( key.hash)).data - - - commit('QUERY', { query: 'DenomTrace', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDenomTrace', payload: { options: { all }, params: {...key},query }}) - return getters['getDenomTrace']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new SpVuexError('QueryClient:QueryDenomTrace', 'API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDenomTraces({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDenomTraces(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryDenomTraces({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'DenomTraces', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDenomTraces', payload: { options: { all }, params: {...key},query }}) - return getters['getDenomTraces']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new SpVuexError('QueryClient:QueryDenomTraces', 'API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams()).data - - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDenomHash({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDenomHash( key.trace)).data - - - commit('QUERY', { query: 'DenomHash', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDenomHash', payload: { options: { all }, params: {...key},query }}) - return getters['getDenomHash']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new SpVuexError('QueryClient:QueryDenomHash', 'API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - async sendMsgTransfer({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgTransfer(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgTransfer:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgTransfer:Send', 'Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgTransfer({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgTransfer(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgTransfer:Init', 'Could not initialize signing client. Wallet is required.') - }else{ - throw new SpVuexError('TxClient:MsgTransfer:Create', 'Could not create message: ' + e.message) - - } - } - }, - - } -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/index.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/index.d.ts deleted file mode 100644 index da4b56b84e..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgTransfer } from "./types/ibc/applications/transfer/v1/tx"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; - msgTransfer: (data: MsgTransfer) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/index.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/index.js deleted file mode 100644 index 0881a877fb..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/index.js +++ /dev/null @@ -1,34 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgTransfer } from "./types/ibc/applications/transfer/v1/tx"; -const types = [ - ["/ibc.applications.transfer.v1.MsgTransfer", MsgTransfer], -]; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - msgTransfer: (data) => ({ typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", value: MsgTransfer.fromPartial(data) }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/index.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/index.ts deleted file mode 100755 index 2415c023a0..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/index.ts +++ /dev/null @@ -1,60 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgTransfer } from "./types/ibc/applications/transfer/v1/tx"; - - -const types = [ - ["/ibc.applications.transfer.v1.MsgTransfer", MsgTransfer], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgTransfer: (data: MsgTransfer): EncodeObject => ({ typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", value: MsgTransfer.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/rest.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/rest.d.ts deleted file mode 100644 index 12af5ae1fd..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/rest.d.ts +++ /dev/null @@ -1,365 +0,0 @@ -/** -* Params defines the set of IBC transfer parameters. -NOTE: To prevent a single token from being transferred, set the -TransfersEnabled parameter to true and then set the bank module's SendEnabled -parameter for the denomination to false. -*/ -export interface Applicationstransferv1Params { - /** - * send_enabled enables or disables all cross-chain token transfers from this - * chain. - */ - sendEnabled?: boolean; - /** - * receive_enabled enables or disables all cross-chain token transfers to this - * chain. - */ - receiveEnabled?: boolean; -} -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* DenomTrace contains the base denomination for ICS20 fungible tokens and the -source tracing information path. -*/ -export interface V1DenomTrace { - /** - * path defines the chain of port/channel identifiers used for tracing the - * source of the fungible token. - */ - path?: string; - /** base denomination of the relayed fungible token. */ - baseDenom?: string; -} -/** -* 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 -*/ -export interface V1Height { - /** @format uint64 */ - revisionNumber?: string; - /** @format uint64 */ - revisionHeight?: string; -} -/** - * MsgTransferResponse defines the Msg/Transfer response type. - */ -export declare type V1MsgTransferResponse = object; -/** -* QueryDenomHashResponse is the response type for the Query/DenomHash RPC -method. -*/ -export interface V1QueryDenomHashResponse { - /** hash (in hex format) of the denomination trace information. */ - hash?: string; -} -/** -* QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC -method. -*/ -export interface V1QueryDenomTraceResponse { - /** denom_trace returns the requested denomination trace information. */ - denomTrace?: V1DenomTrace; -} -/** -* QueryConnectionsResponse is the response type for the Query/DenomTraces RPC -method. -*/ -export interface V1QueryDenomTracesResponse { - /** denom_traces returns all denominations trace information. */ - denomTraces?: V1DenomTrace[]; - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1QueryParamsResponse { - /** params defines the parameters of the module. */ - params?: Applicationstransferv1Params; -} -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - /** - * 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. - * @format uint64 - */ - offset?: string; - /** - * 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. - * @format uint64 - */ - limit?: string; - /** - * 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. - */ - countTotal?: boolean; -} -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title ibc/applications/transfer/v1/genesis.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryDenomHash - * @summary DenomHash queries a denomination hash information. - * @request GET:/ibc/apps/transfer/v1/denom_hashes/{trace} - */ - queryDenomHash: (trace: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDenomTraces - * @summary DenomTraces queries all denomination traces. - * @request GET:/ibc/apps/transfer/v1/denom_traces - */ - queryDenomTraces: (query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDenomTrace - * @summary DenomTrace queries a denomination trace information. - * @request GET:/ibc/apps/transfer/v1/denom_traces/{hash} - */ - queryDenomTrace: (hash: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters of the ibc-transfer module. - * @request GET:/ibc/apps/transfer/v1/params - */ - queryParams: (params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/rest.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/rest.js deleted file mode 100644 index 0f7d80d650..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/rest.js +++ /dev/null @@ -1,197 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title ibc/applications/transfer/v1/genesis.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryDenomHash - * @summary DenomHash queries a denomination hash information. - * @request GET:/ibc/apps/transfer/v1/denom_hashes/{trace} - */ - this.queryDenomHash = (trace, params = {}) => this.request({ - path: `/ibc/apps/transfer/v1/denom_hashes/${trace}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDenomTraces - * @summary DenomTraces queries all denomination traces. - * @request GET:/ibc/apps/transfer/v1/denom_traces - */ - this.queryDenomTraces = (query, params = {}) => this.request({ - path: `/ibc/apps/transfer/v1/denom_traces`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDenomTrace - * @summary DenomTrace queries a denomination trace information. - * @request GET:/ibc/apps/transfer/v1/denom_traces/{hash} - */ - this.queryDenomTrace = (hash, params = {}) => this.request({ - path: `/ibc/apps/transfer/v1/denom_traces/${hash}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters of the ibc-transfer module. - * @request GET:/ibc/apps/transfer/v1/params - */ - this.queryParams = (params = {}) => this.request({ - path: `/ibc/apps/transfer/v1/params`, - method: "GET", - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/rest.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/rest.ts deleted file mode 100644 index e53bb610f3..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/rest.ts +++ /dev/null @@ -1,565 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* Params defines the set of IBC transfer parameters. -NOTE: To prevent a single token from being transferred, set the -TransfersEnabled parameter to true and then set the bank module's SendEnabled -parameter for the denomination to false. -*/ -export interface Applicationstransferv1Params { - /** - * send_enabled enables or disables all cross-chain token transfers from this - * chain. - */ - sendEnabled?: boolean; - - /** - * receive_enabled enables or disables all cross-chain token transfers to this - * chain. - */ - receiveEnabled?: boolean; -} - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* DenomTrace contains the base denomination for ICS20 fungible tokens and the -source tracing information path. -*/ -export interface V1DenomTrace { - /** - * path defines the chain of port/channel identifiers used for tracing the - * source of the fungible token. - */ - path?: string; - - /** base denomination of the relayed fungible token. */ - baseDenom?: string; -} - -/** -* 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 -*/ -export interface V1Height { - /** @format uint64 */ - revisionNumber?: string; - - /** @format uint64 */ - revisionHeight?: string; -} - -/** - * MsgTransferResponse defines the Msg/Transfer response type. - */ -export type V1MsgTransferResponse = object; - -/** -* QueryDenomHashResponse is the response type for the Query/DenomHash RPC -method. -*/ -export interface V1QueryDenomHashResponse { - /** hash (in hex format) of the denomination trace information. */ - hash?: string; -} - -/** -* QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC -method. -*/ -export interface V1QueryDenomTraceResponse { - /** denom_trace returns the requested denomination trace information. */ - denomTrace?: V1DenomTrace; -} - -/** -* QueryConnectionsResponse is the response type for the Query/DenomTraces RPC -method. -*/ -export interface V1QueryDenomTracesResponse { - /** denom_traces returns all denominations trace information. */ - denomTraces?: V1DenomTrace[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1QueryParamsResponse { - /** params defines the parameters of the module. */ - params?: Applicationstransferv1Params; -} - -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - countTotal?: boolean; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - - /** @format uint64 */ - total?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title ibc/applications/transfer/v1/genesis.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryDenomHash - * @summary DenomHash queries a denomination hash information. - * @request GET:/ibc/apps/transfer/v1/denom_hashes/{trace} - */ - queryDenomHash = (trace: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/apps/transfer/v1/denom_hashes/${trace}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDenomTraces - * @summary DenomTraces queries all denomination traces. - * @request GET:/ibc/apps/transfer/v1/denom_traces - */ - queryDenomTraces = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/apps/transfer/v1/denom_traces`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDenomTrace - * @summary DenomTrace queries a denomination trace information. - * @request GET:/ibc/apps/transfer/v1/denom_traces/{hash} - */ - queryDenomTrace = (hash: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/apps/transfer/v1/denom_traces/${hash}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters of the ibc-transfer module. - * @request GET:/ibc/apps/transfer/v1/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/ibc/apps/transfer/v1/params`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index f6c4155704..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - countTotal: boolean; -} -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index 2743268e8e..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,218 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { offset: 0, limit: 0, countTotal: false }; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index ab8644817b..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - countTotal: boolean; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, countTotal: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } else { - message.countTotal = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } else { - message.countTotal = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes( - message.nextKey !== undefined ? message.nextKey : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac6a3..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb30cd..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98406..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.d.ts deleted file mode 100644 index 6fc4b4ba92..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.upgrade.v1beta1"; -/** Plan specifies information about a planned upgrade and when it should occur. */ -export interface Plan { - /** - * 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. - */ - name: string; - /** - * The time after which the upgrade must be performed. - * Leave set to its zero value to use a pre-defined Height instead. - */ - time: Date | undefined; - /** - * The height at which the upgrade must be performed. - * Only used if Time is not set. - */ - height: number; - /** - * Any application specific upgrade info to be included on-chain - * such as a git commit that validators could automatically upgrade to - */ - info: string; -} -/** - * SoftwareUpgradeProposal is a gov Content type for initiating a software - * upgrade. - */ -export interface SoftwareUpgradeProposal { - title: string; - description: string; - plan: Plan | undefined; -} -/** - * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software - * upgrade. - */ -export interface CancelSoftwareUpgradeProposal { - title: string; - description: string; -} -export declare const Plan: { - encode(message: Plan, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Plan; - fromJSON(object: any): Plan; - toJSON(message: Plan): unknown; - fromPartial(object: DeepPartial): Plan; -}; -export declare const SoftwareUpgradeProposal: { - encode(message: SoftwareUpgradeProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SoftwareUpgradeProposal; - fromJSON(object: any): SoftwareUpgradeProposal; - toJSON(message: SoftwareUpgradeProposal): unknown; - fromPartial(object: DeepPartial): SoftwareUpgradeProposal; -}; -export declare const CancelSoftwareUpgradeProposal: { - encode(message: CancelSoftwareUpgradeProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CancelSoftwareUpgradeProposal; - fromJSON(object: any): CancelSoftwareUpgradeProposal; - toJSON(message: CancelSoftwareUpgradeProposal): unknown; - fromPartial(object: DeepPartial): CancelSoftwareUpgradeProposal; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.js deleted file mode 100644 index d4e28cd6a1..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.js +++ /dev/null @@ -1,334 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.upgrade.v1beta1"; -const basePlan = { name: "", height: 0, info: "" }; -export const Plan = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(18).fork()).ldelim(); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePlan }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.height = longToNumber(reader.int64()); - break; - case 4: - message.info = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePlan }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } - else { - message.time = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } - else { - message.info = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.height !== undefined && (obj.height = message.height); - message.info !== undefined && (obj.info = message.info); - return obj; - }, - fromPartial(object) { - const message = { ...basePlan }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } - else { - message.time = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } - else { - message.info = ""; - } - return message; - }, -}; -const baseSoftwareUpgradeProposal = { title: "", description: "" }; -export const SoftwareUpgradeProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSoftwareUpgradeProposal, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSoftwareUpgradeProposal, - }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromJSON(object.plan); - } - else { - message.plan = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.plan !== undefined && - (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseSoftwareUpgradeProposal, - }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromPartial(object.plan); - } - else { - message.plan = undefined; - } - return message; - }, -}; -const baseCancelSoftwareUpgradeProposal = { - title: "", - description: "", -}; -export const CancelSoftwareUpgradeProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCancelSoftwareUpgradeProposal, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseCancelSoftwareUpgradeProposal, - }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - return obj; - }, - fromPartial(object) { - const message = { - ...baseCancelSoftwareUpgradeProposal, - }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function toTimestamp(date) { - const seconds = date.getTime() / 1000; - const nanos = (date.getTime() % 1000) * 1000000; - return { seconds, nanos }; -} -function fromTimestamp(t) { - let millis = t.seconds * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts deleted file mode 100644 index e9cefea25a..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts +++ /dev/null @@ -1,414 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.upgrade.v1beta1"; - -/** Plan specifies information about a planned upgrade and when it should occur. */ -export interface Plan { - /** - * 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. - */ - name: string; - /** - * The time after which the upgrade must be performed. - * Leave set to its zero value to use a pre-defined Height instead. - */ - time: Date | undefined; - /** - * The height at which the upgrade must be performed. - * Only used if Time is not set. - */ - height: number; - /** - * Any application specific upgrade info to be included on-chain - * such as a git commit that validators could automatically upgrade to - */ - info: string; -} - -/** - * SoftwareUpgradeProposal is a gov Content type for initiating a software - * upgrade. - */ -export interface SoftwareUpgradeProposal { - title: string; - description: string; - plan: Plan | undefined; -} - -/** - * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software - * upgrade. - */ -export interface CancelSoftwareUpgradeProposal { - title: string; - description: string; -} - -const basePlan: object = { name: "", height: 0, info: "" }; - -export const Plan = { - encode(message: Plan, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Plan { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePlan } as Plan; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.info = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Plan { - const message = { ...basePlan } as Plan; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - return message; - }, - - toJSON(message: Plan): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.height !== undefined && (obj.height = message.height); - message.info !== undefined && (obj.info = message.info); - return obj; - }, - - fromPartial(object: DeepPartial): Plan { - const message = { ...basePlan } as Plan; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - return message; - }, -}; - -const baseSoftwareUpgradeProposal: object = { title: "", description: "" }; - -export const SoftwareUpgradeProposal = { - encode( - message: SoftwareUpgradeProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SoftwareUpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SoftwareUpgradeProposal { - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromJSON(object.plan); - } else { - message.plan = undefined; - } - return message; - }, - - toJSON(message: SoftwareUpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.plan !== undefined && - (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): SoftwareUpgradeProposal { - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromPartial(object.plan); - } else { - message.plan = undefined; - } - return message; - }, -}; - -const baseCancelSoftwareUpgradeProposal: object = { - title: "", - description: "", -}; - -export const CancelSoftwareUpgradeProposal = { - encode( - message: CancelSoftwareUpgradeProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): CancelSoftwareUpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CancelSoftwareUpgradeProposal { - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - return message; - }, - - toJSON(message: CancelSoftwareUpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - return obj; - }, - - fromPartial( - object: DeepPartial - ): CancelSoftwareUpgradeProposal { - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30bdc6..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/gogoproto/gogo.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/annotations.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0776..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/annotations.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/annotations.js deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/annotations.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/http.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7fb6d..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/http.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/http.js deleted file mode 100644 index eb14b5b699..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/http.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/http.ts deleted file mode 100644 index ddc00f8b42..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/http.ts +++ /dev/null @@ -1,705 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fullyDecodeReservedExpansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = Boolean( - object.fullyDecodeReservedExpansion - ); - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null - ) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", responseBody: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additionalBindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } else { - message.responseBody = ""; - } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/any.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/any.d.ts deleted file mode 100644 index bb088caa2a..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/any.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export declare const Any: { - encode(message: Any, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Any; - fromJSON(object: any): Any; - toJSON(message: Any): unknown; - fromPartial(object: DeepPartial): Any; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/any.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/any.js deleted file mode 100644 index e86d809039..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/any.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseAny = { typeUrl: "" }; -export const Any = { - encode(message, writer = Writer.create()) { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = { ...baseAny }; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } - else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/any.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/any.ts deleted file mode 100644 index b137a629ea..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { typeUrl: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = String(object.typeUrl); - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.typeUrl !== undefined && object.typeUrl !== null) { - message.typeUrl = object.typeUrl; - } else { - message.typeUrl = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index a3076569af..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,1022 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 252725808b..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4144 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } - else { - message.proto3Optional = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } - else { - message.proto3Optional = false; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index 9e508660d1..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5261 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); - } else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reservedName: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } else { - message.proto3Optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } else { - message.proto3Optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } else { - obj.reservedName = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = Boolean(object.clientStreaming); - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = Boolean(object.serverStreaming); - } else { - message.serverStreaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { - message.clientStreaming = object.clientStreaming; - } else { - message.clientStreaming = false; - } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { - message.serverStreaming = object.serverStreaming; - } else { - message.serverStreaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32() as any; - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = String(object.javaOuterClassname); - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = String(object.objcClassPrefix); - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = String(object.csharpNamespace); - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } else { - message.javaPackage = ""; - } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { - message.javaOuterClassname = object.javaOuterClassname; - } else { - message.javaOuterClassname = ""; - } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { - message.javaMultipleFiles = object.javaMultipleFiles; - } else { - message.javaMultipleFiles = false; - } - if ( - object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null - ) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } else { - message.javaGenerateEqualsAndHash = false; - } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } else { - message.goPackage = ""; - } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { - message.ccGenericServices = object.ccGenericServices; - } else { - message.ccGenericServices = false; - } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { - message.javaGenericServices = object.javaGenericServices; - } else { - message.javaGenericServices = false; - } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { - message.pyGenericServices = object.pyGenericServices; - } else { - message.pyGenericServices = false; - } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { - message.phpGenericServices = object.phpGenericServices; - } else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } else { - message.ccEnableArenas = false; - } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { - message.objcClassPrefix = object.objcClassPrefix; - } else { - message.objcClassPrefix = ""; - } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { - message.csharpNamespace = object.csharpNamespace; - } else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } else { - message.phpNamespace = ""; - } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } else { - message.rubyPackage = ""; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { - message.messageSetWireFormat = object.messageSetWireFormat; - } else { - message.messageSetWireFormat = false; - } - if ( - object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null - ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } else { - message.mapEntry = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allowAlias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32() as any; - break; - case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = object.idempotencyLevel; - } else { - message.idempotencyLevel = 0; - } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64() as Long); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = String(object.identifierValue); - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = Number(object.positiveIntValue); - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = Number(object.negativeIntValue); - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } else { - message.aggregateValue = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { - message.identifierValue = object.identifierValue; - } else { - message.identifierValue = ""; - } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { - message.positiveIntValue = object.positiveIntValue; - } else { - message.positiveIntValue = 0; - } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { - message.negativeIntValue = object.negativeIntValue; - } else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } else { - message.aggregateValue = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - namePart: "", - isExtension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } else { - message.isExtension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } else { - message.isExtension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = String(object.leadingComments); - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = String(object.trailingComments); - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { - message.leadingComments = object.leadingComments; - } else { - message.leadingComments = ""; - } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { - message.trailingComments = object.trailingComments; - } else { - message.trailingComments = ""; - } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.d.ts deleted file mode 100644 index 0c9db0bc0d..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} -export declare const Timestamp: { - encode(message: Timestamp, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Timestamp; - fromJSON(object: any): Timestamp; - toJSON(message: Timestamp): unknown; - fromPartial(object: DeepPartial): Timestamp; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.js deleted file mode 100644 index 37b4119aef..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -const baseTimestamp = { seconds: 0, nanos: 0 }; -export const Timestamp = { - encode(message, writer = Writer.create()) { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64()); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } - else { - message.nanos = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - fromPartial(object) { - const message = { ...baseTimestamp }; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } - else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } - else { - message.nanos = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 11864afc86..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.d.ts deleted file mode 100644 index 9b40397c00..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { DenomTrace, Params } from "../../../../ibc/applications/transfer/v1/transfer"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "ibc.applications.transfer.v1"; -/** GenesisState defines the ibc-transfer genesis state */ -export interface GenesisState { - portId: string; - denomTraces: DenomTrace[]; - params: Params | undefined; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.js deleted file mode 100644 index 3ca5eccec5..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.js +++ /dev/null @@ -1,100 +0,0 @@ -/* eslint-disable */ -import { DenomTrace, Params, } from "../../../../ibc/applications/transfer/v1/transfer"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "ibc.applications.transfer.v1"; -const baseGenesisState = { portId: "" }; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - for (const v of message.denomTraces) { - DenomTrace.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.denomTraces = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.denomTraces.push(DenomTrace.decode(reader, reader.uint32())); - break; - case 3: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.denomTraces = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } - else { - message.portId = ""; - } - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromJSON(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.portId !== undefined && (obj.portId = message.portId); - if (message.denomTraces) { - obj.denomTraces = message.denomTraces.map((e) => e ? DenomTrace.toJSON(e) : undefined); - } - else { - obj.denomTraces = []; - } - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.denomTraces = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } - else { - message.portId = ""; - } - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromPartial(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.ts deleted file mode 100644 index 6fdd36c3eb..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* eslint-disable */ -import { - DenomTrace, - Params, -} from "../../../../ibc/applications/transfer/v1/transfer"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "ibc.applications.transfer.v1"; - -/** GenesisState defines the ibc-transfer genesis state */ -export interface GenesisState { - portId: string; - denomTraces: DenomTrace[]; - params: Params | undefined; -} - -const baseGenesisState: object = { portId: "" }; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - for (const v of message.denomTraces) { - DenomTrace.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.denomTraces = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.denomTraces.push(DenomTrace.decode(reader, reader.uint32())); - break; - case 3: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.denomTraces = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = String(object.portId); - } else { - message.portId = ""; - } - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromJSON(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - if (message.denomTraces) { - obj.denomTraces = message.denomTraces.map((e) => - e ? DenomTrace.toJSON(e) : undefined - ); - } else { - obj.denomTraces = []; - } - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.denomTraces = []; - if (object.portId !== undefined && object.portId !== null) { - message.portId = object.portId; - } else { - message.portId = ""; - } - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromPartial(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.d.ts deleted file mode 100644 index 2e414196ce..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.d.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { DenomTrace, Params } from "../../../../ibc/applications/transfer/v1/transfer"; -import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; -export declare const protobufPackage = "ibc.applications.transfer.v1"; -/** - * QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC - * method - */ -export interface QueryDenomTraceRequest { - /** hash (in hex format) of the denomination trace information. */ - hash: string; -} -/** - * QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC - * method. - */ -export interface QueryDenomTraceResponse { - /** denom_trace returns the requested denomination trace information. */ - denomTrace: DenomTrace | undefined; -} -/** - * QueryConnectionsRequest is the request type for the Query/DenomTraces RPC - * method - */ -export interface QueryDenomTracesRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -/** - * QueryConnectionsResponse is the response type for the Query/DenomTraces RPC - * method. - */ -export interface QueryDenomTracesResponse { - /** denom_traces returns all denominations trace information. */ - denomTraces: DenomTrace[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -/** - * QueryDenomHashRequest is the request type for the Query/DenomHash RPC - * method - */ -export interface QueryDenomHashRequest { - /** The denomination trace ([port_id]/[channel_id])+/[denom] */ - trace: string; -} -/** - * QueryDenomHashResponse is the response type for the Query/DenomHash RPC - * method. - */ -export interface QueryDenomHashResponse { - /** hash (in hex format) of the denomination trace information. */ - hash: string; -} -export declare const QueryDenomTraceRequest: { - encode(message: QueryDenomTraceRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomTraceRequest; - fromJSON(object: any): QueryDenomTraceRequest; - toJSON(message: QueryDenomTraceRequest): unknown; - fromPartial(object: DeepPartial): QueryDenomTraceRequest; -}; -export declare const QueryDenomTraceResponse: { - encode(message: QueryDenomTraceResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomTraceResponse; - fromJSON(object: any): QueryDenomTraceResponse; - toJSON(message: QueryDenomTraceResponse): unknown; - fromPartial(object: DeepPartial): QueryDenomTraceResponse; -}; -export declare const QueryDenomTracesRequest: { - encode(message: QueryDenomTracesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomTracesRequest; - fromJSON(object: any): QueryDenomTracesRequest; - toJSON(message: QueryDenomTracesRequest): unknown; - fromPartial(object: DeepPartial): QueryDenomTracesRequest; -}; -export declare const QueryDenomTracesResponse: { - encode(message: QueryDenomTracesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomTracesResponse; - fromJSON(object: any): QueryDenomTracesResponse; - toJSON(message: QueryDenomTracesResponse): unknown; - fromPartial(object: DeepPartial): QueryDenomTracesResponse; -}; -export declare const QueryParamsRequest: { - encode(_: QueryParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest; - fromJSON(_: any): QueryParamsRequest; - toJSON(_: QueryParamsRequest): unknown; - fromPartial(_: DeepPartial): QueryParamsRequest; -}; -export declare const QueryParamsResponse: { - encode(message: QueryParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse; - fromJSON(object: any): QueryParamsResponse; - toJSON(message: QueryParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryParamsResponse; -}; -export declare const QueryDenomHashRequest: { - encode(message: QueryDenomHashRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomHashRequest; - fromJSON(object: any): QueryDenomHashRequest; - toJSON(message: QueryDenomHashRequest): unknown; - fromPartial(object: DeepPartial): QueryDenomHashRequest; -}; -export declare const QueryDenomHashResponse: { - encode(message: QueryDenomHashResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomHashResponse; - fromJSON(object: any): QueryDenomHashResponse; - toJSON(message: QueryDenomHashResponse): unknown; - fromPartial(object: DeepPartial): QueryDenomHashResponse; -}; -/** Query provides defines the gRPC querier service. */ -export interface Query { - /** DenomTrace queries a denomination trace information. */ - DenomTrace(request: QueryDenomTraceRequest): Promise; - /** DenomTraces queries all denomination traces. */ - DenomTraces(request: QueryDenomTracesRequest): Promise; - /** Params queries all parameters of the ibc-transfer module. */ - Params(request: QueryParamsRequest): Promise; - /** DenomHash queries a denomination hash information. */ - DenomHash(request: QueryDenomHashRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - DenomTrace(request: QueryDenomTraceRequest): Promise; - DenomTraces(request: QueryDenomTracesRequest): Promise; - Params(request: QueryParamsRequest): Promise; - DenomHash(request: QueryDenomHashRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.js deleted file mode 100644 index fa2ceccccf..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.js +++ /dev/null @@ -1,472 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { DenomTrace, Params, } from "../../../../ibc/applications/transfer/v1/transfer"; -import { PageRequest, PageResponse, } from "../../../../cosmos/base/query/v1beta1/pagination"; -export const protobufPackage = "ibc.applications.transfer.v1"; -const baseQueryDenomTraceRequest = { hash: "" }; -export const QueryDenomTraceRequest = { - encode(message, writer = Writer.create()) { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDenomTraceRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryDenomTraceRequest }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = String(object.hash); - } - else { - message.hash = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && (obj.hash = message.hash); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryDenomTraceRequest }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = ""; - } - return message; - }, -}; -const baseQueryDenomTraceResponse = {}; -export const QueryDenomTraceResponse = { - encode(message, writer = Writer.create()) { - if (message.denomTrace !== undefined) { - DenomTrace.encode(message.denomTrace, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomTraceResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denomTrace = DenomTrace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomTraceResponse, - }; - if (object.denomTrace !== undefined && object.denomTrace !== null) { - message.denomTrace = DenomTrace.fromJSON(object.denomTrace); - } - else { - message.denomTrace = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denomTrace !== undefined && - (obj.denomTrace = message.denomTrace - ? DenomTrace.toJSON(message.denomTrace) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomTraceResponse, - }; - if (object.denomTrace !== undefined && object.denomTrace !== null) { - message.denomTrace = DenomTrace.fromPartial(object.denomTrace); - } - else { - message.denomTrace = undefined; - } - return message; - }, -}; -const baseQueryDenomTracesRequest = {}; -export const QueryDenomTracesRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomTracesRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomTracesRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomTracesRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryDenomTracesResponse = {}; -export const QueryDenomTracesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.denomTraces) { - DenomTrace.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomTracesResponse, - }; - message.denomTraces = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denomTraces.push(DenomTrace.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomTracesResponse, - }; - message.denomTraces = []; - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.denomTraces) { - obj.denomTraces = message.denomTraces.map((e) => e ? DenomTrace.toJSON(e) : undefined); - } - else { - obj.denomTraces = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomTracesResponse, - }; - message.denomTraces = []; - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryParamsRequest = {}; -export const QueryParamsRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, -}; -const baseQueryParamsResponse = {}; -export const QueryParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; -const baseQueryDenomHashRequest = { trace: "" }; -export const QueryDenomHashRequest = { - encode(message, writer = Writer.create()) { - if (message.trace !== "") { - writer.uint32(10).string(message.trace); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDenomHashRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.trace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryDenomHashRequest }; - if (object.trace !== undefined && object.trace !== null) { - message.trace = String(object.trace); - } - else { - message.trace = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.trace !== undefined && (obj.trace = message.trace); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryDenomHashRequest }; - if (object.trace !== undefined && object.trace !== null) { - message.trace = object.trace; - } - else { - message.trace = ""; - } - return message; - }, -}; -const baseQueryDenomHashResponse = { hash: "" }; -export const QueryDenomHashResponse = { - encode(message, writer = Writer.create()) { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDenomHashResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryDenomHashResponse }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = String(object.hash); - } - else { - message.hash = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && (obj.hash = message.hash); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryDenomHashResponse }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = ""; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - DenomTrace(request) { - const data = QueryDenomTraceRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "DenomTrace", data); - return promise.then((data) => QueryDenomTraceResponse.decode(new Reader(data))); - } - DenomTraces(request) { - const data = QueryDenomTracesRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "DenomTraces", data); - return promise.then((data) => QueryDenomTracesResponse.decode(new Reader(data))); - } - Params(request) { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - DenomHash(request) { - const data = QueryDenomHashRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "DenomHash", data); - return promise.then((data) => QueryDenomHashResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.ts deleted file mode 100644 index 52180aa9b8..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.ts +++ /dev/null @@ -1,682 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { - DenomTrace, - Params, -} from "../../../../ibc/applications/transfer/v1/transfer"; -import { - PageRequest, - PageResponse, -} from "../../../../cosmos/base/query/v1beta1/pagination"; - -export const protobufPackage = "ibc.applications.transfer.v1"; - -/** - * QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC - * method - */ -export interface QueryDenomTraceRequest { - /** hash (in hex format) of the denomination trace information. */ - hash: string; -} - -/** - * QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC - * method. - */ -export interface QueryDenomTraceResponse { - /** denom_trace returns the requested denomination trace information. */ - denomTrace: DenomTrace | undefined; -} - -/** - * QueryConnectionsRequest is the request type for the Query/DenomTraces RPC - * method - */ -export interface QueryDenomTracesRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryConnectionsResponse is the response type for the Query/DenomTraces RPC - * method. - */ -export interface QueryDenomTracesResponse { - /** denom_traces returns all denominations trace information. */ - denomTraces: DenomTrace[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} - -/** - * QueryDenomHashRequest is the request type for the Query/DenomHash RPC - * method - */ -export interface QueryDenomHashRequest { - /** The denomination trace ([port_id]/[channel_id])+/[denom] */ - trace: string; -} - -/** - * QueryDenomHashResponse is the response type for the Query/DenomHash RPC - * method. - */ -export interface QueryDenomHashResponse { - /** hash (in hex format) of the denomination trace information. */ - hash: string; -} - -const baseQueryDenomTraceRequest: object = { hash: "" }; - -export const QueryDenomTraceRequest = { - encode( - message: QueryDenomTraceRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDenomTraceRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDenomTraceRequest } as QueryDenomTraceRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomTraceRequest { - const message = { ...baseQueryDenomTraceRequest } as QueryDenomTraceRequest; - if (object.hash !== undefined && object.hash !== null) { - message.hash = String(object.hash); - } else { - message.hash = ""; - } - return message; - }, - - toJSON(message: QueryDenomTraceRequest): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = message.hash); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomTraceRequest { - const message = { ...baseQueryDenomTraceRequest } as QueryDenomTraceRequest; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = ""; - } - return message; - }, -}; - -const baseQueryDenomTraceResponse: object = {}; - -export const QueryDenomTraceResponse = { - encode( - message: QueryDenomTraceResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.denomTrace !== undefined) { - DenomTrace.encode(message.denomTrace, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDenomTraceResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomTraceResponse, - } as QueryDenomTraceResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denomTrace = DenomTrace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomTraceResponse { - const message = { - ...baseQueryDenomTraceResponse, - } as QueryDenomTraceResponse; - if (object.denomTrace !== undefined && object.denomTrace !== null) { - message.denomTrace = DenomTrace.fromJSON(object.denomTrace); - } else { - message.denomTrace = undefined; - } - return message; - }, - - toJSON(message: QueryDenomTraceResponse): unknown { - const obj: any = {}; - message.denomTrace !== undefined && - (obj.denomTrace = message.denomTrace - ? DenomTrace.toJSON(message.denomTrace) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomTraceResponse { - const message = { - ...baseQueryDenomTraceResponse, - } as QueryDenomTraceResponse; - if (object.denomTrace !== undefined && object.denomTrace !== null) { - message.denomTrace = DenomTrace.fromPartial(object.denomTrace); - } else { - message.denomTrace = undefined; - } - return message; - }, -}; - -const baseQueryDenomTracesRequest: object = {}; - -export const QueryDenomTracesRequest = { - encode( - message: QueryDenomTracesRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDenomTracesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomTracesRequest, - } as QueryDenomTracesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomTracesRequest { - const message = { - ...baseQueryDenomTracesRequest, - } as QueryDenomTracesRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDenomTracesRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomTracesRequest { - const message = { - ...baseQueryDenomTracesRequest, - } as QueryDenomTracesRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDenomTracesResponse: object = {}; - -export const QueryDenomTracesResponse = { - encode( - message: QueryDenomTracesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.denomTraces) { - DenomTrace.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomTracesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomTracesResponse, - } as QueryDenomTracesResponse; - message.denomTraces = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denomTraces.push(DenomTrace.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomTracesResponse { - const message = { - ...baseQueryDenomTracesResponse, - } as QueryDenomTracesResponse; - message.denomTraces = []; - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDenomTracesResponse): unknown { - const obj: any = {}; - if (message.denomTraces) { - obj.denomTraces = message.denomTraces.map((e) => - e ? DenomTrace.toJSON(e) : undefined - ); - } else { - obj.denomTraces = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomTracesResponse { - const message = { - ...baseQueryDenomTracesResponse, - } as QueryDenomTracesResponse; - message.denomTraces = []; - if (object.denomTraces !== undefined && object.denomTraces !== null) { - for (const e of object.denomTraces) { - message.denomTraces.push(DenomTrace.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -const baseQueryDenomHashRequest: object = { trace: "" }; - -export const QueryDenomHashRequest = { - encode( - message: QueryDenomHashRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.trace !== "") { - writer.uint32(10).string(message.trace); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDenomHashRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDenomHashRequest } as QueryDenomHashRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.trace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomHashRequest { - const message = { ...baseQueryDenomHashRequest } as QueryDenomHashRequest; - if (object.trace !== undefined && object.trace !== null) { - message.trace = String(object.trace); - } else { - message.trace = ""; - } - return message; - }, - - toJSON(message: QueryDenomHashRequest): unknown { - const obj: any = {}; - message.trace !== undefined && (obj.trace = message.trace); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomHashRequest { - const message = { ...baseQueryDenomHashRequest } as QueryDenomHashRequest; - if (object.trace !== undefined && object.trace !== null) { - message.trace = object.trace; - } else { - message.trace = ""; - } - return message; - }, -}; - -const baseQueryDenomHashResponse: object = { hash: "" }; - -export const QueryDenomHashResponse = { - encode( - message: QueryDenomHashResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDenomHashResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDenomHashResponse } as QueryDenomHashResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomHashResponse { - const message = { ...baseQueryDenomHashResponse } as QueryDenomHashResponse; - if (object.hash !== undefined && object.hash !== null) { - message.hash = String(object.hash); - } else { - message.hash = ""; - } - return message; - }, - - toJSON(message: QueryDenomHashResponse): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = message.hash); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomHashResponse { - const message = { ...baseQueryDenomHashResponse } as QueryDenomHashResponse; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = ""; - } - return message; - }, -}; - -/** Query provides defines the gRPC querier service. */ -export interface Query { - /** DenomTrace queries a denomination trace information. */ - DenomTrace(request: QueryDenomTraceRequest): Promise; - /** DenomTraces queries all denomination traces. */ - DenomTraces( - request: QueryDenomTracesRequest - ): Promise; - /** Params queries all parameters of the ibc-transfer module. */ - Params(request: QueryParamsRequest): Promise; - /** DenomHash queries a denomination hash information. */ - DenomHash(request: QueryDenomHashRequest): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - DenomTrace( - request: QueryDenomTraceRequest - ): Promise { - const data = QueryDenomTraceRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.transfer.v1.Query", - "DenomTrace", - data - ); - return promise.then((data) => - QueryDenomTraceResponse.decode(new Reader(data)) - ); - } - - DenomTraces( - request: QueryDenomTracesRequest - ): Promise { - const data = QueryDenomTracesRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.transfer.v1.Query", - "DenomTraces", - data - ); - return promise.then((data) => - QueryDenomTracesResponse.decode(new Reader(data)) - ); - } - - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.transfer.v1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - - DenomHash(request: QueryDenomHashRequest): Promise { - const data = QueryDenomHashRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.transfer.v1.Query", - "DenomHash", - data - ); - return promise.then((data) => - QueryDenomHashResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.d.ts deleted file mode 100644 index 4fbaca154e..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "ibc.applications.transfer.v1"; -/** - * DenomTrace contains the base denomination for ICS20 fungible tokens and the - * source tracing information path. - */ -export interface DenomTrace { - /** - * path defines the chain of port/channel identifiers used for tracing the - * source of the fungible token. - */ - path: string; - /** base denomination of the relayed fungible token. */ - baseDenom: string; -} -/** - * Params defines the set of IBC transfer parameters. - * NOTE: To prevent a single token from being transferred, set the - * TransfersEnabled parameter to true and then set the bank module's SendEnabled - * parameter for the denomination to false. - */ -export interface Params { - /** - * send_enabled enables or disables all cross-chain token transfers from this - * chain. - */ - sendEnabled: boolean; - /** - * receive_enabled enables or disables all cross-chain token transfers to this - * chain. - */ - receiveEnabled: boolean; -} -export declare const DenomTrace: { - encode(message: DenomTrace, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DenomTrace; - fromJSON(object: any): DenomTrace; - toJSON(message: DenomTrace): unknown; - fromPartial(object: DeepPartial): DenomTrace; -}; -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.js deleted file mode 100644 index 49e9f1d162..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.js +++ /dev/null @@ -1,145 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "ibc.applications.transfer.v1"; -const baseDenomTrace = { path: "", baseDenom: "" }; -export const DenomTrace = { - encode(message, writer = Writer.create()) { - if (message.path !== "") { - writer.uint32(10).string(message.path); - } - if (message.baseDenom !== "") { - writer.uint32(18).string(message.baseDenom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDenomTrace }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.string(); - break; - case 2: - message.baseDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDenomTrace }; - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - if (object.baseDenom !== undefined && object.baseDenom !== null) { - message.baseDenom = String(object.baseDenom); - } - else { - message.baseDenom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.path !== undefined && (obj.path = message.path); - message.baseDenom !== undefined && (obj.baseDenom = message.baseDenom); - return obj; - }, - fromPartial(object) { - const message = { ...baseDenomTrace }; - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - if (object.baseDenom !== undefined && object.baseDenom !== null) { - message.baseDenom = object.baseDenom; - } - else { - message.baseDenom = ""; - } - return message; - }, -}; -const baseParams = { sendEnabled: false, receiveEnabled: false }; -export const Params = { - encode(message, writer = Writer.create()) { - if (message.sendEnabled === true) { - writer.uint32(8).bool(message.sendEnabled); - } - if (message.receiveEnabled === true) { - writer.uint32(16).bool(message.receiveEnabled); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sendEnabled = reader.bool(); - break; - case 2: - message.receiveEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - message.sendEnabled = Boolean(object.sendEnabled); - } - else { - message.sendEnabled = false; - } - if (object.receiveEnabled !== undefined && object.receiveEnabled !== null) { - message.receiveEnabled = Boolean(object.receiveEnabled); - } - else { - message.receiveEnabled = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sendEnabled !== undefined && - (obj.sendEnabled = message.sendEnabled); - message.receiveEnabled !== undefined && - (obj.receiveEnabled = message.receiveEnabled); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - message.sendEnabled = object.sendEnabled; - } - else { - message.sendEnabled = false; - } - if (object.receiveEnabled !== undefined && object.receiveEnabled !== null) { - message.receiveEnabled = object.receiveEnabled; - } - else { - message.receiveEnabled = false; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.ts deleted file mode 100644 index 9514478528..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "ibc.applications.transfer.v1"; - -/** - * DenomTrace contains the base denomination for ICS20 fungible tokens and the - * source tracing information path. - */ -export interface DenomTrace { - /** - * path defines the chain of port/channel identifiers used for tracing the - * source of the fungible token. - */ - path: string; - /** base denomination of the relayed fungible token. */ - baseDenom: string; -} - -/** - * Params defines the set of IBC transfer parameters. - * NOTE: To prevent a single token from being transferred, set the - * TransfersEnabled parameter to true and then set the bank module's SendEnabled - * parameter for the denomination to false. - */ -export interface Params { - /** - * send_enabled enables or disables all cross-chain token transfers from this - * chain. - */ - sendEnabled: boolean; - /** - * receive_enabled enables or disables all cross-chain token transfers to this - * chain. - */ - receiveEnabled: boolean; -} - -const baseDenomTrace: object = { path: "", baseDenom: "" }; - -export const DenomTrace = { - encode(message: DenomTrace, writer: Writer = Writer.create()): Writer { - if (message.path !== "") { - writer.uint32(10).string(message.path); - } - if (message.baseDenom !== "") { - writer.uint32(18).string(message.baseDenom); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DenomTrace { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDenomTrace } as DenomTrace; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.string(); - break; - case 2: - message.baseDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DenomTrace { - const message = { ...baseDenomTrace } as DenomTrace; - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - if (object.baseDenom !== undefined && object.baseDenom !== null) { - message.baseDenom = String(object.baseDenom); - } else { - message.baseDenom = ""; - } - return message; - }, - - toJSON(message: DenomTrace): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = message.path); - message.baseDenom !== undefined && (obj.baseDenom = message.baseDenom); - return obj; - }, - - fromPartial(object: DeepPartial): DenomTrace { - const message = { ...baseDenomTrace } as DenomTrace; - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - if (object.baseDenom !== undefined && object.baseDenom !== null) { - message.baseDenom = object.baseDenom; - } else { - message.baseDenom = ""; - } - return message; - }, -}; - -const baseParams: object = { sendEnabled: false, receiveEnabled: false }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.sendEnabled === true) { - writer.uint32(8).bool(message.sendEnabled); - } - if (message.receiveEnabled === true) { - writer.uint32(16).bool(message.receiveEnabled); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sendEnabled = reader.bool(); - break; - case 2: - message.receiveEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - message.sendEnabled = Boolean(object.sendEnabled); - } else { - message.sendEnabled = false; - } - if (object.receiveEnabled !== undefined && object.receiveEnabled !== null) { - message.receiveEnabled = Boolean(object.receiveEnabled); - } else { - message.receiveEnabled = false; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.sendEnabled !== undefined && - (obj.sendEnabled = message.sendEnabled); - message.receiveEnabled !== undefined && - (obj.receiveEnabled = message.receiveEnabled); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - message.sendEnabled = object.sendEnabled; - } else { - message.sendEnabled = false; - } - if (object.receiveEnabled !== undefined && object.receiveEnabled !== null) { - message.receiveEnabled = object.receiveEnabled; - } else { - message.receiveEnabled = false; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.d.ts deleted file mode 100644 index e8479dab48..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../../../../cosmos/base/v1beta1/coin"; -import { Height } from "../../../../ibc/core/client/v1/client"; -export declare const protobufPackage = "ibc.applications.transfer.v1"; -/** - * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between - * ICS20 enabled chains. See ICS Spec here: - * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures - */ -export interface MsgTransfer { - /** the port on which the packet will be sent */ - sourcePort: string; - /** the channel by which the packet will be sent */ - sourceChannel: string; - /** the tokens to be transferred */ - token: Coin | undefined; - /** the sender address */ - sender: string; - /** the recipient address on the destination chain */ - receiver: string; - /** - * Timeout height relative to the current block height. - * The timeout is disabled when set to 0. - */ - timeoutHeight: Height | undefined; - /** - * Timeout timestamp in absolute nanoseconds since unix epoch. - * The timeout is disabled when set to 0. - */ - timeoutTimestamp: number; -} -/** MsgTransferResponse defines the Msg/Transfer response type. */ -export interface MsgTransferResponse { -} -export declare const MsgTransfer: { - encode(message: MsgTransfer, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgTransfer; - fromJSON(object: any): MsgTransfer; - toJSON(message: MsgTransfer): unknown; - fromPartial(object: DeepPartial): MsgTransfer; -}; -export declare const MsgTransferResponse: { - encode(_: MsgTransferResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgTransferResponse; - fromJSON(_: any): MsgTransferResponse; - toJSON(_: MsgTransferResponse): unknown; - fromPartial(_: DeepPartial): MsgTransferResponse; -}; -/** Msg defines the ibc/transfer Msg service. */ -export interface Msg { - /** Transfer defines a rpc handler method for MsgTransfer. */ - Transfer(request: MsgTransfer): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - Transfer(request: MsgTransfer): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.js deleted file mode 100644 index 63d0181a40..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.js +++ /dev/null @@ -1,248 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Coin } from "../../../../cosmos/base/v1beta1/coin"; -import { Height } from "../../../../ibc/core/client/v1/client"; -export const protobufPackage = "ibc.applications.transfer.v1"; -const baseMsgTransfer = { - sourcePort: "", - sourceChannel: "", - sender: "", - receiver: "", - timeoutTimestamp: 0, -}; -export const MsgTransfer = { - encode(message, writer = Writer.create()) { - if (message.sourcePort !== "") { - writer.uint32(10).string(message.sourcePort); - } - if (message.sourceChannel !== "") { - writer.uint32(18).string(message.sourceChannel); - } - if (message.token !== undefined) { - Coin.encode(message.token, writer.uint32(26).fork()).ldelim(); - } - if (message.sender !== "") { - writer.uint32(34).string(message.sender); - } - if (message.receiver !== "") { - writer.uint32(42).string(message.receiver); - } - if (message.timeoutHeight !== undefined) { - Height.encode(message.timeoutHeight, writer.uint32(50).fork()).ldelim(); - } - if (message.timeoutTimestamp !== 0) { - writer.uint32(56).uint64(message.timeoutTimestamp); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTransfer }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sourcePort = reader.string(); - break; - case 2: - message.sourceChannel = reader.string(); - break; - case 3: - message.token = Coin.decode(reader, reader.uint32()); - break; - case 4: - message.sender = reader.string(); - break; - case 5: - message.receiver = reader.string(); - break; - case 6: - message.timeoutHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.timeoutTimestamp = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgTransfer }; - if (object.sourcePort !== undefined && object.sourcePort !== null) { - message.sourcePort = String(object.sourcePort); - } - else { - message.sourcePort = ""; - } - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = String(object.sourceChannel); - } - else { - message.sourceChannel = ""; - } - if (object.token !== undefined && object.token !== null) { - message.token = Coin.fromJSON(object.token); - } - else { - message.token = undefined; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = String(object.receiver); - } - else { - message.receiver = ""; - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = Height.fromJSON(object.timeoutHeight); - } - else { - message.timeoutHeight = undefined; - } - if (object.timeoutTimestamp !== undefined && - object.timeoutTimestamp !== null) { - message.timeoutTimestamp = Number(object.timeoutTimestamp); - } - else { - message.timeoutTimestamp = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sourcePort !== undefined && (obj.sourcePort = message.sourcePort); - message.sourceChannel !== undefined && - (obj.sourceChannel = message.sourceChannel); - message.token !== undefined && - (obj.token = message.token ? Coin.toJSON(message.token) : undefined); - message.sender !== undefined && (obj.sender = message.sender); - message.receiver !== undefined && (obj.receiver = message.receiver); - message.timeoutHeight !== undefined && - (obj.timeoutHeight = message.timeoutHeight - ? Height.toJSON(message.timeoutHeight) - : undefined); - message.timeoutTimestamp !== undefined && - (obj.timeoutTimestamp = message.timeoutTimestamp); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgTransfer }; - if (object.sourcePort !== undefined && object.sourcePort !== null) { - message.sourcePort = object.sourcePort; - } - else { - message.sourcePort = ""; - } - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = object.sourceChannel; - } - else { - message.sourceChannel = ""; - } - if (object.token !== undefined && object.token !== null) { - message.token = Coin.fromPartial(object.token); - } - else { - message.token = undefined; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = object.receiver; - } - else { - message.receiver = ""; - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = Height.fromPartial(object.timeoutHeight); - } - else { - message.timeoutHeight = undefined; - } - if (object.timeoutTimestamp !== undefined && - object.timeoutTimestamp !== null) { - message.timeoutTimestamp = object.timeoutTimestamp; - } - else { - message.timeoutTimestamp = 0; - } - return message; - }, -}; -const baseMsgTransferResponse = {}; -export const MsgTransferResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTransferResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgTransferResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgTransferResponse }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Transfer(request) { - const data = MsgTransfer.encode(request).finish(); - const promise = this.rpc.request("ibc.applications.transfer.v1.Msg", "Transfer", data); - return promise.then((data) => MsgTransferResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.ts deleted file mode 100644 index de8d872f12..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.ts +++ /dev/null @@ -1,314 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Coin } from "../../../../cosmos/base/v1beta1/coin"; -import { Height } from "../../../../ibc/core/client/v1/client"; - -export const protobufPackage = "ibc.applications.transfer.v1"; - -/** - * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between - * ICS20 enabled chains. See ICS Spec here: - * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures - */ -export interface MsgTransfer { - /** the port on which the packet will be sent */ - sourcePort: string; - /** the channel by which the packet will be sent */ - sourceChannel: string; - /** the tokens to be transferred */ - token: Coin | undefined; - /** the sender address */ - sender: string; - /** the recipient address on the destination chain */ - receiver: string; - /** - * Timeout height relative to the current block height. - * The timeout is disabled when set to 0. - */ - timeoutHeight: Height | undefined; - /** - * Timeout timestamp in absolute nanoseconds since unix epoch. - * The timeout is disabled when set to 0. - */ - timeoutTimestamp: number; -} - -/** MsgTransferResponse defines the Msg/Transfer response type. */ -export interface MsgTransferResponse {} - -const baseMsgTransfer: object = { - sourcePort: "", - sourceChannel: "", - sender: "", - receiver: "", - timeoutTimestamp: 0, -}; - -export const MsgTransfer = { - encode(message: MsgTransfer, writer: Writer = Writer.create()): Writer { - if (message.sourcePort !== "") { - writer.uint32(10).string(message.sourcePort); - } - if (message.sourceChannel !== "") { - writer.uint32(18).string(message.sourceChannel); - } - if (message.token !== undefined) { - Coin.encode(message.token, writer.uint32(26).fork()).ldelim(); - } - if (message.sender !== "") { - writer.uint32(34).string(message.sender); - } - if (message.receiver !== "") { - writer.uint32(42).string(message.receiver); - } - if (message.timeoutHeight !== undefined) { - Height.encode(message.timeoutHeight, writer.uint32(50).fork()).ldelim(); - } - if (message.timeoutTimestamp !== 0) { - writer.uint32(56).uint64(message.timeoutTimestamp); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgTransfer { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTransfer } as MsgTransfer; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sourcePort = reader.string(); - break; - case 2: - message.sourceChannel = reader.string(); - break; - case 3: - message.token = Coin.decode(reader, reader.uint32()); - break; - case 4: - message.sender = reader.string(); - break; - case 5: - message.receiver = reader.string(); - break; - case 6: - message.timeoutHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.timeoutTimestamp = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgTransfer { - const message = { ...baseMsgTransfer } as MsgTransfer; - if (object.sourcePort !== undefined && object.sourcePort !== null) { - message.sourcePort = String(object.sourcePort); - } else { - message.sourcePort = ""; - } - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = String(object.sourceChannel); - } else { - message.sourceChannel = ""; - } - if (object.token !== undefined && object.token !== null) { - message.token = Coin.fromJSON(object.token); - } else { - message.token = undefined; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = String(object.receiver); - } else { - message.receiver = ""; - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = Height.fromJSON(object.timeoutHeight); - } else { - message.timeoutHeight = undefined; - } - if ( - object.timeoutTimestamp !== undefined && - object.timeoutTimestamp !== null - ) { - message.timeoutTimestamp = Number(object.timeoutTimestamp); - } else { - message.timeoutTimestamp = 0; - } - return message; - }, - - toJSON(message: MsgTransfer): unknown { - const obj: any = {}; - message.sourcePort !== undefined && (obj.sourcePort = message.sourcePort); - message.sourceChannel !== undefined && - (obj.sourceChannel = message.sourceChannel); - message.token !== undefined && - (obj.token = message.token ? Coin.toJSON(message.token) : undefined); - message.sender !== undefined && (obj.sender = message.sender); - message.receiver !== undefined && (obj.receiver = message.receiver); - message.timeoutHeight !== undefined && - (obj.timeoutHeight = message.timeoutHeight - ? Height.toJSON(message.timeoutHeight) - : undefined); - message.timeoutTimestamp !== undefined && - (obj.timeoutTimestamp = message.timeoutTimestamp); - return obj; - }, - - fromPartial(object: DeepPartial): MsgTransfer { - const message = { ...baseMsgTransfer } as MsgTransfer; - if (object.sourcePort !== undefined && object.sourcePort !== null) { - message.sourcePort = object.sourcePort; - } else { - message.sourcePort = ""; - } - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = object.sourceChannel; - } else { - message.sourceChannel = ""; - } - if (object.token !== undefined && object.token !== null) { - message.token = Coin.fromPartial(object.token); - } else { - message.token = undefined; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = object.receiver; - } else { - message.receiver = ""; - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = Height.fromPartial(object.timeoutHeight); - } else { - message.timeoutHeight = undefined; - } - if ( - object.timeoutTimestamp !== undefined && - object.timeoutTimestamp !== null - ) { - message.timeoutTimestamp = object.timeoutTimestamp; - } else { - message.timeoutTimestamp = 0; - } - return message; - }, -}; - -const baseMsgTransferResponse: object = {}; - -export const MsgTransferResponse = { - encode(_: MsgTransferResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgTransferResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTransferResponse } as MsgTransferResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgTransferResponse { - const message = { ...baseMsgTransferResponse } as MsgTransferResponse; - return message; - }, - - toJSON(_: MsgTransferResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgTransferResponse { - const message = { ...baseMsgTransferResponse } as MsgTransferResponse; - return message; - }, -}; - -/** Msg defines the ibc/transfer Msg service. */ -export interface Msg { - /** Transfer defines a rpc handler method for MsgTransfer. */ - Transfer(request: MsgTransfer): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Transfer(request: MsgTransfer): Promise { - const data = MsgTransfer.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.transfer.v1.Msg", - "Transfer", - data - ); - return promise.then((data) => MsgTransferResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.d.ts deleted file mode 100644 index 25f77d669f..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.d.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; -export declare const protobufPackage = "ibc.core.client.v1"; -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientState { - /** client identifier */ - clientId: string; - /** client state */ - clientState: Any | undefined; -} -/** - * ConsensusStateWithHeight defines a consensus state with an additional height - * field. - */ -export interface ConsensusStateWithHeight { - /** consensus state height */ - height: Height | undefined; - /** consensus state */ - consensusState: Any | undefined; -} -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStates { - /** client identifier */ - clientId: string; - /** consensus states and their heights associated with the client */ - consensusStates: ConsensusStateWithHeight[]; -} -/** - * ClientUpdateProposal is a governance proposal. If it passes, the substitute - * client's latest consensus state is copied over to the subject client. The proposal - * handler may fail if the subject and the substitute do not match in client and - * chain parameters (with exception to latest height, frozen height, and chain-id). - */ -export interface ClientUpdateProposal { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - subjectClientId: string; - /** - * the substitute client identifier for the client standing in for the subject - * client - */ - substituteClientId: string; -} -/** - * UpgradeProposal is a gov Content type for initiating an IBC breaking - * upgrade. - */ -export interface UpgradeProposal { - title: string; - description: string; - plan: Plan | undefined; - /** - * An UpgradedClientState must be provided to perform an IBC breaking upgrade. - * This will make the chain commit to the correct upgraded (self) client state - * before the upgrade occurs, so that connecting chains can verify that the - * new upgraded client is valid by verifying a proof on the previous version - * of the chain. This will allow IBC connections to persist smoothly across - * planned chain upgrades - */ - upgradedClientState: Any | undefined; -} -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * 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 - */ -export interface Height { - /** the revision that the client is currently on */ - revisionNumber: number; - /** the height within the given revision */ - revisionHeight: number; -} -/** Params defines the set of IBC light client parameters. */ -export interface Params { - /** allowed_clients defines the list of allowed client state types. */ - allowedClients: string[]; -} -export declare const IdentifiedClientState: { - encode(message: IdentifiedClientState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IdentifiedClientState; - fromJSON(object: any): IdentifiedClientState; - toJSON(message: IdentifiedClientState): unknown; - fromPartial(object: DeepPartial): IdentifiedClientState; -}; -export declare const ConsensusStateWithHeight: { - encode(message: ConsensusStateWithHeight, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ConsensusStateWithHeight; - fromJSON(object: any): ConsensusStateWithHeight; - toJSON(message: ConsensusStateWithHeight): unknown; - fromPartial(object: DeepPartial): ConsensusStateWithHeight; -}; -export declare const ClientConsensusStates: { - encode(message: ClientConsensusStates, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ClientConsensusStates; - fromJSON(object: any): ClientConsensusStates; - toJSON(message: ClientConsensusStates): unknown; - fromPartial(object: DeepPartial): ClientConsensusStates; -}; -export declare const ClientUpdateProposal: { - encode(message: ClientUpdateProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ClientUpdateProposal; - fromJSON(object: any): ClientUpdateProposal; - toJSON(message: ClientUpdateProposal): unknown; - fromPartial(object: DeepPartial): ClientUpdateProposal; -}; -export declare const UpgradeProposal: { - encode(message: UpgradeProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UpgradeProposal; - fromJSON(object: any): UpgradeProposal; - toJSON(message: UpgradeProposal): unknown; - fromPartial(object: DeepPartial): UpgradeProposal; -}; -export declare const Height: { - encode(message: Height, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Height; - fromJSON(object: any): Height; - toJSON(message: Height): unknown; - fromPartial(object: DeepPartial): Height; -}; -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.js deleted file mode 100644 index 860d6ea564..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.js +++ /dev/null @@ -1,622 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; -export const protobufPackage = "ibc.core.client.v1"; -const baseIdentifiedClientState = { clientId: "" }; -export const IdentifiedClientState = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedClientState }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIdentifiedClientState }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } - else { - message.clientState = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseIdentifiedClientState }; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } - else { - message.clientState = undefined; - } - return message; - }, -}; -const baseConsensusStateWithHeight = {}; -export const ConsensusStateWithHeight = { - encode(message, writer = Writer.create()) { - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseConsensusStateWithHeight, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseConsensusStateWithHeight, - }; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } - else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } - else { - message.consensusState = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseConsensusStateWithHeight, - }; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } - else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } - else { - message.consensusState = undefined; - } - return message; - }, -}; -const baseClientConsensusStates = { clientId: "" }; -export const ClientConsensusStates = { - encode(message, writer = Writer.create()) { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.consensusStates) { - ConsensusStateWithHeight.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientConsensusStates }; - message.consensusStates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.consensusStates.push(ConsensusStateWithHeight.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseClientConsensusStates }; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } - else { - message.clientId = ""; - } - if (object.consensusStates !== undefined && - object.consensusStates !== null) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.consensusStates) { - obj.consensusStates = message.consensusStates.map((e) => e ? ConsensusStateWithHeight.toJSON(e) : undefined); - } - else { - obj.consensusStates = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseClientConsensusStates }; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } - else { - message.clientId = ""; - } - if (object.consensusStates !== undefined && - object.consensusStates !== null) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - return message; - }, -}; -const baseClientUpdateProposal = { - title: "", - description: "", - subjectClientId: "", - substituteClientId: "", -}; -export const ClientUpdateProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.subjectClientId !== "") { - writer.uint32(26).string(message.subjectClientId); - } - if (message.substituteClientId !== "") { - writer.uint32(34).string(message.substituteClientId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientUpdateProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.subjectClientId = reader.string(); - break; - case 4: - message.substituteClientId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseClientUpdateProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.subjectClientId !== undefined && - object.subjectClientId !== null) { - message.subjectClientId = String(object.subjectClientId); - } - else { - message.subjectClientId = ""; - } - if (object.substituteClientId !== undefined && - object.substituteClientId !== null) { - message.substituteClientId = String(object.substituteClientId); - } - else { - message.substituteClientId = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.subjectClientId !== undefined && - (obj.subjectClientId = message.subjectClientId); - message.substituteClientId !== undefined && - (obj.substituteClientId = message.substituteClientId); - return obj; - }, - fromPartial(object) { - const message = { ...baseClientUpdateProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.subjectClientId !== undefined && - object.subjectClientId !== null) { - message.subjectClientId = object.subjectClientId; - } - else { - message.subjectClientId = ""; - } - if (object.substituteClientId !== undefined && - object.substituteClientId !== null) { - message.substituteClientId = object.substituteClientId; - } - else { - message.substituteClientId = ""; - } - return message; - }, -}; -const baseUpgradeProposal = { title: "", description: "" }; -export const UpgradeProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); - } - if (message.upgradedClientState !== undefined) { - Any.encode(message.upgradedClientState, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUpgradeProposal }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - case 4: - message.upgradedClientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUpgradeProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromJSON(object.plan); - } - else { - message.plan = undefined; - } - if (object.upgradedClientState !== undefined && - object.upgradedClientState !== null) { - message.upgradedClientState = Any.fromJSON(object.upgradedClientState); - } - else { - message.upgradedClientState = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.plan !== undefined && - (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - message.upgradedClientState !== undefined && - (obj.upgradedClientState = message.upgradedClientState - ? Any.toJSON(message.upgradedClientState) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseUpgradeProposal }; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromPartial(object.plan); - } - else { - message.plan = undefined; - } - if (object.upgradedClientState !== undefined && - object.upgradedClientState !== null) { - message.upgradedClientState = Any.fromPartial(object.upgradedClientState); - } - else { - message.upgradedClientState = undefined; - } - return message; - }, -}; -const baseHeight = { revisionNumber: 0, revisionHeight: 0 }; -export const Height = { - encode(message, writer = Writer.create()) { - if (message.revisionNumber !== 0) { - writer.uint32(8).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(16).uint64(message.revisionHeight); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeight }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revisionNumber = longToNumber(reader.uint64()); - break; - case 2: - message.revisionHeight = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHeight }; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } - else { - message.revisionHeight = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - return obj; - }, - fromPartial(object) { - const message = { ...baseHeight }; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } - else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } - else { - message.revisionHeight = 0; - } - return message; - }, -}; -const baseParams = { allowedClients: "" }; -export const Params = { - encode(message, writer = Writer.create()) { - for (const v of message.allowedClients) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - message.allowedClients = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowedClients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.allowedClients) { - obj.allowedClients = message.allowedClients.map((e) => e); - } - else { - obj.allowedClients = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(e); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.ts deleted file mode 100644 index 7a8e15b6f3..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.ts +++ /dev/null @@ -1,786 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; - -export const protobufPackage = "ibc.core.client.v1"; - -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientState { - /** client identifier */ - clientId: string; - /** client state */ - clientState: Any | undefined; -} - -/** - * ConsensusStateWithHeight defines a consensus state with an additional height - * field. - */ -export interface ConsensusStateWithHeight { - /** consensus state height */ - height: Height | undefined; - /** consensus state */ - consensusState: Any | undefined; -} - -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStates { - /** client identifier */ - clientId: string; - /** consensus states and their heights associated with the client */ - consensusStates: ConsensusStateWithHeight[]; -} - -/** - * ClientUpdateProposal is a governance proposal. If it passes, the substitute - * client's latest consensus state is copied over to the subject client. The proposal - * handler may fail if the subject and the substitute do not match in client and - * chain parameters (with exception to latest height, frozen height, and chain-id). - */ -export interface ClientUpdateProposal { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - subjectClientId: string; - /** - * the substitute client identifier for the client standing in for the subject - * client - */ - substituteClientId: string; -} - -/** - * UpgradeProposal is a gov Content type for initiating an IBC breaking - * upgrade. - */ -export interface UpgradeProposal { - title: string; - description: string; - plan: Plan | undefined; - /** - * An UpgradedClientState must be provided to perform an IBC breaking upgrade. - * This will make the chain commit to the correct upgraded (self) client state - * before the upgrade occurs, so that connecting chains can verify that the - * new upgraded client is valid by verifying a proof on the previous version - * of the chain. This will allow IBC connections to persist smoothly across - * planned chain upgrades - */ - upgradedClientState: Any | undefined; -} - -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * 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 - */ -export interface Height { - /** the revision that the client is currently on */ - revisionNumber: number; - /** the height within the given revision */ - revisionHeight: number; -} - -/** Params defines the set of IBC light client parameters. */ -export interface Params { - /** allowed_clients defines the list of allowed client state types. */ - allowedClients: string[]; -} - -const baseIdentifiedClientState: object = { clientId: "" }; - -export const IdentifiedClientState = { - encode( - message: IdentifiedClientState, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IdentifiedClientState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromJSON(object.clientState); - } else { - message.clientState = undefined; - } - return message; - }, - - toJSON(message: IdentifiedClientState): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.clientState !== undefined && - (obj.clientState = message.clientState - ? Any.toJSON(message.clientState) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if (object.clientState !== undefined && object.clientState !== null) { - message.clientState = Any.fromPartial(object.clientState); - } else { - message.clientState = undefined; - } - return message; - }, -}; - -const baseConsensusStateWithHeight: object = {}; - -export const ConsensusStateWithHeight = { - encode( - message: ConsensusStateWithHeight, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ConsensusStateWithHeight { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromJSON(object.consensusState); - } else { - message.consensusState = undefined; - } - return message; - }, - - toJSON(message: ConsensusStateWithHeight): unknown { - const obj: any = {}; - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - message.consensusState !== undefined && - (obj.consensusState = message.consensusState - ? Any.toJSON(message.consensusState) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - if (object.consensusState !== undefined && object.consensusState !== null) { - message.consensusState = Any.fromPartial(object.consensusState); - } else { - message.consensusState = undefined; - } - return message; - }, -}; - -const baseClientConsensusStates: object = { clientId: "" }; - -export const ClientConsensusStates = { - encode( - message: ClientConsensusStates, - writer: Writer = Writer.create() - ): Writer { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.consensusStates) { - ConsensusStateWithHeight.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientConsensusStates { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensusStates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.consensusStates.push( - ConsensusStateWithHeight.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = String(object.clientId); - } else { - message.clientId = ""; - } - if ( - object.consensusStates !== undefined && - object.consensusStates !== null - ) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ClientConsensusStates): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.consensusStates) { - obj.consensusStates = message.consensusStates.map((e) => - e ? ConsensusStateWithHeight.toJSON(e) : undefined - ); - } else { - obj.consensusStates = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensusStates = []; - if (object.clientId !== undefined && object.clientId !== null) { - message.clientId = object.clientId; - } else { - message.clientId = ""; - } - if ( - object.consensusStates !== undefined && - object.consensusStates !== null - ) { - for (const e of object.consensusStates) { - message.consensusStates.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - return message; - }, -}; - -const baseClientUpdateProposal: object = { - title: "", - description: "", - subjectClientId: "", - substituteClientId: "", -}; - -export const ClientUpdateProposal = { - encode( - message: ClientUpdateProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.subjectClientId !== "") { - writer.uint32(26).string(message.subjectClientId); - } - if (message.substituteClientId !== "") { - writer.uint32(34).string(message.substituteClientId); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientUpdateProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.subjectClientId = reader.string(); - break; - case 4: - message.substituteClientId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if ( - object.subjectClientId !== undefined && - object.subjectClientId !== null - ) { - message.subjectClientId = String(object.subjectClientId); - } else { - message.subjectClientId = ""; - } - if ( - object.substituteClientId !== undefined && - object.substituteClientId !== null - ) { - message.substituteClientId = String(object.substituteClientId); - } else { - message.substituteClientId = ""; - } - return message; - }, - - toJSON(message: ClientUpdateProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.subjectClientId !== undefined && - (obj.subjectClientId = message.subjectClientId); - message.substituteClientId !== undefined && - (obj.substituteClientId = message.substituteClientId); - return obj; - }, - - fromPartial(object: DeepPartial): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if ( - object.subjectClientId !== undefined && - object.subjectClientId !== null - ) { - message.subjectClientId = object.subjectClientId; - } else { - message.subjectClientId = ""; - } - if ( - object.substituteClientId !== undefined && - object.substituteClientId !== null - ) { - message.substituteClientId = object.substituteClientId; - } else { - message.substituteClientId = ""; - } - return message; - }, -}; - -const baseUpgradeProposal: object = { title: "", description: "" }; - -export const UpgradeProposal = { - encode(message: UpgradeProposal, writer: Writer = Writer.create()): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); - } - if (message.upgradedClientState !== undefined) { - Any.encode( - message.upgradedClientState, - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUpgradeProposal } as UpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - case 4: - message.upgradedClientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpgradeProposal { - const message = { ...baseUpgradeProposal } as UpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromJSON(object.plan); - } else { - message.plan = undefined; - } - if ( - object.upgradedClientState !== undefined && - object.upgradedClientState !== null - ) { - message.upgradedClientState = Any.fromJSON(object.upgradedClientState); - } else { - message.upgradedClientState = undefined; - } - return message; - }, - - toJSON(message: UpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.plan !== undefined && - (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - message.upgradedClientState !== undefined && - (obj.upgradedClientState = message.upgradedClientState - ? Any.toJSON(message.upgradedClientState) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): UpgradeProposal { - const message = { ...baseUpgradeProposal } as UpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromPartial(object.plan); - } else { - message.plan = undefined; - } - if ( - object.upgradedClientState !== undefined && - object.upgradedClientState !== null - ) { - message.upgradedClientState = Any.fromPartial(object.upgradedClientState); - } else { - message.upgradedClientState = undefined; - } - return message; - }, -}; - -const baseHeight: object = { revisionNumber: 0, revisionHeight: 0 }; - -export const Height = { - encode(message: Height, writer: Writer = Writer.create()): Writer { - if (message.revisionNumber !== 0) { - writer.uint32(8).uint64(message.revisionNumber); - } - if (message.revisionHeight !== 0) { - writer.uint32(16).uint64(message.revisionHeight); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Height { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeight } as Height; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revisionNumber = longToNumber(reader.uint64() as Long); - break; - case 2: - message.revisionHeight = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Height { - const message = { ...baseHeight } as Height; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = Number(object.revisionNumber); - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = Number(object.revisionHeight); - } else { - message.revisionHeight = 0; - } - return message; - }, - - toJSON(message: Height): unknown { - const obj: any = {}; - message.revisionNumber !== undefined && - (obj.revisionNumber = message.revisionNumber); - message.revisionHeight !== undefined && - (obj.revisionHeight = message.revisionHeight); - return obj; - }, - - fromPartial(object: DeepPartial): Height { - const message = { ...baseHeight } as Height; - if (object.revisionNumber !== undefined && object.revisionNumber !== null) { - message.revisionNumber = object.revisionNumber; - } else { - message.revisionNumber = 0; - } - if (object.revisionHeight !== undefined && object.revisionHeight !== null) { - message.revisionHeight = object.revisionHeight; - } else { - message.revisionHeight = 0; - } - return message; - }, -}; - -const baseParams: object = { allowedClients: "" }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - for (const v of message.allowedClients) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - message.allowedClients = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowedClients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(String(e)); - } - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.allowedClients) { - obj.allowedClients = message.allowedClients.map((e) => e); - } else { - obj.allowedClients = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - message.allowedClients = []; - if (object.allowedClients !== undefined && object.allowedClients !== null) { - for (const e of object.allowedClients) { - message.allowedClients.push(e); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/package.json b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/package.json deleted file mode 100755 index 0aa8c2eb8e..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "ibc-applications-transfer-v1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module ibc.applications.transfer.v1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/ibc-go/v3/modules/apps/transfer/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/vuex-root b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/index.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/index.d.ts deleted file mode 100644 index bdbe552cc0..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { FungibleTokenPacketData } from "./module/types/ibc/applications/transfer/v2/packet"; -export { FungibleTokenPacketData }; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/index.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/index.js deleted file mode 100644 index 6aed4db8c0..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/index.js +++ /dev/null @@ -1,100 +0,0 @@ -import { txClient, queryClient, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { FungibleTokenPacketData } from "./module/types/ibc/applications/transfer/v2/packet"; -export { FungibleTokenPacketData }; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - _Structure: { - FungibleTokenPacketData: getStructure(FungibleTokenPacketData.fromPartial({})), - }, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: ibc.applications.transfer.v2 initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - } -}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/index.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/index.ts deleted file mode 100755 index 830cf90238..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/index.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' -// @ts-ignore -import { SpVuexError } from '@starport/vuex' - -import { FungibleTokenPacketData } from "./module/types/ibc/applications/transfer/v2/packet" - - -export { FungibleTokenPacketData }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - - _Structure: { - FungibleTokenPacketData: getStructure(FungibleTokenPacketData.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: ibc.applications.transfer.v2 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new SpVuexError('Subscriptions: ' + e.message) - } - }) - }, - - - - } -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/index.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/index.d.ts deleted file mode 100644 index a79067e887..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/index.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/index.js deleted file mode 100644 index 60fbd2d028..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/index.js +++ /dev/null @@ -1,30 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -const types = []; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/index.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/index.ts deleted file mode 100755 index 67d4b093f0..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; - - -const types = [ - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/rest.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/rest.d.ts deleted file mode 100644 index 511ae074a1..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/rest.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -export interface ProtobufAny { - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title ibc/applications/transfer/v2/packet.proto - * @version version not set - */ -export declare class Api extends HttpClient { -} -export {}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/rest.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/rest.js deleted file mode 100644 index 2e7a39f2b8..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/rest.js +++ /dev/null @@ -1,137 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title ibc/applications/transfer/v2/packet.proto - * @version version not set - */ -export class Api extends HttpClient { -} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/rest.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/rest.ts deleted file mode 100644 index 3dbb73a8e9..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/rest.ts +++ /dev/null @@ -1,218 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface ProtobufAny { - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title ibc/applications/transfer/v2/packet.proto - * @version version not set - */ -export class Api extends HttpClient {} diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/types/ibc/applications/transfer/v2/packet.d.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/types/ibc/applications/transfer/v2/packet.d.ts deleted file mode 100644 index e09dd05580..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/types/ibc/applications/transfer/v2/packet.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "ibc.applications.transfer.v2"; -/** - * FungibleTokenPacketData defines a struct for the packet payload - * See FungibleTokenPacketData spec: - * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures - */ -export interface FungibleTokenPacketData { - /** the token denomination to be transferred */ - denom: string; - /** the token amount to be transferred */ - amount: string; - /** the sender address */ - sender: string; - /** the recipient address on the destination chain */ - receiver: string; -} -export declare const FungibleTokenPacketData: { - encode(message: FungibleTokenPacketData, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FungibleTokenPacketData; - fromJSON(object: any): FungibleTokenPacketData; - toJSON(message: FungibleTokenPacketData): unknown; - fromPartial(object: DeepPartial): FungibleTokenPacketData; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/types/ibc/applications/transfer/v2/packet.js b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/types/ibc/applications/transfer/v2/packet.js deleted file mode 100644 index 4523f94e28..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/types/ibc/applications/transfer/v2/packet.js +++ /dev/null @@ -1,122 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "ibc.applications.transfer.v2"; -const baseFungibleTokenPacketData = { - denom: "", - amount: "", - sender: "", - receiver: "", -}; -export const FungibleTokenPacketData = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - if (message.receiver !== "") { - writer.uint32(34).string(message.receiver); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseFungibleTokenPacketData, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - case 3: - message.sender = reader.string(); - break; - case 4: - message.receiver = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseFungibleTokenPacketData, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = String(object.receiver); - } - else { - message.receiver = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - message.sender !== undefined && (obj.sender = message.sender); - message.receiver !== undefined && (obj.receiver = message.receiver); - return obj; - }, - fromPartial(object) { - const message = { - ...baseFungibleTokenPacketData, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = object.receiver; - } - else { - message.receiver = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/types/ibc/applications/transfer/v2/packet.ts b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/types/ibc/applications/transfer/v2/packet.ts deleted file mode 100644 index 5d1940016c..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/module/types/ibc/applications/transfer/v2/packet.ts +++ /dev/null @@ -1,153 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "ibc.applications.transfer.v2"; - -/** - * FungibleTokenPacketData defines a struct for the packet payload - * See FungibleTokenPacketData spec: - * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures - */ -export interface FungibleTokenPacketData { - /** the token denomination to be transferred */ - denom: string; - /** the token amount to be transferred */ - amount: string; - /** the sender address */ - sender: string; - /** the recipient address on the destination chain */ - receiver: string; -} - -const baseFungibleTokenPacketData: object = { - denom: "", - amount: "", - sender: "", - receiver: "", -}; - -export const FungibleTokenPacketData = { - encode( - message: FungibleTokenPacketData, - writer: Writer = Writer.create() - ): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - if (message.receiver !== "") { - writer.uint32(34).string(message.receiver); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FungibleTokenPacketData { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseFungibleTokenPacketData, - } as FungibleTokenPacketData; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - case 3: - message.sender = reader.string(); - break; - case 4: - message.receiver = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FungibleTokenPacketData { - const message = { - ...baseFungibleTokenPacketData, - } as FungibleTokenPacketData; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = String(object.receiver); - } else { - message.receiver = ""; - } - return message; - }, - - toJSON(message: FungibleTokenPacketData): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - message.sender !== undefined && (obj.sender = message.sender); - message.receiver !== undefined && (obj.receiver = message.receiver); - return obj; - }, - - fromPartial( - object: DeepPartial - ): FungibleTokenPacketData { - const message = { - ...baseFungibleTokenPacketData, - } as FungibleTokenPacketData; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = object.receiver; - } else { - message.receiver = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/package.json b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/package.json deleted file mode 100755 index 68dec39d5f..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "ibc-applications-transfer-v2-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module ibc.applications.transfer.v2", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/ibc-go/v3/modules/apps/transfer/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/vuex-root b/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v2/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/index.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/index.ts deleted file mode 100755 index bb133be35d..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/index.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { Params } from "./module/types/ibc/applications/interchain_accounts/controller/v1/controller" - - -export { Params }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Params: {}, - - _Structure: { - Params: getStructure(Params.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: ibc.applications.interchain_accounts.controller.v1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams()).data - - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - } -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/index.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/index.ts deleted file mode 100755 index 67d4b093f0..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; - - -const types = [ - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/rest.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/rest.ts deleted file mode 100644 index 0fd88e2358..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/rest.ts +++ /dev/null @@ -1,251 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface ProtobufAny { - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* Params defines the set of on-chain interchain accounts parameters. -The following parameters may be used to disable the controller submodule. -*/ -export interface V1Params { - /** controller_enabled enables or disables the controller submodule. */ - controller_enabled?: boolean; -} - -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1QueryParamsResponse { - /** params defines the parameters of the module. */ - params?: V1Params; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title ibc/applications/interchain_accounts/controller/v1/controller.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters of the ICA controller submodule. - * @request GET:/ibc/apps/interchain_accounts/controller/v1/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/ibc/apps/interchain_accounts/controller/v1/params`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/google/api/annotations.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/google/api/http.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/ibc/applications/interchain_accounts/controller/v1/controller.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/ibc/applications/interchain_accounts/controller/v1/controller.ts deleted file mode 100644 index 58b59d3b2e..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/ibc/applications/interchain_accounts/controller/v1/controller.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = - "ibc.applications.interchain_accounts.controller.v1"; - -/** - * Params defines the set of on-chain interchain accounts parameters. - * The following parameters may be used to disable the controller submodule. - */ -export interface Params { - /** controller_enabled enables or disables the controller submodule. */ - controller_enabled: boolean; -} - -const baseParams: object = { controller_enabled: false }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.controller_enabled === true) { - writer.uint32(8).bool(message.controller_enabled); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.controller_enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if ( - object.controller_enabled !== undefined && - object.controller_enabled !== null - ) { - message.controller_enabled = Boolean(object.controller_enabled); - } else { - message.controller_enabled = false; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.controller_enabled !== undefined && - (obj.controller_enabled = message.controller_enabled); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if ( - object.controller_enabled !== undefined && - object.controller_enabled !== null - ) { - message.controller_enabled = object.controller_enabled; - } else { - message.controller_enabled = false; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/ibc/applications/interchain_accounts/controller/v1/query.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/ibc/applications/interchain_accounts/controller/v1/query.ts deleted file mode 100644 index 94cfc66dca..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/module/types/ibc/applications/interchain_accounts/controller/v1/query.ts +++ /dev/null @@ -1,153 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Params } from "../../../../../ibc/applications/interchain_accounts/controller/v1/controller"; - -export const protobufPackage = - "ibc.applications.interchain_accounts.controller.v1"; - -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -/** Query provides defines the gRPC querier service. */ -export interface Query { - /** Params queries all parameters of the ICA controller submodule. */ - Params(request: QueryParamsRequest): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.interchain_accounts.controller.v1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/package.json b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/package.json deleted file mode 100755 index 0b650c5bc3..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "ibc-applications-interchain_accounts-controller-v1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module ibc.applications.interchain_accounts.controller.v1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/vuex-root b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.controller.v1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/index.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/index.ts deleted file mode 100755 index a6bd800348..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/index.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { Params } from "./module/types/ibc/applications/interchain_accounts/host/v1/host" - - -export { Params }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Params: {}, - - _Structure: { - Params: getStructure(Params.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: ibc.applications.interchain_accounts.host.v1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams()).data - - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - } -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/index.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/index.ts deleted file mode 100755 index 67d4b093f0..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; - - -const types = [ - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/rest.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/rest.ts deleted file mode 100644 index eae7a89551..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/rest.ts +++ /dev/null @@ -1,254 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface ProtobufAny { - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* Params defines the set of on-chain interchain accounts parameters. -The following parameters may be used to disable the host submodule. -*/ -export interface V1Params { - /** host_enabled enables or disables the host submodule. */ - host_enabled?: boolean; - - /** allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain. */ - allow_messages?: string[]; -} - -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1QueryParamsResponse { - /** params defines the parameters of the module. */ - params?: V1Params; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title ibc/applications/interchain_accounts/host/v1/host.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters of the ICA host submodule. - * @request GET:/ibc/apps/interchain_accounts/host/v1/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/ibc/apps/interchain_accounts/host/v1/params`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/google/api/annotations.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/google/api/http.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/ibc/applications/interchain_accounts/host/v1/host.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/ibc/applications/interchain_accounts/host/v1/host.ts deleted file mode 100644 index 1072ff84a3..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/ibc/applications/interchain_accounts/host/v1/host.ts +++ /dev/null @@ -1,106 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "ibc.applications.interchain_accounts.host.v1"; - -/** - * Params defines the set of on-chain interchain accounts parameters. - * The following parameters may be used to disable the host submodule. - */ -export interface Params { - /** host_enabled enables or disables the host submodule. */ - host_enabled: boolean; - /** allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain. */ - allow_messages: string[]; -} - -const baseParams: object = { host_enabled: false, allow_messages: "" }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.host_enabled === true) { - writer.uint32(8).bool(message.host_enabled); - } - for (const v of message.allow_messages) { - writer.uint32(18).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - message.allow_messages = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.host_enabled = reader.bool(); - break; - case 2: - message.allow_messages.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - message.allow_messages = []; - if (object.host_enabled !== undefined && object.host_enabled !== null) { - message.host_enabled = Boolean(object.host_enabled); - } else { - message.host_enabled = false; - } - if (object.allow_messages !== undefined && object.allow_messages !== null) { - for (const e of object.allow_messages) { - message.allow_messages.push(String(e)); - } - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.host_enabled !== undefined && - (obj.host_enabled = message.host_enabled); - if (message.allow_messages) { - obj.allow_messages = message.allow_messages.map((e) => e); - } else { - obj.allow_messages = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - message.allow_messages = []; - if (object.host_enabled !== undefined && object.host_enabled !== null) { - message.host_enabled = object.host_enabled; - } else { - message.host_enabled = false; - } - if (object.allow_messages !== undefined && object.allow_messages !== null) { - for (const e of object.allow_messages) { - message.allow_messages.push(e); - } - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/ibc/applications/interchain_accounts/host/v1/query.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/ibc/applications/interchain_accounts/host/v1/query.ts deleted file mode 100644 index 0b8bfc98ac..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/module/types/ibc/applications/interchain_accounts/host/v1/query.ts +++ /dev/null @@ -1,152 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Params } from "../../../../../ibc/applications/interchain_accounts/host/v1/host"; - -export const protobufPackage = "ibc.applications.interchain_accounts.host.v1"; - -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -/** Query provides defines the gRPC querier service. */ -export interface Query { - /** Params queries all parameters of the ICA host submodule. */ - Params(request: QueryParamsRequest): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.interchain_accounts.host.v1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/package.json b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/package.json deleted file mode 100755 index aa32c27ff8..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "ibc-applications-interchain_accounts-host-v1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module ibc.applications.interchain_accounts.host.v1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/vuex-root b/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.interchain_accounts.host.v1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/index.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/index.ts deleted file mode 100755 index 5e1e511800..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/index.ts +++ /dev/null @@ -1,262 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { DenomTrace } from "./module/types/ibc/applications/transfer/v1/transfer" -import { Params } from "./module/types/ibc/applications/transfer/v1/transfer" - - -export { DenomTrace, Params }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - DenomTrace: {}, - DenomTraces: {}, - Params: {}, - DenomHash: {}, - - _Structure: { - DenomTrace: getStructure(DenomTrace.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getDenomTrace: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DenomTrace[JSON.stringify(params)] ?? {} - }, - getDenomTraces: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DenomTraces[JSON.stringify(params)] ?? {} - }, - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - getDenomHash: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DenomHash[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: ibc.applications.transfer.v1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryDenomTrace({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDenomTrace( key.hash)).data - - - commit('QUERY', { query: 'DenomTrace', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDenomTrace', payload: { options: { all }, params: {...key},query }}) - return getters['getDenomTrace']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDenomTrace API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDenomTraces({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDenomTraces(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryDenomTraces({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'DenomTraces', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDenomTraces', payload: { options: { all }, params: {...key},query }}) - return getters['getDenomTraces']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDenomTraces API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams()).data - - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDenomHash({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDenomHash( key.trace)).data - - - commit('QUERY', { query: 'DenomHash', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDenomHash', payload: { options: { all }, params: {...key},query }}) - return getters['getDenomHash']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDenomHash API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - async sendMsgTransfer({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgTransfer(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgTransfer:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgTransfer:Send Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgTransfer({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgTransfer(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgTransfer:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgTransfer:Create Could not create message: ' + e.message) - } - } - }, - - } -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/index.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/index.ts deleted file mode 100755 index 2415c023a0..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/index.ts +++ /dev/null @@ -1,60 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgTransfer } from "./types/ibc/applications/transfer/v1/tx"; - - -const types = [ - ["/ibc.applications.transfer.v1.MsgTransfer", MsgTransfer], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgTransfer: (data: MsgTransfer): EncodeObject => ({ typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", value: MsgTransfer.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/rest.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/rest.ts deleted file mode 100644 index 61bddbbd87..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/rest.ts +++ /dev/null @@ -1,565 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* Params defines the set of IBC transfer parameters. -NOTE: To prevent a single token from being transferred, set the -TransfersEnabled parameter to true and then set the bank module's SendEnabled -parameter for the denomination to false. -*/ -export interface Applicationstransferv1Params { - /** - * send_enabled enables or disables all cross-chain token transfers from this - * chain. - */ - send_enabled?: boolean; - - /** - * receive_enabled enables or disables all cross-chain token transfers to this - * chain. - */ - receive_enabled?: boolean; -} - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* DenomTrace contains the base denomination for ICS20 fungible tokens and the -source tracing information path. -*/ -export interface V1DenomTrace { - /** - * path defines the chain of port/channel identifiers used for tracing the - * source of the fungible token. - */ - path?: string; - - /** base denomination of the relayed fungible token. */ - base_denom?: string; -} - -/** -* 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 -*/ -export interface V1Height { - /** @format uint64 */ - revision_number?: string; - - /** @format uint64 */ - revision_height?: string; -} - -/** - * MsgTransferResponse defines the Msg/Transfer response type. - */ -export type V1MsgTransferResponse = object; - -/** -* QueryDenomHashResponse is the response type for the Query/DenomHash RPC -method. -*/ -export interface V1QueryDenomHashResponse { - /** hash (in hex format) of the denomination trace information. */ - hash?: string; -} - -/** -* QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC -method. -*/ -export interface V1QueryDenomTraceResponse { - /** denom_trace returns the requested denomination trace information. */ - denom_trace?: V1DenomTrace; -} - -/** -* QueryConnectionsResponse is the response type for the Query/DenomTraces RPC -method. -*/ -export interface V1QueryDenomTracesResponse { - /** denom_traces returns all denominations trace information. */ - denom_traces?: V1DenomTrace[]; - - /** pagination defines the pagination in the response. */ - pagination?: V1Beta1PageResponse; -} - -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface V1QueryParamsResponse { - /** params defines the parameters of the module. */ - params?: Applicationstransferv1Params; -} - -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - count_total?: boolean; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title ibc/applications/transfer/v1/genesis.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryDenomHash - * @summary DenomHash queries a denomination hash information. - * @request GET:/ibc/apps/transfer/v1/denom_hashes/{trace} - */ - queryDenomHash = (trace: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/apps/transfer/v1/denom_hashes/${trace}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDenomTraces - * @summary DenomTraces queries all denomination traces. - * @request GET:/ibc/apps/transfer/v1/denom_traces - */ - queryDenomTraces = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/apps/transfer/v1/denom_traces`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDenomTrace - * @summary DenomTrace queries a denomination trace information. - * @request GET:/ibc/apps/transfer/v1/denom_traces/{hash} - */ - queryDenomTrace = (hash: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/apps/transfer/v1/denom_traces/${hash}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters of the ibc-transfer module. - * @request GET:/ibc/apps/transfer/v1/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/ibc/apps/transfer/v1/params`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 0bc568f477..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,300 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - count_total: boolean; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, count_total: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.count_total !== undefined && - (obj.count_total = message.count_total); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98406..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts deleted file mode 100644 index e9cefea25a..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts +++ /dev/null @@ -1,414 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.upgrade.v1beta1"; - -/** Plan specifies information about a planned upgrade and when it should occur. */ -export interface Plan { - /** - * 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. - */ - name: string; - /** - * The time after which the upgrade must be performed. - * Leave set to its zero value to use a pre-defined Height instead. - */ - time: Date | undefined; - /** - * The height at which the upgrade must be performed. - * Only used if Time is not set. - */ - height: number; - /** - * Any application specific upgrade info to be included on-chain - * such as a git commit that validators could automatically upgrade to - */ - info: string; -} - -/** - * SoftwareUpgradeProposal is a gov Content type for initiating a software - * upgrade. - */ -export interface SoftwareUpgradeProposal { - title: string; - description: string; - plan: Plan | undefined; -} - -/** - * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software - * upgrade. - */ -export interface CancelSoftwareUpgradeProposal { - title: string; - description: string; -} - -const basePlan: object = { name: "", height: 0, info: "" }; - -export const Plan = { - encode(message: Plan, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Plan { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePlan } as Plan; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.info = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Plan { - const message = { ...basePlan } as Plan; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - return message; - }, - - toJSON(message: Plan): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.height !== undefined && (obj.height = message.height); - message.info !== undefined && (obj.info = message.info); - return obj; - }, - - fromPartial(object: DeepPartial): Plan { - const message = { ...basePlan } as Plan; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - return message; - }, -}; - -const baseSoftwareUpgradeProposal: object = { title: "", description: "" }; - -export const SoftwareUpgradeProposal = { - encode( - message: SoftwareUpgradeProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SoftwareUpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SoftwareUpgradeProposal { - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromJSON(object.plan); - } else { - message.plan = undefined; - } - return message; - }, - - toJSON(message: SoftwareUpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.plan !== undefined && - (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): SoftwareUpgradeProposal { - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromPartial(object.plan); - } else { - message.plan = undefined; - } - return message; - }, -}; - -const baseCancelSoftwareUpgradeProposal: object = { - title: "", - description: "", -}; - -export const CancelSoftwareUpgradeProposal = { - encode( - message: CancelSoftwareUpgradeProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): CancelSoftwareUpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CancelSoftwareUpgradeProposal { - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - return message; - }, - - toJSON(message: CancelSoftwareUpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - return obj; - }, - - fromPartial( - object: DeepPartial - ): CancelSoftwareUpgradeProposal { - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/api/annotations.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/api/http.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/protobuf/any.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/protobuf/any.ts deleted file mode 100644 index 233eae465d..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - type_url: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { type_url: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.type_url !== "") { - writer.uint32(10).string(message.type_url); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = String(object.type_url); - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.type_url !== undefined && (obj.type_url = message.type_url); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = object.type_url; - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 11864afc86..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.ts deleted file mode 100644 index a0b97adf2a..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* eslint-disable */ -import { - DenomTrace, - Params, -} from "../../../../ibc/applications/transfer/v1/transfer"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "ibc.applications.transfer.v1"; - -/** GenesisState defines the ibc-transfer genesis state */ -export interface GenesisState { - port_id: string; - denom_traces: DenomTrace[]; - params: Params | undefined; -} - -const baseGenesisState: object = { port_id: "" }; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - for (const v of message.denom_traces) { - DenomTrace.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.denom_traces = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.denom_traces.push(DenomTrace.decode(reader, reader.uint32())); - break; - case 3: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.denom_traces = []; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.denom_traces !== undefined && object.denom_traces !== null) { - for (const e of object.denom_traces) { - message.denom_traces.push(DenomTrace.fromJSON(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - if (message.denom_traces) { - obj.denom_traces = message.denom_traces.map((e) => - e ? DenomTrace.toJSON(e) : undefined - ); - } else { - obj.denom_traces = []; - } - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.denom_traces = []; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.denom_traces !== undefined && object.denom_traces !== null) { - for (const e of object.denom_traces) { - message.denom_traces.push(DenomTrace.fromPartial(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.ts deleted file mode 100644 index 3a54b35799..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/query.ts +++ /dev/null @@ -1,682 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { - DenomTrace, - Params, -} from "../../../../ibc/applications/transfer/v1/transfer"; -import { - PageRequest, - PageResponse, -} from "../../../../cosmos/base/query/v1beta1/pagination"; - -export const protobufPackage = "ibc.applications.transfer.v1"; - -/** - * QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC - * method - */ -export interface QueryDenomTraceRequest { - /** hash (in hex format) of the denomination trace information. */ - hash: string; -} - -/** - * QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC - * method. - */ -export interface QueryDenomTraceResponse { - /** denom_trace returns the requested denomination trace information. */ - denom_trace: DenomTrace | undefined; -} - -/** - * QueryConnectionsRequest is the request type for the Query/DenomTraces RPC - * method - */ -export interface QueryDenomTracesRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} - -/** - * QueryConnectionsResponse is the response type for the Query/DenomTraces RPC - * method. - */ -export interface QueryDenomTracesResponse { - /** denom_traces returns all denominations trace information. */ - denom_traces: DenomTrace[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} - -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} - -/** - * QueryDenomHashRequest is the request type for the Query/DenomHash RPC - * method - */ -export interface QueryDenomHashRequest { - /** The denomination trace ([port_id]/[channel_id])+/[denom] */ - trace: string; -} - -/** - * QueryDenomHashResponse is the response type for the Query/DenomHash RPC - * method. - */ -export interface QueryDenomHashResponse { - /** hash (in hex format) of the denomination trace information. */ - hash: string; -} - -const baseQueryDenomTraceRequest: object = { hash: "" }; - -export const QueryDenomTraceRequest = { - encode( - message: QueryDenomTraceRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDenomTraceRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDenomTraceRequest } as QueryDenomTraceRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomTraceRequest { - const message = { ...baseQueryDenomTraceRequest } as QueryDenomTraceRequest; - if (object.hash !== undefined && object.hash !== null) { - message.hash = String(object.hash); - } else { - message.hash = ""; - } - return message; - }, - - toJSON(message: QueryDenomTraceRequest): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = message.hash); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomTraceRequest { - const message = { ...baseQueryDenomTraceRequest } as QueryDenomTraceRequest; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = ""; - } - return message; - }, -}; - -const baseQueryDenomTraceResponse: object = {}; - -export const QueryDenomTraceResponse = { - encode( - message: QueryDenomTraceResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.denom_trace !== undefined) { - DenomTrace.encode(message.denom_trace, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDenomTraceResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomTraceResponse, - } as QueryDenomTraceResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom_trace = DenomTrace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomTraceResponse { - const message = { - ...baseQueryDenomTraceResponse, - } as QueryDenomTraceResponse; - if (object.denom_trace !== undefined && object.denom_trace !== null) { - message.denom_trace = DenomTrace.fromJSON(object.denom_trace); - } else { - message.denom_trace = undefined; - } - return message; - }, - - toJSON(message: QueryDenomTraceResponse): unknown { - const obj: any = {}; - message.denom_trace !== undefined && - (obj.denom_trace = message.denom_trace - ? DenomTrace.toJSON(message.denom_trace) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomTraceResponse { - const message = { - ...baseQueryDenomTraceResponse, - } as QueryDenomTraceResponse; - if (object.denom_trace !== undefined && object.denom_trace !== null) { - message.denom_trace = DenomTrace.fromPartial(object.denom_trace); - } else { - message.denom_trace = undefined; - } - return message; - }, -}; - -const baseQueryDenomTracesRequest: object = {}; - -export const QueryDenomTracesRequest = { - encode( - message: QueryDenomTracesRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDenomTracesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomTracesRequest, - } as QueryDenomTracesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomTracesRequest { - const message = { - ...baseQueryDenomTracesRequest, - } as QueryDenomTracesRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDenomTracesRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomTracesRequest { - const message = { - ...baseQueryDenomTracesRequest, - } as QueryDenomTracesRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryDenomTracesResponse: object = {}; - -export const QueryDenomTracesResponse = { - encode( - message: QueryDenomTracesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.denom_traces) { - DenomTrace.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomTracesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomTracesResponse, - } as QueryDenomTracesResponse; - message.denom_traces = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom_traces.push(DenomTrace.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomTracesResponse { - const message = { - ...baseQueryDenomTracesResponse, - } as QueryDenomTracesResponse; - message.denom_traces = []; - if (object.denom_traces !== undefined && object.denom_traces !== null) { - for (const e of object.denom_traces) { - message.denom_traces.push(DenomTrace.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryDenomTracesResponse): unknown { - const obj: any = {}; - if (message.denom_traces) { - obj.denom_traces = message.denom_traces.map((e) => - e ? DenomTrace.toJSON(e) : undefined - ); - } else { - obj.denom_traces = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomTracesResponse { - const message = { - ...baseQueryDenomTracesResponse, - } as QueryDenomTracesResponse; - message.denom_traces = []; - if (object.denom_traces !== undefined && object.denom_traces !== null) { - for (const e of object.denom_traces) { - message.denom_traces.push(DenomTrace.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -const baseQueryDenomHashRequest: object = { trace: "" }; - -export const QueryDenomHashRequest = { - encode( - message: QueryDenomHashRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.trace !== "") { - writer.uint32(10).string(message.trace); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDenomHashRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDenomHashRequest } as QueryDenomHashRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.trace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomHashRequest { - const message = { ...baseQueryDenomHashRequest } as QueryDenomHashRequest; - if (object.trace !== undefined && object.trace !== null) { - message.trace = String(object.trace); - } else { - message.trace = ""; - } - return message; - }, - - toJSON(message: QueryDenomHashRequest): unknown { - const obj: any = {}; - message.trace !== undefined && (obj.trace = message.trace); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomHashRequest { - const message = { ...baseQueryDenomHashRequest } as QueryDenomHashRequest; - if (object.trace !== undefined && object.trace !== null) { - message.trace = object.trace; - } else { - message.trace = ""; - } - return message; - }, -}; - -const baseQueryDenomHashResponse: object = { hash: "" }; - -export const QueryDenomHashResponse = { - encode( - message: QueryDenomHashResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryDenomHashResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryDenomHashResponse } as QueryDenomHashResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomHashResponse { - const message = { ...baseQueryDenomHashResponse } as QueryDenomHashResponse; - if (object.hash !== undefined && object.hash !== null) { - message.hash = String(object.hash); - } else { - message.hash = ""; - } - return message; - }, - - toJSON(message: QueryDenomHashResponse): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = message.hash); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomHashResponse { - const message = { ...baseQueryDenomHashResponse } as QueryDenomHashResponse; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = ""; - } - return message; - }, -}; - -/** Query provides defines the gRPC querier service. */ -export interface Query { - /** DenomTrace queries a denomination trace information. */ - DenomTrace(request: QueryDenomTraceRequest): Promise; - /** DenomTraces queries all denomination traces. */ - DenomTraces( - request: QueryDenomTracesRequest - ): Promise; - /** Params queries all parameters of the ibc-transfer module. */ - Params(request: QueryParamsRequest): Promise; - /** DenomHash queries a denomination hash information. */ - DenomHash(request: QueryDenomHashRequest): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - DenomTrace( - request: QueryDenomTraceRequest - ): Promise { - const data = QueryDenomTraceRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.transfer.v1.Query", - "DenomTrace", - data - ); - return promise.then((data) => - QueryDenomTraceResponse.decode(new Reader(data)) - ); - } - - DenomTraces( - request: QueryDenomTracesRequest - ): Promise { - const data = QueryDenomTracesRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.transfer.v1.Query", - "DenomTraces", - data - ); - return promise.then((data) => - QueryDenomTracesResponse.decode(new Reader(data)) - ); - } - - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.transfer.v1.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - - DenomHash(request: QueryDenomHashRequest): Promise { - const data = QueryDenomHashRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.transfer.v1.Query", - "DenomHash", - data - ); - return promise.then((data) => - QueryDenomHashResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.ts deleted file mode 100644 index e3533c988c..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/transfer.ts +++ /dev/null @@ -1,200 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "ibc.applications.transfer.v1"; - -/** - * DenomTrace contains the base denomination for ICS20 fungible tokens and the - * source tracing information path. - */ -export interface DenomTrace { - /** - * path defines the chain of port/channel identifiers used for tracing the - * source of the fungible token. - */ - path: string; - /** base denomination of the relayed fungible token. */ - base_denom: string; -} - -/** - * Params defines the set of IBC transfer parameters. - * NOTE: To prevent a single token from being transferred, set the - * TransfersEnabled parameter to true and then set the bank module's SendEnabled - * parameter for the denomination to false. - */ -export interface Params { - /** - * send_enabled enables or disables all cross-chain token transfers from this - * chain. - */ - send_enabled: boolean; - /** - * receive_enabled enables or disables all cross-chain token transfers to this - * chain. - */ - receive_enabled: boolean; -} - -const baseDenomTrace: object = { path: "", base_denom: "" }; - -export const DenomTrace = { - encode(message: DenomTrace, writer: Writer = Writer.create()): Writer { - if (message.path !== "") { - writer.uint32(10).string(message.path); - } - if (message.base_denom !== "") { - writer.uint32(18).string(message.base_denom); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DenomTrace { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDenomTrace } as DenomTrace; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.string(); - break; - case 2: - message.base_denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DenomTrace { - const message = { ...baseDenomTrace } as DenomTrace; - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - if (object.base_denom !== undefined && object.base_denom !== null) { - message.base_denom = String(object.base_denom); - } else { - message.base_denom = ""; - } - return message; - }, - - toJSON(message: DenomTrace): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = message.path); - message.base_denom !== undefined && (obj.base_denom = message.base_denom); - return obj; - }, - - fromPartial(object: DeepPartial): DenomTrace { - const message = { ...baseDenomTrace } as DenomTrace; - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - if (object.base_denom !== undefined && object.base_denom !== null) { - message.base_denom = object.base_denom; - } else { - message.base_denom = ""; - } - return message; - }, -}; - -const baseParams: object = { send_enabled: false, receive_enabled: false }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.send_enabled === true) { - writer.uint32(8).bool(message.send_enabled); - } - if (message.receive_enabled === true) { - writer.uint32(16).bool(message.receive_enabled); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.send_enabled = reader.bool(); - break; - case 2: - message.receive_enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if (object.send_enabled !== undefined && object.send_enabled !== null) { - message.send_enabled = Boolean(object.send_enabled); - } else { - message.send_enabled = false; - } - if ( - object.receive_enabled !== undefined && - object.receive_enabled !== null - ) { - message.receive_enabled = Boolean(object.receive_enabled); - } else { - message.receive_enabled = false; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.send_enabled !== undefined && - (obj.send_enabled = message.send_enabled); - message.receive_enabled !== undefined && - (obj.receive_enabled = message.receive_enabled); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if (object.send_enabled !== undefined && object.send_enabled !== null) { - message.send_enabled = object.send_enabled; - } else { - message.send_enabled = false; - } - if ( - object.receive_enabled !== undefined && - object.receive_enabled !== null - ) { - message.receive_enabled = object.receive_enabled; - } else { - message.receive_enabled = false; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.ts deleted file mode 100644 index f084f672ba..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/tx.ts +++ /dev/null @@ -1,315 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Coin } from "../../../../cosmos/base/v1beta1/coin"; -import { Height } from "../../../../ibc/core/client/v1/client"; - -export const protobufPackage = "ibc.applications.transfer.v1"; - -/** - * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between - * ICS20 enabled chains. See ICS Spec here: - * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures - */ -export interface MsgTransfer { - /** the port on which the packet will be sent */ - source_port: string; - /** the channel by which the packet will be sent */ - source_channel: string; - /** the tokens to be transferred */ - token: Coin | undefined; - /** the sender address */ - sender: string; - /** the recipient address on the destination chain */ - receiver: string; - /** - * Timeout height relative to the current block height. - * The timeout is disabled when set to 0. - */ - timeout_height: Height | undefined; - /** - * Timeout timestamp in absolute nanoseconds since unix epoch. - * The timeout is disabled when set to 0. - */ - timeout_timestamp: number; -} - -/** MsgTransferResponse defines the Msg/Transfer response type. */ -export interface MsgTransferResponse {} - -const baseMsgTransfer: object = { - source_port: "", - source_channel: "", - sender: "", - receiver: "", - timeout_timestamp: 0, -}; - -export const MsgTransfer = { - encode(message: MsgTransfer, writer: Writer = Writer.create()): Writer { - if (message.source_port !== "") { - writer.uint32(10).string(message.source_port); - } - if (message.source_channel !== "") { - writer.uint32(18).string(message.source_channel); - } - if (message.token !== undefined) { - Coin.encode(message.token, writer.uint32(26).fork()).ldelim(); - } - if (message.sender !== "") { - writer.uint32(34).string(message.sender); - } - if (message.receiver !== "") { - writer.uint32(42).string(message.receiver); - } - if (message.timeout_height !== undefined) { - Height.encode(message.timeout_height, writer.uint32(50).fork()).ldelim(); - } - if (message.timeout_timestamp !== 0) { - writer.uint32(56).uint64(message.timeout_timestamp); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgTransfer { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTransfer } as MsgTransfer; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.source_port = reader.string(); - break; - case 2: - message.source_channel = reader.string(); - break; - case 3: - message.token = Coin.decode(reader, reader.uint32()); - break; - case 4: - message.sender = reader.string(); - break; - case 5: - message.receiver = reader.string(); - break; - case 6: - message.timeout_height = Height.decode(reader, reader.uint32()); - break; - case 7: - message.timeout_timestamp = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgTransfer { - const message = { ...baseMsgTransfer } as MsgTransfer; - if (object.source_port !== undefined && object.source_port !== null) { - message.source_port = String(object.source_port); - } else { - message.source_port = ""; - } - if (object.source_channel !== undefined && object.source_channel !== null) { - message.source_channel = String(object.source_channel); - } else { - message.source_channel = ""; - } - if (object.token !== undefined && object.token !== null) { - message.token = Coin.fromJSON(object.token); - } else { - message.token = undefined; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = String(object.receiver); - } else { - message.receiver = ""; - } - if (object.timeout_height !== undefined && object.timeout_height !== null) { - message.timeout_height = Height.fromJSON(object.timeout_height); - } else { - message.timeout_height = undefined; - } - if ( - object.timeout_timestamp !== undefined && - object.timeout_timestamp !== null - ) { - message.timeout_timestamp = Number(object.timeout_timestamp); - } else { - message.timeout_timestamp = 0; - } - return message; - }, - - toJSON(message: MsgTransfer): unknown { - const obj: any = {}; - message.source_port !== undefined && - (obj.source_port = message.source_port); - message.source_channel !== undefined && - (obj.source_channel = message.source_channel); - message.token !== undefined && - (obj.token = message.token ? Coin.toJSON(message.token) : undefined); - message.sender !== undefined && (obj.sender = message.sender); - message.receiver !== undefined && (obj.receiver = message.receiver); - message.timeout_height !== undefined && - (obj.timeout_height = message.timeout_height - ? Height.toJSON(message.timeout_height) - : undefined); - message.timeout_timestamp !== undefined && - (obj.timeout_timestamp = message.timeout_timestamp); - return obj; - }, - - fromPartial(object: DeepPartial): MsgTransfer { - const message = { ...baseMsgTransfer } as MsgTransfer; - if (object.source_port !== undefined && object.source_port !== null) { - message.source_port = object.source_port; - } else { - message.source_port = ""; - } - if (object.source_channel !== undefined && object.source_channel !== null) { - message.source_channel = object.source_channel; - } else { - message.source_channel = ""; - } - if (object.token !== undefined && object.token !== null) { - message.token = Coin.fromPartial(object.token); - } else { - message.token = undefined; - } - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if (object.receiver !== undefined && object.receiver !== null) { - message.receiver = object.receiver; - } else { - message.receiver = ""; - } - if (object.timeout_height !== undefined && object.timeout_height !== null) { - message.timeout_height = Height.fromPartial(object.timeout_height); - } else { - message.timeout_height = undefined; - } - if ( - object.timeout_timestamp !== undefined && - object.timeout_timestamp !== null - ) { - message.timeout_timestamp = object.timeout_timestamp; - } else { - message.timeout_timestamp = 0; - } - return message; - }, -}; - -const baseMsgTransferResponse: object = {}; - -export const MsgTransferResponse = { - encode(_: MsgTransferResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgTransferResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTransferResponse } as MsgTransferResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgTransferResponse { - const message = { ...baseMsgTransferResponse } as MsgTransferResponse; - return message; - }, - - toJSON(_: MsgTransferResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgTransferResponse { - const message = { ...baseMsgTransferResponse } as MsgTransferResponse; - return message; - }, -}; - -/** Msg defines the ibc/transfer Msg service. */ -export interface Msg { - /** Transfer defines a rpc handler method for MsgTransfer. */ - Transfer(request: MsgTransfer): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Transfer(request: MsgTransfer): Promise { - const data = MsgTransfer.encode(request).finish(); - const promise = this.rpc.request( - "ibc.applications.transfer.v1.Msg", - "Transfer", - data - ); - return promise.then((data) => MsgTransferResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.ts b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.ts deleted file mode 100644 index b34686d396..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/module/types/ibc/core/client/v1/client.ts +++ /dev/null @@ -1,814 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; - -export const protobufPackage = "ibc.core.client.v1"; - -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientState { - /** client identifier */ - client_id: string; - /** client state */ - client_state: Any | undefined; -} - -/** - * ConsensusStateWithHeight defines a consensus state with an additional height - * field. - */ -export interface ConsensusStateWithHeight { - /** consensus state height */ - height: Height | undefined; - /** consensus state */ - consensus_state: Any | undefined; -} - -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStates { - /** client identifier */ - client_id: string; - /** consensus states and their heights associated with the client */ - consensus_states: ConsensusStateWithHeight[]; -} - -/** - * ClientUpdateProposal is a governance proposal. If it passes, the substitute - * client's latest consensus state is copied over to the subject client. The proposal - * handler may fail if the subject and the substitute do not match in client and - * chain parameters (with exception to latest height, frozen height, and chain-id). - */ -export interface ClientUpdateProposal { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - subject_client_id: string; - /** - * the substitute client identifier for the client standing in for the subject - * client - */ - substitute_client_id: string; -} - -/** - * UpgradeProposal is a gov Content type for initiating an IBC breaking - * upgrade. - */ -export interface UpgradeProposal { - title: string; - description: string; - plan: Plan | undefined; - /** - * An UpgradedClientState must be provided to perform an IBC breaking upgrade. - * This will make the chain commit to the correct upgraded (self) client state - * before the upgrade occurs, so that connecting chains can verify that the - * new upgraded client is valid by verifying a proof on the previous version - * of the chain. This will allow IBC connections to persist smoothly across - * planned chain upgrades - */ - upgraded_client_state: Any | undefined; -} - -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * 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 - */ -export interface Height { - /** the revision that the client is currently on */ - revision_number: number; - /** the height within the given revision */ - revision_height: number; -} - -/** Params defines the set of IBC light client parameters. */ -export interface Params { - /** allowed_clients defines the list of allowed client state types. */ - allowed_clients: string[]; -} - -const baseIdentifiedClientState: object = { client_id: "" }; - -export const IdentifiedClientState = { - encode( - message: IdentifiedClientState, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - if (message.client_state !== undefined) { - Any.encode(message.client_state, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IdentifiedClientState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.client_state = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromJSON(object.client_state); - } else { - message.client_state = undefined; - } - return message; - }, - - toJSON(message: IdentifiedClientState): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - message.client_state !== undefined && - (obj.client_state = message.client_state - ? Any.toJSON(message.client_state) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromPartial(object.client_state); - } else { - message.client_state = undefined; - } - return message; - }, -}; - -const baseConsensusStateWithHeight: object = {}; - -export const ConsensusStateWithHeight = { - encode( - message: ConsensusStateWithHeight, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(10).fork()).ldelim(); - } - if (message.consensus_state !== undefined) { - Any.encode(message.consensus_state, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ConsensusStateWithHeight { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensus_state = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromJSON(object.consensus_state); - } else { - message.consensus_state = undefined; - } - return message; - }, - - toJSON(message: ConsensusStateWithHeight): unknown { - const obj: any = {}; - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - message.consensus_state !== undefined && - (obj.consensus_state = message.consensus_state - ? Any.toJSON(message.consensus_state) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromPartial(object.consensus_state); - } else { - message.consensus_state = undefined; - } - return message; - }, -}; - -const baseClientConsensusStates: object = { client_id: "" }; - -export const ClientConsensusStates = { - encode( - message: ClientConsensusStates, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - for (const v of message.consensus_states) { - ConsensusStateWithHeight.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientConsensusStates { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensus_states = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.consensus_states.push( - ConsensusStateWithHeight.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensus_states = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if ( - object.consensus_states !== undefined && - object.consensus_states !== null - ) { - for (const e of object.consensus_states) { - message.consensus_states.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ClientConsensusStates): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - if (message.consensus_states) { - obj.consensus_states = message.consensus_states.map((e) => - e ? ConsensusStateWithHeight.toJSON(e) : undefined - ); - } else { - obj.consensus_states = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensus_states = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if ( - object.consensus_states !== undefined && - object.consensus_states !== null - ) { - for (const e of object.consensus_states) { - message.consensus_states.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - return message; - }, -}; - -const baseClientUpdateProposal: object = { - title: "", - description: "", - subject_client_id: "", - substitute_client_id: "", -}; - -export const ClientUpdateProposal = { - encode( - message: ClientUpdateProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.subject_client_id !== "") { - writer.uint32(26).string(message.subject_client_id); - } - if (message.substitute_client_id !== "") { - writer.uint32(34).string(message.substitute_client_id); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientUpdateProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.subject_client_id = reader.string(); - break; - case 4: - message.substitute_client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if ( - object.subject_client_id !== undefined && - object.subject_client_id !== null - ) { - message.subject_client_id = String(object.subject_client_id); - } else { - message.subject_client_id = ""; - } - if ( - object.substitute_client_id !== undefined && - object.substitute_client_id !== null - ) { - message.substitute_client_id = String(object.substitute_client_id); - } else { - message.substitute_client_id = ""; - } - return message; - }, - - toJSON(message: ClientUpdateProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.subject_client_id !== undefined && - (obj.subject_client_id = message.subject_client_id); - message.substitute_client_id !== undefined && - (obj.substitute_client_id = message.substitute_client_id); - return obj; - }, - - fromPartial(object: DeepPartial): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if ( - object.subject_client_id !== undefined && - object.subject_client_id !== null - ) { - message.subject_client_id = object.subject_client_id; - } else { - message.subject_client_id = ""; - } - if ( - object.substitute_client_id !== undefined && - object.substitute_client_id !== null - ) { - message.substitute_client_id = object.substitute_client_id; - } else { - message.substitute_client_id = ""; - } - return message; - }, -}; - -const baseUpgradeProposal: object = { title: "", description: "" }; - -export const UpgradeProposal = { - encode(message: UpgradeProposal, writer: Writer = Writer.create()): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); - } - if (message.upgraded_client_state !== undefined) { - Any.encode( - message.upgraded_client_state, - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUpgradeProposal } as UpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - case 4: - message.upgraded_client_state = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpgradeProposal { - const message = { ...baseUpgradeProposal } as UpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromJSON(object.plan); - } else { - message.plan = undefined; - } - if ( - object.upgraded_client_state !== undefined && - object.upgraded_client_state !== null - ) { - message.upgraded_client_state = Any.fromJSON( - object.upgraded_client_state - ); - } else { - message.upgraded_client_state = undefined; - } - return message; - }, - - toJSON(message: UpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.plan !== undefined && - (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - message.upgraded_client_state !== undefined && - (obj.upgraded_client_state = message.upgraded_client_state - ? Any.toJSON(message.upgraded_client_state) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): UpgradeProposal { - const message = { ...baseUpgradeProposal } as UpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromPartial(object.plan); - } else { - message.plan = undefined; - } - if ( - object.upgraded_client_state !== undefined && - object.upgraded_client_state !== null - ) { - message.upgraded_client_state = Any.fromPartial( - object.upgraded_client_state - ); - } else { - message.upgraded_client_state = undefined; - } - return message; - }, -}; - -const baseHeight: object = { revision_number: 0, revision_height: 0 }; - -export const Height = { - encode(message: Height, writer: Writer = Writer.create()): Writer { - if (message.revision_number !== 0) { - writer.uint32(8).uint64(message.revision_number); - } - if (message.revision_height !== 0) { - writer.uint32(16).uint64(message.revision_height); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Height { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeight } as Height; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revision_number = longToNumber(reader.uint64() as Long); - break; - case 2: - message.revision_height = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Height { - const message = { ...baseHeight } as Height; - if ( - object.revision_number !== undefined && - object.revision_number !== null - ) { - message.revision_number = Number(object.revision_number); - } else { - message.revision_number = 0; - } - if ( - object.revision_height !== undefined && - object.revision_height !== null - ) { - message.revision_height = Number(object.revision_height); - } else { - message.revision_height = 0; - } - return message; - }, - - toJSON(message: Height): unknown { - const obj: any = {}; - message.revision_number !== undefined && - (obj.revision_number = message.revision_number); - message.revision_height !== undefined && - (obj.revision_height = message.revision_height); - return obj; - }, - - fromPartial(object: DeepPartial): Height { - const message = { ...baseHeight } as Height; - if ( - object.revision_number !== undefined && - object.revision_number !== null - ) { - message.revision_number = object.revision_number; - } else { - message.revision_number = 0; - } - if ( - object.revision_height !== undefined && - object.revision_height !== null - ) { - message.revision_height = object.revision_height; - } else { - message.revision_height = 0; - } - return message; - }, -}; - -const baseParams: object = { allowed_clients: "" }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - for (const v of message.allowed_clients) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - message.allowed_clients = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowed_clients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - message.allowed_clients = []; - if ( - object.allowed_clients !== undefined && - object.allowed_clients !== null - ) { - for (const e of object.allowed_clients) { - message.allowed_clients.push(String(e)); - } - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.allowed_clients) { - obj.allowed_clients = message.allowed_clients.map((e) => e); - } else { - obj.allowed_clients = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - message.allowed_clients = []; - if ( - object.allowed_clients !== undefined && - object.allowed_clients !== null - ) { - for (const e of object.allowed_clients) { - message.allowed_clients.push(e); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/package.json b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/package.json deleted file mode 100755 index 0aa8c2eb8e..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "ibc-applications-transfer-v1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module ibc.applications.transfer.v1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/ibc-go/v3/modules/apps/transfer/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/vuex-root b/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.applications.transfer.v1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/index.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/index.ts deleted file mode 100755 index c13c088bdf..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/index.ts +++ /dev/null @@ -1,517 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { Channel } from "./module/types/ibc/core/channel/v1/channel" -import { IdentifiedChannel } from "./module/types/ibc/core/channel/v1/channel" -import { Counterparty } from "./module/types/ibc/core/channel/v1/channel" -import { Packet } from "./module/types/ibc/core/channel/v1/channel" -import { PacketState } from "./module/types/ibc/core/channel/v1/channel" -import { Acknowledgement } from "./module/types/ibc/core/channel/v1/channel" -import { PacketSequence } from "./module/types/ibc/core/channel/v1/genesis" - - -export { Channel, IdentifiedChannel, Counterparty, Packet, PacketState, Acknowledgement, PacketSequence }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Channel: {}, - Channels: {}, - ConnectionChannels: {}, - ChannelClientState: {}, - ChannelConsensusState: {}, - PacketCommitment: {}, - PacketCommitments: {}, - PacketReceipt: {}, - PacketAcknowledgement: {}, - PacketAcknowledgements: {}, - UnreceivedPackets: {}, - UnreceivedAcks: {}, - NextSequenceReceive: {}, - - _Structure: { - Channel: getStructure(Channel.fromPartial({})), - IdentifiedChannel: getStructure(IdentifiedChannel.fromPartial({})), - Counterparty: getStructure(Counterparty.fromPartial({})), - Packet: getStructure(Packet.fromPartial({})), - PacketState: getStructure(PacketState.fromPartial({})), - Acknowledgement: getStructure(Acknowledgement.fromPartial({})), - PacketSequence: getStructure(PacketSequence.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getChannel: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Channel[JSON.stringify(params)] ?? {} - }, - getChannels: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Channels[JSON.stringify(params)] ?? {} - }, - getConnectionChannels: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ConnectionChannels[JSON.stringify(params)] ?? {} - }, - getChannelClientState: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ChannelClientState[JSON.stringify(params)] ?? {} - }, - getChannelConsensusState: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ChannelConsensusState[JSON.stringify(params)] ?? {} - }, - getPacketCommitment: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.PacketCommitment[JSON.stringify(params)] ?? {} - }, - getPacketCommitments: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.PacketCommitments[JSON.stringify(params)] ?? {} - }, - getPacketReceipt: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.PacketReceipt[JSON.stringify(params)] ?? {} - }, - getPacketAcknowledgement: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.PacketAcknowledgement[JSON.stringify(params)] ?? {} - }, - getPacketAcknowledgements: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.PacketAcknowledgements[JSON.stringify(params)] ?? {} - }, - getUnreceivedPackets: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.UnreceivedPackets[JSON.stringify(params)] ?? {} - }, - getUnreceivedAcks: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.UnreceivedAcks[JSON.stringify(params)] ?? {} - }, - getNextSequenceReceive: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.NextSequenceReceive[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: ibc.core.channel.v1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryChannel({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryChannel( key.channel_id, key.port_id)).data - - - commit('QUERY', { query: 'Channel', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryChannel', payload: { options: { all }, params: {...key},query }}) - return getters['getChannel']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryChannel API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryChannels({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryChannels(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryChannels({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Channels', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryChannels', payload: { options: { all }, params: {...key},query }}) - return getters['getChannels']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryChannels API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryConnectionChannels({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryConnectionChannels( key.connection, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryConnectionChannels( key.connection, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ConnectionChannels', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryConnectionChannels', payload: { options: { all }, params: {...key},query }}) - return getters['getConnectionChannels']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryConnectionChannels API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryChannelClientState({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryChannelClientState( key.channel_id, key.port_id)).data - - - commit('QUERY', { query: 'ChannelClientState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryChannelClientState', payload: { options: { all }, params: {...key},query }}) - return getters['getChannelClientState']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryChannelClientState API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryChannelConsensusState({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryChannelConsensusState( key.channel_id, key.port_id, key.revision_number, key.revision_height)).data - - - commit('QUERY', { query: 'ChannelConsensusState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryChannelConsensusState', payload: { options: { all }, params: {...key},query }}) - return getters['getChannelConsensusState']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryChannelConsensusState API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryPacketCommitment({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryPacketCommitment( key.channel_id, key.port_id, key.sequence)).data - - - commit('QUERY', { query: 'PacketCommitment', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryPacketCommitment', payload: { options: { all }, params: {...key},query }}) - return getters['getPacketCommitment']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryPacketCommitment API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryPacketCommitments({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryPacketCommitments( key.channel_id, key.port_id, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryPacketCommitments( key.channel_id, key.port_id, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'PacketCommitments', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryPacketCommitments', payload: { options: { all }, params: {...key},query }}) - return getters['getPacketCommitments']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryPacketCommitments API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryPacketReceipt({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryPacketReceipt( key.channel_id, key.port_id, key.sequence)).data - - - commit('QUERY', { query: 'PacketReceipt', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryPacketReceipt', payload: { options: { all }, params: {...key},query }}) - return getters['getPacketReceipt']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryPacketReceipt API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryPacketAcknowledgement({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryPacketAcknowledgement( key.channel_id, key.port_id, key.sequence)).data - - - commit('QUERY', { query: 'PacketAcknowledgement', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryPacketAcknowledgement', payload: { options: { all }, params: {...key},query }}) - return getters['getPacketAcknowledgement']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryPacketAcknowledgement API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryPacketAcknowledgements({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryPacketAcknowledgements( key.channel_id, key.port_id, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryPacketAcknowledgements( key.channel_id, key.port_id, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'PacketAcknowledgements', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryPacketAcknowledgements', payload: { options: { all }, params: {...key},query }}) - return getters['getPacketAcknowledgements']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryPacketAcknowledgements API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryUnreceivedPackets({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryUnreceivedPackets( key.channel_id, key.port_id, key.packet_commitment_sequences)).data - - - commit('QUERY', { query: 'UnreceivedPackets', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryUnreceivedPackets', payload: { options: { all }, params: {...key},query }}) - return getters['getUnreceivedPackets']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryUnreceivedPackets API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryUnreceivedAcks({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryUnreceivedAcks( key.channel_id, key.port_id, key.packet_ack_sequences)).data - - - commit('QUERY', { query: 'UnreceivedAcks', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryUnreceivedAcks', payload: { options: { all }, params: {...key},query }}) - return getters['getUnreceivedAcks']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryUnreceivedAcks API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryNextSequenceReceive({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryNextSequenceReceive( key.channel_id, key.port_id)).data - - - commit('QUERY', { query: 'NextSequenceReceive', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryNextSequenceReceive', payload: { options: { all }, params: {...key},query }}) - return getters['getNextSequenceReceive']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryNextSequenceReceive API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - } -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/index.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/index.ts deleted file mode 100755 index 67d4b093f0..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; - - -const types = [ - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/rest.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/rest.ts deleted file mode 100644 index 1bf035befb..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/rest.ts +++ /dev/null @@ -1,1385 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* 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. -*/ -export interface V1Channel { - /** - * 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. - */ - state?: V1State; - - /** - * - 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 - */ - ordering?: V1Order; - counterparty?: V1Counterparty; - connection_hops?: string[]; - version?: string; -} - -export interface V1Counterparty { - /** port on the counterparty chain which owns the other end of the channel. */ - port_id?: string; - channel_id?: string; -} - -/** -* 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 -*/ -export interface V1Height { - /** @format uint64 */ - revision_number?: string; - - /** @format uint64 */ - revision_height?: string; -} - -/** -* IdentifiedChannel defines a channel with additional port and channel -identifier fields. -*/ -export interface V1IdentifiedChannel { - /** - * 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. - */ - state?: V1State; - - /** - * - 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 - */ - ordering?: V1Order; - counterparty?: V1Counterparty; - connection_hops?: string[]; - version?: string; - port_id?: string; - channel_id?: string; -} - -/** -* IdentifiedClientState defines a client state with an additional client -identifier field. -*/ -export interface V1IdentifiedClientState { - client_id?: string; - - /** - * `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_state?: ProtobufAny; -} - -/** - * MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. - */ -export interface V1MsgAcknowledgementResponse { - /** - * - RESPONSE_RESULT_UNSPECIFIED: Default zero value enumeration - * - RESPONSE_RESULT_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - * - RESPONSE_RESULT_SUCCESS: The message was executed successfully - */ - result?: V1ResponseResultType; -} - -/** -* MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response -type. -*/ -export type V1MsgChannelCloseConfirmResponse = object; - -/** - * MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. - */ -export type V1MsgChannelCloseInitResponse = object; - -/** - * MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. - */ -export type V1MsgChannelOpenAckResponse = object; - -/** -* MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response -type. -*/ -export type V1MsgChannelOpenConfirmResponse = object; - -/** - * MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. - */ -export interface V1MsgChannelOpenInitResponse { - channel_id?: string; -} - -/** - * MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. - */ -export type V1MsgChannelOpenTryResponse = object; - -/** - * MsgRecvPacketResponse defines the Msg/RecvPacket response type. - */ -export interface V1MsgRecvPacketResponse { - /** - * - RESPONSE_RESULT_UNSPECIFIED: Default zero value enumeration - * - RESPONSE_RESULT_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - * - RESPONSE_RESULT_SUCCESS: The message was executed successfully - */ - result?: V1ResponseResultType; -} - -/** - * MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. - */ -export interface V1MsgTimeoutOnCloseResponse { - /** - * - RESPONSE_RESULT_UNSPECIFIED: Default zero value enumeration - * - RESPONSE_RESULT_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - * - RESPONSE_RESULT_SUCCESS: The message was executed successfully - */ - result?: V1ResponseResultType; -} - -/** - * MsgTimeoutResponse defines the Msg/Timeout response type. - */ -export interface V1MsgTimeoutResponse { - /** - * - RESPONSE_RESULT_UNSPECIFIED: Default zero value enumeration - * - RESPONSE_RESULT_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - * - RESPONSE_RESULT_SUCCESS: The message was executed successfully - */ - result?: V1ResponseResultType; -} - -/** -* - 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 -*/ -export enum V1Order { - ORDER_NONE_UNSPECIFIED = "ORDER_NONE_UNSPECIFIED", - ORDER_UNORDERED = "ORDER_UNORDERED", - ORDER_ORDERED = "ORDER_ORDERED", -} - -export interface V1Packet { - /** - * number corresponds to the order of sends and receives, where a Packet - * with an earlier sequence number must be sent and received before a Packet - * with a later sequence number. - * @format uint64 - */ - sequence?: string; - - /** identifies the port on the sending chain. */ - source_port?: string; - - /** identifies the channel end on the sending chain. */ - source_channel?: string; - - /** identifies the port on the receiving chain. */ - destination_port?: string; - - /** identifies the channel end on the receiving chain. */ - destination_channel?: string; - - /** @format byte */ - data?: string; - - /** - * 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_height?: V1Height; - - /** @format uint64 */ - timeout_timestamp?: string; -} - -/** -* 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. -*/ -export interface V1PacketState { - /** channel port identifier. */ - port_id?: string; - - /** channel unique identifier. */ - channel_id?: string; - - /** - * packet sequence. - * @format uint64 - */ - sequence?: string; - - /** - * embedded data that represents packet state. - * @format byte - */ - data?: string; -} - -export interface V1QueryChannelClientStateResponse { - /** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ - identified_client_state?: V1IdentifiedClientState; - - /** @format byte */ - proof?: string; - - /** - * 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 - */ - proof_height?: V1Height; -} - -export interface V1QueryChannelConsensusStateResponse { - /** - * `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" - * } - */ - consensus_state?: ProtobufAny; - client_id?: string; - - /** @format byte */ - proof?: string; - - /** - * 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 - */ - proof_height?: V1Height; -} - -/** -* 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. -*/ -export interface V1QueryChannelResponse { - /** - * 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. - */ - channel?: V1Channel; - - /** @format byte */ - proof?: string; - - /** - * 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 - */ - proof_height?: V1Height; -} - -/** - * QueryChannelsResponse is the response type for the Query/Channels RPC method. - */ -export interface V1QueryChannelsResponse { - /** list of stored channels of the chain. */ - channels?: V1IdentifiedChannel[]; - - /** - * 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; - * } - */ - pagination?: V1Beta1PageResponse; - - /** - * 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 - */ - height?: V1Height; -} - -export interface V1QueryConnectionChannelsResponse { - /** list of channels associated with a connection. */ - channels?: V1IdentifiedChannel[]; - - /** - * 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; - * } - */ - pagination?: V1Beta1PageResponse; - - /** - * 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 - */ - height?: V1Height; -} - -export interface V1QueryNextSequenceReceiveResponse { - /** @format uint64 */ - next_sequence_receive?: string; - - /** @format byte */ - proof?: string; - - /** - * 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 - */ - proof_height?: V1Height; -} - -export interface V1QueryPacketAcknowledgementResponse { - /** @format byte */ - acknowledgement?: string; - - /** @format byte */ - proof?: string; - - /** - * 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 - */ - proof_height?: V1Height; -} - -export interface V1QueryPacketAcknowledgementsResponse { - acknowledgements?: V1PacketState[]; - - /** - * 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; - * } - */ - pagination?: V1Beta1PageResponse; - - /** - * 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 - */ - height?: V1Height; -} - -export interface V1QueryPacketCommitmentResponse { - /** @format byte */ - commitment?: string; - - /** @format byte */ - proof?: string; - - /** - * 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 - */ - proof_height?: V1Height; -} - -export interface V1QueryPacketCommitmentsResponse { - commitments?: V1PacketState[]; - - /** - * 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; - * } - */ - pagination?: V1Beta1PageResponse; - - /** - * 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 - */ - height?: V1Height; -} - -export interface V1QueryPacketReceiptResponse { - received?: boolean; - - /** @format byte */ - proof?: string; - - /** - * 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 - */ - proof_height?: V1Height; -} - -export interface V1QueryUnreceivedAcksResponse { - sequences?: string[]; - - /** - * 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 - */ - height?: V1Height; -} - -export interface V1QueryUnreceivedPacketsResponse { - sequences?: string[]; - - /** - * 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 - */ - height?: V1Height; -} - -/** -* - RESPONSE_RESULT_UNSPECIFIED: Default zero value enumeration - - RESPONSE_RESULT_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - - RESPONSE_RESULT_SUCCESS: The message was executed successfully -*/ -export enum V1ResponseResultType { - RESPONSE_RESULT_UNSPECIFIED = "RESPONSE_RESULT_UNSPECIFIED", - RESPONSE_RESULT_NOOP = "RESPONSE_RESULT_NOOP", - RESPONSE_RESULT_SUCCESS = "RESPONSE_RESULT_SUCCESS", -} - -/** -* 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. -*/ -export enum V1State { - STATE_UNINITIALIZED_UNSPECIFIED = "STATE_UNINITIALIZED_UNSPECIFIED", - STATE_INIT = "STATE_INIT", - STATE_TRYOPEN = "STATE_TRYOPEN", - STATE_OPEN = "STATE_OPEN", - STATE_CLOSED = "STATE_CLOSED", -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - count_total?: boolean; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title ibc/core/channel/v1/channel.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryChannels - * @summary Channels queries all the IBC channels of a chain. - * @request GET:/ibc/core/channel/v1/channels - */ - queryChannels = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/channel/v1/channels`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryChannel - * @summary Channel queries an IBC Channel. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id} - */ - queryChannel = (channel_id: string, port_id: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/channel/v1/channels/${channel_id}/ports/${port_id}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryChannelClientState - * @summary ChannelClientState queries for the client state for the channel associated -with the provided channel identifiers. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/client_state - */ - queryChannelClientState = (channel_id: string, port_id: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/channel/v1/channels/${channel_id}/ports/${port_id}/client_state`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryChannelConsensusState - * @summary ChannelConsensusState queries for the consensus state for the channel -associated with the provided channel identifiers. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height} - */ - queryChannelConsensusState = ( - channel_id: string, - port_id: string, - revision_number: string, - revision_height: string, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/channel/v1/channels/${channel_id}/ports/${port_id}/consensus_state/revision/${revision_number}/height/${revision_height}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryNextSequenceReceive - * @summary NextSequenceReceive returns the next receive sequence for a given channel. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence - */ - queryNextSequenceReceive = (channel_id: string, port_id: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/channel/v1/channels/${channel_id}/ports/${port_id}/next_sequence`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryPacketAcknowledgements - * @summary PacketAcknowledgements returns all the packet acknowledgements associated -with a channel. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements - */ - queryPacketAcknowledgements = ( - channel_id: string, - port_id: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - packet_commitment_sequences?: string[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/channel/v1/channels/${channel_id}/ports/${port_id}/packet_acknowledgements`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryPacketAcknowledgement - * @summary PacketAcknowledgement queries a stored packet acknowledgement hash. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence} - */ - queryPacketAcknowledgement = (channel_id: string, port_id: string, sequence: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/channel/v1/channels/${channel_id}/ports/${port_id}/packet_acks/${sequence}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryPacketCommitments - * @summary PacketCommitments returns all the packet commitments hashes associated -with a channel. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments - */ - queryPacketCommitments = ( - channel_id: string, - port_id: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/channel/v1/channels/${channel_id}/ports/${port_id}/packet_commitments`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryUnreceivedAcks - * @summary UnreceivedAcks returns all the unreceived IBC acknowledgements associated -with a channel and sequences. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks - */ - queryUnreceivedAcks = ( - channel_id: string, - port_id: string, - packet_ack_sequences: string[], - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/channel/v1/channels/${channel_id}/ports/${port_id}/packet_commitments/${packet_ack_sequences}/unreceived_acks`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryUnreceivedPackets - * @summary UnreceivedPackets returns all the unreceived IBC packets associated with a -channel and sequences. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets - */ - queryUnreceivedPackets = ( - channel_id: string, - port_id: string, - packet_commitment_sequences: string[], - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/channel/v1/channels/${channel_id}/ports/${port_id}/packet_commitments/${packet_commitment_sequences}/unreceived_packets`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryPacketCommitment - * @summary PacketCommitment queries a stored packet commitment hash. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence} - */ - queryPacketCommitment = (channel_id: string, port_id: string, sequence: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/channel/v1/channels/${channel_id}/ports/${port_id}/packet_commitments/${sequence}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryPacketReceipt - * @summary PacketReceipt queries if a given packet sequence has been received on the -queried chain - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence} - */ - queryPacketReceipt = (channel_id: string, port_id: string, sequence: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/channel/v1/channels/${channel_id}/ports/${port_id}/packet_receipts/${sequence}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryConnectionChannels - * @summary ConnectionChannels queries all the channels associated with a connection -end. - * @request GET:/ibc/core/channel/v1/connections/{connection}/channels - */ - queryConnectionChannels = ( - connection: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/channel/v1/connections/${connection}/channels`, - method: "GET", - query: query, - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 0bc568f477..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,300 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - count_total: boolean; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, count_total: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.count_total !== undefined && - (obj.count_total = message.count_total); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts deleted file mode 100644 index e9cefea25a..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts +++ /dev/null @@ -1,414 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.upgrade.v1beta1"; - -/** Plan specifies information about a planned upgrade and when it should occur. */ -export interface Plan { - /** - * 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. - */ - name: string; - /** - * The time after which the upgrade must be performed. - * Leave set to its zero value to use a pre-defined Height instead. - */ - time: Date | undefined; - /** - * The height at which the upgrade must be performed. - * Only used if Time is not set. - */ - height: number; - /** - * Any application specific upgrade info to be included on-chain - * such as a git commit that validators could automatically upgrade to - */ - info: string; -} - -/** - * SoftwareUpgradeProposal is a gov Content type for initiating a software - * upgrade. - */ -export interface SoftwareUpgradeProposal { - title: string; - description: string; - plan: Plan | undefined; -} - -/** - * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software - * upgrade. - */ -export interface CancelSoftwareUpgradeProposal { - title: string; - description: string; -} - -const basePlan: object = { name: "", height: 0, info: "" }; - -export const Plan = { - encode(message: Plan, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Plan { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePlan } as Plan; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.info = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Plan { - const message = { ...basePlan } as Plan; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - return message; - }, - - toJSON(message: Plan): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.height !== undefined && (obj.height = message.height); - message.info !== undefined && (obj.info = message.info); - return obj; - }, - - fromPartial(object: DeepPartial): Plan { - const message = { ...basePlan } as Plan; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - return message; - }, -}; - -const baseSoftwareUpgradeProposal: object = { title: "", description: "" }; - -export const SoftwareUpgradeProposal = { - encode( - message: SoftwareUpgradeProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SoftwareUpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SoftwareUpgradeProposal { - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromJSON(object.plan); - } else { - message.plan = undefined; - } - return message; - }, - - toJSON(message: SoftwareUpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.plan !== undefined && - (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): SoftwareUpgradeProposal { - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromPartial(object.plan); - } else { - message.plan = undefined; - } - return message; - }, -}; - -const baseCancelSoftwareUpgradeProposal: object = { - title: "", - description: "", -}; - -export const CancelSoftwareUpgradeProposal = { - encode( - message: CancelSoftwareUpgradeProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): CancelSoftwareUpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CancelSoftwareUpgradeProposal { - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - return message; - }, - - toJSON(message: CancelSoftwareUpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - return obj; - }, - - fromPartial( - object: DeepPartial - ): CancelSoftwareUpgradeProposal { - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/api/annotations.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/api/http.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/protobuf/any.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/protobuf/any.ts deleted file mode 100644 index 233eae465d..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - type_url: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { type_url: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.type_url !== "") { - writer.uint32(10).string(message.type_url); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = String(object.type_url); - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.type_url !== undefined && (obj.type_url = message.type_url); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = object.type_url; - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 11864afc86..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.ts deleted file mode 100644 index 7ce4330670..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/channel.ts +++ /dev/null @@ -1,1073 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Height } from "../../../../ibc/core/client/v1/client"; - -export const protobufPackage = "ibc.core.channel.v1"; - -/** - * State defines if a channel is in one of the following states: - * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - */ -export enum State { - /** STATE_UNINITIALIZED_UNSPECIFIED - Default State */ - STATE_UNINITIALIZED_UNSPECIFIED = 0, - /** STATE_INIT - A channel has just started the opening handshake. */ - STATE_INIT = 1, - /** STATE_TRYOPEN - A channel has acknowledged the handshake step on the counterparty chain. */ - STATE_TRYOPEN = 2, - /** - * STATE_OPEN - A channel has completed the handshake. Open channels are - * ready to send and receive packets. - */ - STATE_OPEN = 3, - /** - * STATE_CLOSED - A channel has been closed and can no longer be used to send or receive - * packets. - */ - STATE_CLOSED = 4, - UNRECOGNIZED = -1, -} - -export function stateFromJSON(object: any): State { - switch (object) { - case 0: - case "STATE_UNINITIALIZED_UNSPECIFIED": - return State.STATE_UNINITIALIZED_UNSPECIFIED; - case 1: - case "STATE_INIT": - return State.STATE_INIT; - case 2: - case "STATE_TRYOPEN": - return State.STATE_TRYOPEN; - case 3: - case "STATE_OPEN": - return State.STATE_OPEN; - case 4: - case "STATE_CLOSED": - return State.STATE_CLOSED; - case -1: - case "UNRECOGNIZED": - default: - return State.UNRECOGNIZED; - } -} - -export function stateToJSON(object: State): string { - switch (object) { - case State.STATE_UNINITIALIZED_UNSPECIFIED: - return "STATE_UNINITIALIZED_UNSPECIFIED"; - case State.STATE_INIT: - return "STATE_INIT"; - case State.STATE_TRYOPEN: - return "STATE_TRYOPEN"; - case State.STATE_OPEN: - return "STATE_OPEN"; - case State.STATE_CLOSED: - return "STATE_CLOSED"; - default: - return "UNKNOWN"; - } -} - -/** Order defines if a channel is ORDERED or UNORDERED */ -export enum Order { - /** ORDER_NONE_UNSPECIFIED - zero-value for channel ordering */ - ORDER_NONE_UNSPECIFIED = 0, - /** - * ORDER_UNORDERED - packets can be delivered in any order, which may differ from the order in - * which they were sent. - */ - ORDER_UNORDERED = 1, - /** ORDER_ORDERED - packets are delivered exactly in the order which they were sent */ - ORDER_ORDERED = 2, - UNRECOGNIZED = -1, -} - -export function orderFromJSON(object: any): Order { - switch (object) { - case 0: - case "ORDER_NONE_UNSPECIFIED": - return Order.ORDER_NONE_UNSPECIFIED; - case 1: - case "ORDER_UNORDERED": - return Order.ORDER_UNORDERED; - case 2: - case "ORDER_ORDERED": - return Order.ORDER_ORDERED; - case -1: - case "UNRECOGNIZED": - default: - return Order.UNRECOGNIZED; - } -} - -export function orderToJSON(object: Order): string { - switch (object) { - case Order.ORDER_NONE_UNSPECIFIED: - return "ORDER_NONE_UNSPECIFIED"; - case Order.ORDER_UNORDERED: - return "ORDER_UNORDERED"; - case Order.ORDER_ORDERED: - return "ORDER_ORDERED"; - default: - return "UNKNOWN"; - } -} - -/** - * 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. - */ -export interface Channel { - /** current state of the channel end */ - state: State; - /** whether the channel is ordered or unordered */ - ordering: Order; - /** counterparty channel end */ - counterparty: Counterparty | undefined; - /** - * list of connection identifiers, in order, along which packets sent on - * this channel will travel - */ - connection_hops: string[]; - /** opaque channel version, which is agreed upon during the handshake */ - version: string; -} - -/** - * IdentifiedChannel defines a channel with additional port and channel - * identifier fields. - */ -export interface IdentifiedChannel { - /** current state of the channel end */ - state: State; - /** whether the channel is ordered or unordered */ - ordering: Order; - /** counterparty channel end */ - counterparty: Counterparty | undefined; - /** - * list of connection identifiers, in order, along which packets sent on - * this channel will travel - */ - connection_hops: string[]; - /** opaque channel version, which is agreed upon during the handshake */ - version: string; - /** port identifier */ - port_id: string; - /** channel identifier */ - channel_id: string; -} - -/** Counterparty defines a channel end counterparty */ -export interface Counterparty { - /** port on the counterparty chain which owns the other end of the channel. */ - port_id: string; - /** channel end on the counterparty chain */ - channel_id: string; -} - -/** Packet defines a type that carries data across different chains through IBC */ -export interface Packet { - /** - * number corresponds to the order of sends and receives, where a Packet - * with an earlier sequence number must be sent and received before a Packet - * with a later sequence number. - */ - sequence: number; - /** identifies the port on the sending chain. */ - source_port: string; - /** identifies the channel end on the sending chain. */ - source_channel: string; - /** identifies the port on the receiving chain. */ - destination_port: string; - /** identifies the channel end on the receiving chain. */ - destination_channel: string; - /** actual opaque bytes transferred directly to the application module */ - data: Uint8Array; - /** block height after which the packet times out */ - timeout_height: Height | undefined; - /** block timestamp (in nanoseconds) after which the packet times out */ - timeout_timestamp: number; -} - -/** - * 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. - */ -export interface PacketState { - /** channel port identifier. */ - port_id: string; - /** channel unique identifier. */ - channel_id: string; - /** packet sequence. */ - sequence: number; - /** embedded data that represents packet state. */ - data: Uint8Array; -} - -/** - * Acknowledgement is the recommended acknowledgement format to be used by - * app-specific protocols. - * NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental - * conflicts with other protobuf message formats used for acknowledgements. - * The first byte of any message with this format will be the non-ASCII values - * `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: - * https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope - */ -export interface Acknowledgement { - result: Uint8Array | undefined; - error: string | undefined; -} - -const baseChannel: object = { - state: 0, - ordering: 0, - connection_hops: "", - version: "", -}; - -export const Channel = { - encode(message: Channel, writer: Writer = Writer.create()): Writer { - if (message.state !== 0) { - writer.uint32(8).int32(message.state); - } - if (message.ordering !== 0) { - writer.uint32(16).int32(message.ordering); - } - if (message.counterparty !== undefined) { - Counterparty.encode( - message.counterparty, - writer.uint32(26).fork() - ).ldelim(); - } - for (const v of message.connection_hops) { - writer.uint32(34).string(v!); - } - if (message.version !== "") { - writer.uint32(42).string(message.version); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Channel { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseChannel } as Channel; - message.connection_hops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.state = reader.int32() as any; - break; - case 2: - message.ordering = reader.int32() as any; - break; - case 3: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 4: - message.connection_hops.push(reader.string()); - break; - case 5: - message.version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Channel { - const message = { ...baseChannel } as Channel; - message.connection_hops = []; - if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); - } else { - message.state = 0; - } - if (object.ordering !== undefined && object.ordering !== null) { - message.ordering = orderFromJSON(object.ordering); - } else { - message.ordering = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } else { - message.counterparty = undefined; - } - if ( - object.connection_hops !== undefined && - object.connection_hops !== null - ) { - for (const e of object.connection_hops) { - message.connection_hops.push(String(e)); - } - } - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } else { - message.version = ""; - } - return message; - }, - - toJSON(message: Channel): unknown { - const obj: any = {}; - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.ordering !== undefined && - (obj.ordering = orderToJSON(message.ordering)); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - if (message.connection_hops) { - obj.connection_hops = message.connection_hops.map((e) => e); - } else { - obj.connection_hops = []; - } - message.version !== undefined && (obj.version = message.version); - return obj; - }, - - fromPartial(object: DeepPartial): Channel { - const message = { ...baseChannel } as Channel; - message.connection_hops = []; - if (object.state !== undefined && object.state !== null) { - message.state = object.state; - } else { - message.state = 0; - } - if (object.ordering !== undefined && object.ordering !== null) { - message.ordering = object.ordering; - } else { - message.ordering = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } else { - message.counterparty = undefined; - } - if ( - object.connection_hops !== undefined && - object.connection_hops !== null - ) { - for (const e of object.connection_hops) { - message.connection_hops.push(e); - } - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } else { - message.version = ""; - } - return message; - }, -}; - -const baseIdentifiedChannel: object = { - state: 0, - ordering: 0, - connection_hops: "", - version: "", - port_id: "", - channel_id: "", -}; - -export const IdentifiedChannel = { - encode(message: IdentifiedChannel, writer: Writer = Writer.create()): Writer { - if (message.state !== 0) { - writer.uint32(8).int32(message.state); - } - if (message.ordering !== 0) { - writer.uint32(16).int32(message.ordering); - } - if (message.counterparty !== undefined) { - Counterparty.encode( - message.counterparty, - writer.uint32(26).fork() - ).ldelim(); - } - for (const v of message.connection_hops) { - writer.uint32(34).string(v!); - } - if (message.version !== "") { - writer.uint32(42).string(message.version); - } - if (message.port_id !== "") { - writer.uint32(50).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(58).string(message.channel_id); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IdentifiedChannel { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedChannel } as IdentifiedChannel; - message.connection_hops = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.state = reader.int32() as any; - break; - case 2: - message.ordering = reader.int32() as any; - break; - case 3: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 4: - message.connection_hops.push(reader.string()); - break; - case 5: - message.version = reader.string(); - break; - case 6: - message.port_id = reader.string(); - break; - case 7: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IdentifiedChannel { - const message = { ...baseIdentifiedChannel } as IdentifiedChannel; - message.connection_hops = []; - if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); - } else { - message.state = 0; - } - if (object.ordering !== undefined && object.ordering !== null) { - message.ordering = orderFromJSON(object.ordering); - } else { - message.ordering = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } else { - message.counterparty = undefined; - } - if ( - object.connection_hops !== undefined && - object.connection_hops !== null - ) { - for (const e of object.connection_hops) { - message.connection_hops.push(String(e)); - } - } - if (object.version !== undefined && object.version !== null) { - message.version = String(object.version); - } else { - message.version = ""; - } - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - return message; - }, - - toJSON(message: IdentifiedChannel): unknown { - const obj: any = {}; - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.ordering !== undefined && - (obj.ordering = orderToJSON(message.ordering)); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - if (message.connection_hops) { - obj.connection_hops = message.connection_hops.map((e) => e); - } else { - obj.connection_hops = []; - } - message.version !== undefined && (obj.version = message.version); - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - return obj; - }, - - fromPartial(object: DeepPartial): IdentifiedChannel { - const message = { ...baseIdentifiedChannel } as IdentifiedChannel; - message.connection_hops = []; - if (object.state !== undefined && object.state !== null) { - message.state = object.state; - } else { - message.state = 0; - } - if (object.ordering !== undefined && object.ordering !== null) { - message.ordering = object.ordering; - } else { - message.ordering = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } else { - message.counterparty = undefined; - } - if ( - object.connection_hops !== undefined && - object.connection_hops !== null - ) { - for (const e of object.connection_hops) { - message.connection_hops.push(e); - } - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version; - } else { - message.version = ""; - } - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - return message; - }, -}; - -const baseCounterparty: object = { port_id: "", channel_id: "" }; - -export const Counterparty = { - encode(message: Counterparty, writer: Writer = Writer.create()): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Counterparty { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCounterparty } as Counterparty; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Counterparty { - const message = { ...baseCounterparty } as Counterparty; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - return message; - }, - - toJSON(message: Counterparty): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - return obj; - }, - - fromPartial(object: DeepPartial): Counterparty { - const message = { ...baseCounterparty } as Counterparty; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - return message; - }, -}; - -const basePacket: object = { - sequence: 0, - source_port: "", - source_channel: "", - destination_port: "", - destination_channel: "", - timeout_timestamp: 0, -}; - -export const Packet = { - encode(message: Packet, writer: Writer = Writer.create()): Writer { - if (message.sequence !== 0) { - writer.uint32(8).uint64(message.sequence); - } - if (message.source_port !== "") { - writer.uint32(18).string(message.source_port); - } - if (message.source_channel !== "") { - writer.uint32(26).string(message.source_channel); - } - if (message.destination_port !== "") { - writer.uint32(34).string(message.destination_port); - } - if (message.destination_channel !== "") { - writer.uint32(42).string(message.destination_channel); - } - if (message.data.length !== 0) { - writer.uint32(50).bytes(message.data); - } - if (message.timeout_height !== undefined) { - Height.encode(message.timeout_height, writer.uint32(58).fork()).ldelim(); - } - if (message.timeout_timestamp !== 0) { - writer.uint32(64).uint64(message.timeout_timestamp); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Packet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePacket } as Packet; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = longToNumber(reader.uint64() as Long); - break; - case 2: - message.source_port = reader.string(); - break; - case 3: - message.source_channel = reader.string(); - break; - case 4: - message.destination_port = reader.string(); - break; - case 5: - message.destination_channel = reader.string(); - break; - case 6: - message.data = reader.bytes(); - break; - case 7: - message.timeout_height = Height.decode(reader, reader.uint32()); - break; - case 8: - message.timeout_timestamp = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Packet { - const message = { ...basePacket } as Packet; - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - if (object.source_port !== undefined && object.source_port !== null) { - message.source_port = String(object.source_port); - } else { - message.source_port = ""; - } - if (object.source_channel !== undefined && object.source_channel !== null) { - message.source_channel = String(object.source_channel); - } else { - message.source_channel = ""; - } - if ( - object.destination_port !== undefined && - object.destination_port !== null - ) { - message.destination_port = String(object.destination_port); - } else { - message.destination_port = ""; - } - if ( - object.destination_channel !== undefined && - object.destination_channel !== null - ) { - message.destination_channel = String(object.destination_channel); - } else { - message.destination_channel = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - if (object.timeout_height !== undefined && object.timeout_height !== null) { - message.timeout_height = Height.fromJSON(object.timeout_height); - } else { - message.timeout_height = undefined; - } - if ( - object.timeout_timestamp !== undefined && - object.timeout_timestamp !== null - ) { - message.timeout_timestamp = Number(object.timeout_timestamp); - } else { - message.timeout_timestamp = 0; - } - return message; - }, - - toJSON(message: Packet): unknown { - const obj: any = {}; - message.sequence !== undefined && (obj.sequence = message.sequence); - message.source_port !== undefined && - (obj.source_port = message.source_port); - message.source_channel !== undefined && - (obj.source_channel = message.source_channel); - message.destination_port !== undefined && - (obj.destination_port = message.destination_port); - message.destination_channel !== undefined && - (obj.destination_channel = message.destination_channel); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - message.timeout_height !== undefined && - (obj.timeout_height = message.timeout_height - ? Height.toJSON(message.timeout_height) - : undefined); - message.timeout_timestamp !== undefined && - (obj.timeout_timestamp = message.timeout_timestamp); - return obj; - }, - - fromPartial(object: DeepPartial): Packet { - const message = { ...basePacket } as Packet; - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - if (object.source_port !== undefined && object.source_port !== null) { - message.source_port = object.source_port; - } else { - message.source_port = ""; - } - if (object.source_channel !== undefined && object.source_channel !== null) { - message.source_channel = object.source_channel; - } else { - message.source_channel = ""; - } - if ( - object.destination_port !== undefined && - object.destination_port !== null - ) { - message.destination_port = object.destination_port; - } else { - message.destination_port = ""; - } - if ( - object.destination_channel !== undefined && - object.destination_channel !== null - ) { - message.destination_channel = object.destination_channel; - } else { - message.destination_channel = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - if (object.timeout_height !== undefined && object.timeout_height !== null) { - message.timeout_height = Height.fromPartial(object.timeout_height); - } else { - message.timeout_height = undefined; - } - if ( - object.timeout_timestamp !== undefined && - object.timeout_timestamp !== null - ) { - message.timeout_timestamp = object.timeout_timestamp; - } else { - message.timeout_timestamp = 0; - } - return message; - }, -}; - -const basePacketState: object = { port_id: "", channel_id: "", sequence: 0 }; - -export const PacketState = { - encode(message: PacketState, writer: Writer = Writer.create()): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - if (message.data.length !== 0) { - writer.uint32(34).bytes(message.data); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PacketState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePacketState } as PacketState; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = longToNumber(reader.uint64() as Long); - break; - case 4: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PacketState { - const message = { ...basePacketState } as PacketState; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - - toJSON(message: PacketState): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - message.sequence !== undefined && (obj.sequence = message.sequence); - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): PacketState { - const message = { ...basePacketState } as PacketState; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = new Uint8Array(); - } - return message; - }, -}; - -const baseAcknowledgement: object = {}; - -export const Acknowledgement = { - encode(message: Acknowledgement, writer: Writer = Writer.create()): Writer { - if (message.result !== undefined) { - writer.uint32(170).bytes(message.result); - } - if (message.error !== undefined) { - writer.uint32(178).string(message.error); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Acknowledgement { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAcknowledgement } as Acknowledgement; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 21: - message.result = reader.bytes(); - break; - case 22: - message.error = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Acknowledgement { - const message = { ...baseAcknowledgement } as Acknowledgement; - if (object.result !== undefined && object.result !== null) { - message.result = bytesFromBase64(object.result); - } - if (object.error !== undefined && object.error !== null) { - message.error = String(object.error); - } else { - message.error = undefined; - } - return message; - }, - - toJSON(message: Acknowledgement): unknown { - const obj: any = {}; - message.result !== undefined && - (obj.result = - message.result !== undefined - ? base64FromBytes(message.result) - : undefined); - message.error !== undefined && (obj.error = message.error); - return obj; - }, - - fromPartial(object: DeepPartial): Acknowledgement { - const message = { ...baseAcknowledgement } as Acknowledgement; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } else { - message.result = undefined; - } - if (object.error !== undefined && object.error !== null) { - message.error = object.error; - } else { - message.error = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.ts deleted file mode 100644 index 2c2fa94a31..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/genesis.ts +++ /dev/null @@ -1,414 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { - IdentifiedChannel, - PacketState, -} from "../../../../ibc/core/channel/v1/channel"; - -export const protobufPackage = "ibc.core.channel.v1"; - -/** GenesisState defines the ibc channel submodule's genesis state. */ -export interface GenesisState { - channels: IdentifiedChannel[]; - acknowledgements: PacketState[]; - commitments: PacketState[]; - receipts: PacketState[]; - send_sequences: PacketSequence[]; - recv_sequences: PacketSequence[]; - ack_sequences: PacketSequence[]; - /** the sequence for the next generated channel identifier */ - next_channel_sequence: number; -} - -/** - * PacketSequence defines the genesis type necessary to retrieve and store - * next send and receive sequences. - */ -export interface PacketSequence { - port_id: string; - channel_id: string; - sequence: number; -} - -const baseGenesisState: object = { next_channel_sequence: 0 }; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - for (const v of message.channels) { - IdentifiedChannel.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.acknowledgements) { - PacketState.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.commitments) { - PacketState.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.receipts) { - PacketState.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.send_sequences) { - PacketSequence.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.recv_sequences) { - PacketSequence.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.ack_sequences) { - PacketSequence.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.next_channel_sequence !== 0) { - writer.uint32(64).uint64(message.next_channel_sequence); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.channels = []; - message.acknowledgements = []; - message.commitments = []; - message.receipts = []; - message.send_sequences = []; - message.recv_sequences = []; - message.ack_sequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channels.push( - IdentifiedChannel.decode(reader, reader.uint32()) - ); - break; - case 2: - message.acknowledgements.push( - PacketState.decode(reader, reader.uint32()) - ); - break; - case 3: - message.commitments.push(PacketState.decode(reader, reader.uint32())); - break; - case 4: - message.receipts.push(PacketState.decode(reader, reader.uint32())); - break; - case 5: - message.send_sequences.push( - PacketSequence.decode(reader, reader.uint32()) - ); - break; - case 6: - message.recv_sequences.push( - PacketSequence.decode(reader, reader.uint32()) - ); - break; - case 7: - message.ack_sequences.push( - PacketSequence.decode(reader, reader.uint32()) - ); - break; - case 8: - message.next_channel_sequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.channels = []; - message.acknowledgements = []; - message.commitments = []; - message.receipts = []; - message.send_sequences = []; - message.recv_sequences = []; - message.ack_sequences = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromJSON(e)); - } - } - if ( - object.acknowledgements !== undefined && - object.acknowledgements !== null - ) { - for (const e of object.acknowledgements) { - message.acknowledgements.push(PacketState.fromJSON(e)); - } - } - if (object.commitments !== undefined && object.commitments !== null) { - for (const e of object.commitments) { - message.commitments.push(PacketState.fromJSON(e)); - } - } - if (object.receipts !== undefined && object.receipts !== null) { - for (const e of object.receipts) { - message.receipts.push(PacketState.fromJSON(e)); - } - } - if (object.send_sequences !== undefined && object.send_sequences !== null) { - for (const e of object.send_sequences) { - message.send_sequences.push(PacketSequence.fromJSON(e)); - } - } - if (object.recv_sequences !== undefined && object.recv_sequences !== null) { - for (const e of object.recv_sequences) { - message.recv_sequences.push(PacketSequence.fromJSON(e)); - } - } - if (object.ack_sequences !== undefined && object.ack_sequences !== null) { - for (const e of object.ack_sequences) { - message.ack_sequences.push(PacketSequence.fromJSON(e)); - } - } - if ( - object.next_channel_sequence !== undefined && - object.next_channel_sequence !== null - ) { - message.next_channel_sequence = Number(object.next_channel_sequence); - } else { - message.next_channel_sequence = 0; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.channels) { - obj.channels = message.channels.map((e) => - e ? IdentifiedChannel.toJSON(e) : undefined - ); - } else { - obj.channels = []; - } - if (message.acknowledgements) { - obj.acknowledgements = message.acknowledgements.map((e) => - e ? PacketState.toJSON(e) : undefined - ); - } else { - obj.acknowledgements = []; - } - if (message.commitments) { - obj.commitments = message.commitments.map((e) => - e ? PacketState.toJSON(e) : undefined - ); - } else { - obj.commitments = []; - } - if (message.receipts) { - obj.receipts = message.receipts.map((e) => - e ? PacketState.toJSON(e) : undefined - ); - } else { - obj.receipts = []; - } - if (message.send_sequences) { - obj.send_sequences = message.send_sequences.map((e) => - e ? PacketSequence.toJSON(e) : undefined - ); - } else { - obj.send_sequences = []; - } - if (message.recv_sequences) { - obj.recv_sequences = message.recv_sequences.map((e) => - e ? PacketSequence.toJSON(e) : undefined - ); - } else { - obj.recv_sequences = []; - } - if (message.ack_sequences) { - obj.ack_sequences = message.ack_sequences.map((e) => - e ? PacketSequence.toJSON(e) : undefined - ); - } else { - obj.ack_sequences = []; - } - message.next_channel_sequence !== undefined && - (obj.next_channel_sequence = message.next_channel_sequence); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.channels = []; - message.acknowledgements = []; - message.commitments = []; - message.receipts = []; - message.send_sequences = []; - message.recv_sequences = []; - message.ack_sequences = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromPartial(e)); - } - } - if ( - object.acknowledgements !== undefined && - object.acknowledgements !== null - ) { - for (const e of object.acknowledgements) { - message.acknowledgements.push(PacketState.fromPartial(e)); - } - } - if (object.commitments !== undefined && object.commitments !== null) { - for (const e of object.commitments) { - message.commitments.push(PacketState.fromPartial(e)); - } - } - if (object.receipts !== undefined && object.receipts !== null) { - for (const e of object.receipts) { - message.receipts.push(PacketState.fromPartial(e)); - } - } - if (object.send_sequences !== undefined && object.send_sequences !== null) { - for (const e of object.send_sequences) { - message.send_sequences.push(PacketSequence.fromPartial(e)); - } - } - if (object.recv_sequences !== undefined && object.recv_sequences !== null) { - for (const e of object.recv_sequences) { - message.recv_sequences.push(PacketSequence.fromPartial(e)); - } - } - if (object.ack_sequences !== undefined && object.ack_sequences !== null) { - for (const e of object.ack_sequences) { - message.ack_sequences.push(PacketSequence.fromPartial(e)); - } - } - if ( - object.next_channel_sequence !== undefined && - object.next_channel_sequence !== null - ) { - message.next_channel_sequence = object.next_channel_sequence; - } else { - message.next_channel_sequence = 0; - } - return message; - }, -}; - -const basePacketSequence: object = { port_id: "", channel_id: "", sequence: 0 }; - -export const PacketSequence = { - encode(message: PacketSequence, writer: Writer = Writer.create()): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PacketSequence { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePacketSequence } as PacketSequence; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PacketSequence { - const message = { ...basePacketSequence } as PacketSequence; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - return message; - }, - - toJSON(message: PacketSequence): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - - fromPartial(object: DeepPartial): PacketSequence { - const message = { ...basePacketSequence } as PacketSequence; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.ts deleted file mode 100644 index b31f2787b2..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/query.ts +++ /dev/null @@ -1,3549 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - Channel, - IdentifiedChannel, - PacketState, -} from "../../../../ibc/core/channel/v1/channel"; -import { - Height, - IdentifiedClientState, -} from "../../../../ibc/core/client/v1/client"; -import { - PageRequest, - PageResponse, -} from "../../../../cosmos/base/query/v1beta1/pagination"; -import { Any } from "../../../../google/protobuf/any"; - -export const protobufPackage = "ibc.core.channel.v1"; - -/** QueryChannelRequest is the request type for the Query/Channel RPC method */ -export interface QueryChannelRequest { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; -} - -/** - * 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. - */ -export interface QueryChannelResponse { - /** channel associated with the request identifiers */ - channel: Channel | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height: Height | undefined; -} - -/** QueryChannelsRequest is the request type for the Query/Channels RPC method */ -export interface QueryChannelsRequest { - /** pagination request */ - pagination: PageRequest | undefined; -} - -/** QueryChannelsResponse is the response type for the Query/Channels RPC method. */ -export interface QueryChannelsResponse { - /** list of stored channels of the chain. */ - channels: IdentifiedChannel[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} - -/** - * QueryConnectionChannelsRequest is the request type for the - * Query/QueryConnectionChannels RPC method - */ -export interface QueryConnectionChannelsRequest { - /** connection unique identifier */ - connection: string; - /** pagination request */ - pagination: PageRequest | undefined; -} - -/** - * QueryConnectionChannelsResponse is the Response type for the - * Query/QueryConnectionChannels RPC method - */ -export interface QueryConnectionChannelsResponse { - /** list of channels associated with a connection. */ - channels: IdentifiedChannel[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} - -/** - * QueryChannelClientStateRequest is the request type for the Query/ClientState - * RPC method - */ -export interface QueryChannelClientStateRequest { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; -} - -/** - * QueryChannelClientStateResponse is the Response type for the - * Query/QueryChannelClientState RPC method - */ -export interface QueryChannelClientStateResponse { - /** client state associated with the channel */ - identified_client_state: IdentifiedClientState | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height: Height | undefined; -} - -/** - * QueryChannelConsensusStateRequest is the request type for the - * Query/ConsensusState RPC method - */ -export interface QueryChannelConsensusStateRequest { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** revision number of the consensus state */ - revision_number: number; - /** revision height of the consensus state */ - revision_height: number; -} - -/** - * QueryChannelClientStateResponse is the Response type for the - * Query/QueryChannelClientState RPC method - */ -export interface QueryChannelConsensusStateResponse { - /** consensus state associated with the channel */ - consensus_state: Any | undefined; - /** client ID associated with the consensus state */ - client_id: string; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height: Height | undefined; -} - -/** - * QueryPacketCommitmentRequest is the request type for the - * Query/PacketCommitment RPC method - */ -export interface QueryPacketCommitmentRequest { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** packet sequence */ - sequence: number; -} - -/** - * QueryPacketCommitmentResponse defines the client query response for a packet - * which also includes a proof and the height from which the proof was - * retrieved - */ -export interface QueryPacketCommitmentResponse { - /** packet associated with the request fields */ - commitment: Uint8Array; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height: Height | undefined; -} - -/** - * QueryPacketCommitmentsRequest is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketCommitmentsRequest { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** pagination request */ - pagination: PageRequest | undefined; -} - -/** - * QueryPacketCommitmentsResponse is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketCommitmentsResponse { - commitments: PacketState[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} - -/** - * QueryPacketReceiptRequest is the request type for the - * Query/PacketReceipt RPC method - */ -export interface QueryPacketReceiptRequest { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** packet sequence */ - sequence: number; -} - -/** - * QueryPacketReceiptResponse defines the client query response for a packet - * receipt which also includes a proof, and the height from which the proof was - * retrieved - */ -export interface QueryPacketReceiptResponse { - /** success flag for if receipt exists */ - received: boolean; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height: Height | undefined; -} - -/** - * QueryPacketAcknowledgementRequest is the request type for the - * Query/PacketAcknowledgement RPC method - */ -export interface QueryPacketAcknowledgementRequest { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** packet sequence */ - sequence: number; -} - -/** - * QueryPacketAcknowledgementResponse defines the client query response for a - * packet which also includes a proof and the height from which the - * proof was retrieved - */ -export interface QueryPacketAcknowledgementResponse { - /** packet associated with the request fields */ - acknowledgement: Uint8Array; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height: Height | undefined; -} - -/** - * QueryPacketAcknowledgementsRequest is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketAcknowledgementsRequest { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** pagination request */ - pagination: PageRequest | undefined; - /** list of packet sequences */ - packet_commitment_sequences: number[]; -} - -/** - * QueryPacketAcknowledgemetsResponse is the request type for the - * Query/QueryPacketAcknowledgements RPC method - */ -export interface QueryPacketAcknowledgementsResponse { - acknowledgements: PacketState[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} - -/** - * QueryUnreceivedPacketsRequest is the request type for the - * Query/UnreceivedPackets RPC method - */ -export interface QueryUnreceivedPacketsRequest { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** list of packet sequences */ - packet_commitment_sequences: number[]; -} - -/** - * QueryUnreceivedPacketsResponse is the response type for the - * Query/UnreceivedPacketCommitments RPC method - */ -export interface QueryUnreceivedPacketsResponse { - /** list of unreceived packet sequences */ - sequences: number[]; - /** query block height */ - height: Height | undefined; -} - -/** - * QueryUnreceivedAcks is the request type for the - * Query/UnreceivedAcks RPC method - */ -export interface QueryUnreceivedAcksRequest { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** list of acknowledgement sequences */ - packet_ack_sequences: number[]; -} - -/** - * QueryUnreceivedAcksResponse is the response type for the - * Query/UnreceivedAcks RPC method - */ -export interface QueryUnreceivedAcksResponse { - /** list of unreceived acknowledgement sequences */ - sequences: number[]; - /** query block height */ - height: Height | undefined; -} - -/** - * QueryNextSequenceReceiveRequest is the request type for the - * Query/QueryNextSequenceReceiveRequest RPC method - */ -export interface QueryNextSequenceReceiveRequest { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; -} - -/** - * QuerySequenceResponse is the request type for the - * Query/QueryNextSequenceReceiveResponse RPC method - */ -export interface QueryNextSequenceReceiveResponse { - /** next sequence receive number */ - next_sequence_receive: number; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height: Height | undefined; -} - -const baseQueryChannelRequest: object = { port_id: "", channel_id: "" }; - -export const QueryChannelRequest = { - encode( - message: QueryChannelRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryChannelRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryChannelRequest } as QueryChannelRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelRequest { - const message = { ...baseQueryChannelRequest } as QueryChannelRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - return message; - }, - - toJSON(message: QueryChannelRequest): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - return obj; - }, - - fromPartial(object: DeepPartial): QueryChannelRequest { - const message = { ...baseQueryChannelRequest } as QueryChannelRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - return message; - }, -}; - -const baseQueryChannelResponse: object = {}; - -export const QueryChannelResponse = { - encode( - message: QueryChannelResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.channel !== undefined) { - Channel.encode(message.channel, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryChannelResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryChannelResponse } as QueryChannelResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel = Channel.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelResponse { - const message = { ...baseQueryChannelResponse } as QueryChannelResponse; - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromJSON(object.channel); - } else { - message.channel = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, - - toJSON(message: QueryChannelResponse): unknown { - const obj: any = {}; - message.channel !== undefined && - (obj.channel = message.channel - ? Channel.toJSON(message.channel) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryChannelResponse { - const message = { ...baseQueryChannelResponse } as QueryChannelResponse; - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromPartial(object.channel); - } else { - message.channel = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, -}; - -const baseQueryChannelsRequest: object = {}; - -export const QueryChannelsRequest = { - encode( - message: QueryChannelsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryChannelsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryChannelsRequest } as QueryChannelsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelsRequest { - const message = { ...baseQueryChannelsRequest } as QueryChannelsRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryChannelsRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryChannelsRequest { - const message = { ...baseQueryChannelsRequest } as QueryChannelsRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryChannelsResponse: object = {}; - -export const QueryChannelsResponse = { - encode( - message: QueryChannelsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.channels) { - IdentifiedChannel.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryChannelsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryChannelsResponse } as QueryChannelsResponse; - message.channels = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channels.push( - IdentifiedChannel.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelsResponse { - const message = { ...baseQueryChannelsResponse } as QueryChannelsResponse; - message.channels = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - return message; - }, - - toJSON(message: QueryChannelsResponse): unknown { - const obj: any = {}; - if (message.channels) { - obj.channels = message.channels.map((e) => - e ? IdentifiedChannel.toJSON(e) : undefined - ); - } else { - obj.channels = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryChannelsResponse { - const message = { ...baseQueryChannelsResponse } as QueryChannelsResponse; - message.channels = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - return message; - }, -}; - -const baseQueryConnectionChannelsRequest: object = { connection: "" }; - -export const QueryConnectionChannelsRequest = { - encode( - message: QueryConnectionChannelsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.connection !== "") { - writer.uint32(10).string(message.connection); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConnectionChannelsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionChannelsRequest, - } as QueryConnectionChannelsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionChannelsRequest { - const message = { - ...baseQueryConnectionChannelsRequest, - } as QueryConnectionChannelsRequest; - if (object.connection !== undefined && object.connection !== null) { - message.connection = String(object.connection); - } else { - message.connection = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryConnectionChannelsRequest): unknown { - const obj: any = {}; - message.connection !== undefined && (obj.connection = message.connection); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionChannelsRequest { - const message = { - ...baseQueryConnectionChannelsRequest, - } as QueryConnectionChannelsRequest; - if (object.connection !== undefined && object.connection !== null) { - message.connection = object.connection; - } else { - message.connection = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryConnectionChannelsResponse: object = {}; - -export const QueryConnectionChannelsResponse = { - encode( - message: QueryConnectionChannelsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.channels) { - IdentifiedChannel.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConnectionChannelsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionChannelsResponse, - } as QueryConnectionChannelsResponse; - message.channels = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channels.push( - IdentifiedChannel.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionChannelsResponse { - const message = { - ...baseQueryConnectionChannelsResponse, - } as QueryConnectionChannelsResponse; - message.channels = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - return message; - }, - - toJSON(message: QueryConnectionChannelsResponse): unknown { - const obj: any = {}; - if (message.channels) { - obj.channels = message.channels.map((e) => - e ? IdentifiedChannel.toJSON(e) : undefined - ); - } else { - obj.channels = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionChannelsResponse { - const message = { - ...baseQueryConnectionChannelsResponse, - } as QueryConnectionChannelsResponse; - message.channels = []; - if (object.channels !== undefined && object.channels !== null) { - for (const e of object.channels) { - message.channels.push(IdentifiedChannel.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - return message; - }, -}; - -const baseQueryChannelClientStateRequest: object = { - port_id: "", - channel_id: "", -}; - -export const QueryChannelClientStateRequest = { - encode( - message: QueryChannelClientStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryChannelClientStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryChannelClientStateRequest, - } as QueryChannelClientStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelClientStateRequest { - const message = { - ...baseQueryChannelClientStateRequest, - } as QueryChannelClientStateRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - return message; - }, - - toJSON(message: QueryChannelClientStateRequest): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryChannelClientStateRequest { - const message = { - ...baseQueryChannelClientStateRequest, - } as QueryChannelClientStateRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - return message; - }, -}; - -const baseQueryChannelClientStateResponse: object = {}; - -export const QueryChannelClientStateResponse = { - encode( - message: QueryChannelClientStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.identified_client_state !== undefined) { - IdentifiedClientState.encode( - message.identified_client_state, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryChannelClientStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryChannelClientStateResponse, - } as QueryChannelClientStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identified_client_state = IdentifiedClientState.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelClientStateResponse { - const message = { - ...baseQueryChannelClientStateResponse, - } as QueryChannelClientStateResponse; - if ( - object.identified_client_state !== undefined && - object.identified_client_state !== null - ) { - message.identified_client_state = IdentifiedClientState.fromJSON( - object.identified_client_state - ); - } else { - message.identified_client_state = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, - - toJSON(message: QueryChannelClientStateResponse): unknown { - const obj: any = {}; - message.identified_client_state !== undefined && - (obj.identified_client_state = message.identified_client_state - ? IdentifiedClientState.toJSON(message.identified_client_state) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryChannelClientStateResponse { - const message = { - ...baseQueryChannelClientStateResponse, - } as QueryChannelClientStateResponse; - if ( - object.identified_client_state !== undefined && - object.identified_client_state !== null - ) { - message.identified_client_state = IdentifiedClientState.fromPartial( - object.identified_client_state - ); - } else { - message.identified_client_state = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, -}; - -const baseQueryChannelConsensusStateRequest: object = { - port_id: "", - channel_id: "", - revision_number: 0, - revision_height: 0, -}; - -export const QueryChannelConsensusStateRequest = { - encode( - message: QueryChannelConsensusStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - if (message.revision_number !== 0) { - writer.uint32(24).uint64(message.revision_number); - } - if (message.revision_height !== 0) { - writer.uint32(32).uint64(message.revision_height); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryChannelConsensusStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryChannelConsensusStateRequest, - } as QueryChannelConsensusStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.revision_number = longToNumber(reader.uint64() as Long); - break; - case 4: - message.revision_height = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelConsensusStateRequest { - const message = { - ...baseQueryChannelConsensusStateRequest, - } as QueryChannelConsensusStateRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - if ( - object.revision_number !== undefined && - object.revision_number !== null - ) { - message.revision_number = Number(object.revision_number); - } else { - message.revision_number = 0; - } - if ( - object.revision_height !== undefined && - object.revision_height !== null - ) { - message.revision_height = Number(object.revision_height); - } else { - message.revision_height = 0; - } - return message; - }, - - toJSON(message: QueryChannelConsensusStateRequest): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - message.revision_number !== undefined && - (obj.revision_number = message.revision_number); - message.revision_height !== undefined && - (obj.revision_height = message.revision_height); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryChannelConsensusStateRequest { - const message = { - ...baseQueryChannelConsensusStateRequest, - } as QueryChannelConsensusStateRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - if ( - object.revision_number !== undefined && - object.revision_number !== null - ) { - message.revision_number = object.revision_number; - } else { - message.revision_number = 0; - } - if ( - object.revision_height !== undefined && - object.revision_height !== null - ) { - message.revision_height = object.revision_height; - } else { - message.revision_height = 0; - } - return message; - }, -}; - -const baseQueryChannelConsensusStateResponse: object = { client_id: "" }; - -export const QueryChannelConsensusStateResponse = { - encode( - message: QueryChannelConsensusStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.consensus_state !== undefined) { - Any.encode(message.consensus_state, writer.uint32(10).fork()).ldelim(); - } - if (message.client_id !== "") { - writer.uint32(18).string(message.client_id); - } - if (message.proof.length !== 0) { - writer.uint32(26).bytes(message.proof); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryChannelConsensusStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryChannelConsensusStateResponse, - } as QueryChannelConsensusStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensus_state = Any.decode(reader, reader.uint32()); - break; - case 2: - message.client_id = reader.string(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryChannelConsensusStateResponse { - const message = { - ...baseQueryChannelConsensusStateResponse, - } as QueryChannelConsensusStateResponse; - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromJSON(object.consensus_state); - } else { - message.consensus_state = undefined; - } - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, - - toJSON(message: QueryChannelConsensusStateResponse): unknown { - const obj: any = {}; - message.consensus_state !== undefined && - (obj.consensus_state = message.consensus_state - ? Any.toJSON(message.consensus_state) - : undefined); - message.client_id !== undefined && (obj.client_id = message.client_id); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryChannelConsensusStateResponse { - const message = { - ...baseQueryChannelConsensusStateResponse, - } as QueryChannelConsensusStateResponse; - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromPartial(object.consensus_state); - } else { - message.consensus_state = undefined; - } - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, -}; - -const baseQueryPacketCommitmentRequest: object = { - port_id: "", - channel_id: "", - sequence: 0, -}; - -export const QueryPacketCommitmentRequest = { - encode( - message: QueryPacketCommitmentRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketCommitmentRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketCommitmentRequest, - } as QueryPacketCommitmentRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketCommitmentRequest { - const message = { - ...baseQueryPacketCommitmentRequest, - } as QueryPacketCommitmentRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - return message; - }, - - toJSON(message: QueryPacketCommitmentRequest): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketCommitmentRequest { - const message = { - ...baseQueryPacketCommitmentRequest, - } as QueryPacketCommitmentRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - return message; - }, -}; - -const baseQueryPacketCommitmentResponse: object = {}; - -export const QueryPacketCommitmentResponse = { - encode( - message: QueryPacketCommitmentResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.commitment.length !== 0) { - writer.uint32(10).bytes(message.commitment); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketCommitmentResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketCommitmentResponse, - } as QueryPacketCommitmentResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commitment = reader.bytes(); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketCommitmentResponse { - const message = { - ...baseQueryPacketCommitmentResponse, - } as QueryPacketCommitmentResponse; - if (object.commitment !== undefined && object.commitment !== null) { - message.commitment = bytesFromBase64(object.commitment); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, - - toJSON(message: QueryPacketCommitmentResponse): unknown { - const obj: any = {}; - message.commitment !== undefined && - (obj.commitment = base64FromBytes( - message.commitment !== undefined ? message.commitment : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketCommitmentResponse { - const message = { - ...baseQueryPacketCommitmentResponse, - } as QueryPacketCommitmentResponse; - if (object.commitment !== undefined && object.commitment !== null) { - message.commitment = object.commitment; - } else { - message.commitment = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, -}; - -const baseQueryPacketCommitmentsRequest: object = { - port_id: "", - channel_id: "", -}; - -export const QueryPacketCommitmentsRequest = { - encode( - message: QueryPacketCommitmentsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketCommitmentsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketCommitmentsRequest, - } as QueryPacketCommitmentsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketCommitmentsRequest { - const message = { - ...baseQueryPacketCommitmentsRequest, - } as QueryPacketCommitmentsRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryPacketCommitmentsRequest): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketCommitmentsRequest { - const message = { - ...baseQueryPacketCommitmentsRequest, - } as QueryPacketCommitmentsRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryPacketCommitmentsResponse: object = {}; - -export const QueryPacketCommitmentsResponse = { - encode( - message: QueryPacketCommitmentsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.commitments) { - PacketState.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketCommitmentsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketCommitmentsResponse, - } as QueryPacketCommitmentsResponse; - message.commitments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commitments.push(PacketState.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketCommitmentsResponse { - const message = { - ...baseQueryPacketCommitmentsResponse, - } as QueryPacketCommitmentsResponse; - message.commitments = []; - if (object.commitments !== undefined && object.commitments !== null) { - for (const e of object.commitments) { - message.commitments.push(PacketState.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - return message; - }, - - toJSON(message: QueryPacketCommitmentsResponse): unknown { - const obj: any = {}; - if (message.commitments) { - obj.commitments = message.commitments.map((e) => - e ? PacketState.toJSON(e) : undefined - ); - } else { - obj.commitments = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketCommitmentsResponse { - const message = { - ...baseQueryPacketCommitmentsResponse, - } as QueryPacketCommitmentsResponse; - message.commitments = []; - if (object.commitments !== undefined && object.commitments !== null) { - for (const e of object.commitments) { - message.commitments.push(PacketState.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - return message; - }, -}; - -const baseQueryPacketReceiptRequest: object = { - port_id: "", - channel_id: "", - sequence: 0, -}; - -export const QueryPacketReceiptRequest = { - encode( - message: QueryPacketReceiptRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketReceiptRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketReceiptRequest, - } as QueryPacketReceiptRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketReceiptRequest { - const message = { - ...baseQueryPacketReceiptRequest, - } as QueryPacketReceiptRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - return message; - }, - - toJSON(message: QueryPacketReceiptRequest): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketReceiptRequest { - const message = { - ...baseQueryPacketReceiptRequest, - } as QueryPacketReceiptRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - return message; - }, -}; - -const baseQueryPacketReceiptResponse: object = { received: false }; - -export const QueryPacketReceiptResponse = { - encode( - message: QueryPacketReceiptResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.received === true) { - writer.uint32(16).bool(message.received); - } - if (message.proof.length !== 0) { - writer.uint32(26).bytes(message.proof); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketReceiptResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketReceiptResponse, - } as QueryPacketReceiptResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.received = reader.bool(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketReceiptResponse { - const message = { - ...baseQueryPacketReceiptResponse, - } as QueryPacketReceiptResponse; - if (object.received !== undefined && object.received !== null) { - message.received = Boolean(object.received); - } else { - message.received = false; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, - - toJSON(message: QueryPacketReceiptResponse): unknown { - const obj: any = {}; - message.received !== undefined && (obj.received = message.received); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketReceiptResponse { - const message = { - ...baseQueryPacketReceiptResponse, - } as QueryPacketReceiptResponse; - if (object.received !== undefined && object.received !== null) { - message.received = object.received; - } else { - message.received = false; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, -}; - -const baseQueryPacketAcknowledgementRequest: object = { - port_id: "", - channel_id: "", - sequence: 0, -}; - -export const QueryPacketAcknowledgementRequest = { - encode( - message: QueryPacketAcknowledgementRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - if (message.sequence !== 0) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketAcknowledgementRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketAcknowledgementRequest, - } as QueryPacketAcknowledgementRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketAcknowledgementRequest { - const message = { - ...baseQueryPacketAcknowledgementRequest, - } as QueryPacketAcknowledgementRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = Number(object.sequence); - } else { - message.sequence = 0; - } - return message; - }, - - toJSON(message: QueryPacketAcknowledgementRequest): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - message.sequence !== undefined && (obj.sequence = message.sequence); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketAcknowledgementRequest { - const message = { - ...baseQueryPacketAcknowledgementRequest, - } as QueryPacketAcknowledgementRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - if (object.sequence !== undefined && object.sequence !== null) { - message.sequence = object.sequence; - } else { - message.sequence = 0; - } - return message; - }, -}; - -const baseQueryPacketAcknowledgementResponse: object = {}; - -export const QueryPacketAcknowledgementResponse = { - encode( - message: QueryPacketAcknowledgementResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.acknowledgement.length !== 0) { - writer.uint32(10).bytes(message.acknowledgement); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketAcknowledgementResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketAcknowledgementResponse, - } as QueryPacketAcknowledgementResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.acknowledgement = reader.bytes(); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketAcknowledgementResponse { - const message = { - ...baseQueryPacketAcknowledgementResponse, - } as QueryPacketAcknowledgementResponse; - if ( - object.acknowledgement !== undefined && - object.acknowledgement !== null - ) { - message.acknowledgement = bytesFromBase64(object.acknowledgement); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, - - toJSON(message: QueryPacketAcknowledgementResponse): unknown { - const obj: any = {}; - message.acknowledgement !== undefined && - (obj.acknowledgement = base64FromBytes( - message.acknowledgement !== undefined - ? message.acknowledgement - : new Uint8Array() - )); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketAcknowledgementResponse { - const message = { - ...baseQueryPacketAcknowledgementResponse, - } as QueryPacketAcknowledgementResponse; - if ( - object.acknowledgement !== undefined && - object.acknowledgement !== null - ) { - message.acknowledgement = object.acknowledgement; - } else { - message.acknowledgement = new Uint8Array(); - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, -}; - -const baseQueryPacketAcknowledgementsRequest: object = { - port_id: "", - channel_id: "", - packet_commitment_sequences: 0, -}; - -export const QueryPacketAcknowledgementsRequest = { - encode( - message: QueryPacketAcknowledgementsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim(); - } - writer.uint32(34).fork(); - for (const v of message.packet_commitment_sequences) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketAcknowledgementsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketAcknowledgementsRequest, - } as QueryPacketAcknowledgementsRequest; - message.packet_commitment_sequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - case 4: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.packet_commitment_sequences.push( - longToNumber(reader.uint64() as Long) - ); - } - } else { - message.packet_commitment_sequences.push( - longToNumber(reader.uint64() as Long) - ); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketAcknowledgementsRequest { - const message = { - ...baseQueryPacketAcknowledgementsRequest, - } as QueryPacketAcknowledgementsRequest; - message.packet_commitment_sequences = []; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - if ( - object.packet_commitment_sequences !== undefined && - object.packet_commitment_sequences !== null - ) { - for (const e of object.packet_commitment_sequences) { - message.packet_commitment_sequences.push(Number(e)); - } - } - return message; - }, - - toJSON(message: QueryPacketAcknowledgementsRequest): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - if (message.packet_commitment_sequences) { - obj.packet_commitment_sequences = message.packet_commitment_sequences.map( - (e) => e - ); - } else { - obj.packet_commitment_sequences = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketAcknowledgementsRequest { - const message = { - ...baseQueryPacketAcknowledgementsRequest, - } as QueryPacketAcknowledgementsRequest; - message.packet_commitment_sequences = []; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - if ( - object.packet_commitment_sequences !== undefined && - object.packet_commitment_sequences !== null - ) { - for (const e of object.packet_commitment_sequences) { - message.packet_commitment_sequences.push(e); - } - } - return message; - }, -}; - -const baseQueryPacketAcknowledgementsResponse: object = {}; - -export const QueryPacketAcknowledgementsResponse = { - encode( - message: QueryPacketAcknowledgementsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.acknowledgements) { - PacketState.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPacketAcknowledgementsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPacketAcknowledgementsResponse, - } as QueryPacketAcknowledgementsResponse; - message.acknowledgements = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.acknowledgements.push( - PacketState.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPacketAcknowledgementsResponse { - const message = { - ...baseQueryPacketAcknowledgementsResponse, - } as QueryPacketAcknowledgementsResponse; - message.acknowledgements = []; - if ( - object.acknowledgements !== undefined && - object.acknowledgements !== null - ) { - for (const e of object.acknowledgements) { - message.acknowledgements.push(PacketState.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - return message; - }, - - toJSON(message: QueryPacketAcknowledgementsResponse): unknown { - const obj: any = {}; - if (message.acknowledgements) { - obj.acknowledgements = message.acknowledgements.map((e) => - e ? PacketState.toJSON(e) : undefined - ); - } else { - obj.acknowledgements = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPacketAcknowledgementsResponse { - const message = { - ...baseQueryPacketAcknowledgementsResponse, - } as QueryPacketAcknowledgementsResponse; - message.acknowledgements = []; - if ( - object.acknowledgements !== undefined && - object.acknowledgements !== null - ) { - for (const e of object.acknowledgements) { - message.acknowledgements.push(PacketState.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - return message; - }, -}; - -const baseQueryUnreceivedPacketsRequest: object = { - port_id: "", - channel_id: "", - packet_commitment_sequences: 0, -}; - -export const QueryUnreceivedPacketsRequest = { - encode( - message: QueryUnreceivedPacketsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - writer.uint32(26).fork(); - for (const v of message.packet_commitment_sequences) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUnreceivedPacketsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnreceivedPacketsRequest, - } as QueryUnreceivedPacketsRequest; - message.packet_commitment_sequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.packet_commitment_sequences.push( - longToNumber(reader.uint64() as Long) - ); - } - } else { - message.packet_commitment_sequences.push( - longToNumber(reader.uint64() as Long) - ); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUnreceivedPacketsRequest { - const message = { - ...baseQueryUnreceivedPacketsRequest, - } as QueryUnreceivedPacketsRequest; - message.packet_commitment_sequences = []; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - if ( - object.packet_commitment_sequences !== undefined && - object.packet_commitment_sequences !== null - ) { - for (const e of object.packet_commitment_sequences) { - message.packet_commitment_sequences.push(Number(e)); - } - } - return message; - }, - - toJSON(message: QueryUnreceivedPacketsRequest): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - if (message.packet_commitment_sequences) { - obj.packet_commitment_sequences = message.packet_commitment_sequences.map( - (e) => e - ); - } else { - obj.packet_commitment_sequences = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUnreceivedPacketsRequest { - const message = { - ...baseQueryUnreceivedPacketsRequest, - } as QueryUnreceivedPacketsRequest; - message.packet_commitment_sequences = []; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - if ( - object.packet_commitment_sequences !== undefined && - object.packet_commitment_sequences !== null - ) { - for (const e of object.packet_commitment_sequences) { - message.packet_commitment_sequences.push(e); - } - } - return message; - }, -}; - -const baseQueryUnreceivedPacketsResponse: object = { sequences: 0 }; - -export const QueryUnreceivedPacketsResponse = { - encode( - message: QueryUnreceivedPacketsResponse, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.sequences) { - writer.uint64(v); - } - writer.ldelim(); - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUnreceivedPacketsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnreceivedPacketsResponse, - } as QueryUnreceivedPacketsResponse; - message.sequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.sequences.push(longToNumber(reader.uint64() as Long)); - } - } else { - message.sequences.push(longToNumber(reader.uint64() as Long)); - } - break; - case 2: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUnreceivedPacketsResponse { - const message = { - ...baseQueryUnreceivedPacketsResponse, - } as QueryUnreceivedPacketsResponse; - message.sequences = []; - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(Number(e)); - } - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - return message; - }, - - toJSON(message: QueryUnreceivedPacketsResponse): unknown { - const obj: any = {}; - if (message.sequences) { - obj.sequences = message.sequences.map((e) => e); - } else { - obj.sequences = []; - } - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUnreceivedPacketsResponse { - const message = { - ...baseQueryUnreceivedPacketsResponse, - } as QueryUnreceivedPacketsResponse; - message.sequences = []; - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(e); - } - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - return message; - }, -}; - -const baseQueryUnreceivedAcksRequest: object = { - port_id: "", - channel_id: "", - packet_ack_sequences: 0, -}; - -export const QueryUnreceivedAcksRequest = { - encode( - message: QueryUnreceivedAcksRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - writer.uint32(26).fork(); - for (const v of message.packet_ack_sequences) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUnreceivedAcksRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnreceivedAcksRequest, - } as QueryUnreceivedAcksRequest; - message.packet_ack_sequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.packet_ack_sequences.push( - longToNumber(reader.uint64() as Long) - ); - } - } else { - message.packet_ack_sequences.push( - longToNumber(reader.uint64() as Long) - ); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUnreceivedAcksRequest { - const message = { - ...baseQueryUnreceivedAcksRequest, - } as QueryUnreceivedAcksRequest; - message.packet_ack_sequences = []; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - if ( - object.packet_ack_sequences !== undefined && - object.packet_ack_sequences !== null - ) { - for (const e of object.packet_ack_sequences) { - message.packet_ack_sequences.push(Number(e)); - } - } - return message; - }, - - toJSON(message: QueryUnreceivedAcksRequest): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - if (message.packet_ack_sequences) { - obj.packet_ack_sequences = message.packet_ack_sequences.map((e) => e); - } else { - obj.packet_ack_sequences = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUnreceivedAcksRequest { - const message = { - ...baseQueryUnreceivedAcksRequest, - } as QueryUnreceivedAcksRequest; - message.packet_ack_sequences = []; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - if ( - object.packet_ack_sequences !== undefined && - object.packet_ack_sequences !== null - ) { - for (const e of object.packet_ack_sequences) { - message.packet_ack_sequences.push(e); - } - } - return message; - }, -}; - -const baseQueryUnreceivedAcksResponse: object = { sequences: 0 }; - -export const QueryUnreceivedAcksResponse = { - encode( - message: QueryUnreceivedAcksResponse, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.sequences) { - writer.uint64(v); - } - writer.ldelim(); - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUnreceivedAcksResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUnreceivedAcksResponse, - } as QueryUnreceivedAcksResponse; - message.sequences = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.sequences.push(longToNumber(reader.uint64() as Long)); - } - } else { - message.sequences.push(longToNumber(reader.uint64() as Long)); - } - break; - case 2: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUnreceivedAcksResponse { - const message = { - ...baseQueryUnreceivedAcksResponse, - } as QueryUnreceivedAcksResponse; - message.sequences = []; - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(Number(e)); - } - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - return message; - }, - - toJSON(message: QueryUnreceivedAcksResponse): unknown { - const obj: any = {}; - if (message.sequences) { - obj.sequences = message.sequences.map((e) => e); - } else { - obj.sequences = []; - } - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUnreceivedAcksResponse { - const message = { - ...baseQueryUnreceivedAcksResponse, - } as QueryUnreceivedAcksResponse; - message.sequences = []; - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(e); - } - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - return message; - }, -}; - -const baseQueryNextSequenceReceiveRequest: object = { - port_id: "", - channel_id: "", -}; - -export const QueryNextSequenceReceiveRequest = { - encode( - message: QueryNextSequenceReceiveRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryNextSequenceReceiveRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryNextSequenceReceiveRequest, - } as QueryNextSequenceReceiveRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryNextSequenceReceiveRequest { - const message = { - ...baseQueryNextSequenceReceiveRequest, - } as QueryNextSequenceReceiveRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - return message; - }, - - toJSON(message: QueryNextSequenceReceiveRequest): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryNextSequenceReceiveRequest { - const message = { - ...baseQueryNextSequenceReceiveRequest, - } as QueryNextSequenceReceiveRequest; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - return message; - }, -}; - -const baseQueryNextSequenceReceiveResponse: object = { - next_sequence_receive: 0, -}; - -export const QueryNextSequenceReceiveResponse = { - encode( - message: QueryNextSequenceReceiveResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.next_sequence_receive !== 0) { - writer.uint32(8).uint64(message.next_sequence_receive); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryNextSequenceReceiveResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryNextSequenceReceiveResponse, - } as QueryNextSequenceReceiveResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_sequence_receive = longToNumber(reader.uint64() as Long); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryNextSequenceReceiveResponse { - const message = { - ...baseQueryNextSequenceReceiveResponse, - } as QueryNextSequenceReceiveResponse; - if ( - object.next_sequence_receive !== undefined && - object.next_sequence_receive !== null - ) { - message.next_sequence_receive = Number(object.next_sequence_receive); - } else { - message.next_sequence_receive = 0; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, - - toJSON(message: QueryNextSequenceReceiveResponse): unknown { - const obj: any = {}; - message.next_sequence_receive !== undefined && - (obj.next_sequence_receive = message.next_sequence_receive); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryNextSequenceReceiveResponse { - const message = { - ...baseQueryNextSequenceReceiveResponse, - } as QueryNextSequenceReceiveResponse; - if ( - object.next_sequence_receive !== undefined && - object.next_sequence_receive !== null - ) { - message.next_sequence_receive = object.next_sequence_receive; - } else { - message.next_sequence_receive = 0; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, -}; - -/** Query provides defines the gRPC querier service */ -export interface Query { - /** Channel queries an IBC Channel. */ - Channel(request: QueryChannelRequest): Promise; - /** Channels queries all the IBC channels of a chain. */ - Channels(request: QueryChannelsRequest): Promise; - /** - * ConnectionChannels queries all the channels associated with a connection - * end. - */ - ConnectionChannels( - request: QueryConnectionChannelsRequest - ): Promise; - /** - * ChannelClientState queries for the client state for the channel associated - * with the provided channel identifiers. - */ - ChannelClientState( - request: QueryChannelClientStateRequest - ): Promise; - /** - * ChannelConsensusState queries for the consensus state for the channel - * associated with the provided channel identifiers. - */ - ChannelConsensusState( - request: QueryChannelConsensusStateRequest - ): Promise; - /** PacketCommitment queries a stored packet commitment hash. */ - PacketCommitment( - request: QueryPacketCommitmentRequest - ): Promise; - /** - * PacketCommitments returns all the packet commitments hashes associated - * with a channel. - */ - PacketCommitments( - request: QueryPacketCommitmentsRequest - ): Promise; - /** - * PacketReceipt queries if a given packet sequence has been received on the - * queried chain - */ - PacketReceipt( - request: QueryPacketReceiptRequest - ): Promise; - /** PacketAcknowledgement queries a stored packet acknowledgement hash. */ - PacketAcknowledgement( - request: QueryPacketAcknowledgementRequest - ): Promise; - /** - * PacketAcknowledgements returns all the packet acknowledgements associated - * with a channel. - */ - PacketAcknowledgements( - request: QueryPacketAcknowledgementsRequest - ): Promise; - /** - * UnreceivedPackets returns all the unreceived IBC packets associated with a - * channel and sequences. - */ - UnreceivedPackets( - request: QueryUnreceivedPacketsRequest - ): Promise; - /** - * UnreceivedAcks returns all the unreceived IBC acknowledgements associated - * with a channel and sequences. - */ - UnreceivedAcks( - request: QueryUnreceivedAcksRequest - ): Promise; - /** NextSequenceReceive returns the next receive sequence for a given channel. */ - NextSequenceReceive( - request: QueryNextSequenceReceiveRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Channel(request: QueryChannelRequest): Promise { - const data = QueryChannelRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "Channel", - data - ); - return promise.then((data) => - QueryChannelResponse.decode(new Reader(data)) - ); - } - - Channels(request: QueryChannelsRequest): Promise { - const data = QueryChannelsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "Channels", - data - ); - return promise.then((data) => - QueryChannelsResponse.decode(new Reader(data)) - ); - } - - ConnectionChannels( - request: QueryConnectionChannelsRequest - ): Promise { - const data = QueryConnectionChannelsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "ConnectionChannels", - data - ); - return promise.then((data) => - QueryConnectionChannelsResponse.decode(new Reader(data)) - ); - } - - ChannelClientState( - request: QueryChannelClientStateRequest - ): Promise { - const data = QueryChannelClientStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "ChannelClientState", - data - ); - return promise.then((data) => - QueryChannelClientStateResponse.decode(new Reader(data)) - ); - } - - ChannelConsensusState( - request: QueryChannelConsensusStateRequest - ): Promise { - const data = QueryChannelConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "ChannelConsensusState", - data - ); - return promise.then((data) => - QueryChannelConsensusStateResponse.decode(new Reader(data)) - ); - } - - PacketCommitment( - request: QueryPacketCommitmentRequest - ): Promise { - const data = QueryPacketCommitmentRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "PacketCommitment", - data - ); - return promise.then((data) => - QueryPacketCommitmentResponse.decode(new Reader(data)) - ); - } - - PacketCommitments( - request: QueryPacketCommitmentsRequest - ): Promise { - const data = QueryPacketCommitmentsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "PacketCommitments", - data - ); - return promise.then((data) => - QueryPacketCommitmentsResponse.decode(new Reader(data)) - ); - } - - PacketReceipt( - request: QueryPacketReceiptRequest - ): Promise { - const data = QueryPacketReceiptRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "PacketReceipt", - data - ); - return promise.then((data) => - QueryPacketReceiptResponse.decode(new Reader(data)) - ); - } - - PacketAcknowledgement( - request: QueryPacketAcknowledgementRequest - ): Promise { - const data = QueryPacketAcknowledgementRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "PacketAcknowledgement", - data - ); - return promise.then((data) => - QueryPacketAcknowledgementResponse.decode(new Reader(data)) - ); - } - - PacketAcknowledgements( - request: QueryPacketAcknowledgementsRequest - ): Promise { - const data = QueryPacketAcknowledgementsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "PacketAcknowledgements", - data - ); - return promise.then((data) => - QueryPacketAcknowledgementsResponse.decode(new Reader(data)) - ); - } - - UnreceivedPackets( - request: QueryUnreceivedPacketsRequest - ): Promise { - const data = QueryUnreceivedPacketsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "UnreceivedPackets", - data - ); - return promise.then((data) => - QueryUnreceivedPacketsResponse.decode(new Reader(data)) - ); - } - - UnreceivedAcks( - request: QueryUnreceivedAcksRequest - ): Promise { - const data = QueryUnreceivedAcksRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "UnreceivedAcks", - data - ); - return promise.then((data) => - QueryUnreceivedAcksResponse.decode(new Reader(data)) - ); - } - - NextSequenceReceive( - request: QueryNextSequenceReceiveRequest - ): Promise { - const data = QueryNextSequenceReceiveRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Query", - "NextSequenceReceive", - data - ); - return promise.then((data) => - QueryNextSequenceReceiveResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.ts deleted file mode 100644 index 56b1a49c49..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/channel/v1/tx.ts +++ /dev/null @@ -1,2439 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Channel, Packet } from "../../../../ibc/core/channel/v1/channel"; -import { Height } from "../../../../ibc/core/client/v1/client"; - -export const protobufPackage = "ibc.core.channel.v1"; - -/** ResponseResultType defines the possible outcomes of the execution of a message */ -export enum ResponseResultType { - /** RESPONSE_RESULT_UNSPECIFIED - Default zero value enumeration */ - RESPONSE_RESULT_UNSPECIFIED = 0, - /** RESPONSE_RESULT_NOOP - The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) */ - RESPONSE_RESULT_NOOP = 1, - /** RESPONSE_RESULT_SUCCESS - The message was executed successfully */ - RESPONSE_RESULT_SUCCESS = 2, - UNRECOGNIZED = -1, -} - -export function responseResultTypeFromJSON(object: any): ResponseResultType { - switch (object) { - case 0: - case "RESPONSE_RESULT_UNSPECIFIED": - return ResponseResultType.RESPONSE_RESULT_UNSPECIFIED; - case 1: - case "RESPONSE_RESULT_NOOP": - return ResponseResultType.RESPONSE_RESULT_NOOP; - case 2: - case "RESPONSE_RESULT_SUCCESS": - return ResponseResultType.RESPONSE_RESULT_SUCCESS; - case -1: - case "UNRECOGNIZED": - default: - return ResponseResultType.UNRECOGNIZED; - } -} - -export function responseResultTypeToJSON(object: ResponseResultType): string { - switch (object) { - case ResponseResultType.RESPONSE_RESULT_UNSPECIFIED: - return "RESPONSE_RESULT_UNSPECIFIED"; - case ResponseResultType.RESPONSE_RESULT_NOOP: - return "RESPONSE_RESULT_NOOP"; - case ResponseResultType.RESPONSE_RESULT_SUCCESS: - return "RESPONSE_RESULT_SUCCESS"; - default: - return "UNKNOWN"; - } -} - -/** - * MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It - * is called by a relayer on Chain A. - */ -export interface MsgChannelOpenInit { - port_id: string; - channel: Channel | undefined; - signer: string; -} - -/** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ -export interface MsgChannelOpenInitResponse { - channel_id: string; -} - -/** - * MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel - * on Chain B. The version field within the Channel field has been deprecated. Its - * value will be ignored by core IBC. - */ -export interface MsgChannelOpenTry { - port_id: string; - /** - * in the case of crossing hello's, when both chains call OpenInit, we need - * the channel identifier of the previous channel in state INIT - */ - previous_channel_id: string; - /** NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. */ - channel: Channel | undefined; - counterparty_version: string; - proof_init: Uint8Array; - proof_height: Height | undefined; - signer: string; -} - -/** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */ -export interface MsgChannelOpenTryResponse {} - -/** - * MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge - * the change of channel state to TRYOPEN on Chain B. - */ -export interface MsgChannelOpenAck { - port_id: string; - channel_id: string; - counterparty_channel_id: string; - counterparty_version: string; - proof_try: Uint8Array; - proof_height: Height | undefined; - signer: string; -} - -/** MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. */ -export interface MsgChannelOpenAckResponse {} - -/** - * MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to - * acknowledge the change of channel state to OPEN on Chain A. - */ -export interface MsgChannelOpenConfirm { - port_id: string; - channel_id: string; - proof_ack: Uint8Array; - proof_height: Height | undefined; - signer: string; -} - -/** - * MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response - * type. - */ -export interface MsgChannelOpenConfirmResponse {} - -/** - * MsgChannelCloseInit defines a msg sent by a Relayer to Chain A - * to close a channel with Chain B. - */ -export interface MsgChannelCloseInit { - port_id: string; - channel_id: string; - signer: string; -} - -/** MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. */ -export interface MsgChannelCloseInitResponse {} - -/** - * MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B - * to acknowledge the change of channel state to CLOSED on Chain A. - */ -export interface MsgChannelCloseConfirm { - port_id: string; - channel_id: string; - proof_init: Uint8Array; - proof_height: Height | undefined; - signer: string; -} - -/** - * MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response - * type. - */ -export interface MsgChannelCloseConfirmResponse {} - -/** MsgRecvPacket receives incoming IBC packet */ -export interface MsgRecvPacket { - packet: Packet | undefined; - proof_commitment: Uint8Array; - proof_height: Height | undefined; - signer: string; -} - -/** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ -export interface MsgRecvPacketResponse { - result: ResponseResultType; -} - -/** MsgTimeout receives timed-out packet */ -export interface MsgTimeout { - packet: Packet | undefined; - proof_unreceived: Uint8Array; - proof_height: Height | undefined; - next_sequence_recv: number; - signer: string; -} - -/** MsgTimeoutResponse defines the Msg/Timeout response type. */ -export interface MsgTimeoutResponse { - result: ResponseResultType; -} - -/** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ -export interface MsgTimeoutOnClose { - packet: Packet | undefined; - proof_unreceived: Uint8Array; - proof_close: Uint8Array; - proof_height: Height | undefined; - next_sequence_recv: number; - signer: string; -} - -/** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */ -export interface MsgTimeoutOnCloseResponse { - result: ResponseResultType; -} - -/** MsgAcknowledgement receives incoming IBC acknowledgement */ -export interface MsgAcknowledgement { - packet: Packet | undefined; - acknowledgement: Uint8Array; - proof_acked: Uint8Array; - proof_height: Height | undefined; - signer: string; -} - -/** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ -export interface MsgAcknowledgementResponse { - result: ResponseResultType; -} - -const baseMsgChannelOpenInit: object = { port_id: "", signer: "" }; - -export const MsgChannelOpenInit = { - encode( - message: MsgChannelOpenInit, - writer: Writer = Writer.create() - ): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel !== undefined) { - Channel.encode(message.channel, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenInit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelOpenInit } as MsgChannelOpenInit; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel = Channel.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgChannelOpenInit { - const message = { ...baseMsgChannelOpenInit } as MsgChannelOpenInit; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromJSON(object.channel); - } else { - message.channel = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgChannelOpenInit): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel !== undefined && - (obj.channel = message.channel - ? Channel.toJSON(message.channel) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgChannelOpenInit { - const message = { ...baseMsgChannelOpenInit } as MsgChannelOpenInit; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromPartial(object.channel); - } else { - message.channel = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgChannelOpenInitResponse: object = { channel_id: "" }; - -export const MsgChannelOpenInitResponse = { - encode( - message: MsgChannelOpenInitResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.channel_id !== "") { - writer.uint32(10).string(message.channel_id); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgChannelOpenInitResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelOpenInitResponse, - } as MsgChannelOpenInitResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgChannelOpenInitResponse { - const message = { - ...baseMsgChannelOpenInitResponse, - } as MsgChannelOpenInitResponse; - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - return message; - }, - - toJSON(message: MsgChannelOpenInitResponse): unknown { - const obj: any = {}; - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgChannelOpenInitResponse { - const message = { - ...baseMsgChannelOpenInitResponse, - } as MsgChannelOpenInitResponse; - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - return message; - }, -}; - -const baseMsgChannelOpenTry: object = { - port_id: "", - previous_channel_id: "", - counterparty_version: "", - signer: "", -}; - -export const MsgChannelOpenTry = { - encode(message: MsgChannelOpenTry, writer: Writer = Writer.create()): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.previous_channel_id !== "") { - writer.uint32(18).string(message.previous_channel_id); - } - if (message.channel !== undefined) { - Channel.encode(message.channel, writer.uint32(26).fork()).ldelim(); - } - if (message.counterparty_version !== "") { - writer.uint32(34).string(message.counterparty_version); - } - if (message.proof_init.length !== 0) { - writer.uint32(42).bytes(message.proof_init); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(50).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(58).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenTry { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelOpenTry } as MsgChannelOpenTry; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.previous_channel_id = reader.string(); - break; - case 3: - message.channel = Channel.decode(reader, reader.uint32()); - break; - case 4: - message.counterparty_version = reader.string(); - break; - case 5: - message.proof_init = reader.bytes(); - break; - case 6: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgChannelOpenTry { - const message = { ...baseMsgChannelOpenTry } as MsgChannelOpenTry; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if ( - object.previous_channel_id !== undefined && - object.previous_channel_id !== null - ) { - message.previous_channel_id = String(object.previous_channel_id); - } else { - message.previous_channel_id = ""; - } - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromJSON(object.channel); - } else { - message.channel = undefined; - } - if ( - object.counterparty_version !== undefined && - object.counterparty_version !== null - ) { - message.counterparty_version = String(object.counterparty_version); - } else { - message.counterparty_version = ""; - } - if (object.proof_init !== undefined && object.proof_init !== null) { - message.proof_init = bytesFromBase64(object.proof_init); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgChannelOpenTry): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.previous_channel_id !== undefined && - (obj.previous_channel_id = message.previous_channel_id); - message.channel !== undefined && - (obj.channel = message.channel - ? Channel.toJSON(message.channel) - : undefined); - message.counterparty_version !== undefined && - (obj.counterparty_version = message.counterparty_version); - message.proof_init !== undefined && - (obj.proof_init = base64FromBytes( - message.proof_init !== undefined ? message.proof_init : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgChannelOpenTry { - const message = { ...baseMsgChannelOpenTry } as MsgChannelOpenTry; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if ( - object.previous_channel_id !== undefined && - object.previous_channel_id !== null - ) { - message.previous_channel_id = object.previous_channel_id; - } else { - message.previous_channel_id = ""; - } - if (object.channel !== undefined && object.channel !== null) { - message.channel = Channel.fromPartial(object.channel); - } else { - message.channel = undefined; - } - if ( - object.counterparty_version !== undefined && - object.counterparty_version !== null - ) { - message.counterparty_version = object.counterparty_version; - } else { - message.counterparty_version = ""; - } - if (object.proof_init !== undefined && object.proof_init !== null) { - message.proof_init = object.proof_init; - } else { - message.proof_init = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgChannelOpenTryResponse: object = {}; - -export const MsgChannelOpenTryResponse = { - encode( - _: MsgChannelOpenTryResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgChannelOpenTryResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelOpenTryResponse, - } as MsgChannelOpenTryResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgChannelOpenTryResponse { - const message = { - ...baseMsgChannelOpenTryResponse, - } as MsgChannelOpenTryResponse; - return message; - }, - - toJSON(_: MsgChannelOpenTryResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgChannelOpenTryResponse { - const message = { - ...baseMsgChannelOpenTryResponse, - } as MsgChannelOpenTryResponse; - return message; - }, -}; - -const baseMsgChannelOpenAck: object = { - port_id: "", - channel_id: "", - counterparty_channel_id: "", - counterparty_version: "", - signer: "", -}; - -export const MsgChannelOpenAck = { - encode(message: MsgChannelOpenAck, writer: Writer = Writer.create()): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - if (message.counterparty_channel_id !== "") { - writer.uint32(26).string(message.counterparty_channel_id); - } - if (message.counterparty_version !== "") { - writer.uint32(34).string(message.counterparty_version); - } - if (message.proof_try.length !== 0) { - writer.uint32(42).bytes(message.proof_try); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(50).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(58).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenAck { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelOpenAck } as MsgChannelOpenAck; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.counterparty_channel_id = reader.string(); - break; - case 4: - message.counterparty_version = reader.string(); - break; - case 5: - message.proof_try = reader.bytes(); - break; - case 6: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgChannelOpenAck { - const message = { ...baseMsgChannelOpenAck } as MsgChannelOpenAck; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - if ( - object.counterparty_channel_id !== undefined && - object.counterparty_channel_id !== null - ) { - message.counterparty_channel_id = String(object.counterparty_channel_id); - } else { - message.counterparty_channel_id = ""; - } - if ( - object.counterparty_version !== undefined && - object.counterparty_version !== null - ) { - message.counterparty_version = String(object.counterparty_version); - } else { - message.counterparty_version = ""; - } - if (object.proof_try !== undefined && object.proof_try !== null) { - message.proof_try = bytesFromBase64(object.proof_try); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgChannelOpenAck): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - message.counterparty_channel_id !== undefined && - (obj.counterparty_channel_id = message.counterparty_channel_id); - message.counterparty_version !== undefined && - (obj.counterparty_version = message.counterparty_version); - message.proof_try !== undefined && - (obj.proof_try = base64FromBytes( - message.proof_try !== undefined ? message.proof_try : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgChannelOpenAck { - const message = { ...baseMsgChannelOpenAck } as MsgChannelOpenAck; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - if ( - object.counterparty_channel_id !== undefined && - object.counterparty_channel_id !== null - ) { - message.counterparty_channel_id = object.counterparty_channel_id; - } else { - message.counterparty_channel_id = ""; - } - if ( - object.counterparty_version !== undefined && - object.counterparty_version !== null - ) { - message.counterparty_version = object.counterparty_version; - } else { - message.counterparty_version = ""; - } - if (object.proof_try !== undefined && object.proof_try !== null) { - message.proof_try = object.proof_try; - } else { - message.proof_try = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgChannelOpenAckResponse: object = {}; - -export const MsgChannelOpenAckResponse = { - encode( - _: MsgChannelOpenAckResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgChannelOpenAckResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelOpenAckResponse, - } as MsgChannelOpenAckResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgChannelOpenAckResponse { - const message = { - ...baseMsgChannelOpenAckResponse, - } as MsgChannelOpenAckResponse; - return message; - }, - - toJSON(_: MsgChannelOpenAckResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgChannelOpenAckResponse { - const message = { - ...baseMsgChannelOpenAckResponse, - } as MsgChannelOpenAckResponse; - return message; - }, -}; - -const baseMsgChannelOpenConfirm: object = { - port_id: "", - channel_id: "", - signer: "", -}; - -export const MsgChannelOpenConfirm = { - encode( - message: MsgChannelOpenConfirm, - writer: Writer = Writer.create() - ): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - if (message.proof_ack.length !== 0) { - writer.uint32(26).bytes(message.proof_ack); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(34).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgChannelOpenConfirm { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelOpenConfirm } as MsgChannelOpenConfirm; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.proof_ack = reader.bytes(); - break; - case 4: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgChannelOpenConfirm { - const message = { ...baseMsgChannelOpenConfirm } as MsgChannelOpenConfirm; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - if (object.proof_ack !== undefined && object.proof_ack !== null) { - message.proof_ack = bytesFromBase64(object.proof_ack); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgChannelOpenConfirm): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - message.proof_ack !== undefined && - (obj.proof_ack = base64FromBytes( - message.proof_ack !== undefined ? message.proof_ack : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgChannelOpenConfirm { - const message = { ...baseMsgChannelOpenConfirm } as MsgChannelOpenConfirm; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - if (object.proof_ack !== undefined && object.proof_ack !== null) { - message.proof_ack = object.proof_ack; - } else { - message.proof_ack = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgChannelOpenConfirmResponse: object = {}; - -export const MsgChannelOpenConfirmResponse = { - encode( - _: MsgChannelOpenConfirmResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgChannelOpenConfirmResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelOpenConfirmResponse, - } as MsgChannelOpenConfirmResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgChannelOpenConfirmResponse { - const message = { - ...baseMsgChannelOpenConfirmResponse, - } as MsgChannelOpenConfirmResponse; - return message; - }, - - toJSON(_: MsgChannelOpenConfirmResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgChannelOpenConfirmResponse { - const message = { - ...baseMsgChannelOpenConfirmResponse, - } as MsgChannelOpenConfirmResponse; - return message; - }, -}; - -const baseMsgChannelCloseInit: object = { - port_id: "", - channel_id: "", - signer: "", -}; - -export const MsgChannelCloseInit = { - encode( - message: MsgChannelCloseInit, - writer: Writer = Writer.create() - ): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgChannelCloseInit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelCloseInit } as MsgChannelCloseInit; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgChannelCloseInit { - const message = { ...baseMsgChannelCloseInit } as MsgChannelCloseInit; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgChannelCloseInit): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgChannelCloseInit { - const message = { ...baseMsgChannelCloseInit } as MsgChannelCloseInit; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgChannelCloseInitResponse: object = {}; - -export const MsgChannelCloseInitResponse = { - encode( - _: MsgChannelCloseInitResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgChannelCloseInitResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelCloseInitResponse, - } as MsgChannelCloseInitResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgChannelCloseInitResponse { - const message = { - ...baseMsgChannelCloseInitResponse, - } as MsgChannelCloseInitResponse; - return message; - }, - - toJSON(_: MsgChannelCloseInitResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgChannelCloseInitResponse { - const message = { - ...baseMsgChannelCloseInitResponse, - } as MsgChannelCloseInitResponse; - return message; - }, -}; - -const baseMsgChannelCloseConfirm: object = { - port_id: "", - channel_id: "", - signer: "", -}; - -export const MsgChannelCloseConfirm = { - encode( - message: MsgChannelCloseConfirm, - writer: Writer = Writer.create() - ): Writer { - if (message.port_id !== "") { - writer.uint32(10).string(message.port_id); - } - if (message.channel_id !== "") { - writer.uint32(18).string(message.channel_id); - } - if (message.proof_init.length !== 0) { - writer.uint32(26).bytes(message.proof_init); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(34).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgChannelCloseConfirm { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChannelCloseConfirm } as MsgChannelCloseConfirm; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.proof_init = reader.bytes(); - break; - case 4: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgChannelCloseConfirm { - const message = { ...baseMsgChannelCloseConfirm } as MsgChannelCloseConfirm; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = String(object.port_id); - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = String(object.channel_id); - } else { - message.channel_id = ""; - } - if (object.proof_init !== undefined && object.proof_init !== null) { - message.proof_init = bytesFromBase64(object.proof_init); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgChannelCloseConfirm): unknown { - const obj: any = {}; - message.port_id !== undefined && (obj.port_id = message.port_id); - message.channel_id !== undefined && (obj.channel_id = message.channel_id); - message.proof_init !== undefined && - (obj.proof_init = base64FromBytes( - message.proof_init !== undefined ? message.proof_init : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgChannelCloseConfirm { - const message = { ...baseMsgChannelCloseConfirm } as MsgChannelCloseConfirm; - if (object.port_id !== undefined && object.port_id !== null) { - message.port_id = object.port_id; - } else { - message.port_id = ""; - } - if (object.channel_id !== undefined && object.channel_id !== null) { - message.channel_id = object.channel_id; - } else { - message.channel_id = ""; - } - if (object.proof_init !== undefined && object.proof_init !== null) { - message.proof_init = object.proof_init; - } else { - message.proof_init = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgChannelCloseConfirmResponse: object = {}; - -export const MsgChannelCloseConfirmResponse = { - encode( - _: MsgChannelCloseConfirmResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgChannelCloseConfirmResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgChannelCloseConfirmResponse, - } as MsgChannelCloseConfirmResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgChannelCloseConfirmResponse { - const message = { - ...baseMsgChannelCloseConfirmResponse, - } as MsgChannelCloseConfirmResponse; - return message; - }, - - toJSON(_: MsgChannelCloseConfirmResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgChannelCloseConfirmResponse { - const message = { - ...baseMsgChannelCloseConfirmResponse, - } as MsgChannelCloseConfirmResponse; - return message; - }, -}; - -const baseMsgRecvPacket: object = { signer: "" }; - -export const MsgRecvPacket = { - encode(message: MsgRecvPacket, writer: Writer = Writer.create()): Writer { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.proof_commitment.length !== 0) { - writer.uint32(18).bytes(message.proof_commitment); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(34).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgRecvPacket { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgRecvPacket } as MsgRecvPacket; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proof_commitment = reader.bytes(); - break; - case 3: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgRecvPacket { - const message = { ...baseMsgRecvPacket } as MsgRecvPacket; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromJSON(object.packet); - } else { - message.packet = undefined; - } - if ( - object.proof_commitment !== undefined && - object.proof_commitment !== null - ) { - message.proof_commitment = bytesFromBase64(object.proof_commitment); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgRecvPacket): unknown { - const obj: any = {}; - message.packet !== undefined && - (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.proof_commitment !== undefined && - (obj.proof_commitment = base64FromBytes( - message.proof_commitment !== undefined - ? message.proof_commitment - : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgRecvPacket { - const message = { ...baseMsgRecvPacket } as MsgRecvPacket; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromPartial(object.packet); - } else { - message.packet = undefined; - } - if ( - object.proof_commitment !== undefined && - object.proof_commitment !== null - ) { - message.proof_commitment = object.proof_commitment; - } else { - message.proof_commitment = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgRecvPacketResponse: object = { result: 0 }; - -export const MsgRecvPacketResponse = { - encode( - message: MsgRecvPacketResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgRecvPacketResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgRecvPacketResponse } as MsgRecvPacketResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgRecvPacketResponse { - const message = { ...baseMsgRecvPacketResponse } as MsgRecvPacketResponse; - if (object.result !== undefined && object.result !== null) { - message.result = responseResultTypeFromJSON(object.result); - } else { - message.result = 0; - } - return message; - }, - - toJSON(message: MsgRecvPacketResponse): unknown { - const obj: any = {}; - message.result !== undefined && - (obj.result = responseResultTypeToJSON(message.result)); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgRecvPacketResponse { - const message = { ...baseMsgRecvPacketResponse } as MsgRecvPacketResponse; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } else { - message.result = 0; - } - return message; - }, -}; - -const baseMsgTimeout: object = { next_sequence_recv: 0, signer: "" }; - -export const MsgTimeout = { - encode(message: MsgTimeout, writer: Writer = Writer.create()): Writer { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.proof_unreceived.length !== 0) { - writer.uint32(18).bytes(message.proof_unreceived); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim(); - } - if (message.next_sequence_recv !== 0) { - writer.uint32(32).uint64(message.next_sequence_recv); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgTimeout { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTimeout } as MsgTimeout; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proof_unreceived = reader.bytes(); - break; - case 3: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - case 4: - message.next_sequence_recv = longToNumber(reader.uint64() as Long); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgTimeout { - const message = { ...baseMsgTimeout } as MsgTimeout; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromJSON(object.packet); - } else { - message.packet = undefined; - } - if ( - object.proof_unreceived !== undefined && - object.proof_unreceived !== null - ) { - message.proof_unreceived = bytesFromBase64(object.proof_unreceived); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - if ( - object.next_sequence_recv !== undefined && - object.next_sequence_recv !== null - ) { - message.next_sequence_recv = Number(object.next_sequence_recv); - } else { - message.next_sequence_recv = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgTimeout): unknown { - const obj: any = {}; - message.packet !== undefined && - (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.proof_unreceived !== undefined && - (obj.proof_unreceived = base64FromBytes( - message.proof_unreceived !== undefined - ? message.proof_unreceived - : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - message.next_sequence_recv !== undefined && - (obj.next_sequence_recv = message.next_sequence_recv); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgTimeout { - const message = { ...baseMsgTimeout } as MsgTimeout; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromPartial(object.packet); - } else { - message.packet = undefined; - } - if ( - object.proof_unreceived !== undefined && - object.proof_unreceived !== null - ) { - message.proof_unreceived = object.proof_unreceived; - } else { - message.proof_unreceived = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - if ( - object.next_sequence_recv !== undefined && - object.next_sequence_recv !== null - ) { - message.next_sequence_recv = object.next_sequence_recv; - } else { - message.next_sequence_recv = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgTimeoutResponse: object = { result: 0 }; - -export const MsgTimeoutResponse = { - encode( - message: MsgTimeoutResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgTimeoutResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTimeoutResponse } as MsgTimeoutResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgTimeoutResponse { - const message = { ...baseMsgTimeoutResponse } as MsgTimeoutResponse; - if (object.result !== undefined && object.result !== null) { - message.result = responseResultTypeFromJSON(object.result); - } else { - message.result = 0; - } - return message; - }, - - toJSON(message: MsgTimeoutResponse): unknown { - const obj: any = {}; - message.result !== undefined && - (obj.result = responseResultTypeToJSON(message.result)); - return obj; - }, - - fromPartial(object: DeepPartial): MsgTimeoutResponse { - const message = { ...baseMsgTimeoutResponse } as MsgTimeoutResponse; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } else { - message.result = 0; - } - return message; - }, -}; - -const baseMsgTimeoutOnClose: object = { next_sequence_recv: 0, signer: "" }; - -export const MsgTimeoutOnClose = { - encode(message: MsgTimeoutOnClose, writer: Writer = Writer.create()): Writer { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.proof_unreceived.length !== 0) { - writer.uint32(18).bytes(message.proof_unreceived); - } - if (message.proof_close.length !== 0) { - writer.uint32(26).bytes(message.proof_close); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(34).fork()).ldelim(); - } - if (message.next_sequence_recv !== 0) { - writer.uint32(40).uint64(message.next_sequence_recv); - } - if (message.signer !== "") { - writer.uint32(50).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgTimeoutOnClose { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgTimeoutOnClose } as MsgTimeoutOnClose; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proof_unreceived = reader.bytes(); - break; - case 3: - message.proof_close = reader.bytes(); - break; - case 4: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - case 5: - message.next_sequence_recv = longToNumber(reader.uint64() as Long); - break; - case 6: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgTimeoutOnClose { - const message = { ...baseMsgTimeoutOnClose } as MsgTimeoutOnClose; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromJSON(object.packet); - } else { - message.packet = undefined; - } - if ( - object.proof_unreceived !== undefined && - object.proof_unreceived !== null - ) { - message.proof_unreceived = bytesFromBase64(object.proof_unreceived); - } - if (object.proof_close !== undefined && object.proof_close !== null) { - message.proof_close = bytesFromBase64(object.proof_close); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - if ( - object.next_sequence_recv !== undefined && - object.next_sequence_recv !== null - ) { - message.next_sequence_recv = Number(object.next_sequence_recv); - } else { - message.next_sequence_recv = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgTimeoutOnClose): unknown { - const obj: any = {}; - message.packet !== undefined && - (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.proof_unreceived !== undefined && - (obj.proof_unreceived = base64FromBytes( - message.proof_unreceived !== undefined - ? message.proof_unreceived - : new Uint8Array() - )); - message.proof_close !== undefined && - (obj.proof_close = base64FromBytes( - message.proof_close !== undefined - ? message.proof_close - : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - message.next_sequence_recv !== undefined && - (obj.next_sequence_recv = message.next_sequence_recv); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgTimeoutOnClose { - const message = { ...baseMsgTimeoutOnClose } as MsgTimeoutOnClose; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromPartial(object.packet); - } else { - message.packet = undefined; - } - if ( - object.proof_unreceived !== undefined && - object.proof_unreceived !== null - ) { - message.proof_unreceived = object.proof_unreceived; - } else { - message.proof_unreceived = new Uint8Array(); - } - if (object.proof_close !== undefined && object.proof_close !== null) { - message.proof_close = object.proof_close; - } else { - message.proof_close = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - if ( - object.next_sequence_recv !== undefined && - object.next_sequence_recv !== null - ) { - message.next_sequence_recv = object.next_sequence_recv; - } else { - message.next_sequence_recv = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgTimeoutOnCloseResponse: object = { result: 0 }; - -export const MsgTimeoutOnCloseResponse = { - encode( - message: MsgTimeoutOnCloseResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgTimeoutOnCloseResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgTimeoutOnCloseResponse, - } as MsgTimeoutOnCloseResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgTimeoutOnCloseResponse { - const message = { - ...baseMsgTimeoutOnCloseResponse, - } as MsgTimeoutOnCloseResponse; - if (object.result !== undefined && object.result !== null) { - message.result = responseResultTypeFromJSON(object.result); - } else { - message.result = 0; - } - return message; - }, - - toJSON(message: MsgTimeoutOnCloseResponse): unknown { - const obj: any = {}; - message.result !== undefined && - (obj.result = responseResultTypeToJSON(message.result)); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgTimeoutOnCloseResponse { - const message = { - ...baseMsgTimeoutOnCloseResponse, - } as MsgTimeoutOnCloseResponse; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } else { - message.result = 0; - } - return message; - }, -}; - -const baseMsgAcknowledgement: object = { signer: "" }; - -export const MsgAcknowledgement = { - encode( - message: MsgAcknowledgement, - writer: Writer = Writer.create() - ): Writer { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.acknowledgement.length !== 0) { - writer.uint32(18).bytes(message.acknowledgement); - } - if (message.proof_acked.length !== 0) { - writer.uint32(26).bytes(message.proof_acked); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(34).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgAcknowledgement { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgAcknowledgement } as MsgAcknowledgement; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.acknowledgement = reader.bytes(); - break; - case 3: - message.proof_acked = reader.bytes(); - break; - case 4: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgAcknowledgement { - const message = { ...baseMsgAcknowledgement } as MsgAcknowledgement; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromJSON(object.packet); - } else { - message.packet = undefined; - } - if ( - object.acknowledgement !== undefined && - object.acknowledgement !== null - ) { - message.acknowledgement = bytesFromBase64(object.acknowledgement); - } - if (object.proof_acked !== undefined && object.proof_acked !== null) { - message.proof_acked = bytesFromBase64(object.proof_acked); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgAcknowledgement): unknown { - const obj: any = {}; - message.packet !== undefined && - (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.acknowledgement !== undefined && - (obj.acknowledgement = base64FromBytes( - message.acknowledgement !== undefined - ? message.acknowledgement - : new Uint8Array() - )); - message.proof_acked !== undefined && - (obj.proof_acked = base64FromBytes( - message.proof_acked !== undefined - ? message.proof_acked - : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgAcknowledgement { - const message = { ...baseMsgAcknowledgement } as MsgAcknowledgement; - if (object.packet !== undefined && object.packet !== null) { - message.packet = Packet.fromPartial(object.packet); - } else { - message.packet = undefined; - } - if ( - object.acknowledgement !== undefined && - object.acknowledgement !== null - ) { - message.acknowledgement = object.acknowledgement; - } else { - message.acknowledgement = new Uint8Array(); - } - if (object.proof_acked !== undefined && object.proof_acked !== null) { - message.proof_acked = object.proof_acked; - } else { - message.proof_acked = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgAcknowledgementResponse: object = { result: 0 }; - -export const MsgAcknowledgementResponse = { - encode( - message: MsgAcknowledgementResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgAcknowledgementResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgAcknowledgementResponse, - } as MsgAcknowledgementResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgAcknowledgementResponse { - const message = { - ...baseMsgAcknowledgementResponse, - } as MsgAcknowledgementResponse; - if (object.result !== undefined && object.result !== null) { - message.result = responseResultTypeFromJSON(object.result); - } else { - message.result = 0; - } - return message; - }, - - toJSON(message: MsgAcknowledgementResponse): unknown { - const obj: any = {}; - message.result !== undefined && - (obj.result = responseResultTypeToJSON(message.result)); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgAcknowledgementResponse { - const message = { - ...baseMsgAcknowledgementResponse, - } as MsgAcknowledgementResponse; - if (object.result !== undefined && object.result !== null) { - message.result = object.result; - } else { - message.result = 0; - } - return message; - }, -}; - -/** Msg defines the ibc/channel Msg service. */ -export interface Msg { - /** ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. */ - ChannelOpenInit( - request: MsgChannelOpenInit - ): Promise; - /** ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. */ - ChannelOpenTry( - request: MsgChannelOpenTry - ): Promise; - /** ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. */ - ChannelOpenAck( - request: MsgChannelOpenAck - ): Promise; - /** ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. */ - ChannelOpenConfirm( - request: MsgChannelOpenConfirm - ): Promise; - /** ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. */ - ChannelCloseInit( - request: MsgChannelCloseInit - ): Promise; - /** - * ChannelCloseConfirm defines a rpc handler method for - * MsgChannelCloseConfirm. - */ - ChannelCloseConfirm( - request: MsgChannelCloseConfirm - ): Promise; - /** RecvPacket defines a rpc handler method for MsgRecvPacket. */ - RecvPacket(request: MsgRecvPacket): Promise; - /** Timeout defines a rpc handler method for MsgTimeout. */ - Timeout(request: MsgTimeout): Promise; - /** TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. */ - TimeoutOnClose( - request: MsgTimeoutOnClose - ): Promise; - /** Acknowledgement defines a rpc handler method for MsgAcknowledgement. */ - Acknowledgement( - request: MsgAcknowledgement - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - ChannelOpenInit( - request: MsgChannelOpenInit - ): Promise { - const data = MsgChannelOpenInit.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "ChannelOpenInit", - data - ); - return promise.then((data) => - MsgChannelOpenInitResponse.decode(new Reader(data)) - ); - } - - ChannelOpenTry( - request: MsgChannelOpenTry - ): Promise { - const data = MsgChannelOpenTry.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "ChannelOpenTry", - data - ); - return promise.then((data) => - MsgChannelOpenTryResponse.decode(new Reader(data)) - ); - } - - ChannelOpenAck( - request: MsgChannelOpenAck - ): Promise { - const data = MsgChannelOpenAck.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "ChannelOpenAck", - data - ); - return promise.then((data) => - MsgChannelOpenAckResponse.decode(new Reader(data)) - ); - } - - ChannelOpenConfirm( - request: MsgChannelOpenConfirm - ): Promise { - const data = MsgChannelOpenConfirm.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "ChannelOpenConfirm", - data - ); - return promise.then((data) => - MsgChannelOpenConfirmResponse.decode(new Reader(data)) - ); - } - - ChannelCloseInit( - request: MsgChannelCloseInit - ): Promise { - const data = MsgChannelCloseInit.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "ChannelCloseInit", - data - ); - return promise.then((data) => - MsgChannelCloseInitResponse.decode(new Reader(data)) - ); - } - - ChannelCloseConfirm( - request: MsgChannelCloseConfirm - ): Promise { - const data = MsgChannelCloseConfirm.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "ChannelCloseConfirm", - data - ); - return promise.then((data) => - MsgChannelCloseConfirmResponse.decode(new Reader(data)) - ); - } - - RecvPacket(request: MsgRecvPacket): Promise { - const data = MsgRecvPacket.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "RecvPacket", - data - ); - return promise.then((data) => - MsgRecvPacketResponse.decode(new Reader(data)) - ); - } - - Timeout(request: MsgTimeout): Promise { - const data = MsgTimeout.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "Timeout", - data - ); - return promise.then((data) => MsgTimeoutResponse.decode(new Reader(data))); - } - - TimeoutOnClose( - request: MsgTimeoutOnClose - ): Promise { - const data = MsgTimeoutOnClose.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "TimeoutOnClose", - data - ); - return promise.then((data) => - MsgTimeoutOnCloseResponse.decode(new Reader(data)) - ); - } - - Acknowledgement( - request: MsgAcknowledgement - ): Promise { - const data = MsgAcknowledgement.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.channel.v1.Msg", - "Acknowledgement", - data - ); - return promise.then((data) => - MsgAcknowledgementResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.ts deleted file mode 100644 index b34686d396..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/module/types/ibc/core/client/v1/client.ts +++ /dev/null @@ -1,814 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; - -export const protobufPackage = "ibc.core.client.v1"; - -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientState { - /** client identifier */ - client_id: string; - /** client state */ - client_state: Any | undefined; -} - -/** - * ConsensusStateWithHeight defines a consensus state with an additional height - * field. - */ -export interface ConsensusStateWithHeight { - /** consensus state height */ - height: Height | undefined; - /** consensus state */ - consensus_state: Any | undefined; -} - -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStates { - /** client identifier */ - client_id: string; - /** consensus states and their heights associated with the client */ - consensus_states: ConsensusStateWithHeight[]; -} - -/** - * ClientUpdateProposal is a governance proposal. If it passes, the substitute - * client's latest consensus state is copied over to the subject client. The proposal - * handler may fail if the subject and the substitute do not match in client and - * chain parameters (with exception to latest height, frozen height, and chain-id). - */ -export interface ClientUpdateProposal { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - subject_client_id: string; - /** - * the substitute client identifier for the client standing in for the subject - * client - */ - substitute_client_id: string; -} - -/** - * UpgradeProposal is a gov Content type for initiating an IBC breaking - * upgrade. - */ -export interface UpgradeProposal { - title: string; - description: string; - plan: Plan | undefined; - /** - * An UpgradedClientState must be provided to perform an IBC breaking upgrade. - * This will make the chain commit to the correct upgraded (self) client state - * before the upgrade occurs, so that connecting chains can verify that the - * new upgraded client is valid by verifying a proof on the previous version - * of the chain. This will allow IBC connections to persist smoothly across - * planned chain upgrades - */ - upgraded_client_state: Any | undefined; -} - -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * 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 - */ -export interface Height { - /** the revision that the client is currently on */ - revision_number: number; - /** the height within the given revision */ - revision_height: number; -} - -/** Params defines the set of IBC light client parameters. */ -export interface Params { - /** allowed_clients defines the list of allowed client state types. */ - allowed_clients: string[]; -} - -const baseIdentifiedClientState: object = { client_id: "" }; - -export const IdentifiedClientState = { - encode( - message: IdentifiedClientState, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - if (message.client_state !== undefined) { - Any.encode(message.client_state, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IdentifiedClientState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.client_state = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromJSON(object.client_state); - } else { - message.client_state = undefined; - } - return message; - }, - - toJSON(message: IdentifiedClientState): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - message.client_state !== undefined && - (obj.client_state = message.client_state - ? Any.toJSON(message.client_state) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromPartial(object.client_state); - } else { - message.client_state = undefined; - } - return message; - }, -}; - -const baseConsensusStateWithHeight: object = {}; - -export const ConsensusStateWithHeight = { - encode( - message: ConsensusStateWithHeight, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(10).fork()).ldelim(); - } - if (message.consensus_state !== undefined) { - Any.encode(message.consensus_state, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ConsensusStateWithHeight { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensus_state = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromJSON(object.consensus_state); - } else { - message.consensus_state = undefined; - } - return message; - }, - - toJSON(message: ConsensusStateWithHeight): unknown { - const obj: any = {}; - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - message.consensus_state !== undefined && - (obj.consensus_state = message.consensus_state - ? Any.toJSON(message.consensus_state) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromPartial(object.consensus_state); - } else { - message.consensus_state = undefined; - } - return message; - }, -}; - -const baseClientConsensusStates: object = { client_id: "" }; - -export const ClientConsensusStates = { - encode( - message: ClientConsensusStates, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - for (const v of message.consensus_states) { - ConsensusStateWithHeight.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientConsensusStates { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensus_states = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.consensus_states.push( - ConsensusStateWithHeight.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensus_states = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if ( - object.consensus_states !== undefined && - object.consensus_states !== null - ) { - for (const e of object.consensus_states) { - message.consensus_states.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ClientConsensusStates): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - if (message.consensus_states) { - obj.consensus_states = message.consensus_states.map((e) => - e ? ConsensusStateWithHeight.toJSON(e) : undefined - ); - } else { - obj.consensus_states = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensus_states = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if ( - object.consensus_states !== undefined && - object.consensus_states !== null - ) { - for (const e of object.consensus_states) { - message.consensus_states.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - return message; - }, -}; - -const baseClientUpdateProposal: object = { - title: "", - description: "", - subject_client_id: "", - substitute_client_id: "", -}; - -export const ClientUpdateProposal = { - encode( - message: ClientUpdateProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.subject_client_id !== "") { - writer.uint32(26).string(message.subject_client_id); - } - if (message.substitute_client_id !== "") { - writer.uint32(34).string(message.substitute_client_id); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientUpdateProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.subject_client_id = reader.string(); - break; - case 4: - message.substitute_client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if ( - object.subject_client_id !== undefined && - object.subject_client_id !== null - ) { - message.subject_client_id = String(object.subject_client_id); - } else { - message.subject_client_id = ""; - } - if ( - object.substitute_client_id !== undefined && - object.substitute_client_id !== null - ) { - message.substitute_client_id = String(object.substitute_client_id); - } else { - message.substitute_client_id = ""; - } - return message; - }, - - toJSON(message: ClientUpdateProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.subject_client_id !== undefined && - (obj.subject_client_id = message.subject_client_id); - message.substitute_client_id !== undefined && - (obj.substitute_client_id = message.substitute_client_id); - return obj; - }, - - fromPartial(object: DeepPartial): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if ( - object.subject_client_id !== undefined && - object.subject_client_id !== null - ) { - message.subject_client_id = object.subject_client_id; - } else { - message.subject_client_id = ""; - } - if ( - object.substitute_client_id !== undefined && - object.substitute_client_id !== null - ) { - message.substitute_client_id = object.substitute_client_id; - } else { - message.substitute_client_id = ""; - } - return message; - }, -}; - -const baseUpgradeProposal: object = { title: "", description: "" }; - -export const UpgradeProposal = { - encode(message: UpgradeProposal, writer: Writer = Writer.create()): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); - } - if (message.upgraded_client_state !== undefined) { - Any.encode( - message.upgraded_client_state, - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUpgradeProposal } as UpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - case 4: - message.upgraded_client_state = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpgradeProposal { - const message = { ...baseUpgradeProposal } as UpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromJSON(object.plan); - } else { - message.plan = undefined; - } - if ( - object.upgraded_client_state !== undefined && - object.upgraded_client_state !== null - ) { - message.upgraded_client_state = Any.fromJSON( - object.upgraded_client_state - ); - } else { - message.upgraded_client_state = undefined; - } - return message; - }, - - toJSON(message: UpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.plan !== undefined && - (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - message.upgraded_client_state !== undefined && - (obj.upgraded_client_state = message.upgraded_client_state - ? Any.toJSON(message.upgraded_client_state) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): UpgradeProposal { - const message = { ...baseUpgradeProposal } as UpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromPartial(object.plan); - } else { - message.plan = undefined; - } - if ( - object.upgraded_client_state !== undefined && - object.upgraded_client_state !== null - ) { - message.upgraded_client_state = Any.fromPartial( - object.upgraded_client_state - ); - } else { - message.upgraded_client_state = undefined; - } - return message; - }, -}; - -const baseHeight: object = { revision_number: 0, revision_height: 0 }; - -export const Height = { - encode(message: Height, writer: Writer = Writer.create()): Writer { - if (message.revision_number !== 0) { - writer.uint32(8).uint64(message.revision_number); - } - if (message.revision_height !== 0) { - writer.uint32(16).uint64(message.revision_height); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Height { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeight } as Height; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revision_number = longToNumber(reader.uint64() as Long); - break; - case 2: - message.revision_height = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Height { - const message = { ...baseHeight } as Height; - if ( - object.revision_number !== undefined && - object.revision_number !== null - ) { - message.revision_number = Number(object.revision_number); - } else { - message.revision_number = 0; - } - if ( - object.revision_height !== undefined && - object.revision_height !== null - ) { - message.revision_height = Number(object.revision_height); - } else { - message.revision_height = 0; - } - return message; - }, - - toJSON(message: Height): unknown { - const obj: any = {}; - message.revision_number !== undefined && - (obj.revision_number = message.revision_number); - message.revision_height !== undefined && - (obj.revision_height = message.revision_height); - return obj; - }, - - fromPartial(object: DeepPartial): Height { - const message = { ...baseHeight } as Height; - if ( - object.revision_number !== undefined && - object.revision_number !== null - ) { - message.revision_number = object.revision_number; - } else { - message.revision_number = 0; - } - if ( - object.revision_height !== undefined && - object.revision_height !== null - ) { - message.revision_height = object.revision_height; - } else { - message.revision_height = 0; - } - return message; - }, -}; - -const baseParams: object = { allowed_clients: "" }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - for (const v of message.allowed_clients) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - message.allowed_clients = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowed_clients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - message.allowed_clients = []; - if ( - object.allowed_clients !== undefined && - object.allowed_clients !== null - ) { - for (const e of object.allowed_clients) { - message.allowed_clients.push(String(e)); - } - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.allowed_clients) { - obj.allowed_clients = message.allowed_clients.map((e) => e); - } else { - obj.allowed_clients = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - message.allowed_clients = []; - if ( - object.allowed_clients !== undefined && - object.allowed_clients !== null - ) { - for (const e of object.allowed_clients) { - message.allowed_clients.push(e); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/package.json b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/package.json deleted file mode 100755 index 0246e0165e..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "ibc-core-channel-v1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module ibc.core.channel.v1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/ibc-go/v3/modules/core/04-channel/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/vuex-root b/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.channel.v1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/index.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/index.ts deleted file mode 100755 index 3db067f7e0..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/index.ts +++ /dev/null @@ -1,372 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { IdentifiedClientState } from "./module/types/ibc/core/client/v1/client" -import { ConsensusStateWithHeight } from "./module/types/ibc/core/client/v1/client" -import { ClientConsensusStates } from "./module/types/ibc/core/client/v1/client" -import { ClientUpdateProposal } from "./module/types/ibc/core/client/v1/client" -import { UpgradeProposal } from "./module/types/ibc/core/client/v1/client" -import { Height } from "./module/types/ibc/core/client/v1/client" -import { Params } from "./module/types/ibc/core/client/v1/client" -import { GenesisMetadata } from "./module/types/ibc/core/client/v1/genesis" -import { IdentifiedGenesisMetadata } from "./module/types/ibc/core/client/v1/genesis" - - -export { IdentifiedClientState, ConsensusStateWithHeight, ClientConsensusStates, ClientUpdateProposal, UpgradeProposal, Height, Params, GenesisMetadata, IdentifiedGenesisMetadata }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - ClientState: {}, - ClientStates: {}, - ConsensusState: {}, - ConsensusStates: {}, - ClientStatus: {}, - ClientParams: {}, - UpgradedClientState: {}, - UpgradedConsensusState: {}, - - _Structure: { - IdentifiedClientState: getStructure(IdentifiedClientState.fromPartial({})), - ConsensusStateWithHeight: getStructure(ConsensusStateWithHeight.fromPartial({})), - ClientConsensusStates: getStructure(ClientConsensusStates.fromPartial({})), - ClientUpdateProposal: getStructure(ClientUpdateProposal.fromPartial({})), - UpgradeProposal: getStructure(UpgradeProposal.fromPartial({})), - Height: getStructure(Height.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - GenesisMetadata: getStructure(GenesisMetadata.fromPartial({})), - IdentifiedGenesisMetadata: getStructure(IdentifiedGenesisMetadata.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getClientState: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ClientState[JSON.stringify(params)] ?? {} - }, - getClientStates: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ClientStates[JSON.stringify(params)] ?? {} - }, - getConsensusState: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ConsensusState[JSON.stringify(params)] ?? {} - }, - getConsensusStates: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ConsensusStates[JSON.stringify(params)] ?? {} - }, - getClientStatus: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ClientStatus[JSON.stringify(params)] ?? {} - }, - getClientParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ClientParams[JSON.stringify(params)] ?? {} - }, - getUpgradedClientState: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.UpgradedClientState[JSON.stringify(params)] ?? {} - }, - getUpgradedConsensusState: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.UpgradedConsensusState[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: ibc.core.client.v1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryClientState({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryClientState( key.client_id)).data - - - commit('QUERY', { query: 'ClientState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryClientState', payload: { options: { all }, params: {...key},query }}) - return getters['getClientState']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryClientState API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryClientStates({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryClientStates(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryClientStates({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ClientStates', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryClientStates', payload: { options: { all }, params: {...key},query }}) - return getters['getClientStates']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryClientStates API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryConsensusState({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryConsensusState( key.client_id, key.revision_number, key.revision_height, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryConsensusState( key.client_id, key.revision_number, key.revision_height, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ConsensusState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryConsensusState', payload: { options: { all }, params: {...key},query }}) - return getters['getConsensusState']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryConsensusState API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryConsensusStates({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryConsensusStates( key.client_id, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryConsensusStates( key.client_id, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ConsensusStates', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryConsensusStates', payload: { options: { all }, params: {...key},query }}) - return getters['getConsensusStates']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryConsensusStates API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryClientStatus({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryClientStatus( key.client_id)).data - - - commit('QUERY', { query: 'ClientStatus', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryClientStatus', payload: { options: { all }, params: {...key},query }}) - return getters['getClientStatus']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryClientStatus API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryClientParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryClientParams()).data - - - commit('QUERY', { query: 'ClientParams', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryClientParams', payload: { options: { all }, params: {...key},query }}) - return getters['getClientParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryClientParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryUpgradedClientState({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryUpgradedClientState()).data - - - commit('QUERY', { query: 'UpgradedClientState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryUpgradedClientState', payload: { options: { all }, params: {...key},query }}) - return getters['getUpgradedClientState']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryUpgradedClientState API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryUpgradedConsensusState({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryUpgradedConsensusState()).data - - - commit('QUERY', { query: 'UpgradedConsensusState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryUpgradedConsensusState', payload: { options: { all }, params: {...key},query }}) - return getters['getUpgradedConsensusState']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryUpgradedConsensusState API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - } -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/index.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/index.ts deleted file mode 100755 index 67d4b093f0..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; - - -const types = [ - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/rest.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/rest.ts deleted file mode 100644 index 5e397ea297..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/rest.ts +++ /dev/null @@ -1,1227 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* ConsensusStateWithHeight defines a consensus state with an additional height -field. -*/ -export interface V1ConsensusStateWithHeight { - /** - * 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 - */ - height?: V1Height; - - /** - * `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" - * } - */ - consensus_state?: ProtobufAny; -} - -/** -* 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 -*/ -export interface V1Height { - /** @format uint64 */ - revision_number?: string; - - /** @format uint64 */ - revision_height?: string; -} - -/** -* IdentifiedClientState defines a client state with an additional client -identifier field. -*/ -export interface V1IdentifiedClientState { - client_id?: string; - - /** - * `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_state?: ProtobufAny; -} - -/** - * MsgCreateClientResponse defines the Msg/CreateClient response type. - */ -export type V1MsgCreateClientResponse = object; - -/** -* MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response -type. -*/ -export type V1MsgSubmitMisbehaviourResponse = object; - -/** - * MsgUpdateClientResponse defines the Msg/UpdateClient response type. - */ -export type V1MsgUpdateClientResponse = object; - -/** - * MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. - */ -export type V1MsgUpgradeClientResponse = object; - -/** - * Params defines the set of IBC light client parameters. - */ -export interface V1Params { - /** allowed_clients defines the list of allowed client state types. */ - allowed_clients?: string[]; -} - -/** -* QueryClientParamsResponse is the response type for the Query/ClientParams RPC -method. -*/ -export interface V1QueryClientParamsResponse { - /** params defines the parameters of the module. */ - params?: V1Params; -} - -/** -* 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. -*/ -export interface V1QueryClientStateResponse { - /** - * `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_state?: ProtobufAny; - - /** @format byte */ - proof?: string; - - /** - * 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 - */ - proof_height?: V1Height; -} - -/** -* QueryClientStatesResponse is the response type for the Query/ClientStates RPC -method. -*/ -export interface V1QueryClientStatesResponse { - /** list of stored ClientStates of the chain. */ - client_states?: V1IdentifiedClientState[]; - - /** - * 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; - * } - */ - pagination?: V1Beta1PageResponse; -} - -/** -* QueryClientStatusResponse is the response type for the Query/ClientStatus RPC -method. It returns the current status of the IBC client. -*/ -export interface V1QueryClientStatusResponse { - status?: string; -} - -export interface V1QueryConsensusStateResponse { - /** - * `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" - * } - */ - consensus_state?: ProtobufAny; - - /** @format byte */ - proof?: string; - - /** - * 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 - */ - proof_height?: V1Height; -} - -export interface V1QueryConsensusStatesResponse { - consensus_states?: V1ConsensusStateWithHeight[]; - - /** - * 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; - * } - */ - pagination?: V1Beta1PageResponse; -} - -/** -* QueryUpgradedClientStateResponse is the response type for the -Query/UpgradedClientState RPC method. -*/ -export interface V1QueryUpgradedClientStateResponse { - /** - * `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" - * } - */ - upgraded_client_state?: ProtobufAny; -} - -/** -* QueryUpgradedConsensusStateResponse is the response type for the -Query/UpgradedConsensusState RPC method. -*/ -export interface V1QueryUpgradedConsensusStateResponse { - /** - * `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" - * } - */ - upgraded_consensus_state?: ProtobufAny; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - count_total?: boolean; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title ibc/core/client/v1/client.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryClientParams - * @summary ClientParams queries all parameters of the ibc client. - * @request GET:/ibc/client/v1/params - */ - queryClientParams = (params: RequestParams = {}) => - this.request({ - path: `/ibc/client/v1/params`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryClientStates - * @summary ClientStates queries all the IBC light clients of a chain. - * @request GET:/ibc/core/client/v1/client_states - */ - queryClientStates = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/client/v1/client_states`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryClientState - * @summary ClientState queries an IBC light client. - * @request GET:/ibc/core/client/v1/client_states/{client_id} - */ - queryClientState = (client_id: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/client/v1/client_states/${client_id}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryClientStatus - * @summary Status queries the status of an IBC client. - * @request GET:/ibc/core/client/v1/client_status/{client_id} - */ - queryClientStatus = (client_id: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/client/v1/client_status/${client_id}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryConsensusStates - * @summary ConsensusStates queries all the consensus state associated with a given -client. - * @request GET:/ibc/core/client/v1/consensus_states/{client_id} - */ - queryConsensusStates = ( - client_id: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/client/v1/consensus_states/${client_id}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryConsensusState - * @summary ConsensusState queries a consensus state associated with a client state at -a given height. - * @request GET:/ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height} - */ - queryConsensusState = ( - client_id: string, - revision_number: string, - revision_height: string, - query?: { latest_height?: boolean }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/client/v1/consensus_states/${client_id}/revision/${revision_number}/height/${revision_height}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryUpgradedClientState - * @summary UpgradedClientState queries an Upgraded IBC light client. - * @request GET:/ibc/core/client/v1/upgraded_client_states - */ - queryUpgradedClientState = (params: RequestParams = {}) => - this.request({ - path: `/ibc/core/client/v1/upgraded_client_states`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryUpgradedConsensusState - * @summary UpgradedConsensusState queries an Upgraded IBC consensus state. - * @request GET:/ibc/core/client/v1/upgraded_consensus_states - */ - queryUpgradedConsensusState = (params: RequestParams = {}) => - this.request({ - path: `/ibc/core/client/v1/upgraded_consensus_states`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 0bc568f477..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,300 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - count_total: boolean; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, count_total: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.count_total !== undefined && - (obj.count_total = message.count_total); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts deleted file mode 100644 index e9cefea25a..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts +++ /dev/null @@ -1,414 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.upgrade.v1beta1"; - -/** Plan specifies information about a planned upgrade and when it should occur. */ -export interface Plan { - /** - * 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. - */ - name: string; - /** - * The time after which the upgrade must be performed. - * Leave set to its zero value to use a pre-defined Height instead. - */ - time: Date | undefined; - /** - * The height at which the upgrade must be performed. - * Only used if Time is not set. - */ - height: number; - /** - * Any application specific upgrade info to be included on-chain - * such as a git commit that validators could automatically upgrade to - */ - info: string; -} - -/** - * SoftwareUpgradeProposal is a gov Content type for initiating a software - * upgrade. - */ -export interface SoftwareUpgradeProposal { - title: string; - description: string; - plan: Plan | undefined; -} - -/** - * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software - * upgrade. - */ -export interface CancelSoftwareUpgradeProposal { - title: string; - description: string; -} - -const basePlan: object = { name: "", height: 0, info: "" }; - -export const Plan = { - encode(message: Plan, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Plan { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePlan } as Plan; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.info = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Plan { - const message = { ...basePlan } as Plan; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - return message; - }, - - toJSON(message: Plan): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.height !== undefined && (obj.height = message.height); - message.info !== undefined && (obj.info = message.info); - return obj; - }, - - fromPartial(object: DeepPartial): Plan { - const message = { ...basePlan } as Plan; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - return message; - }, -}; - -const baseSoftwareUpgradeProposal: object = { title: "", description: "" }; - -export const SoftwareUpgradeProposal = { - encode( - message: SoftwareUpgradeProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SoftwareUpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SoftwareUpgradeProposal { - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromJSON(object.plan); - } else { - message.plan = undefined; - } - return message; - }, - - toJSON(message: SoftwareUpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.plan !== undefined && - (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): SoftwareUpgradeProposal { - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromPartial(object.plan); - } else { - message.plan = undefined; - } - return message; - }, -}; - -const baseCancelSoftwareUpgradeProposal: object = { - title: "", - description: "", -}; - -export const CancelSoftwareUpgradeProposal = { - encode( - message: CancelSoftwareUpgradeProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): CancelSoftwareUpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CancelSoftwareUpgradeProposal { - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - return message; - }, - - toJSON(message: CancelSoftwareUpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - return obj; - }, - - fromPartial( - object: DeepPartial - ): CancelSoftwareUpgradeProposal { - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/api/annotations.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/api/http.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/protobuf/any.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/protobuf/any.ts deleted file mode 100644 index 233eae465d..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - type_url: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { type_url: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.type_url !== "") { - writer.uint32(10).string(message.type_url); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = String(object.type_url); - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.type_url !== undefined && (obj.type_url = message.type_url); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = object.type_url; - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 11864afc86..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/client.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/client.ts deleted file mode 100644 index b34686d396..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/client.ts +++ /dev/null @@ -1,814 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; - -export const protobufPackage = "ibc.core.client.v1"; - -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientState { - /** client identifier */ - client_id: string; - /** client state */ - client_state: Any | undefined; -} - -/** - * ConsensusStateWithHeight defines a consensus state with an additional height - * field. - */ -export interface ConsensusStateWithHeight { - /** consensus state height */ - height: Height | undefined; - /** consensus state */ - consensus_state: Any | undefined; -} - -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStates { - /** client identifier */ - client_id: string; - /** consensus states and their heights associated with the client */ - consensus_states: ConsensusStateWithHeight[]; -} - -/** - * ClientUpdateProposal is a governance proposal. If it passes, the substitute - * client's latest consensus state is copied over to the subject client. The proposal - * handler may fail if the subject and the substitute do not match in client and - * chain parameters (with exception to latest height, frozen height, and chain-id). - */ -export interface ClientUpdateProposal { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - subject_client_id: string; - /** - * the substitute client identifier for the client standing in for the subject - * client - */ - substitute_client_id: string; -} - -/** - * UpgradeProposal is a gov Content type for initiating an IBC breaking - * upgrade. - */ -export interface UpgradeProposal { - title: string; - description: string; - plan: Plan | undefined; - /** - * An UpgradedClientState must be provided to perform an IBC breaking upgrade. - * This will make the chain commit to the correct upgraded (self) client state - * before the upgrade occurs, so that connecting chains can verify that the - * new upgraded client is valid by verifying a proof on the previous version - * of the chain. This will allow IBC connections to persist smoothly across - * planned chain upgrades - */ - upgraded_client_state: Any | undefined; -} - -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * 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 - */ -export interface Height { - /** the revision that the client is currently on */ - revision_number: number; - /** the height within the given revision */ - revision_height: number; -} - -/** Params defines the set of IBC light client parameters. */ -export interface Params { - /** allowed_clients defines the list of allowed client state types. */ - allowed_clients: string[]; -} - -const baseIdentifiedClientState: object = { client_id: "" }; - -export const IdentifiedClientState = { - encode( - message: IdentifiedClientState, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - if (message.client_state !== undefined) { - Any.encode(message.client_state, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IdentifiedClientState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.client_state = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromJSON(object.client_state); - } else { - message.client_state = undefined; - } - return message; - }, - - toJSON(message: IdentifiedClientState): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - message.client_state !== undefined && - (obj.client_state = message.client_state - ? Any.toJSON(message.client_state) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromPartial(object.client_state); - } else { - message.client_state = undefined; - } - return message; - }, -}; - -const baseConsensusStateWithHeight: object = {}; - -export const ConsensusStateWithHeight = { - encode( - message: ConsensusStateWithHeight, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(10).fork()).ldelim(); - } - if (message.consensus_state !== undefined) { - Any.encode(message.consensus_state, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ConsensusStateWithHeight { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensus_state = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromJSON(object.consensus_state); - } else { - message.consensus_state = undefined; - } - return message; - }, - - toJSON(message: ConsensusStateWithHeight): unknown { - const obj: any = {}; - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - message.consensus_state !== undefined && - (obj.consensus_state = message.consensus_state - ? Any.toJSON(message.consensus_state) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromPartial(object.consensus_state); - } else { - message.consensus_state = undefined; - } - return message; - }, -}; - -const baseClientConsensusStates: object = { client_id: "" }; - -export const ClientConsensusStates = { - encode( - message: ClientConsensusStates, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - for (const v of message.consensus_states) { - ConsensusStateWithHeight.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientConsensusStates { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensus_states = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.consensus_states.push( - ConsensusStateWithHeight.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensus_states = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if ( - object.consensus_states !== undefined && - object.consensus_states !== null - ) { - for (const e of object.consensus_states) { - message.consensus_states.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ClientConsensusStates): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - if (message.consensus_states) { - obj.consensus_states = message.consensus_states.map((e) => - e ? ConsensusStateWithHeight.toJSON(e) : undefined - ); - } else { - obj.consensus_states = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensus_states = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if ( - object.consensus_states !== undefined && - object.consensus_states !== null - ) { - for (const e of object.consensus_states) { - message.consensus_states.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - return message; - }, -}; - -const baseClientUpdateProposal: object = { - title: "", - description: "", - subject_client_id: "", - substitute_client_id: "", -}; - -export const ClientUpdateProposal = { - encode( - message: ClientUpdateProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.subject_client_id !== "") { - writer.uint32(26).string(message.subject_client_id); - } - if (message.substitute_client_id !== "") { - writer.uint32(34).string(message.substitute_client_id); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientUpdateProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.subject_client_id = reader.string(); - break; - case 4: - message.substitute_client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if ( - object.subject_client_id !== undefined && - object.subject_client_id !== null - ) { - message.subject_client_id = String(object.subject_client_id); - } else { - message.subject_client_id = ""; - } - if ( - object.substitute_client_id !== undefined && - object.substitute_client_id !== null - ) { - message.substitute_client_id = String(object.substitute_client_id); - } else { - message.substitute_client_id = ""; - } - return message; - }, - - toJSON(message: ClientUpdateProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.subject_client_id !== undefined && - (obj.subject_client_id = message.subject_client_id); - message.substitute_client_id !== undefined && - (obj.substitute_client_id = message.substitute_client_id); - return obj; - }, - - fromPartial(object: DeepPartial): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if ( - object.subject_client_id !== undefined && - object.subject_client_id !== null - ) { - message.subject_client_id = object.subject_client_id; - } else { - message.subject_client_id = ""; - } - if ( - object.substitute_client_id !== undefined && - object.substitute_client_id !== null - ) { - message.substitute_client_id = object.substitute_client_id; - } else { - message.substitute_client_id = ""; - } - return message; - }, -}; - -const baseUpgradeProposal: object = { title: "", description: "" }; - -export const UpgradeProposal = { - encode(message: UpgradeProposal, writer: Writer = Writer.create()): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); - } - if (message.upgraded_client_state !== undefined) { - Any.encode( - message.upgraded_client_state, - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUpgradeProposal } as UpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - case 4: - message.upgraded_client_state = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpgradeProposal { - const message = { ...baseUpgradeProposal } as UpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromJSON(object.plan); - } else { - message.plan = undefined; - } - if ( - object.upgraded_client_state !== undefined && - object.upgraded_client_state !== null - ) { - message.upgraded_client_state = Any.fromJSON( - object.upgraded_client_state - ); - } else { - message.upgraded_client_state = undefined; - } - return message; - }, - - toJSON(message: UpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.plan !== undefined && - (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - message.upgraded_client_state !== undefined && - (obj.upgraded_client_state = message.upgraded_client_state - ? Any.toJSON(message.upgraded_client_state) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): UpgradeProposal { - const message = { ...baseUpgradeProposal } as UpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromPartial(object.plan); - } else { - message.plan = undefined; - } - if ( - object.upgraded_client_state !== undefined && - object.upgraded_client_state !== null - ) { - message.upgraded_client_state = Any.fromPartial( - object.upgraded_client_state - ); - } else { - message.upgraded_client_state = undefined; - } - return message; - }, -}; - -const baseHeight: object = { revision_number: 0, revision_height: 0 }; - -export const Height = { - encode(message: Height, writer: Writer = Writer.create()): Writer { - if (message.revision_number !== 0) { - writer.uint32(8).uint64(message.revision_number); - } - if (message.revision_height !== 0) { - writer.uint32(16).uint64(message.revision_height); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Height { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeight } as Height; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revision_number = longToNumber(reader.uint64() as Long); - break; - case 2: - message.revision_height = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Height { - const message = { ...baseHeight } as Height; - if ( - object.revision_number !== undefined && - object.revision_number !== null - ) { - message.revision_number = Number(object.revision_number); - } else { - message.revision_number = 0; - } - if ( - object.revision_height !== undefined && - object.revision_height !== null - ) { - message.revision_height = Number(object.revision_height); - } else { - message.revision_height = 0; - } - return message; - }, - - toJSON(message: Height): unknown { - const obj: any = {}; - message.revision_number !== undefined && - (obj.revision_number = message.revision_number); - message.revision_height !== undefined && - (obj.revision_height = message.revision_height); - return obj; - }, - - fromPartial(object: DeepPartial): Height { - const message = { ...baseHeight } as Height; - if ( - object.revision_number !== undefined && - object.revision_number !== null - ) { - message.revision_number = object.revision_number; - } else { - message.revision_number = 0; - } - if ( - object.revision_height !== undefined && - object.revision_height !== null - ) { - message.revision_height = object.revision_height; - } else { - message.revision_height = 0; - } - return message; - }, -}; - -const baseParams: object = { allowed_clients: "" }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - for (const v of message.allowed_clients) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - message.allowed_clients = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowed_clients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - message.allowed_clients = []; - if ( - object.allowed_clients !== undefined && - object.allowed_clients !== null - ) { - for (const e of object.allowed_clients) { - message.allowed_clients.push(String(e)); - } - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.allowed_clients) { - obj.allowed_clients = message.allowed_clients.map((e) => e); - } else { - obj.allowed_clients = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - message.allowed_clients = []; - if ( - object.allowed_clients !== undefined && - object.allowed_clients !== null - ) { - for (const e of object.allowed_clients) { - message.allowed_clients.push(e); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.ts deleted file mode 100644 index e4fe2ae0f5..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/genesis.ts +++ /dev/null @@ -1,481 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { - IdentifiedClientState, - ClientConsensusStates, - Params, -} from "../../../../ibc/core/client/v1/client"; - -export const protobufPackage = "ibc.core.client.v1"; - -/** GenesisState defines the ibc client submodule's genesis state. */ -export interface GenesisState { - /** client states with their corresponding identifiers */ - clients: IdentifiedClientState[]; - /** consensus states from each client */ - clients_consensus: ClientConsensusStates[]; - /** metadata from each client */ - clients_metadata: IdentifiedGenesisMetadata[]; - params: Params | undefined; - /** create localhost on initialization */ - create_localhost: boolean; - /** the sequence for the next generated client identifier */ - next_client_sequence: number; -} - -/** - * GenesisMetadata defines the genesis type for metadata that clients may return - * with ExportMetadata - */ -export interface GenesisMetadata { - /** store key of metadata without clientID-prefix */ - key: Uint8Array; - /** metadata value */ - value: Uint8Array; -} - -/** - * IdentifiedGenesisMetadata has the client metadata with the corresponding - * client id. - */ -export interface IdentifiedGenesisMetadata { - client_id: string; - client_metadata: GenesisMetadata[]; -} - -const baseGenesisState: object = { - create_localhost: false, - next_client_sequence: 0, -}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - for (const v of message.clients) { - IdentifiedClientState.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.clients_consensus) { - ClientConsensusStates.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.clients_metadata) { - IdentifiedGenesisMetadata.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(34).fork()).ldelim(); - } - if (message.create_localhost === true) { - writer.uint32(40).bool(message.create_localhost); - } - if (message.next_client_sequence !== 0) { - writer.uint32(48).uint64(message.next_client_sequence); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.clients = []; - message.clients_consensus = []; - message.clients_metadata = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clients.push( - IdentifiedClientState.decode(reader, reader.uint32()) - ); - break; - case 2: - message.clients_consensus.push( - ClientConsensusStates.decode(reader, reader.uint32()) - ); - break; - case 3: - message.clients_metadata.push( - IdentifiedGenesisMetadata.decode(reader, reader.uint32()) - ); - break; - case 4: - message.params = Params.decode(reader, reader.uint32()); - break; - case 5: - message.create_localhost = reader.bool(); - break; - case 6: - message.next_client_sequence = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.clients = []; - message.clients_consensus = []; - message.clients_metadata = []; - if (object.clients !== undefined && object.clients !== null) { - for (const e of object.clients) { - message.clients.push(IdentifiedClientState.fromJSON(e)); - } - } - if ( - object.clients_consensus !== undefined && - object.clients_consensus !== null - ) { - for (const e of object.clients_consensus) { - message.clients_consensus.push(ClientConsensusStates.fromJSON(e)); - } - } - if ( - object.clients_metadata !== undefined && - object.clients_metadata !== null - ) { - for (const e of object.clients_metadata) { - message.clients_metadata.push(IdentifiedGenesisMetadata.fromJSON(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if ( - object.create_localhost !== undefined && - object.create_localhost !== null - ) { - message.create_localhost = Boolean(object.create_localhost); - } else { - message.create_localhost = false; - } - if ( - object.next_client_sequence !== undefined && - object.next_client_sequence !== null - ) { - message.next_client_sequence = Number(object.next_client_sequence); - } else { - message.next_client_sequence = 0; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.clients) { - obj.clients = message.clients.map((e) => - e ? IdentifiedClientState.toJSON(e) : undefined - ); - } else { - obj.clients = []; - } - if (message.clients_consensus) { - obj.clients_consensus = message.clients_consensus.map((e) => - e ? ClientConsensusStates.toJSON(e) : undefined - ); - } else { - obj.clients_consensus = []; - } - if (message.clients_metadata) { - obj.clients_metadata = message.clients_metadata.map((e) => - e ? IdentifiedGenesisMetadata.toJSON(e) : undefined - ); - } else { - obj.clients_metadata = []; - } - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.create_localhost !== undefined && - (obj.create_localhost = message.create_localhost); - message.next_client_sequence !== undefined && - (obj.next_client_sequence = message.next_client_sequence); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.clients = []; - message.clients_consensus = []; - message.clients_metadata = []; - if (object.clients !== undefined && object.clients !== null) { - for (const e of object.clients) { - message.clients.push(IdentifiedClientState.fromPartial(e)); - } - } - if ( - object.clients_consensus !== undefined && - object.clients_consensus !== null - ) { - for (const e of object.clients_consensus) { - message.clients_consensus.push(ClientConsensusStates.fromPartial(e)); - } - } - if ( - object.clients_metadata !== undefined && - object.clients_metadata !== null - ) { - for (const e of object.clients_metadata) { - message.clients_metadata.push(IdentifiedGenesisMetadata.fromPartial(e)); - } - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if ( - object.create_localhost !== undefined && - object.create_localhost !== null - ) { - message.create_localhost = object.create_localhost; - } else { - message.create_localhost = false; - } - if ( - object.next_client_sequence !== undefined && - object.next_client_sequence !== null - ) { - message.next_client_sequence = object.next_client_sequence; - } else { - message.next_client_sequence = 0; - } - return message; - }, -}; - -const baseGenesisMetadata: object = {}; - -export const GenesisMetadata = { - encode(message: GenesisMetadata, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisMetadata { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisMetadata } as GenesisMetadata; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisMetadata { - const message = { ...baseGenesisMetadata } as GenesisMetadata; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: GenesisMetadata): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisMetadata { - const message = { ...baseGenesisMetadata } as GenesisMetadata; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -const baseIdentifiedGenesisMetadata: object = { client_id: "" }; - -export const IdentifiedGenesisMetadata = { - encode( - message: IdentifiedGenesisMetadata, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - for (const v of message.client_metadata) { - GenesisMetadata.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): IdentifiedGenesisMetadata { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseIdentifiedGenesisMetadata, - } as IdentifiedGenesisMetadata; - message.client_metadata = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.client_metadata.push( - GenesisMetadata.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IdentifiedGenesisMetadata { - const message = { - ...baseIdentifiedGenesisMetadata, - } as IdentifiedGenesisMetadata; - message.client_metadata = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if ( - object.client_metadata !== undefined && - object.client_metadata !== null - ) { - for (const e of object.client_metadata) { - message.client_metadata.push(GenesisMetadata.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: IdentifiedGenesisMetadata): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - if (message.client_metadata) { - obj.client_metadata = message.client_metadata.map((e) => - e ? GenesisMetadata.toJSON(e) : undefined - ); - } else { - obj.client_metadata = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): IdentifiedGenesisMetadata { - const message = { - ...baseIdentifiedGenesisMetadata, - } as IdentifiedGenesisMetadata; - message.client_metadata = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if ( - object.client_metadata !== undefined && - object.client_metadata !== null - ) { - for (const e of object.client_metadata) { - message.client_metadata.push(GenesisMetadata.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/query.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/query.ts deleted file mode 100644 index 206939e4c2..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/query.ts +++ /dev/null @@ -1,1741 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Any } from "../../../../google/protobuf/any"; -import { - Height, - IdentifiedClientState, - ConsensusStateWithHeight, - Params, -} from "../../../../ibc/core/client/v1/client"; -import { - PageRequest, - PageResponse, -} from "../../../../cosmos/base/query/v1beta1/pagination"; - -export const protobufPackage = "ibc.core.client.v1"; - -/** - * QueryClientStateRequest is the request type for the Query/ClientState RPC - * method - */ -export interface QueryClientStateRequest { - /** client state unique identifier */ - client_id: string; -} - -/** - * 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. - */ -export interface QueryClientStateResponse { - /** client state associated with the request identifier */ - client_state: Any | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height: Height | undefined; -} - -/** - * QueryClientStatesRequest is the request type for the Query/ClientStates RPC - * method - */ -export interface QueryClientStatesRequest { - /** pagination request */ - pagination: PageRequest | undefined; -} - -/** - * QueryClientStatesResponse is the response type for the Query/ClientStates RPC - * method. - */ -export interface QueryClientStatesResponse { - /** list of stored ClientStates of the chain. */ - client_states: IdentifiedClientState[]; - /** pagination response */ - pagination: PageResponse | undefined; -} - -/** - * QueryConsensusStateRequest is the request type for the Query/ConsensusState - * RPC method. Besides the consensus state, it includes a proof and the height - * from which the proof was retrieved. - */ -export interface QueryConsensusStateRequest { - /** client identifier */ - client_id: string; - /** consensus state revision number */ - revision_number: number; - /** consensus state revision height */ - revision_height: number; - /** - * latest_height overrrides the height field and queries the latest stored - * ConsensusState - */ - latest_height: boolean; -} - -/** - * QueryConsensusStateResponse is the response type for the Query/ConsensusState - * RPC method - */ -export interface QueryConsensusStateResponse { - /** consensus state associated with the client identifier at the given height */ - consensus_state: Any | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height: Height | undefined; -} - -/** - * QueryConsensusStatesRequest is the request type for the Query/ConsensusStates - * RPC method. - */ -export interface QueryConsensusStatesRequest { - /** client identifier */ - client_id: string; - /** pagination request */ - pagination: PageRequest | undefined; -} - -/** - * QueryConsensusStatesResponse is the response type for the - * Query/ConsensusStates RPC method - */ -export interface QueryConsensusStatesResponse { - /** consensus states associated with the identifier */ - consensus_states: ConsensusStateWithHeight[]; - /** pagination response */ - pagination: PageResponse | undefined; -} - -/** - * QueryClientStatusRequest is the request type for the Query/ClientStatus RPC - * method - */ -export interface QueryClientStatusRequest { - /** client unique identifier */ - client_id: string; -} - -/** - * QueryClientStatusResponse is the response type for the Query/ClientStatus RPC - * method. It returns the current status of the IBC client. - */ -export interface QueryClientStatusResponse { - status: string; -} - -/** - * QueryClientParamsRequest is the request type for the Query/ClientParams RPC - * method. - */ -export interface QueryClientParamsRequest {} - -/** - * QueryClientParamsResponse is the response type for the Query/ClientParams RPC - * method. - */ -export interface QueryClientParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} - -/** - * QueryUpgradedClientStateRequest is the request type for the - * Query/UpgradedClientState RPC method - */ -export interface QueryUpgradedClientStateRequest {} - -/** - * QueryUpgradedClientStateResponse is the response type for the - * Query/UpgradedClientState RPC method. - */ -export interface QueryUpgradedClientStateResponse { - /** client state associated with the request identifier */ - upgraded_client_state: Any | undefined; -} - -/** - * QueryUpgradedConsensusStateRequest is the request type for the - * Query/UpgradedConsensusState RPC method - */ -export interface QueryUpgradedConsensusStateRequest {} - -/** - * QueryUpgradedConsensusStateResponse is the response type for the - * Query/UpgradedConsensusState RPC method. - */ -export interface QueryUpgradedConsensusStateResponse { - /** Consensus state associated with the request identifier */ - upgraded_consensus_state: Any | undefined; -} - -const baseQueryClientStateRequest: object = { client_id: "" }; - -export const QueryClientStateRequest = { - encode( - message: QueryClientStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryClientStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientStateRequest, - } as QueryClientStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientStateRequest { - const message = { - ...baseQueryClientStateRequest, - } as QueryClientStateRequest; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - return message; - }, - - toJSON(message: QueryClientStateRequest): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientStateRequest { - const message = { - ...baseQueryClientStateRequest, - } as QueryClientStateRequest; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - return message; - }, -}; - -const baseQueryClientStateResponse: object = {}; - -export const QueryClientStateResponse = { - encode( - message: QueryClientStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.client_state !== undefined) { - Any.encode(message.client_state, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientStateResponse, - } as QueryClientStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_state = Any.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientStateResponse { - const message = { - ...baseQueryClientStateResponse, - } as QueryClientStateResponse; - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromJSON(object.client_state); - } else { - message.client_state = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, - - toJSON(message: QueryClientStateResponse): unknown { - const obj: any = {}; - message.client_state !== undefined && - (obj.client_state = message.client_state - ? Any.toJSON(message.client_state) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientStateResponse { - const message = { - ...baseQueryClientStateResponse, - } as QueryClientStateResponse; - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromPartial(object.client_state); - } else { - message.client_state = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, -}; - -const baseQueryClientStatesRequest: object = {}; - -export const QueryClientStatesRequest = { - encode( - message: QueryClientStatesRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientStatesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientStatesRequest, - } as QueryClientStatesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientStatesRequest { - const message = { - ...baseQueryClientStatesRequest, - } as QueryClientStatesRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryClientStatesRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientStatesRequest { - const message = { - ...baseQueryClientStatesRequest, - } as QueryClientStatesRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryClientStatesResponse: object = {}; - -export const QueryClientStatesResponse = { - encode( - message: QueryClientStatesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.client_states) { - IdentifiedClientState.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientStatesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientStatesResponse, - } as QueryClientStatesResponse; - message.client_states = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_states.push( - IdentifiedClientState.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientStatesResponse { - const message = { - ...baseQueryClientStatesResponse, - } as QueryClientStatesResponse; - message.client_states = []; - if (object.client_states !== undefined && object.client_states !== null) { - for (const e of object.client_states) { - message.client_states.push(IdentifiedClientState.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryClientStatesResponse): unknown { - const obj: any = {}; - if (message.client_states) { - obj.client_states = message.client_states.map((e) => - e ? IdentifiedClientState.toJSON(e) : undefined - ); - } else { - obj.client_states = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientStatesResponse { - const message = { - ...baseQueryClientStatesResponse, - } as QueryClientStatesResponse; - message.client_states = []; - if (object.client_states !== undefined && object.client_states !== null) { - for (const e of object.client_states) { - message.client_states.push(IdentifiedClientState.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryConsensusStateRequest: object = { - client_id: "", - revision_number: 0, - revision_height: 0, - latest_height: false, -}; - -export const QueryConsensusStateRequest = { - encode( - message: QueryConsensusStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - if (message.revision_number !== 0) { - writer.uint32(16).uint64(message.revision_number); - } - if (message.revision_height !== 0) { - writer.uint32(24).uint64(message.revision_height); - } - if (message.latest_height === true) { - writer.uint32(32).bool(message.latest_height); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConsensusStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConsensusStateRequest, - } as QueryConsensusStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.revision_number = longToNumber(reader.uint64() as Long); - break; - case 3: - message.revision_height = longToNumber(reader.uint64() as Long); - break; - case 4: - message.latest_height = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConsensusStateRequest { - const message = { - ...baseQueryConsensusStateRequest, - } as QueryConsensusStateRequest; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if ( - object.revision_number !== undefined && - object.revision_number !== null - ) { - message.revision_number = Number(object.revision_number); - } else { - message.revision_number = 0; - } - if ( - object.revision_height !== undefined && - object.revision_height !== null - ) { - message.revision_height = Number(object.revision_height); - } else { - message.revision_height = 0; - } - if (object.latest_height !== undefined && object.latest_height !== null) { - message.latest_height = Boolean(object.latest_height); - } else { - message.latest_height = false; - } - return message; - }, - - toJSON(message: QueryConsensusStateRequest): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - message.revision_number !== undefined && - (obj.revision_number = message.revision_number); - message.revision_height !== undefined && - (obj.revision_height = message.revision_height); - message.latest_height !== undefined && - (obj.latest_height = message.latest_height); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConsensusStateRequest { - const message = { - ...baseQueryConsensusStateRequest, - } as QueryConsensusStateRequest; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if ( - object.revision_number !== undefined && - object.revision_number !== null - ) { - message.revision_number = object.revision_number; - } else { - message.revision_number = 0; - } - if ( - object.revision_height !== undefined && - object.revision_height !== null - ) { - message.revision_height = object.revision_height; - } else { - message.revision_height = 0; - } - if (object.latest_height !== undefined && object.latest_height !== null) { - message.latest_height = object.latest_height; - } else { - message.latest_height = false; - } - return message; - }, -}; - -const baseQueryConsensusStateResponse: object = {}; - -export const QueryConsensusStateResponse = { - encode( - message: QueryConsensusStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.consensus_state !== undefined) { - Any.encode(message.consensus_state, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConsensusStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConsensusStateResponse, - } as QueryConsensusStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensus_state = Any.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConsensusStateResponse { - const message = { - ...baseQueryConsensusStateResponse, - } as QueryConsensusStateResponse; - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromJSON(object.consensus_state); - } else { - message.consensus_state = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, - - toJSON(message: QueryConsensusStateResponse): unknown { - const obj: any = {}; - message.consensus_state !== undefined && - (obj.consensus_state = message.consensus_state - ? Any.toJSON(message.consensus_state) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConsensusStateResponse { - const message = { - ...baseQueryConsensusStateResponse, - } as QueryConsensusStateResponse; - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromPartial(object.consensus_state); - } else { - message.consensus_state = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, -}; - -const baseQueryConsensusStatesRequest: object = { client_id: "" }; - -export const QueryConsensusStatesRequest = { - encode( - message: QueryConsensusStatesRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConsensusStatesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConsensusStatesRequest, - } as QueryConsensusStatesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConsensusStatesRequest { - const message = { - ...baseQueryConsensusStatesRequest, - } as QueryConsensusStatesRequest; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryConsensusStatesRequest): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConsensusStatesRequest { - const message = { - ...baseQueryConsensusStatesRequest, - } as QueryConsensusStatesRequest; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryConsensusStatesResponse: object = {}; - -export const QueryConsensusStatesResponse = { - encode( - message: QueryConsensusStatesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.consensus_states) { - ConsensusStateWithHeight.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConsensusStatesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConsensusStatesResponse, - } as QueryConsensusStatesResponse; - message.consensus_states = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensus_states.push( - ConsensusStateWithHeight.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConsensusStatesResponse { - const message = { - ...baseQueryConsensusStatesResponse, - } as QueryConsensusStatesResponse; - message.consensus_states = []; - if ( - object.consensus_states !== undefined && - object.consensus_states !== null - ) { - for (const e of object.consensus_states) { - message.consensus_states.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryConsensusStatesResponse): unknown { - const obj: any = {}; - if (message.consensus_states) { - obj.consensus_states = message.consensus_states.map((e) => - e ? ConsensusStateWithHeight.toJSON(e) : undefined - ); - } else { - obj.consensus_states = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConsensusStatesResponse { - const message = { - ...baseQueryConsensusStatesResponse, - } as QueryConsensusStatesResponse; - message.consensus_states = []; - if ( - object.consensus_states !== undefined && - object.consensus_states !== null - ) { - for (const e of object.consensus_states) { - message.consensus_states.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryClientStatusRequest: object = { client_id: "" }; - -export const QueryClientStatusRequest = { - encode( - message: QueryClientStatusRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientStatusRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientStatusRequest, - } as QueryClientStatusRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientStatusRequest { - const message = { - ...baseQueryClientStatusRequest, - } as QueryClientStatusRequest; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - return message; - }, - - toJSON(message: QueryClientStatusRequest): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientStatusRequest { - const message = { - ...baseQueryClientStatusRequest, - } as QueryClientStatusRequest; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - return message; - }, -}; - -const baseQueryClientStatusResponse: object = { status: "" }; - -export const QueryClientStatusResponse = { - encode( - message: QueryClientStatusResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.status !== "") { - writer.uint32(10).string(message.status); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientStatusResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientStatusResponse, - } as QueryClientStatusResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientStatusResponse { - const message = { - ...baseQueryClientStatusResponse, - } as QueryClientStatusResponse; - if (object.status !== undefined && object.status !== null) { - message.status = String(object.status); - } else { - message.status = ""; - } - return message; - }, - - toJSON(message: QueryClientStatusResponse): unknown { - const obj: any = {}; - message.status !== undefined && (obj.status = message.status); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientStatusResponse { - const message = { - ...baseQueryClientStatusResponse, - } as QueryClientStatusResponse; - if (object.status !== undefined && object.status !== null) { - message.status = object.status; - } else { - message.status = ""; - } - return message; - }, -}; - -const baseQueryClientParamsRequest: object = {}; - -export const QueryClientParamsRequest = { - encode( - _: QueryClientParamsRequest, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientParamsRequest, - } as QueryClientParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryClientParamsRequest { - const message = { - ...baseQueryClientParamsRequest, - } as QueryClientParamsRequest; - return message; - }, - - toJSON(_: QueryClientParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): QueryClientParamsRequest { - const message = { - ...baseQueryClientParamsRequest, - } as QueryClientParamsRequest; - return message; - }, -}; - -const baseQueryClientParamsResponse: object = {}; - -export const QueryClientParamsResponse = { - encode( - message: QueryClientParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientParamsResponse, - } as QueryClientParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientParamsResponse { - const message = { - ...baseQueryClientParamsResponse, - } as QueryClientParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryClientParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientParamsResponse { - const message = { - ...baseQueryClientParamsResponse, - } as QueryClientParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -const baseQueryUpgradedClientStateRequest: object = {}; - -export const QueryUpgradedClientStateRequest = { - encode( - _: QueryUpgradedClientStateRequest, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUpgradedClientStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUpgradedClientStateRequest, - } as QueryUpgradedClientStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryUpgradedClientStateRequest { - const message = { - ...baseQueryUpgradedClientStateRequest, - } as QueryUpgradedClientStateRequest; - return message; - }, - - toJSON(_: QueryUpgradedClientStateRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): QueryUpgradedClientStateRequest { - const message = { - ...baseQueryUpgradedClientStateRequest, - } as QueryUpgradedClientStateRequest; - return message; - }, -}; - -const baseQueryUpgradedClientStateResponse: object = {}; - -export const QueryUpgradedClientStateResponse = { - encode( - message: QueryUpgradedClientStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.upgraded_client_state !== undefined) { - Any.encode( - message.upgraded_client_state, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUpgradedClientStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUpgradedClientStateResponse, - } as QueryUpgradedClientStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.upgraded_client_state = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUpgradedClientStateResponse { - const message = { - ...baseQueryUpgradedClientStateResponse, - } as QueryUpgradedClientStateResponse; - if ( - object.upgraded_client_state !== undefined && - object.upgraded_client_state !== null - ) { - message.upgraded_client_state = Any.fromJSON( - object.upgraded_client_state - ); - } else { - message.upgraded_client_state = undefined; - } - return message; - }, - - toJSON(message: QueryUpgradedClientStateResponse): unknown { - const obj: any = {}; - message.upgraded_client_state !== undefined && - (obj.upgraded_client_state = message.upgraded_client_state - ? Any.toJSON(message.upgraded_client_state) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUpgradedClientStateResponse { - const message = { - ...baseQueryUpgradedClientStateResponse, - } as QueryUpgradedClientStateResponse; - if ( - object.upgraded_client_state !== undefined && - object.upgraded_client_state !== null - ) { - message.upgraded_client_state = Any.fromPartial( - object.upgraded_client_state - ); - } else { - message.upgraded_client_state = undefined; - } - return message; - }, -}; - -const baseQueryUpgradedConsensusStateRequest: object = {}; - -export const QueryUpgradedConsensusStateRequest = { - encode( - _: QueryUpgradedConsensusStateRequest, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUpgradedConsensusStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUpgradedConsensusStateRequest, - } as QueryUpgradedConsensusStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryUpgradedConsensusStateRequest { - const message = { - ...baseQueryUpgradedConsensusStateRequest, - } as QueryUpgradedConsensusStateRequest; - return message; - }, - - toJSON(_: QueryUpgradedConsensusStateRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): QueryUpgradedConsensusStateRequest { - const message = { - ...baseQueryUpgradedConsensusStateRequest, - } as QueryUpgradedConsensusStateRequest; - return message; - }, -}; - -const baseQueryUpgradedConsensusStateResponse: object = {}; - -export const QueryUpgradedConsensusStateResponse = { - encode( - message: QueryUpgradedConsensusStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.upgraded_consensus_state !== undefined) { - Any.encode( - message.upgraded_consensus_state, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryUpgradedConsensusStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryUpgradedConsensusStateResponse, - } as QueryUpgradedConsensusStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.upgraded_consensus_state = Any.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryUpgradedConsensusStateResponse { - const message = { - ...baseQueryUpgradedConsensusStateResponse, - } as QueryUpgradedConsensusStateResponse; - if ( - object.upgraded_consensus_state !== undefined && - object.upgraded_consensus_state !== null - ) { - message.upgraded_consensus_state = Any.fromJSON( - object.upgraded_consensus_state - ); - } else { - message.upgraded_consensus_state = undefined; - } - return message; - }, - - toJSON(message: QueryUpgradedConsensusStateResponse): unknown { - const obj: any = {}; - message.upgraded_consensus_state !== undefined && - (obj.upgraded_consensus_state = message.upgraded_consensus_state - ? Any.toJSON(message.upgraded_consensus_state) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryUpgradedConsensusStateResponse { - const message = { - ...baseQueryUpgradedConsensusStateResponse, - } as QueryUpgradedConsensusStateResponse; - if ( - object.upgraded_consensus_state !== undefined && - object.upgraded_consensus_state !== null - ) { - message.upgraded_consensus_state = Any.fromPartial( - object.upgraded_consensus_state - ); - } else { - message.upgraded_consensus_state = undefined; - } - return message; - }, -}; - -/** Query provides defines the gRPC querier service */ -export interface Query { - /** ClientState queries an IBC light client. */ - ClientState( - request: QueryClientStateRequest - ): Promise; - /** ClientStates queries all the IBC light clients of a chain. */ - ClientStates( - request: QueryClientStatesRequest - ): Promise; - /** - * ConsensusState queries a consensus state associated with a client state at - * a given height. - */ - ConsensusState( - request: QueryConsensusStateRequest - ): Promise; - /** - * ConsensusStates queries all the consensus state associated with a given - * client. - */ - ConsensusStates( - request: QueryConsensusStatesRequest - ): Promise; - /** Status queries the status of an IBC client. */ - ClientStatus( - request: QueryClientStatusRequest - ): Promise; - /** ClientParams queries all parameters of the ibc client. */ - ClientParams( - request: QueryClientParamsRequest - ): Promise; - /** UpgradedClientState queries an Upgraded IBC light client. */ - UpgradedClientState( - request: QueryUpgradedClientStateRequest - ): Promise; - /** UpgradedConsensusState queries an Upgraded IBC consensus state. */ - UpgradedConsensusState( - request: QueryUpgradedConsensusStateRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - ClientState( - request: QueryClientStateRequest - ): Promise { - const data = QueryClientStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Query", - "ClientState", - data - ); - return promise.then((data) => - QueryClientStateResponse.decode(new Reader(data)) - ); - } - - ClientStates( - request: QueryClientStatesRequest - ): Promise { - const data = QueryClientStatesRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Query", - "ClientStates", - data - ); - return promise.then((data) => - QueryClientStatesResponse.decode(new Reader(data)) - ); - } - - ConsensusState( - request: QueryConsensusStateRequest - ): Promise { - const data = QueryConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Query", - "ConsensusState", - data - ); - return promise.then((data) => - QueryConsensusStateResponse.decode(new Reader(data)) - ); - } - - ConsensusStates( - request: QueryConsensusStatesRequest - ): Promise { - const data = QueryConsensusStatesRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Query", - "ConsensusStates", - data - ); - return promise.then((data) => - QueryConsensusStatesResponse.decode(new Reader(data)) - ); - } - - ClientStatus( - request: QueryClientStatusRequest - ): Promise { - const data = QueryClientStatusRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Query", - "ClientStatus", - data - ); - return promise.then((data) => - QueryClientStatusResponse.decode(new Reader(data)) - ); - } - - ClientParams( - request: QueryClientParamsRequest - ): Promise { - const data = QueryClientParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Query", - "ClientParams", - data - ); - return promise.then((data) => - QueryClientParamsResponse.decode(new Reader(data)) - ); - } - - UpgradedClientState( - request: QueryUpgradedClientStateRequest - ): Promise { - const data = QueryUpgradedClientStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Query", - "UpgradedClientState", - data - ); - return promise.then((data) => - QueryUpgradedClientStateResponse.decode(new Reader(data)) - ); - } - - UpgradedConsensusState( - request: QueryUpgradedConsensusStateRequest - ): Promise { - const data = QueryUpgradedConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Query", - "UpgradedConsensusState", - data - ); - return promise.then((data) => - QueryUpgradedConsensusStateResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.ts deleted file mode 100644 index cae5b4534b..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/module/types/ibc/core/client/v1/tx.ts +++ /dev/null @@ -1,862 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; - -export const protobufPackage = "ibc.core.client.v1"; - -/** MsgCreateClient defines a message to create an IBC client */ -export interface MsgCreateClient { - /** light client state */ - client_state: Any | undefined; - /** - * consensus state associated with the client that corresponds to a given - * height. - */ - consensus_state: Any | undefined; - /** signer address */ - signer: string; -} - -/** MsgCreateClientResponse defines the Msg/CreateClient response type. */ -export interface MsgCreateClientResponse {} - -/** - * MsgUpdateClient defines an sdk.Msg to update a IBC client state using - * the given header. - */ -export interface MsgUpdateClient { - /** client unique identifier */ - client_id: string; - /** header to update the light client */ - header: Any | undefined; - /** signer address */ - signer: string; -} - -/** MsgUpdateClientResponse defines the Msg/UpdateClient response type. */ -export interface MsgUpdateClientResponse {} - -/** - * MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client - * state - */ -export interface MsgUpgradeClient { - /** client unique identifier */ - client_id: string; - /** upgraded client state */ - client_state: Any | undefined; - /** - * upgraded consensus state, only contains enough information to serve as a - * basis of trust in update logic - */ - consensus_state: Any | undefined; - /** proof that old chain committed to new client */ - proof_upgrade_client: Uint8Array; - /** proof that old chain committed to new consensus state */ - proof_upgrade_consensus_state: Uint8Array; - /** signer address */ - signer: string; -} - -/** MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. */ -export interface MsgUpgradeClientResponse {} - -/** - * MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for - * light client misbehaviour. - */ -export interface MsgSubmitMisbehaviour { - /** client unique identifier */ - client_id: string; - /** misbehaviour used for freezing the light client */ - misbehaviour: Any | undefined; - /** signer address */ - signer: string; -} - -/** - * MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response - * type. - */ -export interface MsgSubmitMisbehaviourResponse {} - -const baseMsgCreateClient: object = { signer: "" }; - -export const MsgCreateClient = { - encode(message: MsgCreateClient, writer: Writer = Writer.create()): Writer { - if (message.client_state !== undefined) { - Any.encode(message.client_state, writer.uint32(10).fork()).ldelim(); - } - if (message.consensus_state !== undefined) { - Any.encode(message.consensus_state, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgCreateClient { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgCreateClient } as MsgCreateClient; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_state = Any.decode(reader, reader.uint32()); - break; - case 2: - message.consensus_state = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgCreateClient { - const message = { ...baseMsgCreateClient } as MsgCreateClient; - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromJSON(object.client_state); - } else { - message.client_state = undefined; - } - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromJSON(object.consensus_state); - } else { - message.consensus_state = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgCreateClient): unknown { - const obj: any = {}; - message.client_state !== undefined && - (obj.client_state = message.client_state - ? Any.toJSON(message.client_state) - : undefined); - message.consensus_state !== undefined && - (obj.consensus_state = message.consensus_state - ? Any.toJSON(message.consensus_state) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgCreateClient { - const message = { ...baseMsgCreateClient } as MsgCreateClient; - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromPartial(object.client_state); - } else { - message.client_state = undefined; - } - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromPartial(object.consensus_state); - } else { - message.consensus_state = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgCreateClientResponse: object = {}; - -export const MsgCreateClientResponse = { - encode(_: MsgCreateClientResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgCreateClientResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreateClientResponse, - } as MsgCreateClientResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgCreateClientResponse { - const message = { - ...baseMsgCreateClientResponse, - } as MsgCreateClientResponse; - return message; - }, - - toJSON(_: MsgCreateClientResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgCreateClientResponse { - const message = { - ...baseMsgCreateClientResponse, - } as MsgCreateClientResponse; - return message; - }, -}; - -const baseMsgUpdateClient: object = { client_id: "", signer: "" }; - -export const MsgUpdateClient = { - encode(message: MsgUpdateClient, writer: Writer = Writer.create()): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - if (message.header !== undefined) { - Any.encode(message.header, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUpdateClient { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUpdateClient } as MsgUpdateClient; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.header = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgUpdateClient { - const message = { ...baseMsgUpdateClient } as MsgUpdateClient; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromJSON(object.header); - } else { - message.header = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgUpdateClient): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - message.header !== undefined && - (obj.header = message.header ? Any.toJSON(message.header) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgUpdateClient { - const message = { ...baseMsgUpdateClient } as MsgUpdateClient; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if (object.header !== undefined && object.header !== null) { - message.header = Any.fromPartial(object.header); - } else { - message.header = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgUpdateClientResponse: object = {}; - -export const MsgUpdateClientResponse = { - encode(_: MsgUpdateClientResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUpdateClientResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgUpdateClientResponse, - } as MsgUpdateClientResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgUpdateClientResponse { - const message = { - ...baseMsgUpdateClientResponse, - } as MsgUpdateClientResponse; - return message; - }, - - toJSON(_: MsgUpdateClientResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgUpdateClientResponse { - const message = { - ...baseMsgUpdateClientResponse, - } as MsgUpdateClientResponse; - return message; - }, -}; - -const baseMsgUpgradeClient: object = { client_id: "", signer: "" }; - -export const MsgUpgradeClient = { - encode(message: MsgUpgradeClient, writer: Writer = Writer.create()): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - if (message.client_state !== undefined) { - Any.encode(message.client_state, writer.uint32(18).fork()).ldelim(); - } - if (message.consensus_state !== undefined) { - Any.encode(message.consensus_state, writer.uint32(26).fork()).ldelim(); - } - if (message.proof_upgrade_client.length !== 0) { - writer.uint32(34).bytes(message.proof_upgrade_client); - } - if (message.proof_upgrade_consensus_state.length !== 0) { - writer.uint32(42).bytes(message.proof_upgrade_consensus_state); - } - if (message.signer !== "") { - writer.uint32(50).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgUpgradeClient { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgUpgradeClient } as MsgUpgradeClient; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.client_state = Any.decode(reader, reader.uint32()); - break; - case 3: - message.consensus_state = Any.decode(reader, reader.uint32()); - break; - case 4: - message.proof_upgrade_client = reader.bytes(); - break; - case 5: - message.proof_upgrade_consensus_state = reader.bytes(); - break; - case 6: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgUpgradeClient { - const message = { ...baseMsgUpgradeClient } as MsgUpgradeClient; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromJSON(object.client_state); - } else { - message.client_state = undefined; - } - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromJSON(object.consensus_state); - } else { - message.consensus_state = undefined; - } - if ( - object.proof_upgrade_client !== undefined && - object.proof_upgrade_client !== null - ) { - message.proof_upgrade_client = bytesFromBase64( - object.proof_upgrade_client - ); - } - if ( - object.proof_upgrade_consensus_state !== undefined && - object.proof_upgrade_consensus_state !== null - ) { - message.proof_upgrade_consensus_state = bytesFromBase64( - object.proof_upgrade_consensus_state - ); - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgUpgradeClient): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - message.client_state !== undefined && - (obj.client_state = message.client_state - ? Any.toJSON(message.client_state) - : undefined); - message.consensus_state !== undefined && - (obj.consensus_state = message.consensus_state - ? Any.toJSON(message.consensus_state) - : undefined); - message.proof_upgrade_client !== undefined && - (obj.proof_upgrade_client = base64FromBytes( - message.proof_upgrade_client !== undefined - ? message.proof_upgrade_client - : new Uint8Array() - )); - message.proof_upgrade_consensus_state !== undefined && - (obj.proof_upgrade_consensus_state = base64FromBytes( - message.proof_upgrade_consensus_state !== undefined - ? message.proof_upgrade_consensus_state - : new Uint8Array() - )); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgUpgradeClient { - const message = { ...baseMsgUpgradeClient } as MsgUpgradeClient; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromPartial(object.client_state); - } else { - message.client_state = undefined; - } - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromPartial(object.consensus_state); - } else { - message.consensus_state = undefined; - } - if ( - object.proof_upgrade_client !== undefined && - object.proof_upgrade_client !== null - ) { - message.proof_upgrade_client = object.proof_upgrade_client; - } else { - message.proof_upgrade_client = new Uint8Array(); - } - if ( - object.proof_upgrade_consensus_state !== undefined && - object.proof_upgrade_consensus_state !== null - ) { - message.proof_upgrade_consensus_state = - object.proof_upgrade_consensus_state; - } else { - message.proof_upgrade_consensus_state = new Uint8Array(); - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgUpgradeClientResponse: object = {}; - -export const MsgUpgradeClientResponse = { - encode( - _: MsgUpgradeClientResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgUpgradeClientResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgUpgradeClientResponse, - } as MsgUpgradeClientResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgUpgradeClientResponse { - const message = { - ...baseMsgUpgradeClientResponse, - } as MsgUpgradeClientResponse; - return message; - }, - - toJSON(_: MsgUpgradeClientResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgUpgradeClientResponse { - const message = { - ...baseMsgUpgradeClientResponse, - } as MsgUpgradeClientResponse; - return message; - }, -}; - -const baseMsgSubmitMisbehaviour: object = { client_id: "", signer: "" }; - -export const MsgSubmitMisbehaviour = { - encode( - message: MsgSubmitMisbehaviour, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - if (message.misbehaviour !== undefined) { - Any.encode(message.misbehaviour, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgSubmitMisbehaviour { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgSubmitMisbehaviour } as MsgSubmitMisbehaviour; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.misbehaviour = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgSubmitMisbehaviour { - const message = { ...baseMsgSubmitMisbehaviour } as MsgSubmitMisbehaviour; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if (object.misbehaviour !== undefined && object.misbehaviour !== null) { - message.misbehaviour = Any.fromJSON(object.misbehaviour); - } else { - message.misbehaviour = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgSubmitMisbehaviour): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - message.misbehaviour !== undefined && - (obj.misbehaviour = message.misbehaviour - ? Any.toJSON(message.misbehaviour) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgSubmitMisbehaviour { - const message = { ...baseMsgSubmitMisbehaviour } as MsgSubmitMisbehaviour; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if (object.misbehaviour !== undefined && object.misbehaviour !== null) { - message.misbehaviour = Any.fromPartial(object.misbehaviour); - } else { - message.misbehaviour = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgSubmitMisbehaviourResponse: object = {}; - -export const MsgSubmitMisbehaviourResponse = { - encode( - _: MsgSubmitMisbehaviourResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgSubmitMisbehaviourResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgSubmitMisbehaviourResponse, - } as MsgSubmitMisbehaviourResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgSubmitMisbehaviourResponse { - const message = { - ...baseMsgSubmitMisbehaviourResponse, - } as MsgSubmitMisbehaviourResponse; - return message; - }, - - toJSON(_: MsgSubmitMisbehaviourResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgSubmitMisbehaviourResponse { - const message = { - ...baseMsgSubmitMisbehaviourResponse, - } as MsgSubmitMisbehaviourResponse; - return message; - }, -}; - -/** Msg defines the ibc/client Msg service. */ -export interface Msg { - /** CreateClient defines a rpc handler method for MsgCreateClient. */ - CreateClient(request: MsgCreateClient): Promise; - /** UpdateClient defines a rpc handler method for MsgUpdateClient. */ - UpdateClient(request: MsgUpdateClient): Promise; - /** UpgradeClient defines a rpc handler method for MsgUpgradeClient. */ - UpgradeClient(request: MsgUpgradeClient): Promise; - /** SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. */ - SubmitMisbehaviour( - request: MsgSubmitMisbehaviour - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - CreateClient(request: MsgCreateClient): Promise { - const data = MsgCreateClient.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Msg", - "CreateClient", - data - ); - return promise.then((data) => - MsgCreateClientResponse.decode(new Reader(data)) - ); - } - - UpdateClient(request: MsgUpdateClient): Promise { - const data = MsgUpdateClient.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Msg", - "UpdateClient", - data - ); - return promise.then((data) => - MsgUpdateClientResponse.decode(new Reader(data)) - ); - } - - UpgradeClient(request: MsgUpgradeClient): Promise { - const data = MsgUpgradeClient.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Msg", - "UpgradeClient", - data - ); - return promise.then((data) => - MsgUpgradeClientResponse.decode(new Reader(data)) - ); - } - - SubmitMisbehaviour( - request: MsgSubmitMisbehaviour - ): Promise { - const data = MsgSubmitMisbehaviour.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.client.v1.Msg", - "SubmitMisbehaviour", - data - ); - return promise.then((data) => - MsgSubmitMisbehaviourResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/package.json b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/package.json deleted file mode 100755 index 27c53d2127..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "ibc-core-client-v1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module ibc.core.client.v1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/ibc-go/v3/modules/core/02-client/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/vuex-root b/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.client.v1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/index.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/index.ts deleted file mode 100755 index 57db580c6f..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/index.ts +++ /dev/null @@ -1,273 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { ConnectionEnd } from "./module/types/ibc/core/connection/v1/connection" -import { IdentifiedConnection } from "./module/types/ibc/core/connection/v1/connection" -import { Counterparty } from "./module/types/ibc/core/connection/v1/connection" -import { ClientPaths } from "./module/types/ibc/core/connection/v1/connection" -import { ConnectionPaths } from "./module/types/ibc/core/connection/v1/connection" -import { Version } from "./module/types/ibc/core/connection/v1/connection" -import { Params } from "./module/types/ibc/core/connection/v1/connection" - - -export { ConnectionEnd, IdentifiedConnection, Counterparty, ClientPaths, ConnectionPaths, Version, Params }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Connection: {}, - Connections: {}, - ClientConnections: {}, - ConnectionClientState: {}, - ConnectionConsensusState: {}, - - _Structure: { - ConnectionEnd: getStructure(ConnectionEnd.fromPartial({})), - IdentifiedConnection: getStructure(IdentifiedConnection.fromPartial({})), - Counterparty: getStructure(Counterparty.fromPartial({})), - ClientPaths: getStructure(ClientPaths.fromPartial({})), - ConnectionPaths: getStructure(ConnectionPaths.fromPartial({})), - Version: getStructure(Version.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getConnection: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Connection[JSON.stringify(params)] ?? {} - }, - getConnections: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Connections[JSON.stringify(params)] ?? {} - }, - getClientConnections: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ClientConnections[JSON.stringify(params)] ?? {} - }, - getConnectionClientState: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ConnectionClientState[JSON.stringify(params)] ?? {} - }, - getConnectionConsensusState: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ConnectionConsensusState[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: ibc.core.connection.v1 initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryConnection({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryConnection( key.connection_id)).data - - - commit('QUERY', { query: 'Connection', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryConnection', payload: { options: { all }, params: {...key},query }}) - return getters['getConnection']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryConnection API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryConnections({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryConnections(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryConnections({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Connections', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryConnections', payload: { options: { all }, params: {...key},query }}) - return getters['getConnections']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryConnections API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryClientConnections({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryClientConnections( key.client_id)).data - - - commit('QUERY', { query: 'ClientConnections', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryClientConnections', payload: { options: { all }, params: {...key},query }}) - return getters['getClientConnections']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryClientConnections API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryConnectionClientState({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryConnectionClientState( key.connection_id)).data - - - commit('QUERY', { query: 'ConnectionClientState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryConnectionClientState', payload: { options: { all }, params: {...key},query }}) - return getters['getConnectionClientState']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryConnectionClientState API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryConnectionConsensusState({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryConnectionConsensusState( key.connection_id, key.revision_number, key.revision_height)).data - - - commit('QUERY', { query: 'ConnectionConsensusState', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryConnectionConsensusState', payload: { options: { all }, params: {...key},query }}) - return getters['getConnectionConsensusState']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryConnectionConsensusState API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - } -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/index.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/index.ts deleted file mode 100755 index 67d4b093f0..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; - - -const types = [ - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/rest.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/rest.ts deleted file mode 100644 index add2f90bbe..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/rest.ts +++ /dev/null @@ -1,922 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** -* `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" - } -*/ -export interface ProtobufAny { - /** - * 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. - */ - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* 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. -*/ -export interface V1ConnectionEnd { - /** client associated with this connection. */ - client_id?: string; - - /** - * IBC version which can be utilised to determine encodings or protocols for - * channels or packets utilising this connection. - */ - versions?: V1Version[]; - - /** current state of the connection end. */ - state?: V1State; - - /** counterparty chain associated with this connection. */ - counterparty?: V1Counterparty; - - /** - * 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. - * @format uint64 - */ - delay_period?: string; -} - -/** - * Counterparty defines the counterparty chain associated with a connection end. - */ -export interface V1Counterparty { - /** - * identifies the client on the counterparty chain associated with a given - * connection. - */ - client_id?: string; - - /** - * identifies the connection end on the counterparty chain associated with a - * given connection. - */ - connection_id?: string; - - /** commitment merkle prefix of the counterparty chain. */ - prefix?: V1MerklePrefix; -} - -/** -* 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 -*/ -export interface V1Height { - /** @format uint64 */ - revision_number?: string; - - /** @format uint64 */ - revision_height?: string; -} - -/** -* IdentifiedClientState defines a client state with an additional client -identifier field. -*/ -export interface V1IdentifiedClientState { - client_id?: string; - - /** - * `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_state?: ProtobufAny; -} - -/** -* IdentifiedConnection defines a connection with additional connection -identifier field. -*/ -export interface V1IdentifiedConnection { - /** connection identifier. */ - id?: string; - - /** client associated with this connection. */ - client_id?: string; - versions?: V1Version[]; - - /** current state of the connection end. */ - state?: V1State; - - /** counterparty chain associated with this connection. */ - counterparty?: V1Counterparty; - - /** - * delay period associated with this connection. - * @format uint64 - */ - delay_period?: string; -} - -export interface V1MerklePrefix { - /** @format byte */ - key_prefix?: string; -} - -/** - * MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. - */ -export type V1MsgConnectionOpenAckResponse = object; - -/** -* MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm -response type. -*/ -export type V1MsgConnectionOpenConfirmResponse = object; - -/** -* MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response -type. -*/ -export type V1MsgConnectionOpenInitResponse = object; - -/** - * MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. - */ -export type V1MsgConnectionOpenTryResponse = object; - -export interface V1QueryClientConnectionsResponse { - /** slice of all the connection paths associated with a client. */ - connection_paths?: string[]; - - /** @format byte */ - proof?: string; - - /** - * 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 - */ - proof_height?: V1Height; -} - -export interface V1QueryConnectionClientStateResponse { - /** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ - identified_client_state?: V1IdentifiedClientState; - - /** @format byte */ - proof?: string; - - /** - * 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 - */ - proof_height?: V1Height; -} - -export interface V1QueryConnectionConsensusStateResponse { - /** - * `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" - * } - */ - consensus_state?: ProtobufAny; - client_id?: string; - - /** @format byte */ - proof?: string; - - /** - * 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 - */ - proof_height?: V1Height; -} - -/** -* 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. -*/ -export interface V1QueryConnectionResponse { - /** - * 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. - */ - connection?: V1ConnectionEnd; - - /** @format byte */ - proof?: string; - - /** - * 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 - */ - proof_height?: V1Height; -} - -/** -* QueryConnectionsResponse is the response type for the Query/Connections RPC -method. -*/ -export interface V1QueryConnectionsResponse { - /** list of stored connections of the chain. */ - connections?: V1IdentifiedConnection[]; - - /** - * 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; - * } - */ - pagination?: V1Beta1PageResponse; - - /** - * 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 - */ - height?: V1Height; -} - -/** -* 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. -*/ -export enum V1State { - STATE_UNINITIALIZED_UNSPECIFIED = "STATE_UNINITIALIZED_UNSPECIFIED", - STATE_INIT = "STATE_INIT", - STATE_TRYOPEN = "STATE_TRYOPEN", - STATE_OPEN = "STATE_OPEN", -} - -/** -* Version defines the versioning scheme used to negotiate the IBC verison in -the connection handshake. -*/ -export interface V1Version { - identifier?: string; - features?: string[]; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - count_total?: boolean; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title ibc/core/connection/v1/connection.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryClientConnections - * @summary ClientConnections queries the connection paths associated with a client -state. - * @request GET:/ibc/core/connection/v1/client_connections/{client_id} - */ - queryClientConnections = (client_id: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/connection/v1/client_connections/${client_id}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryConnections - * @summary Connections queries all the IBC connections of a chain. - * @request GET:/ibc/core/connection/v1/connections - */ - queryConnections = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/connection/v1/connections`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryConnection - * @summary Connection queries an IBC connection end. - * @request GET:/ibc/core/connection/v1/connections/{connection_id} - */ - queryConnection = (connection_id: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/connection/v1/connections/${connection_id}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryConnectionClientState - * @summary ConnectionClientState queries the client state associated with the -connection. - * @request GET:/ibc/core/connection/v1/connections/{connection_id}/client_state - */ - queryConnectionClientState = (connection_id: string, params: RequestParams = {}) => - this.request({ - path: `/ibc/core/connection/v1/connections/${connection_id}/client_state`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryConnectionConsensusState - * @summary ConnectionConsensusState queries the consensus state associated with the -connection. - * @request GET:/ibc/core/connection/v1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height} - */ - queryConnectionConsensusState = ( - connection_id: string, - revision_number: string, - revision_height: string, - params: RequestParams = {}, - ) => - this.request({ - path: `/ibc/core/connection/v1/connections/${connection_id}/consensus_state/revision/${revision_number}/height/${revision_height}`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 0bc568f477..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,300 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - count_total: boolean; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, count_total: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.count_total !== undefined && - (obj.count_total = message.count_total); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts deleted file mode 100644 index e9cefea25a..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/cosmos/upgrade/v1beta1/upgrade.ts +++ /dev/null @@ -1,414 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.upgrade.v1beta1"; - -/** Plan specifies information about a planned upgrade and when it should occur. */ -export interface Plan { - /** - * 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. - */ - name: string; - /** - * The time after which the upgrade must be performed. - * Leave set to its zero value to use a pre-defined Height instead. - */ - time: Date | undefined; - /** - * The height at which the upgrade must be performed. - * Only used if Time is not set. - */ - height: number; - /** - * Any application specific upgrade info to be included on-chain - * such as a git commit that validators could automatically upgrade to - */ - info: string; -} - -/** - * SoftwareUpgradeProposal is a gov Content type for initiating a software - * upgrade. - */ -export interface SoftwareUpgradeProposal { - title: string; - description: string; - plan: Plan | undefined; -} - -/** - * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software - * upgrade. - */ -export interface CancelSoftwareUpgradeProposal { - title: string; - description: string; -} - -const basePlan: object = { name: "", height: 0, info: "" }; - -export const Plan = { - encode(message: Plan, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.time !== undefined) { - Timestamp.encode( - toTimestamp(message.time), - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== 0) { - writer.uint32(24).int64(message.height); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Plan { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePlan } as Plan; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 3: - message.height = longToNumber(reader.int64() as Long); - break; - case 4: - message.info = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Plan { - const message = { ...basePlan } as Plan; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.time !== undefined && object.time !== null) { - message.time = fromJsonTimestamp(object.time); - } else { - message.time = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.info !== undefined && object.info !== null) { - message.info = String(object.info); - } else { - message.info = ""; - } - return message; - }, - - toJSON(message: Plan): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.time !== undefined && - (obj.time = - message.time !== undefined ? message.time.toISOString() : null); - message.height !== undefined && (obj.height = message.height); - message.info !== undefined && (obj.info = message.info); - return obj; - }, - - fromPartial(object: DeepPartial): Plan { - const message = { ...basePlan } as Plan; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.time !== undefined && object.time !== null) { - message.time = object.time; - } else { - message.time = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.info !== undefined && object.info !== null) { - message.info = object.info; - } else { - message.info = ""; - } - return message; - }, -}; - -const baseSoftwareUpgradeProposal: object = { title: "", description: "" }; - -export const SoftwareUpgradeProposal = { - encode( - message: SoftwareUpgradeProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SoftwareUpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SoftwareUpgradeProposal { - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromJSON(object.plan); - } else { - message.plan = undefined; - } - return message; - }, - - toJSON(message: SoftwareUpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.plan !== undefined && - (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): SoftwareUpgradeProposal { - const message = { - ...baseSoftwareUpgradeProposal, - } as SoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromPartial(object.plan); - } else { - message.plan = undefined; - } - return message; - }, -}; - -const baseCancelSoftwareUpgradeProposal: object = { - title: "", - description: "", -}; - -export const CancelSoftwareUpgradeProposal = { - encode( - message: CancelSoftwareUpgradeProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): CancelSoftwareUpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CancelSoftwareUpgradeProposal { - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - return message; - }, - - toJSON(message: CancelSoftwareUpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - return obj; - }, - - fromPartial( - object: DeepPartial - ): CancelSoftwareUpgradeProposal { - const message = { - ...baseCancelSoftwareUpgradeProposal, - } as CancelSoftwareUpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/gogoproto/gogo.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/api/annotations.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/api/http.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/protobuf/any.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/protobuf/any.ts deleted file mode 100644 index 233eae465d..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/protobuf/any.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * `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" - * } - */ -export interface Any { - /** - * 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. - */ - type_url: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} - -const baseAny: object = { type_url: "" }; - -export const Any = { - encode(message: Any, writer: Writer = Writer.create()): Writer { - if (message.type_url !== "") { - writer.uint32(10).string(message.type_url); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Any { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAny } as Any; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = String(object.type_url); - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - - toJSON(message: Any): unknown { - const obj: any = {}; - message.type_url !== undefined && (obj.type_url = message.type_url); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): Any { - const message = { ...baseAny } as Any; - if (object.type_url !== undefined && object.type_url !== null) { - message.type_url = object.type_url; - } else { - message.type_url = ""; - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 11864afc86..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.ts deleted file mode 100644 index b34686d396..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/client/v1/client.ts +++ /dev/null @@ -1,814 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; -import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; - -export const protobufPackage = "ibc.core.client.v1"; - -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientState { - /** client identifier */ - client_id: string; - /** client state */ - client_state: Any | undefined; -} - -/** - * ConsensusStateWithHeight defines a consensus state with an additional height - * field. - */ -export interface ConsensusStateWithHeight { - /** consensus state height */ - height: Height | undefined; - /** consensus state */ - consensus_state: Any | undefined; -} - -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStates { - /** client identifier */ - client_id: string; - /** consensus states and their heights associated with the client */ - consensus_states: ConsensusStateWithHeight[]; -} - -/** - * ClientUpdateProposal is a governance proposal. If it passes, the substitute - * client's latest consensus state is copied over to the subject client. The proposal - * handler may fail if the subject and the substitute do not match in client and - * chain parameters (with exception to latest height, frozen height, and chain-id). - */ -export interface ClientUpdateProposal { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - subject_client_id: string; - /** - * the substitute client identifier for the client standing in for the subject - * client - */ - substitute_client_id: string; -} - -/** - * UpgradeProposal is a gov Content type for initiating an IBC breaking - * upgrade. - */ -export interface UpgradeProposal { - title: string; - description: string; - plan: Plan | undefined; - /** - * An UpgradedClientState must be provided to perform an IBC breaking upgrade. - * This will make the chain commit to the correct upgraded (self) client state - * before the upgrade occurs, so that connecting chains can verify that the - * new upgraded client is valid by verifying a proof on the previous version - * of the chain. This will allow IBC connections to persist smoothly across - * planned chain upgrades - */ - upgraded_client_state: Any | undefined; -} - -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * 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 - */ -export interface Height { - /** the revision that the client is currently on */ - revision_number: number; - /** the height within the given revision */ - revision_height: number; -} - -/** Params defines the set of IBC light client parameters. */ -export interface Params { - /** allowed_clients defines the list of allowed client state types. */ - allowed_clients: string[]; -} - -const baseIdentifiedClientState: object = { client_id: "" }; - -export const IdentifiedClientState = { - encode( - message: IdentifiedClientState, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - if (message.client_state !== undefined) { - Any.encode(message.client_state, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IdentifiedClientState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.client_state = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromJSON(object.client_state); - } else { - message.client_state = undefined; - } - return message; - }, - - toJSON(message: IdentifiedClientState): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - message.client_state !== undefined && - (obj.client_state = message.client_state - ? Any.toJSON(message.client_state) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): IdentifiedClientState { - const message = { ...baseIdentifiedClientState } as IdentifiedClientState; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromPartial(object.client_state); - } else { - message.client_state = undefined; - } - return message; - }, -}; - -const baseConsensusStateWithHeight: object = {}; - -export const ConsensusStateWithHeight = { - encode( - message: ConsensusStateWithHeight, - writer: Writer = Writer.create() - ): Writer { - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(10).fork()).ldelim(); - } - if (message.consensus_state !== undefined) { - Any.encode(message.consensus_state, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): ConsensusStateWithHeight { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensus_state = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromJSON(object.consensus_state); - } else { - message.consensus_state = undefined; - } - return message; - }, - - toJSON(message: ConsensusStateWithHeight): unknown { - const obj: any = {}; - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - message.consensus_state !== undefined && - (obj.consensus_state = message.consensus_state - ? Any.toJSON(message.consensus_state) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ConsensusStateWithHeight { - const message = { - ...baseConsensusStateWithHeight, - } as ConsensusStateWithHeight; - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromPartial(object.consensus_state); - } else { - message.consensus_state = undefined; - } - return message; - }, -}; - -const baseClientConsensusStates: object = { client_id: "" }; - -export const ClientConsensusStates = { - encode( - message: ClientConsensusStates, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - for (const v of message.consensus_states) { - ConsensusStateWithHeight.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientConsensusStates { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensus_states = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.consensus_states.push( - ConsensusStateWithHeight.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensus_states = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if ( - object.consensus_states !== undefined && - object.consensus_states !== null - ) { - for (const e of object.consensus_states) { - message.consensus_states.push(ConsensusStateWithHeight.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ClientConsensusStates): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - if (message.consensus_states) { - obj.consensus_states = message.consensus_states.map((e) => - e ? ConsensusStateWithHeight.toJSON(e) : undefined - ); - } else { - obj.consensus_states = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ClientConsensusStates { - const message = { ...baseClientConsensusStates } as ClientConsensusStates; - message.consensus_states = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if ( - object.consensus_states !== undefined && - object.consensus_states !== null - ) { - for (const e of object.consensus_states) { - message.consensus_states.push(ConsensusStateWithHeight.fromPartial(e)); - } - } - return message; - }, -}; - -const baseClientUpdateProposal: object = { - title: "", - description: "", - subject_client_id: "", - substitute_client_id: "", -}; - -export const ClientUpdateProposal = { - encode( - message: ClientUpdateProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.subject_client_id !== "") { - writer.uint32(26).string(message.subject_client_id); - } - if (message.substitute_client_id !== "") { - writer.uint32(34).string(message.substitute_client_id); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientUpdateProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.subject_client_id = reader.string(); - break; - case 4: - message.substitute_client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if ( - object.subject_client_id !== undefined && - object.subject_client_id !== null - ) { - message.subject_client_id = String(object.subject_client_id); - } else { - message.subject_client_id = ""; - } - if ( - object.substitute_client_id !== undefined && - object.substitute_client_id !== null - ) { - message.substitute_client_id = String(object.substitute_client_id); - } else { - message.substitute_client_id = ""; - } - return message; - }, - - toJSON(message: ClientUpdateProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.subject_client_id !== undefined && - (obj.subject_client_id = message.subject_client_id); - message.substitute_client_id !== undefined && - (obj.substitute_client_id = message.substitute_client_id); - return obj; - }, - - fromPartial(object: DeepPartial): ClientUpdateProposal { - const message = { ...baseClientUpdateProposal } as ClientUpdateProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if ( - object.subject_client_id !== undefined && - object.subject_client_id !== null - ) { - message.subject_client_id = object.subject_client_id; - } else { - message.subject_client_id = ""; - } - if ( - object.substitute_client_id !== undefined && - object.substitute_client_id !== null - ) { - message.substitute_client_id = object.substitute_client_id; - } else { - message.substitute_client_id = ""; - } - return message; - }, -}; - -const baseUpgradeProposal: object = { title: "", description: "" }; - -export const UpgradeProposal = { - encode(message: UpgradeProposal, writer: Writer = Writer.create()): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); - } - if (message.upgraded_client_state !== undefined) { - Any.encode( - message.upgraded_client_state, - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UpgradeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUpgradeProposal } as UpgradeProposal; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - case 4: - message.upgraded_client_state = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpgradeProposal { - const message = { ...baseUpgradeProposal } as UpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromJSON(object.plan); - } else { - message.plan = undefined; - } - if ( - object.upgraded_client_state !== undefined && - object.upgraded_client_state !== null - ) { - message.upgraded_client_state = Any.fromJSON( - object.upgraded_client_state - ); - } else { - message.upgraded_client_state = undefined; - } - return message; - }, - - toJSON(message: UpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.plan !== undefined && - (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - message.upgraded_client_state !== undefined && - (obj.upgraded_client_state = message.upgraded_client_state - ? Any.toJSON(message.upgraded_client_state) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): UpgradeProposal { - const message = { ...baseUpgradeProposal } as UpgradeProposal; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.plan !== undefined && object.plan !== null) { - message.plan = Plan.fromPartial(object.plan); - } else { - message.plan = undefined; - } - if ( - object.upgraded_client_state !== undefined && - object.upgraded_client_state !== null - ) { - message.upgraded_client_state = Any.fromPartial( - object.upgraded_client_state - ); - } else { - message.upgraded_client_state = undefined; - } - return message; - }, -}; - -const baseHeight: object = { revision_number: 0, revision_height: 0 }; - -export const Height = { - encode(message: Height, writer: Writer = Writer.create()): Writer { - if (message.revision_number !== 0) { - writer.uint32(8).uint64(message.revision_number); - } - if (message.revision_height !== 0) { - writer.uint32(16).uint64(message.revision_height); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Height { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHeight } as Height; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revision_number = longToNumber(reader.uint64() as Long); - break; - case 2: - message.revision_height = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Height { - const message = { ...baseHeight } as Height; - if ( - object.revision_number !== undefined && - object.revision_number !== null - ) { - message.revision_number = Number(object.revision_number); - } else { - message.revision_number = 0; - } - if ( - object.revision_height !== undefined && - object.revision_height !== null - ) { - message.revision_height = Number(object.revision_height); - } else { - message.revision_height = 0; - } - return message; - }, - - toJSON(message: Height): unknown { - const obj: any = {}; - message.revision_number !== undefined && - (obj.revision_number = message.revision_number); - message.revision_height !== undefined && - (obj.revision_height = message.revision_height); - return obj; - }, - - fromPartial(object: DeepPartial): Height { - const message = { ...baseHeight } as Height; - if ( - object.revision_number !== undefined && - object.revision_number !== null - ) { - message.revision_number = object.revision_number; - } else { - message.revision_number = 0; - } - if ( - object.revision_height !== undefined && - object.revision_height !== null - ) { - message.revision_height = object.revision_height; - } else { - message.revision_height = 0; - } - return message; - }, -}; - -const baseParams: object = { allowed_clients: "" }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - for (const v of message.allowed_clients) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - message.allowed_clients = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowed_clients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - message.allowed_clients = []; - if ( - object.allowed_clients !== undefined && - object.allowed_clients !== null - ) { - for (const e of object.allowed_clients) { - message.allowed_clients.push(String(e)); - } - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.allowed_clients) { - obj.allowed_clients = message.allowed_clients.map((e) => e); - } else { - obj.allowed_clients = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - message.allowed_clients = []; - if ( - object.allowed_clients !== undefined && - object.allowed_clients !== null - ) { - for (const e of object.allowed_clients) { - message.allowed_clients.push(e); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.ts deleted file mode 100644 index baa24fc26f..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/commitment/v1/commitment.ts +++ /dev/null @@ -1,324 +0,0 @@ -/* eslint-disable */ -import { CommitmentProof } from "../../../../proofs"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "ibc.core.commitment.v1"; - -/** - * MerkleRoot defines a merkle root hash. - * In the Cosmos SDK, the AppHash of a block header becomes the root. - */ -export interface MerkleRoot { - hash: Uint8Array; -} - -/** - * 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...)) - */ -export interface MerklePrefix { - key_prefix: Uint8Array; -} - -/** - * MerklePath is the path used to verify commitment proofs, which can be an - * arbitrary structured object (defined by a commitment type). - * MerklePath is represented from root-to-leaf - */ -export interface MerklePath { - key_path: string[]; -} - -/** - * MerkleProof is a wrapper type over a chain of CommitmentProofs. - * It demonstrates membership or non-membership for an element or set of - * elements, verifiable in conjunction with a known commitment root. Proofs - * should be succinct. - * MerkleProofs are ordered from leaf-to-root - */ -export interface MerkleProof { - proofs: CommitmentProof[]; -} - -const baseMerkleRoot: object = {}; - -export const MerkleRoot = { - encode(message: MerkleRoot, writer: Writer = Writer.create()): Writer { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MerkleRoot { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMerkleRoot } as MerkleRoot; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MerkleRoot { - const message = { ...baseMerkleRoot } as MerkleRoot; - if (object.hash !== undefined && object.hash !== null) { - message.hash = bytesFromBase64(object.hash); - } - return message; - }, - - toJSON(message: MerkleRoot): unknown { - const obj: any = {}; - message.hash !== undefined && - (obj.hash = base64FromBytes( - message.hash !== undefined ? message.hash : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): MerkleRoot { - const message = { ...baseMerkleRoot } as MerkleRoot; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = new Uint8Array(); - } - return message; - }, -}; - -const baseMerklePrefix: object = {}; - -export const MerklePrefix = { - encode(message: MerklePrefix, writer: Writer = Writer.create()): Writer { - if (message.key_prefix.length !== 0) { - writer.uint32(10).bytes(message.key_prefix); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MerklePrefix { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMerklePrefix } as MerklePrefix; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key_prefix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MerklePrefix { - const message = { ...baseMerklePrefix } as MerklePrefix; - if (object.key_prefix !== undefined && object.key_prefix !== null) { - message.key_prefix = bytesFromBase64(object.key_prefix); - } - return message; - }, - - toJSON(message: MerklePrefix): unknown { - const obj: any = {}; - message.key_prefix !== undefined && - (obj.key_prefix = base64FromBytes( - message.key_prefix !== undefined ? message.key_prefix : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): MerklePrefix { - const message = { ...baseMerklePrefix } as MerklePrefix; - if (object.key_prefix !== undefined && object.key_prefix !== null) { - message.key_prefix = object.key_prefix; - } else { - message.key_prefix = new Uint8Array(); - } - return message; - }, -}; - -const baseMerklePath: object = { key_path: "" }; - -export const MerklePath = { - encode(message: MerklePath, writer: Writer = Writer.create()): Writer { - for (const v of message.key_path) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MerklePath { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMerklePath } as MerklePath; - message.key_path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key_path.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MerklePath { - const message = { ...baseMerklePath } as MerklePath; - message.key_path = []; - if (object.key_path !== undefined && object.key_path !== null) { - for (const e of object.key_path) { - message.key_path.push(String(e)); - } - } - return message; - }, - - toJSON(message: MerklePath): unknown { - const obj: any = {}; - if (message.key_path) { - obj.key_path = message.key_path.map((e) => e); - } else { - obj.key_path = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MerklePath { - const message = { ...baseMerklePath } as MerklePath; - message.key_path = []; - if (object.key_path !== undefined && object.key_path !== null) { - for (const e of object.key_path) { - message.key_path.push(e); - } - } - return message; - }, -}; - -const baseMerkleProof: object = {}; - -export const MerkleProof = { - encode(message: MerkleProof, writer: Writer = Writer.create()): Writer { - for (const v of message.proofs) { - CommitmentProof.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MerkleProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMerkleProof } as MerkleProof; - message.proofs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proofs.push(CommitmentProof.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MerkleProof { - const message = { ...baseMerkleProof } as MerkleProof; - message.proofs = []; - if (object.proofs !== undefined && object.proofs !== null) { - for (const e of object.proofs) { - message.proofs.push(CommitmentProof.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MerkleProof): unknown { - const obj: any = {}; - if (message.proofs) { - obj.proofs = message.proofs.map((e) => - e ? CommitmentProof.toJSON(e) : undefined - ); - } else { - obj.proofs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MerkleProof { - const message = { ...baseMerkleProof } as MerkleProof; - message.proofs = []; - if (object.proofs !== undefined && object.proofs !== null) { - for (const e of object.proofs) { - message.proofs.push(CommitmentProof.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.ts deleted file mode 100644 index fd47a91308..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/connection.ts +++ /dev/null @@ -1,875 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { MerklePrefix } from "../../../../ibc/core/commitment/v1/commitment"; - -export const protobufPackage = "ibc.core.connection.v1"; - -/** - * State defines if a connection is in one of the following states: - * INIT, TRYOPEN, OPEN or UNINITIALIZED. - */ -export enum State { - /** STATE_UNINITIALIZED_UNSPECIFIED - Default State */ - STATE_UNINITIALIZED_UNSPECIFIED = 0, - /** STATE_INIT - A connection end has just started the opening handshake. */ - STATE_INIT = 1, - /** - * STATE_TRYOPEN - A connection end has acknowledged the handshake step on the counterparty - * chain. - */ - STATE_TRYOPEN = 2, - /** STATE_OPEN - A connection end has completed the handshake. */ - STATE_OPEN = 3, - UNRECOGNIZED = -1, -} - -export function stateFromJSON(object: any): State { - switch (object) { - case 0: - case "STATE_UNINITIALIZED_UNSPECIFIED": - return State.STATE_UNINITIALIZED_UNSPECIFIED; - case 1: - case "STATE_INIT": - return State.STATE_INIT; - case 2: - case "STATE_TRYOPEN": - return State.STATE_TRYOPEN; - case 3: - case "STATE_OPEN": - return State.STATE_OPEN; - case -1: - case "UNRECOGNIZED": - default: - return State.UNRECOGNIZED; - } -} - -export function stateToJSON(object: State): string { - switch (object) { - case State.STATE_UNINITIALIZED_UNSPECIFIED: - return "STATE_UNINITIALIZED_UNSPECIFIED"; - case State.STATE_INIT: - return "STATE_INIT"; - case State.STATE_TRYOPEN: - return "STATE_TRYOPEN"; - case State.STATE_OPEN: - return "STATE_OPEN"; - default: - return "UNKNOWN"; - } -} - -/** - * 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. - */ -export interface ConnectionEnd { - /** client associated with this connection. */ - client_id: string; - /** - * IBC version which can be utilised to determine encodings or protocols for - * channels or packets utilising this connection. - */ - versions: Version[]; - /** current state of the connection end. */ - state: State; - /** counterparty chain associated with this connection. */ - counterparty: Counterparty | undefined; - /** - * 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. - */ - delay_period: number; -} - -/** - * IdentifiedConnection defines a connection with additional connection - * identifier field. - */ -export interface IdentifiedConnection { - /** connection identifier. */ - id: string; - /** client associated with this connection. */ - client_id: string; - /** - * IBC version which can be utilised to determine encodings or protocols for - * channels or packets utilising this connection - */ - versions: Version[]; - /** current state of the connection end. */ - state: State; - /** counterparty chain associated with this connection. */ - counterparty: Counterparty | undefined; - /** delay period associated with this connection. */ - delay_period: number; -} - -/** Counterparty defines the counterparty chain associated with a connection end. */ -export interface Counterparty { - /** - * identifies the client on the counterparty chain associated with a given - * connection. - */ - client_id: string; - /** - * identifies the connection end on the counterparty chain associated with a - * given connection. - */ - connection_id: string; - /** commitment merkle prefix of the counterparty chain. */ - prefix: MerklePrefix | undefined; -} - -/** ClientPaths define all the connection paths for a client state. */ -export interface ClientPaths { - /** list of connection paths */ - paths: string[]; -} - -/** ConnectionPaths define all the connection paths for a given client state. */ -export interface ConnectionPaths { - /** client state unique identifier */ - client_id: string; - /** list of connection paths */ - paths: string[]; -} - -/** - * Version defines the versioning scheme used to negotiate the IBC verison in - * the connection handshake. - */ -export interface Version { - /** unique version identifier */ - identifier: string; - /** list of features compatible with the specified identifier */ - features: string[]; -} - -/** Params defines the set of Connection parameters. */ -export interface Params { - /** - * maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the - * largest amount of time that the chain might reasonably take to produce the next block under normal operating - * conditions. A safe choice is 3-5x the expected time per block. - */ - max_expected_time_per_block: number; -} - -const baseConnectionEnd: object = { client_id: "", state: 0, delay_period: 0 }; - -export const ConnectionEnd = { - encode(message: ConnectionEnd, writer: Writer = Writer.create()): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - for (const v of message.versions) { - Version.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.state !== 0) { - writer.uint32(24).int32(message.state); - } - if (message.counterparty !== undefined) { - Counterparty.encode( - message.counterparty, - writer.uint32(34).fork() - ).ldelim(); - } - if (message.delay_period !== 0) { - writer.uint32(40).uint64(message.delay_period); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ConnectionEnd { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConnectionEnd } as ConnectionEnd; - message.versions = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.versions.push(Version.decode(reader, reader.uint32())); - break; - case 3: - message.state = reader.int32() as any; - break; - case 4: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 5: - message.delay_period = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConnectionEnd { - const message = { ...baseConnectionEnd } as ConnectionEnd; - message.versions = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if (object.versions !== undefined && object.versions !== null) { - for (const e of object.versions) { - message.versions.push(Version.fromJSON(e)); - } - } - if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); - } else { - message.state = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.delay_period !== undefined && object.delay_period !== null) { - message.delay_period = Number(object.delay_period); - } else { - message.delay_period = 0; - } - return message; - }, - - toJSON(message: ConnectionEnd): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - if (message.versions) { - obj.versions = message.versions.map((e) => - e ? Version.toJSON(e) : undefined - ); - } else { - obj.versions = []; - } - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - message.delay_period !== undefined && - (obj.delay_period = message.delay_period); - return obj; - }, - - fromPartial(object: DeepPartial): ConnectionEnd { - const message = { ...baseConnectionEnd } as ConnectionEnd; - message.versions = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if (object.versions !== undefined && object.versions !== null) { - for (const e of object.versions) { - message.versions.push(Version.fromPartial(e)); - } - } - if (object.state !== undefined && object.state !== null) { - message.state = object.state; - } else { - message.state = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.delay_period !== undefined && object.delay_period !== null) { - message.delay_period = object.delay_period; - } else { - message.delay_period = 0; - } - return message; - }, -}; - -const baseIdentifiedConnection: object = { - id: "", - client_id: "", - state: 0, - delay_period: 0, -}; - -export const IdentifiedConnection = { - encode( - message: IdentifiedConnection, - writer: Writer = Writer.create() - ): Writer { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.client_id !== "") { - writer.uint32(18).string(message.client_id); - } - for (const v of message.versions) { - Version.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.state !== 0) { - writer.uint32(32).int32(message.state); - } - if (message.counterparty !== undefined) { - Counterparty.encode( - message.counterparty, - writer.uint32(42).fork() - ).ldelim(); - } - if (message.delay_period !== 0) { - writer.uint32(48).uint64(message.delay_period); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IdentifiedConnection { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentifiedConnection } as IdentifiedConnection; - message.versions = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.client_id = reader.string(); - break; - case 3: - message.versions.push(Version.decode(reader, reader.uint32())); - break; - case 4: - message.state = reader.int32() as any; - break; - case 5: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 6: - message.delay_period = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IdentifiedConnection { - const message = { ...baseIdentifiedConnection } as IdentifiedConnection; - message.versions = []; - if (object.id !== undefined && object.id !== null) { - message.id = String(object.id); - } else { - message.id = ""; - } - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if (object.versions !== undefined && object.versions !== null) { - for (const e of object.versions) { - message.versions.push(Version.fromJSON(e)); - } - } - if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); - } else { - message.state = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.delay_period !== undefined && object.delay_period !== null) { - message.delay_period = Number(object.delay_period); - } else { - message.delay_period = 0; - } - return message; - }, - - toJSON(message: IdentifiedConnection): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.client_id !== undefined && (obj.client_id = message.client_id); - if (message.versions) { - obj.versions = message.versions.map((e) => - e ? Version.toJSON(e) : undefined - ); - } else { - obj.versions = []; - } - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - message.delay_period !== undefined && - (obj.delay_period = message.delay_period); - return obj; - }, - - fromPartial(object: DeepPartial): IdentifiedConnection { - const message = { ...baseIdentifiedConnection } as IdentifiedConnection; - message.versions = []; - if (object.id !== undefined && object.id !== null) { - message.id = object.id; - } else { - message.id = ""; - } - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if (object.versions !== undefined && object.versions !== null) { - for (const e of object.versions) { - message.versions.push(Version.fromPartial(e)); - } - } - if (object.state !== undefined && object.state !== null) { - message.state = object.state; - } else { - message.state = 0; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.delay_period !== undefined && object.delay_period !== null) { - message.delay_period = object.delay_period; - } else { - message.delay_period = 0; - } - return message; - }, -}; - -const baseCounterparty: object = { client_id: "", connection_id: "" }; - -export const Counterparty = { - encode(message: Counterparty, writer: Writer = Writer.create()): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - if (message.connection_id !== "") { - writer.uint32(18).string(message.connection_id); - } - if (message.prefix !== undefined) { - MerklePrefix.encode(message.prefix, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Counterparty { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCounterparty } as Counterparty; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.connection_id = reader.string(); - break; - case 3: - message.prefix = MerklePrefix.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Counterparty { - const message = { ...baseCounterparty } as Counterparty; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if (object.connection_id !== undefined && object.connection_id !== null) { - message.connection_id = String(object.connection_id); - } else { - message.connection_id = ""; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = MerklePrefix.fromJSON(object.prefix); - } else { - message.prefix = undefined; - } - return message; - }, - - toJSON(message: Counterparty): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - message.connection_id !== undefined && - (obj.connection_id = message.connection_id); - message.prefix !== undefined && - (obj.prefix = message.prefix - ? MerklePrefix.toJSON(message.prefix) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Counterparty { - const message = { ...baseCounterparty } as Counterparty; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if (object.connection_id !== undefined && object.connection_id !== null) { - message.connection_id = object.connection_id; - } else { - message.connection_id = ""; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = MerklePrefix.fromPartial(object.prefix); - } else { - message.prefix = undefined; - } - return message; - }, -}; - -const baseClientPaths: object = { paths: "" }; - -export const ClientPaths = { - encode(message: ClientPaths, writer: Writer = Writer.create()): Writer { - for (const v of message.paths) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ClientPaths { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseClientPaths } as ClientPaths; - message.paths = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ClientPaths { - const message = { ...baseClientPaths } as ClientPaths; - message.paths = []; - if (object.paths !== undefined && object.paths !== null) { - for (const e of object.paths) { - message.paths.push(String(e)); - } - } - return message; - }, - - toJSON(message: ClientPaths): unknown { - const obj: any = {}; - if (message.paths) { - obj.paths = message.paths.map((e) => e); - } else { - obj.paths = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ClientPaths { - const message = { ...baseClientPaths } as ClientPaths; - message.paths = []; - if (object.paths !== undefined && object.paths !== null) { - for (const e of object.paths) { - message.paths.push(e); - } - } - return message; - }, -}; - -const baseConnectionPaths: object = { client_id: "", paths: "" }; - -export const ConnectionPaths = { - encode(message: ConnectionPaths, writer: Writer = Writer.create()): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - for (const v of message.paths) { - writer.uint32(18).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ConnectionPaths { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseConnectionPaths } as ConnectionPaths; - message.paths = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConnectionPaths { - const message = { ...baseConnectionPaths } as ConnectionPaths; - message.paths = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if (object.paths !== undefined && object.paths !== null) { - for (const e of object.paths) { - message.paths.push(String(e)); - } - } - return message; - }, - - toJSON(message: ConnectionPaths): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - if (message.paths) { - obj.paths = message.paths.map((e) => e); - } else { - obj.paths = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ConnectionPaths { - const message = { ...baseConnectionPaths } as ConnectionPaths; - message.paths = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if (object.paths !== undefined && object.paths !== null) { - for (const e of object.paths) { - message.paths.push(e); - } - } - return message; - }, -}; - -const baseVersion: object = { identifier: "", features: "" }; - -export const Version = { - encode(message: Version, writer: Writer = Writer.create()): Writer { - if (message.identifier !== "") { - writer.uint32(10).string(message.identifier); - } - for (const v of message.features) { - writer.uint32(18).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Version { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVersion } as Version; - message.features = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identifier = reader.string(); - break; - case 2: - message.features.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Version { - const message = { ...baseVersion } as Version; - message.features = []; - if (object.identifier !== undefined && object.identifier !== null) { - message.identifier = String(object.identifier); - } else { - message.identifier = ""; - } - if (object.features !== undefined && object.features !== null) { - for (const e of object.features) { - message.features.push(String(e)); - } - } - return message; - }, - - toJSON(message: Version): unknown { - const obj: any = {}; - message.identifier !== undefined && (obj.identifier = message.identifier); - if (message.features) { - obj.features = message.features.map((e) => e); - } else { - obj.features = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Version { - const message = { ...baseVersion } as Version; - message.features = []; - if (object.identifier !== undefined && object.identifier !== null) { - message.identifier = object.identifier; - } else { - message.identifier = ""; - } - if (object.features !== undefined && object.features !== null) { - for (const e of object.features) { - message.features.push(e); - } - } - return message; - }, -}; - -const baseParams: object = { max_expected_time_per_block: 0 }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.max_expected_time_per_block !== 0) { - writer.uint32(8).uint64(message.max_expected_time_per_block); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_expected_time_per_block = longToNumber( - reader.uint64() as Long - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if ( - object.max_expected_time_per_block !== undefined && - object.max_expected_time_per_block !== null - ) { - message.max_expected_time_per_block = Number( - object.max_expected_time_per_block - ); - } else { - message.max_expected_time_per_block = 0; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.max_expected_time_per_block !== undefined && - (obj.max_expected_time_per_block = message.max_expected_time_per_block); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if ( - object.max_expected_time_per_block !== undefined && - object.max_expected_time_per_block !== null - ) { - message.max_expected_time_per_block = object.max_expected_time_per_block; - } else { - message.max_expected_time_per_block = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.ts deleted file mode 100644 index 5cb373d73f..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/genesis.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { - IdentifiedConnection, - ConnectionPaths, - Params, -} from "../../../../ibc/core/connection/v1/connection"; - -export const protobufPackage = "ibc.core.connection.v1"; - -/** GenesisState defines the ibc connection submodule's genesis state. */ -export interface GenesisState { - connections: IdentifiedConnection[]; - client_connection_paths: ConnectionPaths[]; - /** the sequence for the next generated connection identifier */ - next_connection_sequence: number; - params: Params | undefined; -} - -const baseGenesisState: object = { next_connection_sequence: 0 }; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - for (const v of message.connections) { - IdentifiedConnection.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.client_connection_paths) { - ConnectionPaths.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.next_connection_sequence !== 0) { - writer.uint32(24).uint64(message.next_connection_sequence); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.connections = []; - message.client_connection_paths = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connections.push( - IdentifiedConnection.decode(reader, reader.uint32()) - ); - break; - case 2: - message.client_connection_paths.push( - ConnectionPaths.decode(reader, reader.uint32()) - ); - break; - case 3: - message.next_connection_sequence = longToNumber( - reader.uint64() as Long - ); - break; - case 4: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.connections = []; - message.client_connection_paths = []; - if (object.connections !== undefined && object.connections !== null) { - for (const e of object.connections) { - message.connections.push(IdentifiedConnection.fromJSON(e)); - } - } - if ( - object.client_connection_paths !== undefined && - object.client_connection_paths !== null - ) { - for (const e of object.client_connection_paths) { - message.client_connection_paths.push(ConnectionPaths.fromJSON(e)); - } - } - if ( - object.next_connection_sequence !== undefined && - object.next_connection_sequence !== null - ) { - message.next_connection_sequence = Number( - object.next_connection_sequence - ); - } else { - message.next_connection_sequence = 0; - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.connections) { - obj.connections = message.connections.map((e) => - e ? IdentifiedConnection.toJSON(e) : undefined - ); - } else { - obj.connections = []; - } - if (message.client_connection_paths) { - obj.client_connection_paths = message.client_connection_paths.map((e) => - e ? ConnectionPaths.toJSON(e) : undefined - ); - } else { - obj.client_connection_paths = []; - } - message.next_connection_sequence !== undefined && - (obj.next_connection_sequence = message.next_connection_sequence); - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.connections = []; - message.client_connection_paths = []; - if (object.connections !== undefined && object.connections !== null) { - for (const e of object.connections) { - message.connections.push(IdentifiedConnection.fromPartial(e)); - } - } - if ( - object.client_connection_paths !== undefined && - object.client_connection_paths !== null - ) { - for (const e of object.client_connection_paths) { - message.client_connection_paths.push(ConnectionPaths.fromPartial(e)); - } - } - if ( - object.next_connection_sequence !== undefined && - object.next_connection_sequence !== null - ) { - message.next_connection_sequence = object.next_connection_sequence; - } else { - message.next_connection_sequence = 0; - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.ts deleted file mode 100644 index dd6de9c982..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/query.ts +++ /dev/null @@ -1,1304 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - ConnectionEnd, - IdentifiedConnection, -} from "../../../../ibc/core/connection/v1/connection"; -import { - Height, - IdentifiedClientState, -} from "../../../../ibc/core/client/v1/client"; -import { - PageRequest, - PageResponse, -} from "../../../../cosmos/base/query/v1beta1/pagination"; -import { Any } from "../../../../google/protobuf/any"; - -export const protobufPackage = "ibc.core.connection.v1"; - -/** - * QueryConnectionRequest is the request type for the Query/Connection RPC - * method - */ -export interface QueryConnectionRequest { - /** connection unique identifier */ - connection_id: string; -} - -/** - * 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. - */ -export interface QueryConnectionResponse { - /** connection associated with the request identifier */ - connection: ConnectionEnd | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height: Height | undefined; -} - -/** - * QueryConnectionsRequest is the request type for the Query/Connections RPC - * method - */ -export interface QueryConnectionsRequest { - pagination: PageRequest | undefined; -} - -/** - * QueryConnectionsResponse is the response type for the Query/Connections RPC - * method. - */ -export interface QueryConnectionsResponse { - /** list of stored connections of the chain. */ - connections: IdentifiedConnection[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} - -/** - * QueryClientConnectionsRequest is the request type for the - * Query/ClientConnections RPC method - */ -export interface QueryClientConnectionsRequest { - /** client identifier associated with a connection */ - client_id: string; -} - -/** - * QueryClientConnectionsResponse is the response type for the - * Query/ClientConnections RPC method - */ -export interface QueryClientConnectionsResponse { - /** slice of all the connection paths associated with a client. */ - connection_paths: string[]; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was generated */ - proof_height: Height | undefined; -} - -/** - * QueryConnectionClientStateRequest is the request type for the - * Query/ConnectionClientState RPC method - */ -export interface QueryConnectionClientStateRequest { - /** connection identifier */ - connection_id: string; -} - -/** - * QueryConnectionClientStateResponse is the response type for the - * Query/ConnectionClientState RPC method - */ -export interface QueryConnectionClientStateResponse { - /** client state associated with the channel */ - identified_client_state: IdentifiedClientState | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height: Height | undefined; -} - -/** - * QueryConnectionConsensusStateRequest is the request type for the - * Query/ConnectionConsensusState RPC method - */ -export interface QueryConnectionConsensusStateRequest { - /** connection identifier */ - connection_id: string; - revision_number: number; - revision_height: number; -} - -/** - * QueryConnectionConsensusStateResponse is the response type for the - * Query/ConnectionConsensusState RPC method - */ -export interface QueryConnectionConsensusStateResponse { - /** consensus state associated with the channel */ - consensus_state: Any | undefined; - /** client ID associated with the consensus state */ - client_id: string; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height: Height | undefined; -} - -const baseQueryConnectionRequest: object = { connection_id: "" }; - -export const QueryConnectionRequest = { - encode( - message: QueryConnectionRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.connection_id !== "") { - writer.uint32(10).string(message.connection_id); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryConnectionRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryConnectionRequest } as QueryConnectionRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionRequest { - const message = { ...baseQueryConnectionRequest } as QueryConnectionRequest; - if (object.connection_id !== undefined && object.connection_id !== null) { - message.connection_id = String(object.connection_id); - } else { - message.connection_id = ""; - } - return message; - }, - - toJSON(message: QueryConnectionRequest): unknown { - const obj: any = {}; - message.connection_id !== undefined && - (obj.connection_id = message.connection_id); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionRequest { - const message = { ...baseQueryConnectionRequest } as QueryConnectionRequest; - if (object.connection_id !== undefined && object.connection_id !== null) { - message.connection_id = object.connection_id; - } else { - message.connection_id = ""; - } - return message; - }, -}; - -const baseQueryConnectionResponse: object = {}; - -export const QueryConnectionResponse = { - encode( - message: QueryConnectionResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.connection !== undefined) { - ConnectionEnd.encode( - message.connection, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryConnectionResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionResponse, - } as QueryConnectionResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection = ConnectionEnd.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionResponse { - const message = { - ...baseQueryConnectionResponse, - } as QueryConnectionResponse; - if (object.connection !== undefined && object.connection !== null) { - message.connection = ConnectionEnd.fromJSON(object.connection); - } else { - message.connection = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, - - toJSON(message: QueryConnectionResponse): unknown { - const obj: any = {}; - message.connection !== undefined && - (obj.connection = message.connection - ? ConnectionEnd.toJSON(message.connection) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionResponse { - const message = { - ...baseQueryConnectionResponse, - } as QueryConnectionResponse; - if (object.connection !== undefined && object.connection !== null) { - message.connection = ConnectionEnd.fromPartial(object.connection); - } else { - message.connection = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, -}; - -const baseQueryConnectionsRequest: object = {}; - -export const QueryConnectionsRequest = { - encode( - message: QueryConnectionsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryConnectionsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionsRequest, - } as QueryConnectionsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionsRequest { - const message = { - ...baseQueryConnectionsRequest, - } as QueryConnectionsRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryConnectionsRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionsRequest { - const message = { - ...baseQueryConnectionsRequest, - } as QueryConnectionsRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryConnectionsResponse: object = {}; - -export const QueryConnectionsResponse = { - encode( - message: QueryConnectionsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.connections) { - IdentifiedConnection.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConnectionsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionsResponse, - } as QueryConnectionsResponse; - message.connections = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connections.push( - IdentifiedConnection.decode(reader, reader.uint32()) - ); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionsResponse { - const message = { - ...baseQueryConnectionsResponse, - } as QueryConnectionsResponse; - message.connections = []; - if (object.connections !== undefined && object.connections !== null) { - for (const e of object.connections) { - message.connections.push(IdentifiedConnection.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromJSON(object.height); - } else { - message.height = undefined; - } - return message; - }, - - toJSON(message: QueryConnectionsResponse): unknown { - const obj: any = {}; - if (message.connections) { - obj.connections = message.connections.map((e) => - e ? IdentifiedConnection.toJSON(e) : undefined - ); - } else { - obj.connections = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - message.height !== undefined && - (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionsResponse { - const message = { - ...baseQueryConnectionsResponse, - } as QueryConnectionsResponse; - message.connections = []; - if (object.connections !== undefined && object.connections !== null) { - for (const e of object.connections) { - message.connections.push(IdentifiedConnection.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - if (object.height !== undefined && object.height !== null) { - message.height = Height.fromPartial(object.height); - } else { - message.height = undefined; - } - return message; - }, -}; - -const baseQueryClientConnectionsRequest: object = { client_id: "" }; - -export const QueryClientConnectionsRequest = { - encode( - message: QueryClientConnectionsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientConnectionsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientConnectionsRequest, - } as QueryClientConnectionsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientConnectionsRequest { - const message = { - ...baseQueryClientConnectionsRequest, - } as QueryClientConnectionsRequest; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - return message; - }, - - toJSON(message: QueryClientConnectionsRequest): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientConnectionsRequest { - const message = { - ...baseQueryClientConnectionsRequest, - } as QueryClientConnectionsRequest; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - return message; - }, -}; - -const baseQueryClientConnectionsResponse: object = { connection_paths: "" }; - -export const QueryClientConnectionsResponse = { - encode( - message: QueryClientConnectionsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.connection_paths) { - writer.uint32(10).string(v!); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryClientConnectionsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryClientConnectionsResponse, - } as QueryClientConnectionsResponse; - message.connection_paths = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_paths.push(reader.string()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryClientConnectionsResponse { - const message = { - ...baseQueryClientConnectionsResponse, - } as QueryClientConnectionsResponse; - message.connection_paths = []; - if ( - object.connection_paths !== undefined && - object.connection_paths !== null - ) { - for (const e of object.connection_paths) { - message.connection_paths.push(String(e)); - } - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, - - toJSON(message: QueryClientConnectionsResponse): unknown { - const obj: any = {}; - if (message.connection_paths) { - obj.connection_paths = message.connection_paths.map((e) => e); - } else { - obj.connection_paths = []; - } - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryClientConnectionsResponse { - const message = { - ...baseQueryClientConnectionsResponse, - } as QueryClientConnectionsResponse; - message.connection_paths = []; - if ( - object.connection_paths !== undefined && - object.connection_paths !== null - ) { - for (const e of object.connection_paths) { - message.connection_paths.push(e); - } - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, -}; - -const baseQueryConnectionClientStateRequest: object = { connection_id: "" }; - -export const QueryConnectionClientStateRequest = { - encode( - message: QueryConnectionClientStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.connection_id !== "") { - writer.uint32(10).string(message.connection_id); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConnectionClientStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionClientStateRequest, - } as QueryConnectionClientStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionClientStateRequest { - const message = { - ...baseQueryConnectionClientStateRequest, - } as QueryConnectionClientStateRequest; - if (object.connection_id !== undefined && object.connection_id !== null) { - message.connection_id = String(object.connection_id); - } else { - message.connection_id = ""; - } - return message; - }, - - toJSON(message: QueryConnectionClientStateRequest): unknown { - const obj: any = {}; - message.connection_id !== undefined && - (obj.connection_id = message.connection_id); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionClientStateRequest { - const message = { - ...baseQueryConnectionClientStateRequest, - } as QueryConnectionClientStateRequest; - if (object.connection_id !== undefined && object.connection_id !== null) { - message.connection_id = object.connection_id; - } else { - message.connection_id = ""; - } - return message; - }, -}; - -const baseQueryConnectionClientStateResponse: object = {}; - -export const QueryConnectionClientStateResponse = { - encode( - message: QueryConnectionClientStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.identified_client_state !== undefined) { - IdentifiedClientState.encode( - message.identified_client_state, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConnectionClientStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionClientStateResponse, - } as QueryConnectionClientStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identified_client_state = IdentifiedClientState.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionClientStateResponse { - const message = { - ...baseQueryConnectionClientStateResponse, - } as QueryConnectionClientStateResponse; - if ( - object.identified_client_state !== undefined && - object.identified_client_state !== null - ) { - message.identified_client_state = IdentifiedClientState.fromJSON( - object.identified_client_state - ); - } else { - message.identified_client_state = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, - - toJSON(message: QueryConnectionClientStateResponse): unknown { - const obj: any = {}; - message.identified_client_state !== undefined && - (obj.identified_client_state = message.identified_client_state - ? IdentifiedClientState.toJSON(message.identified_client_state) - : undefined); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionClientStateResponse { - const message = { - ...baseQueryConnectionClientStateResponse, - } as QueryConnectionClientStateResponse; - if ( - object.identified_client_state !== undefined && - object.identified_client_state !== null - ) { - message.identified_client_state = IdentifiedClientState.fromPartial( - object.identified_client_state - ); - } else { - message.identified_client_state = undefined; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, -}; - -const baseQueryConnectionConsensusStateRequest: object = { - connection_id: "", - revision_number: 0, - revision_height: 0, -}; - -export const QueryConnectionConsensusStateRequest = { - encode( - message: QueryConnectionConsensusStateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.connection_id !== "") { - writer.uint32(10).string(message.connection_id); - } - if (message.revision_number !== 0) { - writer.uint32(16).uint64(message.revision_number); - } - if (message.revision_height !== 0) { - writer.uint32(24).uint64(message.revision_height); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConnectionConsensusStateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionConsensusStateRequest, - } as QueryConnectionConsensusStateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - case 2: - message.revision_number = longToNumber(reader.uint64() as Long); - break; - case 3: - message.revision_height = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionConsensusStateRequest { - const message = { - ...baseQueryConnectionConsensusStateRequest, - } as QueryConnectionConsensusStateRequest; - if (object.connection_id !== undefined && object.connection_id !== null) { - message.connection_id = String(object.connection_id); - } else { - message.connection_id = ""; - } - if ( - object.revision_number !== undefined && - object.revision_number !== null - ) { - message.revision_number = Number(object.revision_number); - } else { - message.revision_number = 0; - } - if ( - object.revision_height !== undefined && - object.revision_height !== null - ) { - message.revision_height = Number(object.revision_height); - } else { - message.revision_height = 0; - } - return message; - }, - - toJSON(message: QueryConnectionConsensusStateRequest): unknown { - const obj: any = {}; - message.connection_id !== undefined && - (obj.connection_id = message.connection_id); - message.revision_number !== undefined && - (obj.revision_number = message.revision_number); - message.revision_height !== undefined && - (obj.revision_height = message.revision_height); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionConsensusStateRequest { - const message = { - ...baseQueryConnectionConsensusStateRequest, - } as QueryConnectionConsensusStateRequest; - if (object.connection_id !== undefined && object.connection_id !== null) { - message.connection_id = object.connection_id; - } else { - message.connection_id = ""; - } - if ( - object.revision_number !== undefined && - object.revision_number !== null - ) { - message.revision_number = object.revision_number; - } else { - message.revision_number = 0; - } - if ( - object.revision_height !== undefined && - object.revision_height !== null - ) { - message.revision_height = object.revision_height; - } else { - message.revision_height = 0; - } - return message; - }, -}; - -const baseQueryConnectionConsensusStateResponse: object = { client_id: "" }; - -export const QueryConnectionConsensusStateResponse = { - encode( - message: QueryConnectionConsensusStateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.consensus_state !== undefined) { - Any.encode(message.consensus_state, writer.uint32(10).fork()).ldelim(); - } - if (message.client_id !== "") { - writer.uint32(18).string(message.client_id); - } - if (message.proof.length !== 0) { - writer.uint32(26).bytes(message.proof); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryConnectionConsensusStateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryConnectionConsensusStateResponse, - } as QueryConnectionConsensusStateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensus_state = Any.decode(reader, reader.uint32()); - break; - case 2: - message.client_id = reader.string(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryConnectionConsensusStateResponse { - const message = { - ...baseQueryConnectionConsensusStateResponse, - } as QueryConnectionConsensusStateResponse; - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromJSON(object.consensus_state); - } else { - message.consensus_state = undefined; - } - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = bytesFromBase64(object.proof); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, - - toJSON(message: QueryConnectionConsensusStateResponse): unknown { - const obj: any = {}; - message.consensus_state !== undefined && - (obj.consensus_state = message.consensus_state - ? Any.toJSON(message.consensus_state) - : undefined); - message.client_id !== undefined && (obj.client_id = message.client_id); - message.proof !== undefined && - (obj.proof = base64FromBytes( - message.proof !== undefined ? message.proof : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryConnectionConsensusStateResponse { - const message = { - ...baseQueryConnectionConsensusStateResponse, - } as QueryConnectionConsensusStateResponse; - if ( - object.consensus_state !== undefined && - object.consensus_state !== null - ) { - message.consensus_state = Any.fromPartial(object.consensus_state); - } else { - message.consensus_state = undefined; - } - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if (object.proof !== undefined && object.proof !== null) { - message.proof = object.proof; - } else { - message.proof = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - return message; - }, -}; - -/** Query provides defines the gRPC querier service */ -export interface Query { - /** Connection queries an IBC connection end. */ - Connection(request: QueryConnectionRequest): Promise; - /** Connections queries all the IBC connections of a chain. */ - Connections( - request: QueryConnectionsRequest - ): Promise; - /** - * ClientConnections queries the connection paths associated with a client - * state. - */ - ClientConnections( - request: QueryClientConnectionsRequest - ): Promise; - /** - * ConnectionClientState queries the client state associated with the - * connection. - */ - ConnectionClientState( - request: QueryConnectionClientStateRequest - ): Promise; - /** - * ConnectionConsensusState queries the consensus state associated with the - * connection. - */ - ConnectionConsensusState( - request: QueryConnectionConsensusStateRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Connection( - request: QueryConnectionRequest - ): Promise { - const data = QueryConnectionRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Query", - "Connection", - data - ); - return promise.then((data) => - QueryConnectionResponse.decode(new Reader(data)) - ); - } - - Connections( - request: QueryConnectionsRequest - ): Promise { - const data = QueryConnectionsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Query", - "Connections", - data - ); - return promise.then((data) => - QueryConnectionsResponse.decode(new Reader(data)) - ); - } - - ClientConnections( - request: QueryClientConnectionsRequest - ): Promise { - const data = QueryClientConnectionsRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Query", - "ClientConnections", - data - ); - return promise.then((data) => - QueryClientConnectionsResponse.decode(new Reader(data)) - ); - } - - ConnectionClientState( - request: QueryConnectionClientStateRequest - ): Promise { - const data = QueryConnectionClientStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Query", - "ConnectionClientState", - data - ); - return promise.then((data) => - QueryConnectionClientStateResponse.decode(new Reader(data)) - ); - } - - ConnectionConsensusState( - request: QueryConnectionConsensusStateRequest - ): Promise { - const data = QueryConnectionConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Query", - "ConnectionConsensusState", - data - ); - return promise.then((data) => - QueryConnectionConsensusStateResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.ts deleted file mode 100644 index e598fe1688..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/ibc/core/connection/v1/tx.ts +++ /dev/null @@ -1,1300 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - Counterparty, - Version, -} from "../../../../ibc/core/connection/v1/connection"; -import { Any } from "../../../../google/protobuf/any"; -import { Height } from "../../../../ibc/core/client/v1/client"; - -export const protobufPackage = "ibc.core.connection.v1"; - -/** - * MsgConnectionOpenInit defines the msg sent by an account on Chain A to - * initialize a connection with Chain B. - */ -export interface MsgConnectionOpenInit { - client_id: string; - counterparty: Counterparty | undefined; - version: Version | undefined; - delay_period: number; - signer: string; -} - -/** - * MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response - * type. - */ -export interface MsgConnectionOpenInitResponse {} - -/** - * MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a - * connection on Chain B. - */ -export interface MsgConnectionOpenTry { - client_id: string; - /** - * in the case of crossing hello's, when both chains call OpenInit, we need - * the connection identifier of the previous connection in state INIT - */ - previous_connection_id: string; - client_state: Any | undefined; - counterparty: Counterparty | undefined; - delay_period: number; - counterparty_versions: Version[]; - proof_height: Height | undefined; - /** - * proof of the initialization the connection on Chain A: `UNITIALIZED -> - * INIT` - */ - proof_init: Uint8Array; - /** proof of client state included in message */ - proof_client: Uint8Array; - /** proof of client consensus state */ - proof_consensus: Uint8Array; - consensus_height: Height | undefined; - signer: string; -} - -/** MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. */ -export interface MsgConnectionOpenTryResponse {} - -/** - * MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to - * acknowledge the change of connection state to TRYOPEN on Chain B. - */ -export interface MsgConnectionOpenAck { - connection_id: string; - counterparty_connection_id: string; - version: Version | undefined; - client_state: Any | undefined; - proof_height: Height | undefined; - /** - * proof of the initialization the connection on Chain B: `UNITIALIZED -> - * TRYOPEN` - */ - proof_try: Uint8Array; - /** proof of client state included in message */ - proof_client: Uint8Array; - /** proof of client consensus state */ - proof_consensus: Uint8Array; - consensus_height: Height | undefined; - signer: string; -} - -/** MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. */ -export interface MsgConnectionOpenAckResponse {} - -/** - * MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to - * acknowledge the change of connection state to OPEN on Chain A. - */ -export interface MsgConnectionOpenConfirm { - connection_id: string; - /** proof for the change of the connection state on Chain A: `INIT -> OPEN` */ - proof_ack: Uint8Array; - proof_height: Height | undefined; - signer: string; -} - -/** - * MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm - * response type. - */ -export interface MsgConnectionOpenConfirmResponse {} - -const baseMsgConnectionOpenInit: object = { - client_id: "", - delay_period: 0, - signer: "", -}; - -export const MsgConnectionOpenInit = { - encode( - message: MsgConnectionOpenInit, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - if (message.counterparty !== undefined) { - Counterparty.encode( - message.counterparty, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.version !== undefined) { - Version.encode(message.version, writer.uint32(26).fork()).ldelim(); - } - if (message.delay_period !== 0) { - writer.uint32(32).uint64(message.delay_period); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgConnectionOpenInit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgConnectionOpenInit } as MsgConnectionOpenInit; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 3: - message.version = Version.decode(reader, reader.uint32()); - break; - case 4: - message.delay_period = longToNumber(reader.uint64() as Long); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgConnectionOpenInit { - const message = { ...baseMsgConnectionOpenInit } as MsgConnectionOpenInit; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = Version.fromJSON(object.version); - } else { - message.version = undefined; - } - if (object.delay_period !== undefined && object.delay_period !== null) { - message.delay_period = Number(object.delay_period); - } else { - message.delay_period = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgConnectionOpenInit): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - message.version !== undefined && - (obj.version = message.version - ? Version.toJSON(message.version) - : undefined); - message.delay_period !== undefined && - (obj.delay_period = message.delay_period); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgConnectionOpenInit { - const message = { ...baseMsgConnectionOpenInit } as MsgConnectionOpenInit; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.version !== undefined && object.version !== null) { - message.version = Version.fromPartial(object.version); - } else { - message.version = undefined; - } - if (object.delay_period !== undefined && object.delay_period !== null) { - message.delay_period = object.delay_period; - } else { - message.delay_period = 0; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgConnectionOpenInitResponse: object = {}; - -export const MsgConnectionOpenInitResponse = { - encode( - _: MsgConnectionOpenInitResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgConnectionOpenInitResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgConnectionOpenInitResponse, - } as MsgConnectionOpenInitResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgConnectionOpenInitResponse { - const message = { - ...baseMsgConnectionOpenInitResponse, - } as MsgConnectionOpenInitResponse; - return message; - }, - - toJSON(_: MsgConnectionOpenInitResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgConnectionOpenInitResponse { - const message = { - ...baseMsgConnectionOpenInitResponse, - } as MsgConnectionOpenInitResponse; - return message; - }, -}; - -const baseMsgConnectionOpenTry: object = { - client_id: "", - previous_connection_id: "", - delay_period: 0, - signer: "", -}; - -export const MsgConnectionOpenTry = { - encode( - message: MsgConnectionOpenTry, - writer: Writer = Writer.create() - ): Writer { - if (message.client_id !== "") { - writer.uint32(10).string(message.client_id); - } - if (message.previous_connection_id !== "") { - writer.uint32(18).string(message.previous_connection_id); - } - if (message.client_state !== undefined) { - Any.encode(message.client_state, writer.uint32(26).fork()).ldelim(); - } - if (message.counterparty !== undefined) { - Counterparty.encode( - message.counterparty, - writer.uint32(34).fork() - ).ldelim(); - } - if (message.delay_period !== 0) { - writer.uint32(40).uint64(message.delay_period); - } - for (const v of message.counterparty_versions) { - Version.encode(v!, writer.uint32(50).fork()).ldelim(); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(58).fork()).ldelim(); - } - if (message.proof_init.length !== 0) { - writer.uint32(66).bytes(message.proof_init); - } - if (message.proof_client.length !== 0) { - writer.uint32(74).bytes(message.proof_client); - } - if (message.proof_consensus.length !== 0) { - writer.uint32(82).bytes(message.proof_consensus); - } - if (message.consensus_height !== undefined) { - Height.encode( - message.consensus_height, - writer.uint32(90).fork() - ).ldelim(); - } - if (message.signer !== "") { - writer.uint32(98).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgConnectionOpenTry { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgConnectionOpenTry } as MsgConnectionOpenTry; - message.counterparty_versions = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.previous_connection_id = reader.string(); - break; - case 3: - message.client_state = Any.decode(reader, reader.uint32()); - break; - case 4: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 5: - message.delay_period = longToNumber(reader.uint64() as Long); - break; - case 6: - message.counterparty_versions.push( - Version.decode(reader, reader.uint32()) - ); - break; - case 7: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - case 8: - message.proof_init = reader.bytes(); - break; - case 9: - message.proof_client = reader.bytes(); - break; - case 10: - message.proof_consensus = reader.bytes(); - break; - case 11: - message.consensus_height = Height.decode(reader, reader.uint32()); - break; - case 12: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgConnectionOpenTry { - const message = { ...baseMsgConnectionOpenTry } as MsgConnectionOpenTry; - message.counterparty_versions = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = String(object.client_id); - } else { - message.client_id = ""; - } - if ( - object.previous_connection_id !== undefined && - object.previous_connection_id !== null - ) { - message.previous_connection_id = String(object.previous_connection_id); - } else { - message.previous_connection_id = ""; - } - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromJSON(object.client_state); - } else { - message.client_state = undefined; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromJSON(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.delay_period !== undefined && object.delay_period !== null) { - message.delay_period = Number(object.delay_period); - } else { - message.delay_period = 0; - } - if ( - object.counterparty_versions !== undefined && - object.counterparty_versions !== null - ) { - for (const e of object.counterparty_versions) { - message.counterparty_versions.push(Version.fromJSON(e)); - } - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.proof_init !== undefined && object.proof_init !== null) { - message.proof_init = bytesFromBase64(object.proof_init); - } - if (object.proof_client !== undefined && object.proof_client !== null) { - message.proof_client = bytesFromBase64(object.proof_client); - } - if ( - object.proof_consensus !== undefined && - object.proof_consensus !== null - ) { - message.proof_consensus = bytesFromBase64(object.proof_consensus); - } - if ( - object.consensus_height !== undefined && - object.consensus_height !== null - ) { - message.consensus_height = Height.fromJSON(object.consensus_height); - } else { - message.consensus_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgConnectionOpenTry): unknown { - const obj: any = {}; - message.client_id !== undefined && (obj.client_id = message.client_id); - message.previous_connection_id !== undefined && - (obj.previous_connection_id = message.previous_connection_id); - message.client_state !== undefined && - (obj.client_state = message.client_state - ? Any.toJSON(message.client_state) - : undefined); - message.counterparty !== undefined && - (obj.counterparty = message.counterparty - ? Counterparty.toJSON(message.counterparty) - : undefined); - message.delay_period !== undefined && - (obj.delay_period = message.delay_period); - if (message.counterparty_versions) { - obj.counterparty_versions = message.counterparty_versions.map((e) => - e ? Version.toJSON(e) : undefined - ); - } else { - obj.counterparty_versions = []; - } - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - message.proof_init !== undefined && - (obj.proof_init = base64FromBytes( - message.proof_init !== undefined ? message.proof_init : new Uint8Array() - )); - message.proof_client !== undefined && - (obj.proof_client = base64FromBytes( - message.proof_client !== undefined - ? message.proof_client - : new Uint8Array() - )); - message.proof_consensus !== undefined && - (obj.proof_consensus = base64FromBytes( - message.proof_consensus !== undefined - ? message.proof_consensus - : new Uint8Array() - )); - message.consensus_height !== undefined && - (obj.consensus_height = message.consensus_height - ? Height.toJSON(message.consensus_height) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgConnectionOpenTry { - const message = { ...baseMsgConnectionOpenTry } as MsgConnectionOpenTry; - message.counterparty_versions = []; - if (object.client_id !== undefined && object.client_id !== null) { - message.client_id = object.client_id; - } else { - message.client_id = ""; - } - if ( - object.previous_connection_id !== undefined && - object.previous_connection_id !== null - ) { - message.previous_connection_id = object.previous_connection_id; - } else { - message.previous_connection_id = ""; - } - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromPartial(object.client_state); - } else { - message.client_state = undefined; - } - if (object.counterparty !== undefined && object.counterparty !== null) { - message.counterparty = Counterparty.fromPartial(object.counterparty); - } else { - message.counterparty = undefined; - } - if (object.delay_period !== undefined && object.delay_period !== null) { - message.delay_period = object.delay_period; - } else { - message.delay_period = 0; - } - if ( - object.counterparty_versions !== undefined && - object.counterparty_versions !== null - ) { - for (const e of object.counterparty_versions) { - message.counterparty_versions.push(Version.fromPartial(e)); - } - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.proof_init !== undefined && object.proof_init !== null) { - message.proof_init = object.proof_init; - } else { - message.proof_init = new Uint8Array(); - } - if (object.proof_client !== undefined && object.proof_client !== null) { - message.proof_client = object.proof_client; - } else { - message.proof_client = new Uint8Array(); - } - if ( - object.proof_consensus !== undefined && - object.proof_consensus !== null - ) { - message.proof_consensus = object.proof_consensus; - } else { - message.proof_consensus = new Uint8Array(); - } - if ( - object.consensus_height !== undefined && - object.consensus_height !== null - ) { - message.consensus_height = Height.fromPartial(object.consensus_height); - } else { - message.consensus_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgConnectionOpenTryResponse: object = {}; - -export const MsgConnectionOpenTryResponse = { - encode( - _: MsgConnectionOpenTryResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgConnectionOpenTryResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgConnectionOpenTryResponse, - } as MsgConnectionOpenTryResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgConnectionOpenTryResponse { - const message = { - ...baseMsgConnectionOpenTryResponse, - } as MsgConnectionOpenTryResponse; - return message; - }, - - toJSON(_: MsgConnectionOpenTryResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgConnectionOpenTryResponse { - const message = { - ...baseMsgConnectionOpenTryResponse, - } as MsgConnectionOpenTryResponse; - return message; - }, -}; - -const baseMsgConnectionOpenAck: object = { - connection_id: "", - counterparty_connection_id: "", - signer: "", -}; - -export const MsgConnectionOpenAck = { - encode( - message: MsgConnectionOpenAck, - writer: Writer = Writer.create() - ): Writer { - if (message.connection_id !== "") { - writer.uint32(10).string(message.connection_id); - } - if (message.counterparty_connection_id !== "") { - writer.uint32(18).string(message.counterparty_connection_id); - } - if (message.version !== undefined) { - Version.encode(message.version, writer.uint32(26).fork()).ldelim(); - } - if (message.client_state !== undefined) { - Any.encode(message.client_state, writer.uint32(34).fork()).ldelim(); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(42).fork()).ldelim(); - } - if (message.proof_try.length !== 0) { - writer.uint32(50).bytes(message.proof_try); - } - if (message.proof_client.length !== 0) { - writer.uint32(58).bytes(message.proof_client); - } - if (message.proof_consensus.length !== 0) { - writer.uint32(66).bytes(message.proof_consensus); - } - if (message.consensus_height !== undefined) { - Height.encode( - message.consensus_height, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.signer !== "") { - writer.uint32(82).string(message.signer); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgConnectionOpenAck { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgConnectionOpenAck } as MsgConnectionOpenAck; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - case 2: - message.counterparty_connection_id = reader.string(); - break; - case 3: - message.version = Version.decode(reader, reader.uint32()); - break; - case 4: - message.client_state = Any.decode(reader, reader.uint32()); - break; - case 5: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - case 6: - message.proof_try = reader.bytes(); - break; - case 7: - message.proof_client = reader.bytes(); - break; - case 8: - message.proof_consensus = reader.bytes(); - break; - case 9: - message.consensus_height = Height.decode(reader, reader.uint32()); - break; - case 10: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgConnectionOpenAck { - const message = { ...baseMsgConnectionOpenAck } as MsgConnectionOpenAck; - if (object.connection_id !== undefined && object.connection_id !== null) { - message.connection_id = String(object.connection_id); - } else { - message.connection_id = ""; - } - if ( - object.counterparty_connection_id !== undefined && - object.counterparty_connection_id !== null - ) { - message.counterparty_connection_id = String( - object.counterparty_connection_id - ); - } else { - message.counterparty_connection_id = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = Version.fromJSON(object.version); - } else { - message.version = undefined; - } - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromJSON(object.client_state); - } else { - message.client_state = undefined; - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.proof_try !== undefined && object.proof_try !== null) { - message.proof_try = bytesFromBase64(object.proof_try); - } - if (object.proof_client !== undefined && object.proof_client !== null) { - message.proof_client = bytesFromBase64(object.proof_client); - } - if ( - object.proof_consensus !== undefined && - object.proof_consensus !== null - ) { - message.proof_consensus = bytesFromBase64(object.proof_consensus); - } - if ( - object.consensus_height !== undefined && - object.consensus_height !== null - ) { - message.consensus_height = Height.fromJSON(object.consensus_height); - } else { - message.consensus_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgConnectionOpenAck): unknown { - const obj: any = {}; - message.connection_id !== undefined && - (obj.connection_id = message.connection_id); - message.counterparty_connection_id !== undefined && - (obj.counterparty_connection_id = message.counterparty_connection_id); - message.version !== undefined && - (obj.version = message.version - ? Version.toJSON(message.version) - : undefined); - message.client_state !== undefined && - (obj.client_state = message.client_state - ? Any.toJSON(message.client_state) - : undefined); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - message.proof_try !== undefined && - (obj.proof_try = base64FromBytes( - message.proof_try !== undefined ? message.proof_try : new Uint8Array() - )); - message.proof_client !== undefined && - (obj.proof_client = base64FromBytes( - message.proof_client !== undefined - ? message.proof_client - : new Uint8Array() - )); - message.proof_consensus !== undefined && - (obj.proof_consensus = base64FromBytes( - message.proof_consensus !== undefined - ? message.proof_consensus - : new Uint8Array() - )); - message.consensus_height !== undefined && - (obj.consensus_height = message.consensus_height - ? Height.toJSON(message.consensus_height) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial(object: DeepPartial): MsgConnectionOpenAck { - const message = { ...baseMsgConnectionOpenAck } as MsgConnectionOpenAck; - if (object.connection_id !== undefined && object.connection_id !== null) { - message.connection_id = object.connection_id; - } else { - message.connection_id = ""; - } - if ( - object.counterparty_connection_id !== undefined && - object.counterparty_connection_id !== null - ) { - message.counterparty_connection_id = object.counterparty_connection_id; - } else { - message.counterparty_connection_id = ""; - } - if (object.version !== undefined && object.version !== null) { - message.version = Version.fromPartial(object.version); - } else { - message.version = undefined; - } - if (object.client_state !== undefined && object.client_state !== null) { - message.client_state = Any.fromPartial(object.client_state); - } else { - message.client_state = undefined; - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.proof_try !== undefined && object.proof_try !== null) { - message.proof_try = object.proof_try; - } else { - message.proof_try = new Uint8Array(); - } - if (object.proof_client !== undefined && object.proof_client !== null) { - message.proof_client = object.proof_client; - } else { - message.proof_client = new Uint8Array(); - } - if ( - object.proof_consensus !== undefined && - object.proof_consensus !== null - ) { - message.proof_consensus = object.proof_consensus; - } else { - message.proof_consensus = new Uint8Array(); - } - if ( - object.consensus_height !== undefined && - object.consensus_height !== null - ) { - message.consensus_height = Height.fromPartial(object.consensus_height); - } else { - message.consensus_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgConnectionOpenAckResponse: object = {}; - -export const MsgConnectionOpenAckResponse = { - encode( - _: MsgConnectionOpenAckResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgConnectionOpenAckResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgConnectionOpenAckResponse, - } as MsgConnectionOpenAckResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgConnectionOpenAckResponse { - const message = { - ...baseMsgConnectionOpenAckResponse, - } as MsgConnectionOpenAckResponse; - return message; - }, - - toJSON(_: MsgConnectionOpenAckResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgConnectionOpenAckResponse { - const message = { - ...baseMsgConnectionOpenAckResponse, - } as MsgConnectionOpenAckResponse; - return message; - }, -}; - -const baseMsgConnectionOpenConfirm: object = { connection_id: "", signer: "" }; - -export const MsgConnectionOpenConfirm = { - encode( - message: MsgConnectionOpenConfirm, - writer: Writer = Writer.create() - ): Writer { - if (message.connection_id !== "") { - writer.uint32(10).string(message.connection_id); - } - if (message.proof_ack.length !== 0) { - writer.uint32(18).bytes(message.proof_ack); - } - if (message.proof_height !== undefined) { - Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(34).string(message.signer); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgConnectionOpenConfirm { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgConnectionOpenConfirm, - } as MsgConnectionOpenConfirm; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - case 2: - message.proof_ack = reader.bytes(); - break; - case 3: - message.proof_height = Height.decode(reader, reader.uint32()); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgConnectionOpenConfirm { - const message = { - ...baseMsgConnectionOpenConfirm, - } as MsgConnectionOpenConfirm; - if (object.connection_id !== undefined && object.connection_id !== null) { - message.connection_id = String(object.connection_id); - } else { - message.connection_id = ""; - } - if (object.proof_ack !== undefined && object.proof_ack !== null) { - message.proof_ack = bytesFromBase64(object.proof_ack); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromJSON(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = String(object.signer); - } else { - message.signer = ""; - } - return message; - }, - - toJSON(message: MsgConnectionOpenConfirm): unknown { - const obj: any = {}; - message.connection_id !== undefined && - (obj.connection_id = message.connection_id); - message.proof_ack !== undefined && - (obj.proof_ack = base64FromBytes( - message.proof_ack !== undefined ? message.proof_ack : new Uint8Array() - )); - message.proof_height !== undefined && - (obj.proof_height = message.proof_height - ? Height.toJSON(message.proof_height) - : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgConnectionOpenConfirm { - const message = { - ...baseMsgConnectionOpenConfirm, - } as MsgConnectionOpenConfirm; - if (object.connection_id !== undefined && object.connection_id !== null) { - message.connection_id = object.connection_id; - } else { - message.connection_id = ""; - } - if (object.proof_ack !== undefined && object.proof_ack !== null) { - message.proof_ack = object.proof_ack; - } else { - message.proof_ack = new Uint8Array(); - } - if (object.proof_height !== undefined && object.proof_height !== null) { - message.proof_height = Height.fromPartial(object.proof_height); - } else { - message.proof_height = undefined; - } - if (object.signer !== undefined && object.signer !== null) { - message.signer = object.signer; - } else { - message.signer = ""; - } - return message; - }, -}; - -const baseMsgConnectionOpenConfirmResponse: object = {}; - -export const MsgConnectionOpenConfirmResponse = { - encode( - _: MsgConnectionOpenConfirmResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgConnectionOpenConfirmResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgConnectionOpenConfirmResponse, - } as MsgConnectionOpenConfirmResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgConnectionOpenConfirmResponse { - const message = { - ...baseMsgConnectionOpenConfirmResponse, - } as MsgConnectionOpenConfirmResponse; - return message; - }, - - toJSON(_: MsgConnectionOpenConfirmResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgConnectionOpenConfirmResponse { - const message = { - ...baseMsgConnectionOpenConfirmResponse, - } as MsgConnectionOpenConfirmResponse; - return message; - }, -}; - -/** Msg defines the ibc/connection Msg service. */ -export interface Msg { - /** ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. */ - ConnectionOpenInit( - request: MsgConnectionOpenInit - ): Promise; - /** ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. */ - ConnectionOpenTry( - request: MsgConnectionOpenTry - ): Promise; - /** ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. */ - ConnectionOpenAck( - request: MsgConnectionOpenAck - ): Promise; - /** - * ConnectionOpenConfirm defines a rpc handler method for - * MsgConnectionOpenConfirm. - */ - ConnectionOpenConfirm( - request: MsgConnectionOpenConfirm - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - ConnectionOpenInit( - request: MsgConnectionOpenInit - ): Promise { - const data = MsgConnectionOpenInit.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Msg", - "ConnectionOpenInit", - data - ); - return promise.then((data) => - MsgConnectionOpenInitResponse.decode(new Reader(data)) - ); - } - - ConnectionOpenTry( - request: MsgConnectionOpenTry - ): Promise { - const data = MsgConnectionOpenTry.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Msg", - "ConnectionOpenTry", - data - ); - return promise.then((data) => - MsgConnectionOpenTryResponse.decode(new Reader(data)) - ); - } - - ConnectionOpenAck( - request: MsgConnectionOpenAck - ): Promise { - const data = MsgConnectionOpenAck.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Msg", - "ConnectionOpenAck", - data - ); - return promise.then((data) => - MsgConnectionOpenAckResponse.decode(new Reader(data)) - ); - } - - ConnectionOpenConfirm( - request: MsgConnectionOpenConfirm - ): Promise { - const data = MsgConnectionOpenConfirm.encode(request).finish(); - const promise = this.rpc.request( - "ibc.core.connection.v1.Msg", - "ConnectionOpenConfirm", - data - ); - return promise.then((data) => - MsgConnectionOpenConfirmResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/proofs.ts b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/proofs.ts deleted file mode 100644 index 86dd3c215a..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/module/types/proofs.ts +++ /dev/null @@ -1,1831 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "ics23"; - -export enum HashOp { - /** NO_HASH - NO_HASH is the default if no data passed. Note this is an illegal argument some places. */ - NO_HASH = 0, - SHA256 = 1, - SHA512 = 2, - KECCAK = 3, - RIPEMD160 = 4, - /** BITCOIN - ripemd160(sha256(x)) */ - BITCOIN = 5, - UNRECOGNIZED = -1, -} - -export function hashOpFromJSON(object: any): HashOp { - switch (object) { - case 0: - case "NO_HASH": - return HashOp.NO_HASH; - case 1: - case "SHA256": - return HashOp.SHA256; - case 2: - case "SHA512": - return HashOp.SHA512; - case 3: - case "KECCAK": - return HashOp.KECCAK; - case 4: - case "RIPEMD160": - return HashOp.RIPEMD160; - case 5: - case "BITCOIN": - return HashOp.BITCOIN; - case -1: - case "UNRECOGNIZED": - default: - return HashOp.UNRECOGNIZED; - } -} - -export function hashOpToJSON(object: HashOp): string { - switch (object) { - case HashOp.NO_HASH: - return "NO_HASH"; - case HashOp.SHA256: - return "SHA256"; - case HashOp.SHA512: - return "SHA512"; - case HashOp.KECCAK: - return "KECCAK"; - case HashOp.RIPEMD160: - return "RIPEMD160"; - case HashOp.BITCOIN: - return "BITCOIN"; - default: - return "UNKNOWN"; - } -} - -/** - * LengthOp defines how to process the key and value of the LeafOp - * to include length information. After encoding the length with the given - * algorithm, the length will be prepended to the key and value bytes. - * (Each one with it's own encoded length) - */ -export enum LengthOp { - /** NO_PREFIX - NO_PREFIX don't include any length info */ - NO_PREFIX = 0, - /** VAR_PROTO - VAR_PROTO uses protobuf (and go-amino) varint encoding of the length */ - VAR_PROTO = 1, - /** VAR_RLP - VAR_RLP uses rlp int encoding of the length */ - VAR_RLP = 2, - /** FIXED32_BIG - FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer */ - FIXED32_BIG = 3, - /** FIXED32_LITTLE - FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer */ - FIXED32_LITTLE = 4, - /** FIXED64_BIG - FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer */ - FIXED64_BIG = 5, - /** FIXED64_LITTLE - FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer */ - FIXED64_LITTLE = 6, - /** REQUIRE_32_BYTES - REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) */ - REQUIRE_32_BYTES = 7, - /** REQUIRE_64_BYTES - REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) */ - REQUIRE_64_BYTES = 8, - UNRECOGNIZED = -1, -} - -export function lengthOpFromJSON(object: any): LengthOp { - switch (object) { - case 0: - case "NO_PREFIX": - return LengthOp.NO_PREFIX; - case 1: - case "VAR_PROTO": - return LengthOp.VAR_PROTO; - case 2: - case "VAR_RLP": - return LengthOp.VAR_RLP; - case 3: - case "FIXED32_BIG": - return LengthOp.FIXED32_BIG; - case 4: - case "FIXED32_LITTLE": - return LengthOp.FIXED32_LITTLE; - case 5: - case "FIXED64_BIG": - return LengthOp.FIXED64_BIG; - case 6: - case "FIXED64_LITTLE": - return LengthOp.FIXED64_LITTLE; - case 7: - case "REQUIRE_32_BYTES": - return LengthOp.REQUIRE_32_BYTES; - case 8: - case "REQUIRE_64_BYTES": - return LengthOp.REQUIRE_64_BYTES; - case -1: - case "UNRECOGNIZED": - default: - return LengthOp.UNRECOGNIZED; - } -} - -export function lengthOpToJSON(object: LengthOp): string { - switch (object) { - case LengthOp.NO_PREFIX: - return "NO_PREFIX"; - case LengthOp.VAR_PROTO: - return "VAR_PROTO"; - case LengthOp.VAR_RLP: - return "VAR_RLP"; - case LengthOp.FIXED32_BIG: - return "FIXED32_BIG"; - case LengthOp.FIXED32_LITTLE: - return "FIXED32_LITTLE"; - case LengthOp.FIXED64_BIG: - return "FIXED64_BIG"; - case LengthOp.FIXED64_LITTLE: - return "FIXED64_LITTLE"; - case LengthOp.REQUIRE_32_BYTES: - return "REQUIRE_32_BYTES"; - case LengthOp.REQUIRE_64_BYTES: - return "REQUIRE_64_BYTES"; - default: - return "UNKNOWN"; - } -} - -/** - * ExistenceProof takes a key and a value and a set of steps to perform on it. - * The result of peforming all these steps will provide a "root hash", which can - * be compared to the value in a header. - * - * Since it is computationally infeasible to produce a hash collission for any of the used - * cryptographic hash functions, if someone can provide a series of operations to transform - * a given key and value into a root hash that matches some trusted root, these key and values - * must be in the referenced merkle tree. - * - * The only possible issue is maliablity in LeafOp, such as providing extra prefix data, - * which should be controlled by a spec. Eg. with lengthOp as NONE, - * prefix = FOO, key = BAR, value = CHOICE - * and - * prefix = F, key = OOBAR, value = CHOICE - * would produce the same value. - * - * With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field - * in the ProofSpec is valuable to prevent this mutability. And why all trees should - * length-prefix the data before hashing it. - */ -export interface ExistenceProof { - key: Uint8Array; - value: Uint8Array; - leaf: LeafOp | undefined; - path: InnerOp[]; -} - -/** - * NonExistenceProof takes a proof of two neighbors, one left of the desired key, - * one right of the desired key. If both proofs are valid AND they are neighbors, - * then there is no valid proof for the given key. - */ -export interface NonExistenceProof { - /** TODO: remove this as unnecessary??? we prove a range */ - key: Uint8Array; - left: ExistenceProof | undefined; - right: ExistenceProof | undefined; -} - -/** CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages */ -export interface CommitmentProof { - exist: ExistenceProof | undefined; - nonexist: NonExistenceProof | undefined; - batch: BatchProof | undefined; - compressed: CompressedBatchProof | undefined; -} - -/** - * LeafOp represents the raw key-value data we wish to prove, and - * must be flexible to represent the internal transformation from - * the original key-value pairs into the basis hash, for many existing - * merkle trees. - * - * key and value are passed in. So that the signature of this operation is: - * leafOp(key, value) -> output - * - * To process this, first prehash the keys and values if needed (ANY means no hash in this case): - * hkey = prehashKey(key) - * hvalue = prehashValue(value) - * - * Then combine the bytes, and hash it - * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) - */ -export interface LeafOp { - hash: HashOp; - prehash_key: HashOp; - prehash_value: HashOp; - length: LengthOp; - /** - * prefix is a fixed bytes that may optionally be included at the beginning to differentiate - * a leaf node from an inner node. - */ - prefix: Uint8Array; -} - -/** - * InnerOp represents a merkle-proof step that is not a leaf. - * It represents concatenating two children and hashing them to provide the next result. - * - * The result of the previous step is passed in, so the signature of this op is: - * innerOp(child) -> output - * - * The result of applying InnerOp should be: - * output = op.hash(op.prefix || child || op.suffix) - * - * where the || operator is concatenation of binary data, - * and child is the result of hashing all the tree below this step. - * - * Any special data, like prepending child with the length, or prepending the entire operation with - * some value to differentiate from leaf nodes, should be included in prefix and suffix. - * If either of prefix or suffix is empty, we just treat it as an empty string - */ -export interface InnerOp { - hash: HashOp; - prefix: Uint8Array; - suffix: Uint8Array; -} - -/** - * ProofSpec defines what the expected parameters are for a given proof type. - * This can be stored in the client and used to validate any incoming proofs. - * - * verify(ProofSpec, Proof) -> Proof | Error - * - * As demonstrated in tests, if we don't fix the algorithm used to calculate the - * LeafHash for a given tree, there are many possible key-value pairs that can - * generate a given hash (by interpretting the preimage differently). - * We need this for proper security, requires client knows a priori what - * tree format server uses. But not in code, rather a configuration object. - */ -export interface ProofSpec { - /** - * any field in the ExistenceProof must be the same as in this spec. - * except Prefix, which is just the first bytes of prefix (spec can be longer) - */ - leaf_spec: LeafOp | undefined; - inner_spec: InnerSpec | undefined; - /** max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) */ - max_depth: number; - /** min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) */ - min_depth: number; -} - -/** - * InnerSpec contains all store-specific structure info to determine if two proofs from a - * given store are neighbors. - * - * This enables: - * - * isLeftMost(spec: InnerSpec, op: InnerOp) - * isRightMost(spec: InnerSpec, op: InnerOp) - * isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) - */ -export interface InnerSpec { - /** - * Child order is the ordering of the children node, must count from 0 - * iavl tree is [0, 1] (left then right) - * merk is [0, 2, 1] (left, right, here) - */ - child_order: number[]; - child_size: number; - min_prefix_length: number; - max_prefix_length: number; - /** empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) */ - empty_child: Uint8Array; - /** hash is the algorithm that must be used for each InnerOp */ - hash: HashOp; -} - -/** BatchProof is a group of multiple proof types than can be compressed */ -export interface BatchProof { - entries: BatchEntry[]; -} - -/** Use BatchEntry not CommitmentProof, to avoid recursion */ -export interface BatchEntry { - exist: ExistenceProof | undefined; - nonexist: NonExistenceProof | undefined; -} - -export interface CompressedBatchProof { - entries: CompressedBatchEntry[]; - lookup_inners: InnerOp[]; -} - -/** Use BatchEntry not CommitmentProof, to avoid recursion */ -export interface CompressedBatchEntry { - exist: CompressedExistenceProof | undefined; - nonexist: CompressedNonExistenceProof | undefined; -} - -export interface CompressedExistenceProof { - key: Uint8Array; - value: Uint8Array; - leaf: LeafOp | undefined; - /** these are indexes into the lookup_inners table in CompressedBatchProof */ - path: number[]; -} - -export interface CompressedNonExistenceProof { - /** TODO: remove this as unnecessary??? we prove a range */ - key: Uint8Array; - left: CompressedExistenceProof | undefined; - right: CompressedExistenceProof | undefined; -} - -const baseExistenceProof: object = {}; - -export const ExistenceProof = { - encode(message: ExistenceProof, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (message.leaf !== undefined) { - LeafOp.encode(message.leaf, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.path) { - InnerOp.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExistenceProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExistenceProof } as ExistenceProof; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.leaf = LeafOp.decode(reader, reader.uint32()); - break; - case 4: - message.path.push(InnerOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExistenceProof { - const message = { ...baseExistenceProof } as ExistenceProof; - message.path = []; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.leaf !== undefined && object.leaf !== null) { - message.leaf = LeafOp.fromJSON(object.leaf); - } else { - message.leaf = undefined; - } - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(InnerOp.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExistenceProof): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - message.leaf !== undefined && - (obj.leaf = message.leaf ? LeafOp.toJSON(message.leaf) : undefined); - if (message.path) { - obj.path = message.path.map((e) => (e ? InnerOp.toJSON(e) : undefined)); - } else { - obj.path = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ExistenceProof { - const message = { ...baseExistenceProof } as ExistenceProof; - message.path = []; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - if (object.leaf !== undefined && object.leaf !== null) { - message.leaf = LeafOp.fromPartial(object.leaf); - } else { - message.leaf = undefined; - } - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(InnerOp.fromPartial(e)); - } - } - return message; - }, -}; - -const baseNonExistenceProof: object = {}; - -export const NonExistenceProof = { - encode(message: NonExistenceProof, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.left !== undefined) { - ExistenceProof.encode(message.left, writer.uint32(18).fork()).ldelim(); - } - if (message.right !== undefined) { - ExistenceProof.encode(message.right, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): NonExistenceProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseNonExistenceProof } as NonExistenceProof; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.left = ExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.right = ExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): NonExistenceProof { - const message = { ...baseNonExistenceProof } as NonExistenceProof; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.left !== undefined && object.left !== null) { - message.left = ExistenceProof.fromJSON(object.left); - } else { - message.left = undefined; - } - if (object.right !== undefined && object.right !== null) { - message.right = ExistenceProof.fromJSON(object.right); - } else { - message.right = undefined; - } - return message; - }, - - toJSON(message: NonExistenceProof): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.left !== undefined && - (obj.left = message.left - ? ExistenceProof.toJSON(message.left) - : undefined); - message.right !== undefined && - (obj.right = message.right - ? ExistenceProof.toJSON(message.right) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): NonExistenceProof { - const message = { ...baseNonExistenceProof } as NonExistenceProof; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.left !== undefined && object.left !== null) { - message.left = ExistenceProof.fromPartial(object.left); - } else { - message.left = undefined; - } - if (object.right !== undefined && object.right !== null) { - message.right = ExistenceProof.fromPartial(object.right); - } else { - message.right = undefined; - } - return message; - }, -}; - -const baseCommitmentProof: object = {}; - -export const CommitmentProof = { - encode(message: CommitmentProof, writer: Writer = Writer.create()): Writer { - if (message.exist !== undefined) { - ExistenceProof.encode(message.exist, writer.uint32(10).fork()).ldelim(); - } - if (message.nonexist !== undefined) { - NonExistenceProof.encode( - message.nonexist, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.batch !== undefined) { - BatchProof.encode(message.batch, writer.uint32(26).fork()).ldelim(); - } - if (message.compressed !== undefined) { - CompressedBatchProof.encode( - message.compressed, - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CommitmentProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommitmentProof } as CommitmentProof; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = ExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = NonExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.batch = BatchProof.decode(reader, reader.uint32()); - break; - case 4: - message.compressed = CompressedBatchProof.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CommitmentProof { - const message = { ...baseCommitmentProof } as CommitmentProof; - if (object.exist !== undefined && object.exist !== null) { - message.exist = ExistenceProof.fromJSON(object.exist); - } else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = NonExistenceProof.fromJSON(object.nonexist); - } else { - message.nonexist = undefined; - } - if (object.batch !== undefined && object.batch !== null) { - message.batch = BatchProof.fromJSON(object.batch); - } else { - message.batch = undefined; - } - if (object.compressed !== undefined && object.compressed !== null) { - message.compressed = CompressedBatchProof.fromJSON(object.compressed); - } else { - message.compressed = undefined; - } - return message; - }, - - toJSON(message: CommitmentProof): unknown { - const obj: any = {}; - message.exist !== undefined && - (obj.exist = message.exist - ? ExistenceProof.toJSON(message.exist) - : undefined); - message.nonexist !== undefined && - (obj.nonexist = message.nonexist - ? NonExistenceProof.toJSON(message.nonexist) - : undefined); - message.batch !== undefined && - (obj.batch = message.batch - ? BatchProof.toJSON(message.batch) - : undefined); - message.compressed !== undefined && - (obj.compressed = message.compressed - ? CompressedBatchProof.toJSON(message.compressed) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): CommitmentProof { - const message = { ...baseCommitmentProof } as CommitmentProof; - if (object.exist !== undefined && object.exist !== null) { - message.exist = ExistenceProof.fromPartial(object.exist); - } else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = NonExistenceProof.fromPartial(object.nonexist); - } else { - message.nonexist = undefined; - } - if (object.batch !== undefined && object.batch !== null) { - message.batch = BatchProof.fromPartial(object.batch); - } else { - message.batch = undefined; - } - if (object.compressed !== undefined && object.compressed !== null) { - message.compressed = CompressedBatchProof.fromPartial(object.compressed); - } else { - message.compressed = undefined; - } - return message; - }, -}; - -const baseLeafOp: object = { - hash: 0, - prehash_key: 0, - prehash_value: 0, - length: 0, -}; - -export const LeafOp = { - encode(message: LeafOp, writer: Writer = Writer.create()): Writer { - if (message.hash !== 0) { - writer.uint32(8).int32(message.hash); - } - if (message.prehash_key !== 0) { - writer.uint32(16).int32(message.prehash_key); - } - if (message.prehash_value !== 0) { - writer.uint32(24).int32(message.prehash_value); - } - if (message.length !== 0) { - writer.uint32(32).int32(message.length); - } - if (message.prefix.length !== 0) { - writer.uint32(42).bytes(message.prefix); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): LeafOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLeafOp } as LeafOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.int32() as any; - break; - case 2: - message.prehash_key = reader.int32() as any; - break; - case 3: - message.prehash_value = reader.int32() as any; - break; - case 4: - message.length = reader.int32() as any; - break; - case 5: - message.prefix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LeafOp { - const message = { ...baseLeafOp } as LeafOp; - if (object.hash !== undefined && object.hash !== null) { - message.hash = hashOpFromJSON(object.hash); - } else { - message.hash = 0; - } - if (object.prehash_key !== undefined && object.prehash_key !== null) { - message.prehash_key = hashOpFromJSON(object.prehash_key); - } else { - message.prehash_key = 0; - } - if (object.prehash_value !== undefined && object.prehash_value !== null) { - message.prehash_value = hashOpFromJSON(object.prehash_value); - } else { - message.prehash_value = 0; - } - if (object.length !== undefined && object.length !== null) { - message.length = lengthOpFromJSON(object.length); - } else { - message.length = 0; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = bytesFromBase64(object.prefix); - } - return message; - }, - - toJSON(message: LeafOp): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash)); - message.prehash_key !== undefined && - (obj.prehash_key = hashOpToJSON(message.prehash_key)); - message.prehash_value !== undefined && - (obj.prehash_value = hashOpToJSON(message.prehash_value)); - message.length !== undefined && - (obj.length = lengthOpToJSON(message.length)); - message.prefix !== undefined && - (obj.prefix = base64FromBytes( - message.prefix !== undefined ? message.prefix : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): LeafOp { - const message = { ...baseLeafOp } as LeafOp; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = 0; - } - if (object.prehash_key !== undefined && object.prehash_key !== null) { - message.prehash_key = object.prehash_key; - } else { - message.prehash_key = 0; - } - if (object.prehash_value !== undefined && object.prehash_value !== null) { - message.prehash_value = object.prehash_value; - } else { - message.prehash_value = 0; - } - if (object.length !== undefined && object.length !== null) { - message.length = object.length; - } else { - message.length = 0; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = object.prefix; - } else { - message.prefix = new Uint8Array(); - } - return message; - }, -}; - -const baseInnerOp: object = { hash: 0 }; - -export const InnerOp = { - encode(message: InnerOp, writer: Writer = Writer.create()): Writer { - if (message.hash !== 0) { - writer.uint32(8).int32(message.hash); - } - if (message.prefix.length !== 0) { - writer.uint32(18).bytes(message.prefix); - } - if (message.suffix.length !== 0) { - writer.uint32(26).bytes(message.suffix); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): InnerOp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseInnerOp } as InnerOp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.int32() as any; - break; - case 2: - message.prefix = reader.bytes(); - break; - case 3: - message.suffix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): InnerOp { - const message = { ...baseInnerOp } as InnerOp; - if (object.hash !== undefined && object.hash !== null) { - message.hash = hashOpFromJSON(object.hash); - } else { - message.hash = 0; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = bytesFromBase64(object.prefix); - } - if (object.suffix !== undefined && object.suffix !== null) { - message.suffix = bytesFromBase64(object.suffix); - } - return message; - }, - - toJSON(message: InnerOp): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash)); - message.prefix !== undefined && - (obj.prefix = base64FromBytes( - message.prefix !== undefined ? message.prefix : new Uint8Array() - )); - message.suffix !== undefined && - (obj.suffix = base64FromBytes( - message.suffix !== undefined ? message.suffix : new Uint8Array() - )); - return obj; - }, - - fromPartial(object: DeepPartial): InnerOp { - const message = { ...baseInnerOp } as InnerOp; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = 0; - } - if (object.prefix !== undefined && object.prefix !== null) { - message.prefix = object.prefix; - } else { - message.prefix = new Uint8Array(); - } - if (object.suffix !== undefined && object.suffix !== null) { - message.suffix = object.suffix; - } else { - message.suffix = new Uint8Array(); - } - return message; - }, -}; - -const baseProofSpec: object = { max_depth: 0, min_depth: 0 }; - -export const ProofSpec = { - encode(message: ProofSpec, writer: Writer = Writer.create()): Writer { - if (message.leaf_spec !== undefined) { - LeafOp.encode(message.leaf_spec, writer.uint32(10).fork()).ldelim(); - } - if (message.inner_spec !== undefined) { - InnerSpec.encode(message.inner_spec, writer.uint32(18).fork()).ldelim(); - } - if (message.max_depth !== 0) { - writer.uint32(24).int32(message.max_depth); - } - if (message.min_depth !== 0) { - writer.uint32(32).int32(message.min_depth); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ProofSpec { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseProofSpec } as ProofSpec; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.leaf_spec = LeafOp.decode(reader, reader.uint32()); - break; - case 2: - message.inner_spec = InnerSpec.decode(reader, reader.uint32()); - break; - case 3: - message.max_depth = reader.int32(); - break; - case 4: - message.min_depth = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ProofSpec { - const message = { ...baseProofSpec } as ProofSpec; - if (object.leaf_spec !== undefined && object.leaf_spec !== null) { - message.leaf_spec = LeafOp.fromJSON(object.leaf_spec); - } else { - message.leaf_spec = undefined; - } - if (object.inner_spec !== undefined && object.inner_spec !== null) { - message.inner_spec = InnerSpec.fromJSON(object.inner_spec); - } else { - message.inner_spec = undefined; - } - if (object.max_depth !== undefined && object.max_depth !== null) { - message.max_depth = Number(object.max_depth); - } else { - message.max_depth = 0; - } - if (object.min_depth !== undefined && object.min_depth !== null) { - message.min_depth = Number(object.min_depth); - } else { - message.min_depth = 0; - } - return message; - }, - - toJSON(message: ProofSpec): unknown { - const obj: any = {}; - message.leaf_spec !== undefined && - (obj.leaf_spec = message.leaf_spec - ? LeafOp.toJSON(message.leaf_spec) - : undefined); - message.inner_spec !== undefined && - (obj.inner_spec = message.inner_spec - ? InnerSpec.toJSON(message.inner_spec) - : undefined); - message.max_depth !== undefined && (obj.max_depth = message.max_depth); - message.min_depth !== undefined && (obj.min_depth = message.min_depth); - return obj; - }, - - fromPartial(object: DeepPartial): ProofSpec { - const message = { ...baseProofSpec } as ProofSpec; - if (object.leaf_spec !== undefined && object.leaf_spec !== null) { - message.leaf_spec = LeafOp.fromPartial(object.leaf_spec); - } else { - message.leaf_spec = undefined; - } - if (object.inner_spec !== undefined && object.inner_spec !== null) { - message.inner_spec = InnerSpec.fromPartial(object.inner_spec); - } else { - message.inner_spec = undefined; - } - if (object.max_depth !== undefined && object.max_depth !== null) { - message.max_depth = object.max_depth; - } else { - message.max_depth = 0; - } - if (object.min_depth !== undefined && object.min_depth !== null) { - message.min_depth = object.min_depth; - } else { - message.min_depth = 0; - } - return message; - }, -}; - -const baseInnerSpec: object = { - child_order: 0, - child_size: 0, - min_prefix_length: 0, - max_prefix_length: 0, - hash: 0, -}; - -export const InnerSpec = { - encode(message: InnerSpec, writer: Writer = Writer.create()): Writer { - writer.uint32(10).fork(); - for (const v of message.child_order) { - writer.int32(v); - } - writer.ldelim(); - if (message.child_size !== 0) { - writer.uint32(16).int32(message.child_size); - } - if (message.min_prefix_length !== 0) { - writer.uint32(24).int32(message.min_prefix_length); - } - if (message.max_prefix_length !== 0) { - writer.uint32(32).int32(message.max_prefix_length); - } - if (message.empty_child.length !== 0) { - writer.uint32(42).bytes(message.empty_child); - } - if (message.hash !== 0) { - writer.uint32(48).int32(message.hash); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): InnerSpec { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseInnerSpec } as InnerSpec; - message.child_order = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.child_order.push(reader.int32()); - } - } else { - message.child_order.push(reader.int32()); - } - break; - case 2: - message.child_size = reader.int32(); - break; - case 3: - message.min_prefix_length = reader.int32(); - break; - case 4: - message.max_prefix_length = reader.int32(); - break; - case 5: - message.empty_child = reader.bytes(); - break; - case 6: - message.hash = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): InnerSpec { - const message = { ...baseInnerSpec } as InnerSpec; - message.child_order = []; - if (object.child_order !== undefined && object.child_order !== null) { - for (const e of object.child_order) { - message.child_order.push(Number(e)); - } - } - if (object.child_size !== undefined && object.child_size !== null) { - message.child_size = Number(object.child_size); - } else { - message.child_size = 0; - } - if ( - object.min_prefix_length !== undefined && - object.min_prefix_length !== null - ) { - message.min_prefix_length = Number(object.min_prefix_length); - } else { - message.min_prefix_length = 0; - } - if ( - object.max_prefix_length !== undefined && - object.max_prefix_length !== null - ) { - message.max_prefix_length = Number(object.max_prefix_length); - } else { - message.max_prefix_length = 0; - } - if (object.empty_child !== undefined && object.empty_child !== null) { - message.empty_child = bytesFromBase64(object.empty_child); - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = hashOpFromJSON(object.hash); - } else { - message.hash = 0; - } - return message; - }, - - toJSON(message: InnerSpec): unknown { - const obj: any = {}; - if (message.child_order) { - obj.child_order = message.child_order.map((e) => e); - } else { - obj.child_order = []; - } - message.child_size !== undefined && (obj.child_size = message.child_size); - message.min_prefix_length !== undefined && - (obj.min_prefix_length = message.min_prefix_length); - message.max_prefix_length !== undefined && - (obj.max_prefix_length = message.max_prefix_length); - message.empty_child !== undefined && - (obj.empty_child = base64FromBytes( - message.empty_child !== undefined - ? message.empty_child - : new Uint8Array() - )); - message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash)); - return obj; - }, - - fromPartial(object: DeepPartial): InnerSpec { - const message = { ...baseInnerSpec } as InnerSpec; - message.child_order = []; - if (object.child_order !== undefined && object.child_order !== null) { - for (const e of object.child_order) { - message.child_order.push(e); - } - } - if (object.child_size !== undefined && object.child_size !== null) { - message.child_size = object.child_size; - } else { - message.child_size = 0; - } - if ( - object.min_prefix_length !== undefined && - object.min_prefix_length !== null - ) { - message.min_prefix_length = object.min_prefix_length; - } else { - message.min_prefix_length = 0; - } - if ( - object.max_prefix_length !== undefined && - object.max_prefix_length !== null - ) { - message.max_prefix_length = object.max_prefix_length; - } else { - message.max_prefix_length = 0; - } - if (object.empty_child !== undefined && object.empty_child !== null) { - message.empty_child = object.empty_child; - } else { - message.empty_child = new Uint8Array(); - } - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = 0; - } - return message; - }, -}; - -const baseBatchProof: object = {}; - -export const BatchProof = { - encode(message: BatchProof, writer: Writer = Writer.create()): Writer { - for (const v of message.entries) { - BatchEntry.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BatchProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBatchProof } as BatchProof; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.entries.push(BatchEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BatchProof { - const message = { ...baseBatchProof } as BatchProof; - message.entries = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(BatchEntry.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: BatchProof): unknown { - const obj: any = {}; - if (message.entries) { - obj.entries = message.entries.map((e) => - e ? BatchEntry.toJSON(e) : undefined - ); - } else { - obj.entries = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): BatchProof { - const message = { ...baseBatchProof } as BatchProof; - message.entries = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(BatchEntry.fromPartial(e)); - } - } - return message; - }, -}; - -const baseBatchEntry: object = {}; - -export const BatchEntry = { - encode(message: BatchEntry, writer: Writer = Writer.create()): Writer { - if (message.exist !== undefined) { - ExistenceProof.encode(message.exist, writer.uint32(10).fork()).ldelim(); - } - if (message.nonexist !== undefined) { - NonExistenceProof.encode( - message.nonexist, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BatchEntry { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBatchEntry } as BatchEntry; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = ExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = NonExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BatchEntry { - const message = { ...baseBatchEntry } as BatchEntry; - if (object.exist !== undefined && object.exist !== null) { - message.exist = ExistenceProof.fromJSON(object.exist); - } else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = NonExistenceProof.fromJSON(object.nonexist); - } else { - message.nonexist = undefined; - } - return message; - }, - - toJSON(message: BatchEntry): unknown { - const obj: any = {}; - message.exist !== undefined && - (obj.exist = message.exist - ? ExistenceProof.toJSON(message.exist) - : undefined); - message.nonexist !== undefined && - (obj.nonexist = message.nonexist - ? NonExistenceProof.toJSON(message.nonexist) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): BatchEntry { - const message = { ...baseBatchEntry } as BatchEntry; - if (object.exist !== undefined && object.exist !== null) { - message.exist = ExistenceProof.fromPartial(object.exist); - } else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = NonExistenceProof.fromPartial(object.nonexist); - } else { - message.nonexist = undefined; - } - return message; - }, -}; - -const baseCompressedBatchProof: object = {}; - -export const CompressedBatchProof = { - encode( - message: CompressedBatchProof, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.entries) { - CompressedBatchEntry.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.lookup_inners) { - InnerOp.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CompressedBatchProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCompressedBatchProof } as CompressedBatchProof; - message.entries = []; - message.lookup_inners = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.entries.push( - CompressedBatchEntry.decode(reader, reader.uint32()) - ); - break; - case 2: - message.lookup_inners.push(InnerOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CompressedBatchProof { - const message = { ...baseCompressedBatchProof } as CompressedBatchProof; - message.entries = []; - message.lookup_inners = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(CompressedBatchEntry.fromJSON(e)); - } - } - if (object.lookup_inners !== undefined && object.lookup_inners !== null) { - for (const e of object.lookup_inners) { - message.lookup_inners.push(InnerOp.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: CompressedBatchProof): unknown { - const obj: any = {}; - if (message.entries) { - obj.entries = message.entries.map((e) => - e ? CompressedBatchEntry.toJSON(e) : undefined - ); - } else { - obj.entries = []; - } - if (message.lookup_inners) { - obj.lookup_inners = message.lookup_inners.map((e) => - e ? InnerOp.toJSON(e) : undefined - ); - } else { - obj.lookup_inners = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): CompressedBatchProof { - const message = { ...baseCompressedBatchProof } as CompressedBatchProof; - message.entries = []; - message.lookup_inners = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(CompressedBatchEntry.fromPartial(e)); - } - } - if (object.lookup_inners !== undefined && object.lookup_inners !== null) { - for (const e of object.lookup_inners) { - message.lookup_inners.push(InnerOp.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCompressedBatchEntry: object = {}; - -export const CompressedBatchEntry = { - encode( - message: CompressedBatchEntry, - writer: Writer = Writer.create() - ): Writer { - if (message.exist !== undefined) { - CompressedExistenceProof.encode( - message.exist, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.nonexist !== undefined) { - CompressedNonExistenceProof.encode( - message.nonexist, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CompressedBatchEntry { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCompressedBatchEntry } as CompressedBatchEntry; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = CompressedExistenceProof.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.nonexist = CompressedNonExistenceProof.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CompressedBatchEntry { - const message = { ...baseCompressedBatchEntry } as CompressedBatchEntry; - if (object.exist !== undefined && object.exist !== null) { - message.exist = CompressedExistenceProof.fromJSON(object.exist); - } else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = CompressedNonExistenceProof.fromJSON(object.nonexist); - } else { - message.nonexist = undefined; - } - return message; - }, - - toJSON(message: CompressedBatchEntry): unknown { - const obj: any = {}; - message.exist !== undefined && - (obj.exist = message.exist - ? CompressedExistenceProof.toJSON(message.exist) - : undefined); - message.nonexist !== undefined && - (obj.nonexist = message.nonexist - ? CompressedNonExistenceProof.toJSON(message.nonexist) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): CompressedBatchEntry { - const message = { ...baseCompressedBatchEntry } as CompressedBatchEntry; - if (object.exist !== undefined && object.exist !== null) { - message.exist = CompressedExistenceProof.fromPartial(object.exist); - } else { - message.exist = undefined; - } - if (object.nonexist !== undefined && object.nonexist !== null) { - message.nonexist = CompressedNonExistenceProof.fromPartial( - object.nonexist - ); - } else { - message.nonexist = undefined; - } - return message; - }, -}; - -const baseCompressedExistenceProof: object = { path: 0 }; - -export const CompressedExistenceProof = { - encode( - message: CompressedExistenceProof, - writer: Writer = Writer.create() - ): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (message.leaf !== undefined) { - LeafOp.encode(message.leaf, writer.uint32(26).fork()).ldelim(); - } - writer.uint32(34).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): CompressedExistenceProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCompressedExistenceProof, - } as CompressedExistenceProof; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.leaf = LeafOp.decode(reader, reader.uint32()); - break; - case 4: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CompressedExistenceProof { - const message = { - ...baseCompressedExistenceProof, - } as CompressedExistenceProof; - message.path = []; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.leaf !== undefined && object.leaf !== null) { - message.leaf = LeafOp.fromJSON(object.leaf); - } else { - message.leaf = undefined; - } - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - return message; - }, - - toJSON(message: CompressedExistenceProof): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); - message.leaf !== undefined && - (obj.leaf = message.leaf ? LeafOp.toJSON(message.leaf) : undefined); - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): CompressedExistenceProof { - const message = { - ...baseCompressedExistenceProof, - } as CompressedExistenceProof; - message.path = []; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - if (object.leaf !== undefined && object.leaf !== null) { - message.leaf = LeafOp.fromPartial(object.leaf); - } else { - message.leaf = undefined; - } - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - return message; - }, -}; - -const baseCompressedNonExistenceProof: object = {}; - -export const CompressedNonExistenceProof = { - encode( - message: CompressedNonExistenceProof, - writer: Writer = Writer.create() - ): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.left !== undefined) { - CompressedExistenceProof.encode( - message.left, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.right !== undefined) { - CompressedExistenceProof.encode( - message.right, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): CompressedNonExistenceProof { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseCompressedNonExistenceProof, - } as CompressedNonExistenceProof; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.left = CompressedExistenceProof.decode( - reader, - reader.uint32() - ); - break; - case 3: - message.right = CompressedExistenceProof.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CompressedNonExistenceProof { - const message = { - ...baseCompressedNonExistenceProof, - } as CompressedNonExistenceProof; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.left !== undefined && object.left !== null) { - message.left = CompressedExistenceProof.fromJSON(object.left); - } else { - message.left = undefined; - } - if (object.right !== undefined && object.right !== null) { - message.right = CompressedExistenceProof.fromJSON(object.right); - } else { - message.right = undefined; - } - return message; - }, - - toJSON(message: CompressedNonExistenceProof): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.left !== undefined && - (obj.left = message.left - ? CompressedExistenceProof.toJSON(message.left) - : undefined); - message.right !== undefined && - (obj.right = message.right - ? CompressedExistenceProof.toJSON(message.right) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): CompressedNonExistenceProof { - const message = { - ...baseCompressedNonExistenceProof, - } as CompressedNonExistenceProof; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.left !== undefined && object.left !== null) { - message.left = CompressedExistenceProof.fromPartial(object.left); - } else { - message.left = undefined; - } - if (object.right !== undefined && object.right !== null) { - message.right = CompressedExistenceProof.fromPartial(object.right); - } else { - message.right = undefined; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/package.json b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/package.json deleted file mode 100755 index 7d5dd3043a..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "ibc-core-connection-v1-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module ibc.core.connection.v1", - "author": "Starport Codegen ", - "homepage": "http://github.com/cosmos/ibc-go/v3/modules/core/03-connection/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/vuex-root b/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/ibc-go/v3/ibc.core.connection.v1/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/index.d.ts b/vue/src/store/generated/index.d.ts deleted file mode 100644 index cda031fb63..0000000000 --- a/vue/src/store/generated/index.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -declare const _default: { - CosmWasmWasmdCosmwasmWasmV1: (store: any) => void; - CosmosCosmosSdkCosmosAuthzV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosBankV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosCrisisV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosDistributionV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosEvidenceV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosFeegrantV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosGovV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosSlashingV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosStakingV1Beta1: (store: any) => void; - CosmosCosmosSdkCosmosVestingV1Beta1: (store: any) => void; - CosmosIbcGoIbcApplicationsTransferV1: (store: any) => void; - CosmosIbcGoIbcApplicationsTransferV2: (store: any) => void; - SeiProtocolSeiChainSeiprotocolSeichainDex: (store: any) => void; - SeiProtocolSeiChainSeiprotocolSeichainOracle: (store: any) => void; - SeiProtocolSeiChainSeiprotocolSeichainTokenfactory: (store: any) => void; -}; -export default _default; diff --git a/vue/src/store/generated/index.js b/vue/src/store/generated/index.js deleted file mode 100644 index e28b27c609..0000000000 --- a/vue/src/store/generated/index.js +++ /dev/null @@ -1,52 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import CosmWasmWasmdCosmwasmWasmV1 from './CosmWasm/wasmd/cosmwasm.wasm.v1'; -import CosmosCosmosSdkCosmosAuthzV1Beta1 from './cosmos/cosmos-sdk/cosmos.authz.v1beta1'; -import CosmosCosmosSdkCosmosBankV1Beta1 from './cosmos/cosmos-sdk/cosmos.bank.v1beta1'; -import CosmosCosmosSdkCosmosCrisisV1Beta1 from './cosmos/cosmos-sdk/cosmos.crisis.v1beta1'; -import CosmosCosmosSdkCosmosDistributionV1Beta1 from './cosmos/cosmos-sdk/cosmos.distribution.v1beta1'; -import CosmosCosmosSdkCosmosEvidenceV1Beta1 from './cosmos/cosmos-sdk/cosmos.evidence.v1beta1'; -import CosmosCosmosSdkCosmosFeegrantV1Beta1 from './cosmos/cosmos-sdk/cosmos.feegrant.v1beta1'; -import CosmosCosmosSdkCosmosGovV1Beta1 from './cosmos/cosmos-sdk/cosmos.gov.v1beta1'; -import CosmosCosmosSdkCosmosSlashingV1Beta1 from './cosmos/cosmos-sdk/cosmos.slashing.v1beta1'; -import CosmosCosmosSdkCosmosStakingV1Beta1 from './cosmos/cosmos-sdk/cosmos.staking.v1beta1'; -import CosmosCosmosSdkCosmosVestingV1Beta1 from './cosmos/cosmos-sdk/cosmos.vesting.v1beta1'; -import CosmosIbcGoIbcApplicationsTransferV1 from './cosmos/ibc-go/ibc.applications.transfer.v1'; -import CosmosIbcGoIbcApplicationsTransferV2 from './cosmos/ibc-go/ibc.applications.transfer.v2'; -import SeiProtocolSeiChainSeiprotocolSeichainDex from './sei-protocol/sei-chain/seiprotocol.seichain.dex'; -import SeiProtocolSeiChainSeiprotocolSeichainOracle from './sei-protocol/sei-chain/seiprotocol.seichain.oracle'; -import SeiProtocolSeiChainSeiprotocolSeichainTokenfactory from './sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory'; -export default { - CosmWasmWasmdCosmwasmWasmV1: load(CosmWasmWasmdCosmwasmWasmV1, 'cosmwasm.wasm.v1'), - CosmosCosmosSdkCosmosAuthzV1Beta1: load(CosmosCosmosSdkCosmosAuthzV1Beta1, 'cosmos.authz.v1beta1'), - CosmosCosmosSdkCosmosBankV1Beta1: load(CosmosCosmosSdkCosmosBankV1Beta1, 'cosmos.bank.v1beta1'), - CosmosCosmosSdkCosmosCrisisV1Beta1: load(CosmosCosmosSdkCosmosCrisisV1Beta1, 'cosmos.crisis.v1beta1'), - CosmosCosmosSdkCosmosDistributionV1Beta1: load(CosmosCosmosSdkCosmosDistributionV1Beta1, 'cosmos.distribution.v1beta1'), - CosmosCosmosSdkCosmosEvidenceV1Beta1: load(CosmosCosmosSdkCosmosEvidenceV1Beta1, 'cosmos.evidence.v1beta1'), - CosmosCosmosSdkCosmosFeegrantV1Beta1: load(CosmosCosmosSdkCosmosFeegrantV1Beta1, 'cosmos.feegrant.v1beta1'), - CosmosCosmosSdkCosmosGovV1Beta1: load(CosmosCosmosSdkCosmosGovV1Beta1, 'cosmos.gov.v1beta1'), - CosmosCosmosSdkCosmosSlashingV1Beta1: load(CosmosCosmosSdkCosmosSlashingV1Beta1, 'cosmos.slashing.v1beta1'), - CosmosCosmosSdkCosmosStakingV1Beta1: load(CosmosCosmosSdkCosmosStakingV1Beta1, 'cosmos.staking.v1beta1'), - CosmosCosmosSdkCosmosVestingV1Beta1: load(CosmosCosmosSdkCosmosVestingV1Beta1, 'cosmos.vesting.v1beta1'), - CosmosIbcGoIbcApplicationsTransferV1: load(CosmosIbcGoIbcApplicationsTransferV1, 'ibc.applications.transfer.v1'), - CosmosIbcGoIbcApplicationsTransferV2: load(CosmosIbcGoIbcApplicationsTransferV2, 'ibc.applications.transfer.v2'), - SeiProtocolSeiChainSeiprotocolSeichainDex: load(SeiProtocolSeiChainSeiprotocolSeichainDex, 'seiprotocol.seichain.dex'), - SeiProtocolSeiChainSeiprotocolSeichainOracle: load(SeiProtocolSeiChainSeiprotocolSeichainOracle, 'seiprotocol.seichain.oracle'), - SeiProtocolSeiChainSeiprotocolSeichainTokenfactory: load(SeiProtocolSeiChainSeiprotocolSeichainTokenfactory, 'seiprotocol.seichain.tokenfactory'), -}; -function load(mod, fullns) { - return function init(store) { - if (store.hasModule([fullns])) { - throw new Error('Duplicate module name detected: ' + fullns); - } - else { - store.registerModule([fullns], mod); - store.subscribe((mutation) => { - if (mutation.type == 'common/env/INITIALIZE_WS_COMPLETE') { - store.dispatch(fullns + '/init', null, { - root: true - }); - } - }); - } - }; -} diff --git a/vue/src/store/generated/index.ts b/vue/src/store/generated/index.ts deleted file mode 100755 index dfd2f60777..0000000000 --- a/vue/src/store/generated/index.ts +++ /dev/null @@ -1,83 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import CosmWasmWasmdCosmwasmWasmV1 from './CosmWasm/wasmd/cosmwasm.wasm.v1' -import CosmosCosmosSdkCosmosAuthV1Beta1 from './cosmos/cosmos-sdk/cosmos.auth.v1beta1' -import CosmosCosmosSdkCosmosAuthzV1Beta1 from './cosmos/cosmos-sdk/cosmos.authz.v1beta1' -import CosmosCosmosSdkCosmosBankV1Beta1 from './cosmos/cosmos-sdk/cosmos.bank.v1beta1' -import CosmosCosmosSdkCosmosBaseTendermintV1Beta1 from './cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1' -import CosmosCosmosSdkCosmosCrisisV1Beta1 from './cosmos/cosmos-sdk/cosmos.crisis.v1beta1' -import CosmosCosmosSdkCosmosDistributionV1Beta1 from './cosmos/cosmos-sdk/cosmos.distribution.v1beta1' -import CosmosCosmosSdkCosmosEvidenceV1Beta1 from './cosmos/cosmos-sdk/cosmos.evidence.v1beta1' -import CosmosCosmosSdkCosmosFeegrantV1Beta1 from './cosmos/cosmos-sdk/cosmos.feegrant.v1beta1' -import CosmosCosmosSdkCosmosGovV1Beta1 from './cosmos/cosmos-sdk/cosmos.gov.v1beta1' -import CosmosCosmosSdkCosmosParamsV1Beta1 from './cosmos/cosmos-sdk/cosmos.params.v1beta1' -import CosmosCosmosSdkCosmosSlashingV1Beta1 from './cosmos/cosmos-sdk/cosmos.slashing.v1beta1' -import CosmosCosmosSdkCosmosStakingV1Beta1 from './cosmos/cosmos-sdk/cosmos.staking.v1beta1' -import CosmosCosmosSdkCosmosTxV1Beta1 from './cosmos/cosmos-sdk/cosmos.tx.v1beta1' -import CosmosCosmosSdkCosmosUpgradeV1Beta1 from './cosmos/cosmos-sdk/cosmos.upgrade.v1beta1' -import CosmosCosmosSdkCosmosVestingV1Beta1 from './cosmos/cosmos-sdk/cosmos.vesting.v1beta1' -import CosmosIbcGoIbcApplicationsTransferV1 from './cosmos/ibc-go/ibc.applications.transfer.v1' -import CosmosIbcGoIbcApplicationsTransferV2 from './cosmos/ibc-go/ibc.applications.transfer.v2' -import IbcGoV3IbcApplicationsInterchainAccountsControllerV1 from './ibc-go/v3/ibc.applications.interchain_accounts.controller.v1' -import IbcGoV3IbcApplicationsInterchainAccountsHostV1 from './ibc-go/v3/ibc.applications.interchain_accounts.host.v1' -import IbcGoV3IbcApplicationsTransferV1 from './ibc-go/v3/ibc.applications.transfer.v1' -import IbcGoV3IbcCoreChannelV1 from './ibc-go/v3/ibc.core.channel.v1' -import IbcGoV3IbcCoreClientV1 from './ibc-go/v3/ibc.core.client.v1' -import IbcGoV3IbcCoreConnectionV1 from './ibc-go/v3/ibc.core.connection.v1' -import SeiProtocolSeiChainSeiprotocolSeichainDex from './sei-protocol/sei-chain/seiprotocol.seichain.dex' -import SeiProtocolSeiChainSeiprotocolSeichainEpoch from './sei-protocol/sei-chain/seiprotocol.seichain.epoch' -import SeiProtocolSeiChainSeiprotocolSeichainMint from './sei-protocol/sei-chain/seiprotocol.seichain.mint' -import SeiProtocolSeiChainSeiprotocolSeichainOracle from './sei-protocol/sei-chain/seiprotocol.seichain.oracle' -import SeiProtocolSeiChainSeiprotocolSeichainTokenfactory from './sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory' - - -export default { - CosmWasmWasmdCosmwasmWasmV1: load(CosmWasmWasmdCosmwasmWasmV1, 'cosmwasm.wasm.v1'), - CosmosCosmosSdkCosmosAuthV1Beta1: load(CosmosCosmosSdkCosmosAuthV1Beta1, 'cosmos.auth.v1beta1'), - CosmosCosmosSdkCosmosAuthzV1Beta1: load(CosmosCosmosSdkCosmosAuthzV1Beta1, 'cosmos.authz.v1beta1'), - CosmosCosmosSdkCosmosBankV1Beta1: load(CosmosCosmosSdkCosmosBankV1Beta1, 'cosmos.bank.v1beta1'), - CosmosCosmosSdkCosmosBaseTendermintV1Beta1: load(CosmosCosmosSdkCosmosBaseTendermintV1Beta1, 'cosmos.base.tendermint.v1beta1'), - CosmosCosmosSdkCosmosCrisisV1Beta1: load(CosmosCosmosSdkCosmosCrisisV1Beta1, 'cosmos.crisis.v1beta1'), - CosmosCosmosSdkCosmosDistributionV1Beta1: load(CosmosCosmosSdkCosmosDistributionV1Beta1, 'cosmos.distribution.v1beta1'), - CosmosCosmosSdkCosmosEvidenceV1Beta1: load(CosmosCosmosSdkCosmosEvidenceV1Beta1, 'cosmos.evidence.v1beta1'), - CosmosCosmosSdkCosmosFeegrantV1Beta1: load(CosmosCosmosSdkCosmosFeegrantV1Beta1, 'cosmos.feegrant.v1beta1'), - CosmosCosmosSdkCosmosGovV1Beta1: load(CosmosCosmosSdkCosmosGovV1Beta1, 'cosmos.gov.v1beta1'), - CosmosCosmosSdkCosmosParamsV1Beta1: load(CosmosCosmosSdkCosmosParamsV1Beta1, 'cosmos.params.v1beta1'), - CosmosCosmosSdkCosmosSlashingV1Beta1: load(CosmosCosmosSdkCosmosSlashingV1Beta1, 'cosmos.slashing.v1beta1'), - CosmosCosmosSdkCosmosStakingV1Beta1: load(CosmosCosmosSdkCosmosStakingV1Beta1, 'cosmos.staking.v1beta1'), - CosmosCosmosSdkCosmosTxV1Beta1: load(CosmosCosmosSdkCosmosTxV1Beta1, 'cosmos.tx.v1beta1'), - CosmosCosmosSdkCosmosUpgradeV1Beta1: load(CosmosCosmosSdkCosmosUpgradeV1Beta1, 'cosmos.upgrade.v1beta1'), - CosmosCosmosSdkCosmosVestingV1Beta1: load(CosmosCosmosSdkCosmosVestingV1Beta1, 'cosmos.vesting.v1beta1'), - CosmosIbcGoIbcApplicationsTransferV1: load(CosmosIbcGoIbcApplicationsTransferV1, 'ibc.applications.transfer.v1'), - CosmosIbcGoIbcApplicationsTransferV2: load(CosmosIbcGoIbcApplicationsTransferV2, 'ibc.applications.transfer.v2'), - IbcGoV3IbcApplicationsInterchainAccountsControllerV1: load(IbcGoV3IbcApplicationsInterchainAccountsControllerV1, 'ibc.applications.interchain_accounts.controller.v1'), - IbcGoV3IbcApplicationsInterchainAccountsHostV1: load(IbcGoV3IbcApplicationsInterchainAccountsHostV1, 'ibc.applications.interchain_accounts.host.v1'), - IbcGoV3IbcApplicationsTransferV1: load(IbcGoV3IbcApplicationsTransferV1, 'ibc.applications.transfer.v1'), - IbcGoV3IbcCoreChannelV1: load(IbcGoV3IbcCoreChannelV1, 'ibc.core.channel.v1'), - IbcGoV3IbcCoreClientV1: load(IbcGoV3IbcCoreClientV1, 'ibc.core.client.v1'), - IbcGoV3IbcCoreConnectionV1: load(IbcGoV3IbcCoreConnectionV1, 'ibc.core.connection.v1'), - SeiProtocolSeiChainSeiprotocolSeichainDex: load(SeiProtocolSeiChainSeiprotocolSeichainDex, 'seiprotocol.seichain.dex'), - SeiProtocolSeiChainSeiprotocolSeichainEpoch: load(SeiProtocolSeiChainSeiprotocolSeichainEpoch, 'seiprotocol.seichain.epoch'), - SeiProtocolSeiChainSeiprotocolSeichainMint: load(SeiProtocolSeiChainSeiprotocolSeichainMint, 'seiprotocol.seichain.mint'), - SeiProtocolSeiChainSeiprotocolSeichainOracle: load(SeiProtocolSeiChainSeiprotocolSeichainOracle, 'seiprotocol.seichain.oracle'), - SeiProtocolSeiChainSeiprotocolSeichainTokenfactory: load(SeiProtocolSeiChainSeiprotocolSeichainTokenfactory, 'seiprotocol.seichain.tokenfactory'), - -} - - -function load(mod, fullns) { - return function init(store) { - if (store.hasModule([fullns])) { - throw new Error('Duplicate module name detected: '+ fullns) - }else{ - store.registerModule([fullns], mod) - store.subscribe((mutation) => { - if (mutation.type == 'common/env/INITIALIZE_WS_COMPLETE') { - store.dispatch(fullns+ '/init', null, { - root: true - }) - } - }) - } - } -} diff --git a/vue/src/store/generated/package.json b/vue/src/store/generated/package.json deleted file mode 100755 index ce071212b7..0000000000 --- a/vue/src/store/generated/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "sei-protocol-sei-chain-js", - "version": "0.1.0", - "description": "Autogenerated cosmos modules vuex store", - "author": "Starport Codegen ", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} diff --git a/vue/src/store/generated/readme.md b/vue/src/store/generated/readme.md deleted file mode 100755 index a9a292f4b9..0000000000 --- a/vue/src/store/generated/readme.md +++ /dev/null @@ -1 +0,0 @@ -THIS FOLDER IS GENERATED AUTOMATICALLY. DO NOT MODIFY. diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/index.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/index.d.ts deleted file mode 100644 index 6db8359cdc..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { AssetIBCInfo } from "./module/types/dex/asset_list"; -import { AssetMetadata } from "./module/types/dex/asset_list"; -import { ContractInfo } from "./module/types/dex/contract"; -import { ContractDependencyInfo } from "./module/types/dex/contract"; -import { LegacyContractInfo } from "./module/types/dex/contract"; -import { RegisterPairsProposal } from "./module/types/dex/gov"; -import { UpdateTickSizeProposal } from "./module/types/dex/gov"; -import { AddAssetMetadataProposal } from "./module/types/dex/gov"; -import { LongBook } from "./module/types/dex/long_book"; -import { MatchResult } from "./module/types/dex/match_result"; -import { Order } from "./module/types/dex/order"; -import { Cancellation } from "./module/types/dex/order"; -import { ActiveOrders } from "./module/types/dex/order"; -import { OrderEntry } from "./module/types/dex/order_entry"; -import { Allocation } from "./module/types/dex/order_entry"; -import { Pair } from "./module/types/dex/pair"; -import { BatchContractPair } from "./module/types/dex/pair"; -import { Params } from "./module/types/dex/params"; -import { Price } from "./module/types/dex/price"; -import { PriceCandlestick } from "./module/types/dex/price"; -import { SettlementEntry } from "./module/types/dex/settlement"; -import { Settlements } from "./module/types/dex/settlement"; -import { ShortBook } from "./module/types/dex/short_book"; -import { TickSize } from "./module/types/dex/tick_size"; -import { Twap } from "./module/types/dex/twap"; -export { AssetIBCInfo, AssetMetadata, ContractInfo, ContractDependencyInfo, LegacyContractInfo, RegisterPairsProposal, UpdateTickSizeProposal, AddAssetMetadataProposal, LongBook, MatchResult, Order, Cancellation, ActiveOrders, OrderEntry, Allocation, Pair, BatchContractPair, Params, Price, PriceCandlestick, SettlementEntry, Settlements, ShortBook, TickSize, Twap }; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/index.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/index.js deleted file mode 100644 index 5c98a98a58..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/index.js +++ /dev/null @@ -1,550 +0,0 @@ -import { txClient, queryClient, MissingWalletError, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { AssetIBCInfo } from "./module/types/dex/asset_list"; -import { AssetMetadata } from "./module/types/dex/asset_list"; -import { ContractInfo } from "./module/types/dex/contract"; -import { ContractDependencyInfo } from "./module/types/dex/contract"; -import { LegacyContractInfo } from "./module/types/dex/contract"; -import { RegisterPairsProposal } from "./module/types/dex/gov"; -import { UpdateTickSizeProposal } from "./module/types/dex/gov"; -import { AddAssetMetadataProposal } from "./module/types/dex/gov"; -import { LongBook } from "./module/types/dex/long_book"; -import { MatchResult } from "./module/types/dex/match_result"; -import { Order } from "./module/types/dex/order"; -import { Cancellation } from "./module/types/dex/order"; -import { ActiveOrders } from "./module/types/dex/order"; -import { OrderEntry } from "./module/types/dex/order_entry"; -import { Allocation } from "./module/types/dex/order_entry"; -import { Pair } from "./module/types/dex/pair"; -import { BatchContractPair } from "./module/types/dex/pair"; -import { Params } from "./module/types/dex/params"; -import { Price } from "./module/types/dex/price"; -import { PriceCandlestick } from "./module/types/dex/price"; -import { SettlementEntry } from "./module/types/dex/settlement"; -import { Settlements } from "./module/types/dex/settlement"; -import { ShortBook } from "./module/types/dex/short_book"; -import { TickSize } from "./module/types/dex/tick_size"; -import { Twap } from "./module/types/dex/twap"; -export { AssetIBCInfo, AssetMetadata, ContractInfo, ContractDependencyInfo, LegacyContractInfo, RegisterPairsProposal, UpdateTickSizeProposal, AddAssetMetadataProposal, LongBook, MatchResult, Order, Cancellation, ActiveOrders, OrderEntry, Allocation, Pair, BatchContractPair, Params, Price, PriceCandlestick, SettlementEntry, Settlements, ShortBook, TickSize, Twap }; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Params: {}, - LongBook: {}, - LongBookAll: {}, - ShortBook: {}, - ShortBookAll: {}, - GetPrices: {}, - GetTwaps: {}, - AssetMetadata: {}, - AssetList: {}, - GetRegisteredPairs: {}, - GetOrders: {}, - GetOrder: {}, - GetHistoricalPrices: {}, - GetMarketSummary: {}, - _Structure: { - AssetIBCInfo: getStructure(AssetIBCInfo.fromPartial({})), - AssetMetadata: getStructure(AssetMetadata.fromPartial({})), - ContractInfo: getStructure(ContractInfo.fromPartial({})), - ContractDependencyInfo: getStructure(ContractDependencyInfo.fromPartial({})), - LegacyContractInfo: getStructure(LegacyContractInfo.fromPartial({})), - RegisterPairsProposal: getStructure(RegisterPairsProposal.fromPartial({})), - UpdateTickSizeProposal: getStructure(UpdateTickSizeProposal.fromPartial({})), - AddAssetMetadataProposal: getStructure(AddAssetMetadataProposal.fromPartial({})), - LongBook: getStructure(LongBook.fromPartial({})), - MatchResult: getStructure(MatchResult.fromPartial({})), - Order: getStructure(Order.fromPartial({})), - Cancellation: getStructure(Cancellation.fromPartial({})), - ActiveOrders: getStructure(ActiveOrders.fromPartial({})), - OrderEntry: getStructure(OrderEntry.fromPartial({})), - Allocation: getStructure(Allocation.fromPartial({})), - Pair: getStructure(Pair.fromPartial({})), - BatchContractPair: getStructure(BatchContractPair.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - Price: getStructure(Price.fromPartial({})), - PriceCandlestick: getStructure(PriceCandlestick.fromPartial({})), - SettlementEntry: getStructure(SettlementEntry.fromPartial({})), - Settlements: getStructure(Settlements.fromPartial({})), - ShortBook: getStructure(ShortBook.fromPartial({})), - TickSize: getStructure(TickSize.fromPartial({})), - Twap: getStructure(Twap.fromPartial({})), - }, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getParams: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Params[JSON.stringify(params)] ?? {}; - }, - getLongBook: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.LongBook[JSON.stringify(params)] ?? {}; - }, - getLongBookAll: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.LongBookAll[JSON.stringify(params)] ?? {}; - }, - getShortBook: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.ShortBook[JSON.stringify(params)] ?? {}; - }, - getShortBookAll: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.ShortBookAll[JSON.stringify(params)] ?? {}; - }, - getGetPrices: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.GetPrices[JSON.stringify(params)] ?? {}; - }, - getGetTwaps: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.GetTwaps[JSON.stringify(params)] ?? {}; - }, - getAssetMetadata: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.AssetMetadata[JSON.stringify(params)] ?? {}; - }, - getAssetList: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.AssetList[JSON.stringify(params)] ?? {}; - }, - getGetRegisteredPairs: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.GetRegisteredPairs[JSON.stringify(params)] ?? {}; - }, - getGetOrders: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.GetOrders[JSON.stringify(params)] ?? {}; - }, - getGetOrder: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.GetOrder[JSON.stringify(params)] ?? {}; - }, - getGetHistoricalPrices: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.GetHistoricalPrices[JSON.stringify(params)] ?? {}; - }, - getGetMarketSummary: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.GetMarketSummary[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: seiprotocol.seichain.dex initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryParams()).data; - commit('QUERY', { query: 'Params', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryLongBook({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryLongBook(key.contractAddr, key.priceDenom, key.assetDenom, key.price)).data; - commit('QUERY', { query: 'LongBook', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryLongBook', payload: { options: { all }, params: { ...key }, query } }); - return getters['getLongBook']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryLongBook', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryLongBookAll({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryLongBookAll(key.contractAddr, key.priceDenom, key.assetDenom, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryLongBookAll(key.contractAddr, key.priceDenom, key.assetDenom, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'LongBookAll', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryLongBookAll', payload: { options: { all }, params: { ...key }, query } }); - return getters['getLongBookAll']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryLongBookAll', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryShortBook({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryShortBook(key.contractAddr, key.priceDenom, key.assetDenom, key.price)).data; - commit('QUERY', { query: 'ShortBook', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryShortBook', payload: { options: { all }, params: { ...key }, query } }); - return getters['getShortBook']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryShortBook', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryShortBookAll({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryShortBookAll(key.contractAddr, key.priceDenom, key.assetDenom, query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryShortBookAll(key.contractAddr, key.priceDenom, key.assetDenom, { ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ShortBookAll', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryShortBookAll', payload: { options: { all }, params: { ...key }, query } }); - return getters['getShortBookAll']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryShortBookAll', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryGetPrices({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryGetPrices(key.contractAddr, key.priceDenom, key.assetDenom)).data; - commit('QUERY', { query: 'GetPrices', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryGetPrices', payload: { options: { all }, params: { ...key }, query } }); - return getters['getGetPrices']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryGetPrices', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryGetTwaps({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryGetTwaps(key.contractAddr, key.lookbackSeconds)).data; - commit('QUERY', { query: 'GetTwaps', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryGetTwaps', payload: { options: { all }, params: { ...key }, query } }); - return getters['getGetTwaps']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryGetTwaps', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryAssetMetadata({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryAssetMetadata(key.denom)).data; - commit('QUERY', { query: 'AssetMetadata', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryAssetMetadata', payload: { options: { all }, params: { ...key }, query } }); - return getters['getAssetMetadata']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryAssetMetadata', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryAssetList({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryAssetList()).data; - commit('QUERY', { query: 'AssetList', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryAssetList', payload: { options: { all }, params: { ...key }, query } }); - return getters['getAssetList']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryAssetList', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryGetRegisteredPairs({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryGetRegisteredPairs(query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryGetRegisteredPairs({ ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'GetRegisteredPairs', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryGetRegisteredPairs', payload: { options: { all }, params: { ...key }, query } }); - return getters['getGetRegisteredPairs']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryGetRegisteredPairs', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryGetOrders({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryGetOrders(key.contractAddr, key.account)).data; - commit('QUERY', { query: 'GetOrders', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryGetOrders', payload: { options: { all }, params: { ...key }, query } }); - return getters['getGetOrders']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryGetOrders', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryGetOrder({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryGetOrder(key.contractAddr, key.priceDenom, key.assetDenom, key.id)).data; - commit('QUERY', { query: 'GetOrder', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryGetOrder', payload: { options: { all }, params: { ...key }, query } }); - return getters['getGetOrder']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryGetOrder', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryGetHistoricalPrices({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryGetHistoricalPrices(key.contractAddr, key.priceDenom, key.assetDenom, key.periodLengthInSeconds, key.numOfPeriods)).data; - commit('QUERY', { query: 'GetHistoricalPrices', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryGetHistoricalPrices', payload: { options: { all }, params: { ...key }, query } }); - return getters['getGetHistoricalPrices']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryGetHistoricalPrices', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryGetMarketSummary({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryGetMarketSummary(key.contractAddr, key.priceDenom, key.assetDenom, key.lookbackInSeconds)).data; - commit('QUERY', { query: 'GetMarketSummary', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryGetMarketSummary', payload: { options: { all }, params: { ...key }, query } }); - return getters['getGetMarketSummary']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryGetMarketSummary', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async sendMsgRegisterContract({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgRegisterContract(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgRegisterContract:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgRegisterContract:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgCancelOrders({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgCancelOrders(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgCancelOrders:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgCancelOrders:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgPlaceOrders({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgPlaceOrders(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgPlaceOrders:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgPlaceOrders:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async MsgRegisterContract({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgRegisterContract(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgRegisterContract:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgRegisterContract:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgCancelOrders({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgCancelOrders(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgCancelOrders:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgCancelOrders:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgPlaceOrders({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgPlaceOrders(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgPlaceOrders:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgPlaceOrders:Create', 'Could not create message: ' + e.message); - } - } - }, - } -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/index.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/index.ts deleted file mode 100755 index 96ef1fa4e3..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/index.ts +++ /dev/null @@ -1,662 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { AssetIBCInfo } from "./module/types/dex/asset_list" -import { AssetMetadata } from "./module/types/dex/asset_list" -import { ContractInfo } from "./module/types/dex/contract" -import { ContractDependencyInfo } from "./module/types/dex/contract" -import { LegacyContractInfo } from "./module/types/dex/contract" -import { RegisterPairsProposal } from "./module/types/dex/gov" -import { UpdateTickSizeProposal } from "./module/types/dex/gov" -import { AddAssetMetadataProposal } from "./module/types/dex/gov" -import { LongBook } from "./module/types/dex/long_book" -import { MatchResult } from "./module/types/dex/match_result" -import { Order } from "./module/types/dex/order" -import { Cancellation } from "./module/types/dex/order" -import { ActiveOrders } from "./module/types/dex/order" -import { OrderEntry } from "./module/types/dex/order_entry" -import { Allocation } from "./module/types/dex/order_entry" -import { Pair } from "./module/types/dex/pair" -import { BatchContractPair } from "./module/types/dex/pair" -import { Params } from "./module/types/dex/params" -import { Price } from "./module/types/dex/price" -import { PriceCandlestick } from "./module/types/dex/price" -import { SettlementEntry } from "./module/types/dex/settlement" -import { Settlements } from "./module/types/dex/settlement" -import { ShortBook } from "./module/types/dex/short_book" -import { TickSize } from "./module/types/dex/tick_size" -import { Twap } from "./module/types/dex/twap" - - -export { AssetIBCInfo, AssetMetadata, ContractInfo, ContractDependencyInfo, LegacyContractInfo, RegisterPairsProposal, UpdateTickSizeProposal, AddAssetMetadataProposal, LongBook, MatchResult, Order, Cancellation, ActiveOrders, OrderEntry, Allocation, Pair, BatchContractPair, Params, Price, PriceCandlestick, SettlementEntry, Settlements, ShortBook, TickSize, Twap }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Params: {}, - LongBook: {}, - LongBookAll: {}, - ShortBook: {}, - ShortBookAll: {}, - GetPrices: {}, - GetTwaps: {}, - AssetMetadata: {}, - AssetList: {}, - GetRegisteredPairs: {}, - GetOrders: {}, - GetOrder: {}, - GetHistoricalPrices: {}, - GetMarketSummary: {}, - - _Structure: { - AssetIBCInfo: getStructure(AssetIBCInfo.fromPartial({})), - AssetMetadata: getStructure(AssetMetadata.fromPartial({})), - ContractInfo: getStructure(ContractInfo.fromPartial({})), - ContractDependencyInfo: getStructure(ContractDependencyInfo.fromPartial({})), - LegacyContractInfo: getStructure(LegacyContractInfo.fromPartial({})), - RegisterPairsProposal: getStructure(RegisterPairsProposal.fromPartial({})), - UpdateTickSizeProposal: getStructure(UpdateTickSizeProposal.fromPartial({})), - AddAssetMetadataProposal: getStructure(AddAssetMetadataProposal.fromPartial({})), - LongBook: getStructure(LongBook.fromPartial({})), - MatchResult: getStructure(MatchResult.fromPartial({})), - Order: getStructure(Order.fromPartial({})), - Cancellation: getStructure(Cancellation.fromPartial({})), - ActiveOrders: getStructure(ActiveOrders.fromPartial({})), - OrderEntry: getStructure(OrderEntry.fromPartial({})), - Allocation: getStructure(Allocation.fromPartial({})), - Pair: getStructure(Pair.fromPartial({})), - BatchContractPair: getStructure(BatchContractPair.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - Price: getStructure(Price.fromPartial({})), - PriceCandlestick: getStructure(PriceCandlestick.fromPartial({})), - SettlementEntry: getStructure(SettlementEntry.fromPartial({})), - Settlements: getStructure(Settlements.fromPartial({})), - ShortBook: getStructure(ShortBook.fromPartial({})), - TickSize: getStructure(TickSize.fromPartial({})), - Twap: getStructure(Twap.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - getLongBook: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.LongBook[JSON.stringify(params)] ?? {} - }, - getLongBookAll: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.LongBookAll[JSON.stringify(params)] ?? {} - }, - getShortBook: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ShortBook[JSON.stringify(params)] ?? {} - }, - getShortBookAll: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ShortBookAll[JSON.stringify(params)] ?? {} - }, - getGetPrices: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetPrices[JSON.stringify(params)] ?? {} - }, - getGetTwaps: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetTwaps[JSON.stringify(params)] ?? {} - }, - getAssetMetadata: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.AssetMetadata[JSON.stringify(params)] ?? {} - }, - getAssetList: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.AssetList[JSON.stringify(params)] ?? {} - }, - getGetRegisteredPairs: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetRegisteredPairs[JSON.stringify(params)] ?? {} - }, - getGetOrders: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetOrders[JSON.stringify(params)] ?? {} - }, - getGetOrder: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetOrder[JSON.stringify(params)] ?? {} - }, - getGetHistoricalPrices: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetHistoricalPrices[JSON.stringify(params)] ?? {} - }, - getGetMarketSummary: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.GetMarketSummary[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: seiprotocol.seichain.dex initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams()).data - - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryLongBook({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryLongBook( key.contractAddr, key.priceDenom, key.assetDenom, key.price)).data - - - commit('QUERY', { query: 'LongBook', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryLongBook', payload: { options: { all }, params: {...key},query }}) - return getters['getLongBook']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryLongBook API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryLongBookAll({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryLongBookAll( key.contractAddr, key.priceDenom, key.assetDenom, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryLongBookAll( key.contractAddr, key.priceDenom, key.assetDenom, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'LongBookAll', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryLongBookAll', payload: { options: { all }, params: {...key},query }}) - return getters['getLongBookAll']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryLongBookAll API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryShortBook({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryShortBook( key.contractAddr, key.priceDenom, key.assetDenom, key.price)).data - - - commit('QUERY', { query: 'ShortBook', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryShortBook', payload: { options: { all }, params: {...key},query }}) - return getters['getShortBook']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryShortBook API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryShortBookAll({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryShortBookAll( key.contractAddr, key.priceDenom, key.assetDenom, query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryShortBookAll( key.contractAddr, key.priceDenom, key.assetDenom, {...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'ShortBookAll', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryShortBookAll', payload: { options: { all }, params: {...key},query }}) - return getters['getShortBookAll']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryShortBookAll API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryGetPrices({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryGetPrices( key.contractAddr, key.priceDenom, key.assetDenom)).data - - - commit('QUERY', { query: 'GetPrices', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryGetPrices', payload: { options: { all }, params: {...key},query }}) - return getters['getGetPrices']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryGetPrices API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryGetTwaps({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryGetTwaps( key.contractAddr, key.lookbackSeconds)).data - - - commit('QUERY', { query: 'GetTwaps', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryGetTwaps', payload: { options: { all }, params: {...key},query }}) - return getters['getGetTwaps']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryGetTwaps API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryAssetMetadata({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryAssetMetadata( key.denom)).data - - - commit('QUERY', { query: 'AssetMetadata', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAssetMetadata', payload: { options: { all }, params: {...key},query }}) - return getters['getAssetMetadata']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryAssetMetadata API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryAssetList({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryAssetList()).data - - - commit('QUERY', { query: 'AssetList', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAssetList', payload: { options: { all }, params: {...key},query }}) - return getters['getAssetList']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryAssetList API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryGetRegisteredPairs({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryGetRegisteredPairs(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryGetRegisteredPairs({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'GetRegisteredPairs', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryGetRegisteredPairs', payload: { options: { all }, params: {...key},query }}) - return getters['getGetRegisteredPairs']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryGetRegisteredPairs API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryGetOrders({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryGetOrders( key.contractAddr, key.account)).data - - - commit('QUERY', { query: 'GetOrders', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryGetOrders', payload: { options: { all }, params: {...key},query }}) - return getters['getGetOrders']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryGetOrders API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryGetOrder({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryGetOrder( key.contractAddr, key.priceDenom, key.assetDenom, key.id)).data - - - commit('QUERY', { query: 'GetOrder', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryGetOrder', payload: { options: { all }, params: {...key},query }}) - return getters['getGetOrder']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryGetOrder API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryGetHistoricalPrices({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryGetHistoricalPrices( key.contractAddr, key.priceDenom, key.assetDenom, key.periodLengthInSeconds, key.numOfPeriods)).data - - - commit('QUERY', { query: 'GetHistoricalPrices', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryGetHistoricalPrices', payload: { options: { all }, params: {...key},query }}) - return getters['getGetHistoricalPrices']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryGetHistoricalPrices API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryGetMarketSummary({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryGetMarketSummary( key.contractAddr, key.priceDenom, key.assetDenom, key.lookbackInSeconds)).data - - - commit('QUERY', { query: 'GetMarketSummary', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryGetMarketSummary', payload: { options: { all }, params: {...key},query }}) - return getters['getGetMarketSummary']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryGetMarketSummary API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - async sendMsgPlaceOrders({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgPlaceOrders(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgPlaceOrders:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgPlaceOrders:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgRegisterContract({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgRegisterContract(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgRegisterContract:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgRegisterContract:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgCancelOrders({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCancelOrders(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgCancelOrders:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgCancelOrders:Send Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgPlaceOrders({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgPlaceOrders(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgPlaceOrders:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgPlaceOrders:Create Could not create message: ' + e.message) - } - } - }, - async MsgRegisterContract({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgRegisterContract(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgRegisterContract:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgRegisterContract:Create Could not create message: ' + e.message) - } - } - }, - async MsgCancelOrders({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCancelOrders(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgCancelOrders:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgCancelOrders:Create Could not create message: ' + e.message) - } - } - }, - - } -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/index.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/index.d.ts deleted file mode 100644 index 85f398e7fa..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/index.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgRegisterContract } from "./types/dex/tx"; -import { MsgCancelOrders } from "./types/dex/tx"; -import { MsgPlaceOrders } from "./types/dex/tx"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; - msgRegisterContract: (data: MsgRegisterContract) => EncodeObject; - msgCancelOrders: (data: MsgCancelOrders) => EncodeObject; - msgPlaceOrders: (data: MsgPlaceOrders) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/index.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/index.js deleted file mode 100644 index c62bd4b9ca..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/index.js +++ /dev/null @@ -1,40 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgRegisterContract } from "./types/dex/tx"; -import { MsgCancelOrders } from "./types/dex/tx"; -import { MsgPlaceOrders } from "./types/dex/tx"; -const types = [ - ["/seiprotocol.seichain.dex.MsgRegisterContract", MsgRegisterContract], - ["/seiprotocol.seichain.dex.MsgCancelOrders", MsgCancelOrders], - ["/seiprotocol.seichain.dex.MsgPlaceOrders", MsgPlaceOrders], -]; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - msgRegisterContract: (data) => ({ typeUrl: "/seiprotocol.seichain.dex.MsgRegisterContract", value: MsgRegisterContract.fromPartial(data) }), - msgCancelOrders: (data) => ({ typeUrl: "/seiprotocol.seichain.dex.MsgCancelOrders", value: MsgCancelOrders.fromPartial(data) }), - msgPlaceOrders: (data) => ({ typeUrl: "/seiprotocol.seichain.dex.MsgPlaceOrders", value: MsgPlaceOrders.fromPartial(data) }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/index.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/index.ts deleted file mode 100755 index 3120c51e38..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/index.ts +++ /dev/null @@ -1,66 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgPlaceOrders } from "./types/dex/tx"; -import { MsgRegisterContract } from "./types/dex/tx"; -import { MsgCancelOrders } from "./types/dex/tx"; - - -const types = [ - ["/seiprotocol.seichain.dex.MsgPlaceOrders", MsgPlaceOrders], - ["/seiprotocol.seichain.dex.MsgRegisterContract", MsgRegisterContract], - ["/seiprotocol.seichain.dex.MsgCancelOrders", MsgCancelOrders], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgPlaceOrders: (data: MsgPlaceOrders): EncodeObject => ({ typeUrl: "/seiprotocol.seichain.dex.MsgPlaceOrders", value: MsgPlaceOrders.fromPartial( data ) }), - msgRegisterContract: (data: MsgRegisterContract): EncodeObject => ({ typeUrl: "/seiprotocol.seichain.dex.MsgRegisterContract", value: MsgRegisterContract.fromPartial( data ) }), - msgCancelOrders: (data: MsgCancelOrders): EncodeObject => ({ typeUrl: "/seiprotocol.seichain.dex.MsgCancelOrders", value: MsgCancelOrders.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/rest.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/rest.d.ts deleted file mode 100644 index aceae166ca..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/rest.d.ts +++ /dev/null @@ -1,550 +0,0 @@ -export interface DexAllocation { - /** @format uint64 */ - orderId?: string; - quantity?: string; - account?: string; -} -export interface DexAssetIBCInfo { - sourceChannel?: string; - dstChannel?: string; - sourceDenom?: string; - sourceChainID?: string; -} -export interface DexAssetMetadata { - ibcInfo?: DexAssetIBCInfo; - typeAsset?: string; - /** - * Metadata represents a struct that describes - * a basic token. - */ - metadata?: V1Beta1Metadata; -} -export interface DexCancellation { - /** @format uint64 */ - id?: string; - initiator?: DexCancellationInitiator; - creator?: string; - contractAddr?: string; - priceDenom?: string; - assetDenom?: string; - positionDirection?: DexPositionDirection; - price?: string; -} -export declare enum DexCancellationInitiator { - USER = "USER", - LIQUIDATED = "LIQUIDATED" -} -export interface DexContractDependencyInfo { - dependency?: string; - immediateElderSibling?: string; - immediateYoungerSibling?: string; -} -export interface DexContractInfo { - /** @format uint64 */ - codeId?: string; - contractAddr?: string; - needHook?: boolean; - needOrderMatching?: boolean; - dependencies?: DexContractDependencyInfo[]; - /** @format int64 */ - numIncomingDependencies?: string; -} -export interface DexLongBook { - price?: string; - entry?: DexOrderEntry; -} -export interface DexMatchResult { - /** @format int64 */ - height?: string; - contractAddr?: string; - orders?: DexOrder[]; - settlements?: DexSettlementEntry[]; - cancellations?: DexCancellation[]; -} -export declare type DexMsgCancelOrdersResponse = object; -export interface DexMsgPlaceOrdersResponse { - orderIds?: string[]; -} -export declare type DexMsgRegisterContractResponse = object; -export interface DexOrder { - /** @format uint64 */ - id?: string; - status?: DexOrderStatus; - account?: string; - contractAddr?: string; - price?: string; - quantity?: string; - priceDenom?: string; - assetDenom?: string; - orderType?: DexOrderType; - positionDirection?: DexPositionDirection; - data?: string; - statusDescription?: string; -} -export interface DexOrderEntry { - price?: string; - quantity?: string; - allocations?: DexAllocation[]; - priceDenom?: string; - assetDenom?: string; -} -export declare enum DexOrderStatus { - PLACED = "PLACED", - FAILED_TO_PLACE = "FAILED_TO_PLACE", - CANCELLED = "CANCELLED", - FULFILLED = "FULFILLED" -} -export declare enum DexOrderType { - LIMIT = "LIMIT", - MARKET = "MARKET", - LIQUIDATION = "LIQUIDATION", - FOKMARKET = "FOKMARKET" -} -export interface DexPair { - priceDenom?: string; - assetDenom?: string; - ticksize?: string; -} -export declare enum DexPositionDirection { - LONG = "LONG", - SHORT = "SHORT" -} -export interface DexPrice { - /** @format uint64 */ - snapshotTimestampInSeconds?: string; - price?: string; - pair?: DexPair; -} -export interface DexPriceCandlestick { - /** @format uint64 */ - beginTimestamp?: string; - /** @format uint64 */ - endTimestamp?: string; - open?: string; - high?: string; - low?: string; - close?: string; - volume?: string; -} -export interface DexQueryAllLongBookResponse { - LongBook?: DexLongBook[]; - /** - * 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; - * } - */ - pagination?: V1Beta1PageResponse; -} -export interface DexQueryAllShortBookResponse { - ShortBook?: DexShortBook[]; - /** - * 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; - * } - */ - pagination?: V1Beta1PageResponse; -} -export interface DexQueryAssetListResponse { - assetList?: DexAssetMetadata[]; -} -export interface DexQueryAssetMetadataResponse { - metadata?: DexAssetMetadata; -} -export interface DexQueryGetHistoricalPricesResponse { - prices?: DexPriceCandlestick[]; -} -export interface DexQueryGetLongBookResponse { - LongBook?: DexLongBook; -} -export interface DexQueryGetMarketSummaryResponse { - totalVolume?: string; - totalVolumeNotional?: string; - highPrice?: string; - lowPrice?: string; - lastPrice?: string; -} -export interface DexQueryGetMatchResultResponse { - result?: DexMatchResult; -} -export interface DexQueryGetOrderByIDResponse { - order?: DexOrder; -} -export interface DexQueryGetOrdersResponse { - orders?: DexOrder[]; -} -export interface DexQueryGetPricesResponse { - prices?: DexPrice[]; -} -export interface DexQueryGetShortBookResponse { - ShortBook?: DexShortBook; -} -export interface DexQueryGetTwapsResponse { - twaps?: DexTwap[]; -} -export interface DexQueryOrderSimulationResponse { - ExecutedQuantity?: string; -} -/** - * QueryParamsResponse is response type for the Query/Params RPC method. - */ -export interface DexQueryParamsResponse { - /** params holds all the parameters of this module. */ - params?: SeichaindexParams; -} -export interface DexQueryRegisteredPairsResponse { - pairs?: DexPair[]; -} -export interface DexSettlementEntry { - account?: string; - priceDenom?: string; - assetDenom?: string; - quantity?: string; - executionCostOrProceed?: string; - expectedCostOrProceed?: string; - positionDirection?: string; - orderType?: string; - /** @format uint64 */ - orderId?: string; - /** @format uint64 */ - timestamp?: string; - /** @format uint64 */ - height?: string; - /** @format uint64 */ - settlementId?: string; -} -export interface DexShortBook { - price?: string; - entry?: DexOrderEntry; -} -export interface DexTwap { - pair?: DexPair; - twap?: string; - /** @format uint64 */ - lookbackSeconds?: string; -} -export interface ProtobufAny { - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** - * Params defines the parameters for the module. - */ -export interface SeichaindexParams { - /** @format uint64 */ - priceSnapshotRetention?: string; -} -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} -/** -* DenomUnit represents a struct that describes a given -denomination unit of the basic token. -*/ -export interface V1Beta1DenomUnit { - /** denom represents the string name of the given denom unit (e.g uatom). */ - denom?: string; - /** - * 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). - * @format int64 - */ - exponent?: number; - aliases?: string[]; -} -/** -* Metadata represents a struct that describes -a basic token. -*/ -export interface V1Beta1Metadata { - description?: string; - denomUnits?: V1Beta1DenomUnit[]; - /** base represents the base denom (should be the DenomUnit with exponent = 0). */ - base?: string; - /** - * display indicates the suggested denom that should be - * displayed in clients. - */ - display?: string; - /** Since: cosmos-sdk 0.43 */ - name?: string; - /** - * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - * be the same as the display. - * - * Since: cosmos-sdk 0.43 - */ - symbol?: string; -} -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - /** - * 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. - * @format uint64 - */ - offset?: string; - /** - * 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. - * @format uint64 - */ - limit?: string; - /** - * 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. - */ - countTotal?: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse?: boolean; -} -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - nextKey?: string; - /** @format uint64 */ - total?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title dex/asset_list.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryAssetList - * @summary Returns metadata for all the assets - * @request GET:/sei-protocol/seichain/dex/asset_list - */ - queryAssetList: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryAssetMetadata - * @summary Returns the metadata for a specified denom / display type - * @request GET:/sei-protocol/seichain/dex/asset_list/{denom} - */ - queryAssetMetadata: (denom: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryGetHistoricalPrices - * @request GET:/sei-protocol/seichain/dex/get_historical_prices/{contractAddr}/{priceDenom}/{assetDenom}/{periodLengthInSeconds}/{numOfPeriods} - */ - queryGetHistoricalPrices: (contractAddr: string, priceDenom: string, assetDenom: string, periodLengthInSeconds: string, numOfPeriods: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryGetMarketSummary - * @request GET:/sei-protocol/seichain/dex/get_market_summary/{contractAddr}/{priceDenom}/{assetDenom}/{lookbackInSeconds} - */ - queryGetMarketSummary: (contractAddr: string, priceDenom: string, assetDenom: string, lookbackInSeconds: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryGetOrder - * @request GET:/sei-protocol/seichain/dex/get_order_by_id/{contractAddr}/{priceDenom}/{assetDenom}/{id} - */ - queryGetOrder: (contractAddr: string, priceDenom: string, assetDenom: string, id: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryGetOrders - * @request GET:/sei-protocol/seichain/dex/get_orders/{contractAddr}/{account} - */ - queryGetOrders: (contractAddr: string, account: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryGetPrices - * @request GET:/sei-protocol/seichain/dex/get_prices/{contractAddr}/{priceDenom}/{assetDenom} - */ - queryGetPrices: (contractAddr: string, priceDenom: string, assetDenom: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryGetTwaps - * @request GET:/sei-protocol/seichain/dex/get_twaps/{contractAddr}/{lookbackSeconds} - */ - queryGetTwaps: (contractAddr: string, lookbackSeconds: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryLongBookAll - * @summary Queries a list of LongBook items. - * @request GET:/sei-protocol/seichain/dex/long_book/{contractAddr}/{priceDenom}/{assetDenom} - */ - queryLongBookAll: (contractAddr: string, priceDenom: string, assetDenom: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryLongBook - * @summary Queries a LongBook by id. - * @request GET:/sei-protocol/seichain/dex/long_book/{contractAddr}/{priceDenom}/{assetDenom}/{price} - */ - queryLongBook: (contractAddr: string, priceDenom: string, assetDenom: string, price: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Parameters queries the parameters of the module. - * @request GET:/sei-protocol/seichain/dex/params - */ - queryParams: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryGetRegisteredPairs - * @summary Returns all registered pairs for specified contract address - * @request GET:/sei-protocol/seichain/dex/registered_pairs - */ - queryGetRegisteredPairs: (query?: { - contractAddr?: string; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryShortBookAll - * @summary Queries a list of ShortBook items. - * @request GET:/sei-protocol/seichain/dex/short_book/{contractAddr}/{priceDenom}/{assetDenom} - */ - queryShortBookAll: (contractAddr: string, priceDenom: string, assetDenom: string, query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.countTotal"?: boolean; - "pagination.reverse"?: boolean; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryShortBook - * @summary Queries a ShortBook by id. - * @request GET:/sei-protocol/seichain/dex/short_book/{contractAddr}/{priceDenom}/{assetDenom}/{price} - */ - queryShortBook: (contractAddr: string, priceDenom: string, assetDenom: string, price: string, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/rest.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/rest.js deleted file mode 100644 index e0082aac11..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/rest.js +++ /dev/null @@ -1,357 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var DexCancellationInitiator; -(function (DexCancellationInitiator) { - DexCancellationInitiator["USER"] = "USER"; - DexCancellationInitiator["LIQUIDATED"] = "LIQUIDATED"; -})(DexCancellationInitiator || (DexCancellationInitiator = {})); -export var DexOrderStatus; -(function (DexOrderStatus) { - DexOrderStatus["PLACED"] = "PLACED"; - DexOrderStatus["FAILED_TO_PLACE"] = "FAILED_TO_PLACE"; - DexOrderStatus["CANCELLED"] = "CANCELLED"; - DexOrderStatus["FULFILLED"] = "FULFILLED"; -})(DexOrderStatus || (DexOrderStatus = {})); -export var DexOrderType; -(function (DexOrderType) { - DexOrderType["LIMIT"] = "LIMIT"; - DexOrderType["MARKET"] = "MARKET"; - DexOrderType["LIQUIDATION"] = "LIQUIDATION"; - DexOrderType["FOKMARKET"] = "FOKMARKET"; -})(DexOrderType || (DexOrderType = {})); -export var DexPositionDirection; -(function (DexPositionDirection) { - DexPositionDirection["LONG"] = "LONG"; - DexPositionDirection["SHORT"] = "SHORT"; -})(DexPositionDirection || (DexPositionDirection = {})); -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title dex/asset_list.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryAssetList - * @summary Returns metadata for all the assets - * @request GET:/sei-protocol/seichain/dex/asset_list - */ - this.queryAssetList = (params = {}) => this.request({ - path: `/sei-protocol/seichain/dex/asset_list`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryAssetMetadata - * @summary Returns the metadata for a specified denom / display type - * @request GET:/sei-protocol/seichain/dex/asset_list/{denom} - */ - this.queryAssetMetadata = (denom, params = {}) => this.request({ - path: `/sei-protocol/seichain/dex/asset_list/${denom}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryGetHistoricalPrices - * @request GET:/sei-protocol/seichain/dex/get_historical_prices/{contractAddr}/{priceDenom}/{assetDenom}/{periodLengthInSeconds}/{numOfPeriods} - */ - this.queryGetHistoricalPrices = (contractAddr, priceDenom, assetDenom, periodLengthInSeconds, numOfPeriods, params = {}) => this.request({ - path: `/sei-protocol/seichain/dex/get_historical_prices/${contractAddr}/${priceDenom}/${assetDenom}/${periodLengthInSeconds}/${numOfPeriods}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryGetMarketSummary - * @request GET:/sei-protocol/seichain/dex/get_market_summary/{contractAddr}/{priceDenom}/{assetDenom}/{lookbackInSeconds} - */ - this.queryGetMarketSummary = (contractAddr, priceDenom, assetDenom, lookbackInSeconds, params = {}) => this.request({ - path: `/sei-protocol/seichain/dex/get_market_summary/${contractAddr}/${priceDenom}/${assetDenom}/${lookbackInSeconds}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryGetOrder - * @request GET:/sei-protocol/seichain/dex/get_order_by_id/{contractAddr}/{priceDenom}/{assetDenom}/{id} - */ - this.queryGetOrder = (contractAddr, priceDenom, assetDenom, id, params = {}) => this.request({ - path: `/sei-protocol/seichain/dex/get_order_by_id/${contractAddr}/${priceDenom}/${assetDenom}/${id}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryGetOrders - * @request GET:/sei-protocol/seichain/dex/get_orders/{contractAddr}/{account} - */ - this.queryGetOrders = (contractAddr, account, params = {}) => this.request({ - path: `/sei-protocol/seichain/dex/get_orders/${contractAddr}/${account}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryGetPrices - * @request GET:/sei-protocol/seichain/dex/get_prices/{contractAddr}/{priceDenom}/{assetDenom} - */ - this.queryGetPrices = (contractAddr, priceDenom, assetDenom, params = {}) => this.request({ - path: `/sei-protocol/seichain/dex/get_prices/${contractAddr}/${priceDenom}/${assetDenom}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryGetTwaps - * @request GET:/sei-protocol/seichain/dex/get_twaps/{contractAddr}/{lookbackSeconds} - */ - this.queryGetTwaps = (contractAddr, lookbackSeconds, params = {}) => this.request({ - path: `/sei-protocol/seichain/dex/get_twaps/${contractAddr}/${lookbackSeconds}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryLongBookAll - * @summary Queries a list of LongBook items. - * @request GET:/sei-protocol/seichain/dex/long_book/{contractAddr}/{priceDenom}/{assetDenom} - */ - this.queryLongBookAll = (contractAddr, priceDenom, assetDenom, query, params = {}) => this.request({ - path: `/sei-protocol/seichain/dex/long_book/${contractAddr}/${priceDenom}/${assetDenom}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryLongBook - * @summary Queries a LongBook by id. - * @request GET:/sei-protocol/seichain/dex/long_book/{contractAddr}/{priceDenom}/{assetDenom}/{price} - */ - this.queryLongBook = (contractAddr, priceDenom, assetDenom, price, params = {}) => this.request({ - path: `/sei-protocol/seichain/dex/long_book/${contractAddr}/${priceDenom}/${assetDenom}/${price}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Parameters queries the parameters of the module. - * @request GET:/sei-protocol/seichain/dex/params - */ - this.queryParams = (params = {}) => this.request({ - path: `/sei-protocol/seichain/dex/params`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryGetRegisteredPairs - * @summary Returns all registered pairs for specified contract address - * @request GET:/sei-protocol/seichain/dex/registered_pairs - */ - this.queryGetRegisteredPairs = (query, params = {}) => this.request({ - path: `/sei-protocol/seichain/dex/registered_pairs`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryShortBookAll - * @summary Queries a list of ShortBook items. - * @request GET:/sei-protocol/seichain/dex/short_book/{contractAddr}/{priceDenom}/{assetDenom} - */ - this.queryShortBookAll = (contractAddr, priceDenom, assetDenom, query, params = {}) => this.request({ - path: `/sei-protocol/seichain/dex/short_book/${contractAddr}/${priceDenom}/${assetDenom}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryShortBook - * @summary Queries a ShortBook by id. - * @request GET:/sei-protocol/seichain/dex/short_book/{contractAddr}/{priceDenom}/{assetDenom}/{price} - */ - this.queryShortBook = (contractAddr, priceDenom, assetDenom, price, params = {}) => this.request({ - path: `/sei-protocol/seichain/dex/short_book/${contractAddr}/${priceDenom}/${assetDenom}/${price}`, - method: "GET", - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/rest.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/rest.ts deleted file mode 100644 index 7d38fd1189..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/rest.ts +++ /dev/null @@ -1,897 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface DexAllocation { - /** @format uint64 */ - orderId?: string; - quantity?: string; - account?: string; -} - -export interface DexAssetIBCInfo { - sourceChannel?: string; - dstChannel?: string; - sourceDenom?: string; - sourceChainID?: string; -} - -export interface DexAssetMetadata { - ibcInfo?: DexAssetIBCInfo; - type_asset?: string; - - /** - * Metadata represents a struct that describes - * a basic token. - */ - metadata?: V1Beta1Metadata; -} - -export interface DexCancellation { - /** @format uint64 */ - id?: string; - initiator?: DexCancellationInitiator; - creator?: string; - contractAddr?: string; - priceDenom?: string; - assetDenom?: string; - positionDirection?: DexPositionDirection; - price?: string; -} - -export enum DexCancellationInitiator { - USER = "USER", - LIQUIDATED = "LIQUIDATED", -} - -export interface DexContractDependencyInfo { - dependency?: string; - immediateElderSibling?: string; - immediateYoungerSibling?: string; -} - -export interface DexContractInfo { - /** @format uint64 */ - codeId?: string; - contractAddr?: string; - needHook?: boolean; - needOrderMatching?: boolean; - dependencies?: DexContractDependencyInfo[]; - - /** @format int64 */ - numIncomingDependencies?: string; -} - -export interface DexLongBook { - price?: string; - entry?: DexOrderEntry; -} - -export interface DexMatchResult { - /** @format int64 */ - height?: string; - contractAddr?: string; - orders?: DexOrder[]; - settlements?: DexSettlementEntry[]; - cancellations?: DexCancellation[]; -} - -export type DexMsgCancelOrdersResponse = object; - -export interface DexMsgPlaceOrdersResponse { - orderIds?: string[]; -} - -export type DexMsgRegisterContractResponse = object; - -export interface DexOrder { - /** @format uint64 */ - id?: string; - status?: DexOrderStatus; - account?: string; - contractAddr?: string; - price?: string; - quantity?: string; - priceDenom?: string; - assetDenom?: string; - orderType?: DexOrderType; - positionDirection?: DexPositionDirection; - data?: string; - statusDescription?: string; -} - -export interface DexOrderEntry { - price?: string; - quantity?: string; - allocations?: DexAllocation[]; - priceDenom?: string; - assetDenom?: string; -} - -export enum DexOrderStatus { - PLACED = "PLACED", - FAILED_TO_PLACE = "FAILED_TO_PLACE", - CANCELLED = "CANCELLED", - FULFILLED = "FULFILLED", -} - -export enum DexOrderType { - LIMIT = "LIMIT", - MARKET = "MARKET", - LIQUIDATION = "LIQUIDATION", - FOKMARKET = "FOKMARKET", -} - -export interface DexPair { - priceDenom?: string; - assetDenom?: string; - ticksize?: string; -} - -export enum DexPositionDirection { - LONG = "LONG", - SHORT = "SHORT", -} - -export interface DexPrice { - /** @format uint64 */ - snapshotTimestampInSeconds?: string; - price?: string; - pair?: DexPair; -} - -export interface DexPriceCandlestick { - /** @format uint64 */ - beginTimestamp?: string; - - /** @format uint64 */ - endTimestamp?: string; - open?: string; - high?: string; - low?: string; - close?: string; - volume?: string; -} - -export interface DexQueryAllLongBookResponse { - LongBook?: DexLongBook[]; - - /** - * 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; - * } - */ - pagination?: V1Beta1PageResponse; -} - -export interface DexQueryAllShortBookResponse { - ShortBook?: DexShortBook[]; - - /** - * 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; - * } - */ - pagination?: V1Beta1PageResponse; -} - -export interface DexQueryAssetListResponse { - assetList?: DexAssetMetadata[]; -} - -export interface DexQueryAssetMetadataResponse { - metadata?: DexAssetMetadata; -} - -export interface DexQueryGetHistoricalPricesResponse { - prices?: DexPriceCandlestick[]; -} - -export interface DexQueryGetLongBookResponse { - LongBook?: DexLongBook; -} - -export interface DexQueryGetMarketSummaryResponse { - totalVolume?: string; - totalVolumeNotional?: string; - highPrice?: string; - lowPrice?: string; - lastPrice?: string; -} - -export interface DexQueryGetMatchResultResponse { - result?: DexMatchResult; -} - -export interface DexQueryGetOrderByIDResponse { - order?: DexOrder; -} - -export interface DexQueryGetOrdersResponse { - orders?: DexOrder[]; -} - -export interface DexQueryGetPricesResponse { - prices?: DexPrice[]; -} - -export interface DexQueryGetShortBookResponse { - ShortBook?: DexShortBook; -} - -export interface DexQueryGetTwapsResponse { - twaps?: DexTwap[]; -} - -export interface DexQueryOrderSimulationResponse { - ExecutedQuantity?: string; -} - -/** - * QueryParamsResponse is response type for the Query/Params RPC method. - */ -export interface DexQueryParamsResponse { - /** params holds all the parameters of this module. */ - params?: SeichaindexParams; -} - -export interface DexQueryRegisteredPairsResponse { - pairs?: DexPair[]; -} - -export interface DexSettlementEntry { - account?: string; - priceDenom?: string; - assetDenom?: string; - quantity?: string; - executionCostOrProceed?: string; - expectedCostOrProceed?: string; - positionDirection?: string; - orderType?: string; - - /** @format uint64 */ - orderId?: string; - - /** @format uint64 */ - timestamp?: string; - - /** @format uint64 */ - height?: string; - - /** @format uint64 */ - settlementId?: string; -} - -export interface DexShortBook { - price?: string; - entry?: DexOrderEntry; -} - -export interface DexTwap { - pair?: DexPair; - twap?: string; - - /** @format uint64 */ - lookbackSeconds?: string; -} - -export interface ProtobufAny { - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** - * Params defines the parameters for the module. - */ -export interface SeichaindexParams { - /** @format uint64 */ - price_snapshot_retention?: string; -} - -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -/** -* DenomUnit represents a struct that describes a given -denomination unit of the basic token. -*/ -export interface V1Beta1DenomUnit { - /** denom represents the string name of the given denom unit (e.g uatom). */ - denom?: string; - - /** - * 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). - * @format int64 - */ - exponent?: number; - aliases?: string[]; -} - -/** -* Metadata represents a struct that describes -a basic token. -*/ -export interface V1Beta1Metadata { - description?: string; - denom_units?: V1Beta1DenomUnit[]; - - /** base represents the base denom (should be the DenomUnit with exponent = 0). */ - base?: string; - - /** - * display indicates the suggested denom that should be - * displayed in clients. - */ - display?: string; - - /** Since: cosmos-sdk 0.43 */ - name?: string; - - /** - * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - * be the same as the display. - * - * Since: cosmos-sdk 0.43 - */ - symbol?: string; -} - -/** -* message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } -*/ -export interface V1Beta1PageRequest { - /** - * 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. - * @format byte - */ - key?: string; - - /** - * 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. - * @format uint64 - */ - offset?: string; - - /** - * 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. - * @format uint64 - */ - limit?: string; - - /** - * 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. - */ - count_total?: boolean; -} - -/** -* 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; - } -*/ -export interface V1Beta1PageResponse { - /** @format byte */ - next_key?: string; - - /** @format uint64 */ - total?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title dex/asset_list.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryAssetList - * @summary Returns metadata for all the assets - * @request GET:/sei-protocol/seichain/dex/asset_list - */ - queryAssetList = (params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/seichain/dex/asset_list`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryAssetMetadata - * @summary Returns the metadata for a specified denom / display type - * @request GET:/sei-protocol/seichain/dex/asset_list/{denom} - */ - queryAssetMetadata = (denom: string, params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/seichain/dex/asset_list/${denom}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryGetHistoricalPrices - * @request GET:/sei-protocol/seichain/dex/get_historical_prices/{contractAddr}/{priceDenom}/{assetDenom}/{periodLengthInSeconds}/{numOfPeriods} - */ - queryGetHistoricalPrices = ( - contractAddr: string, - priceDenom: string, - assetDenom: string, - periodLengthInSeconds: string, - numOfPeriods: string, - params: RequestParams = {}, - ) => - this.request({ - path: `/sei-protocol/seichain/dex/get_historical_prices/${contractAddr}/${priceDenom}/${assetDenom}/${periodLengthInSeconds}/${numOfPeriods}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryGetMarketSummary - * @request GET:/sei-protocol/seichain/dex/get_market_summary/{contractAddr}/{priceDenom}/{assetDenom}/{lookbackInSeconds} - */ - queryGetMarketSummary = ( - contractAddr: string, - priceDenom: string, - assetDenom: string, - lookbackInSeconds: string, - params: RequestParams = {}, - ) => - this.request({ - path: `/sei-protocol/seichain/dex/get_market_summary/${contractAddr}/${priceDenom}/${assetDenom}/${lookbackInSeconds}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryGetOrder - * @request GET:/sei-protocol/seichain/dex/get_order_by_id/{contractAddr}/{priceDenom}/{assetDenom}/{id} - */ - queryGetOrder = ( - contractAddr: string, - priceDenom: string, - assetDenom: string, - id: string, - params: RequestParams = {}, - ) => - this.request({ - path: `/sei-protocol/seichain/dex/get_order_by_id/${contractAddr}/${priceDenom}/${assetDenom}/${id}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryGetOrders - * @request GET:/sei-protocol/seichain/dex/get_orders/{contractAddr}/{account} - */ - queryGetOrders = (contractAddr: string, account: string, params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/seichain/dex/get_orders/${contractAddr}/${account}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryGetPrices - * @request GET:/sei-protocol/seichain/dex/get_prices/{contractAddr}/{priceDenom}/{assetDenom} - */ - queryGetPrices = (contractAddr: string, priceDenom: string, assetDenom: string, params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/seichain/dex/get_prices/${contractAddr}/${priceDenom}/${assetDenom}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryGetTwaps - * @request GET:/sei-protocol/seichain/dex/get_twaps/{contractAddr}/{lookbackSeconds} - */ - queryGetTwaps = (contractAddr: string, lookbackSeconds: string, params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/seichain/dex/get_twaps/${contractAddr}/${lookbackSeconds}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryLongBookAll - * @summary Queries a list of LongBook items. - * @request GET:/sei-protocol/seichain/dex/long_book/{contractAddr}/{priceDenom}/{assetDenom} - */ - queryLongBookAll = ( - contractAddr: string, - priceDenom: string, - assetDenom: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/sei-protocol/seichain/dex/long_book/${contractAddr}/${priceDenom}/${assetDenom}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryLongBook - * @summary Queries a LongBook by id. - * @request GET:/sei-protocol/seichain/dex/long_book/{contractAddr}/{priceDenom}/{assetDenom}/{price} - */ - queryLongBook = ( - contractAddr: string, - priceDenom: string, - assetDenom: string, - price: string, - params: RequestParams = {}, - ) => - this.request({ - path: `/sei-protocol/seichain/dex/long_book/${contractAddr}/${priceDenom}/${assetDenom}/${price}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Parameters queries the parameters of the module. - * @request GET:/sei-protocol/seichain/dex/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/seichain/dex/params`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryGetRegisteredPairs - * @summary Returns all registered pairs for specified contract address - * @request GET:/sei-protocol/seichain/dex/registered_pairs - */ - queryGetRegisteredPairs = (query?: { contractAddr?: string }, params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/seichain/dex/registered_pairs`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryShortBookAll - * @summary Queries a list of ShortBook items. - * @request GET:/sei-protocol/seichain/dex/short_book/{contractAddr}/{priceDenom}/{assetDenom} - */ - queryShortBookAll = ( - contractAddr: string, - priceDenom: string, - assetDenom: string, - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/sei-protocol/seichain/dex/short_book/${contractAddr}/${priceDenom}/${assetDenom}`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryShortBook - * @summary Queries a ShortBook by id. - * @request GET:/sei-protocol/seichain/dex/short_book/{contractAddr}/{priceDenom}/{assetDenom}/{price} - */ - queryShortBook = ( - contractAddr: string, - priceDenom: string, - assetDenom: string, - price: string, - params: RequestParams = {}, - ) => - this.request({ - path: `/sei-protocol/seichain/dex/short_book/${contractAddr}/${priceDenom}/${assetDenom}/${price}`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/bank/v1beta1/bank.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/bank/v1beta1/bank.d.ts deleted file mode 100644 index 10903df2f9..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/bank/v1beta1/bank.d.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.bank.v1beta1"; -/** Params defines the parameters for the bank module. */ -export interface Params { - sendEnabled: SendEnabled[]; - defaultSendEnabled: boolean; -} -/** - * SendEnabled maps coin denom to a send_enabled status (whether a denom is - * sendable). - */ -export interface SendEnabled { - denom: string; - enabled: boolean; -} -/** Input models transaction input. */ -export interface Input { - address: string; - coins: Coin[]; -} -/** Output models transaction outputs. */ -export interface Output { - address: string; - coins: Coin[]; -} -/** - * Supply represents a struct that passively keeps track of the total supply - * amounts in the network. - * This message is deprecated now that supply is indexed by denom. - * - * @deprecated - */ -export interface Supply { - total: Coin[]; -} -/** - * DenomUnit represents a struct that describes a given - * denomination unit of the basic token. - */ -export interface DenomUnit { - /** denom represents the string name of the given denom unit (e.g uatom). */ - denom: string; - /** - * 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). - */ - exponent: number; - /** aliases is a list of string aliases for the given denom */ - aliases: string[]; -} -/** - * Metadata represents a struct that describes - * a basic token. - */ -export interface Metadata { - description: string; - /** denom_units represents the list of DenomUnit's for a given coin */ - denomUnits: DenomUnit[]; - /** base represents the base denom (should be the DenomUnit with exponent = 0). */ - base: string; - /** - * display indicates the suggested denom that should be - * displayed in clients. - */ - display: string; - /** - * name defines the name of the token (eg: Cosmos Atom) - * - * Since: cosmos-sdk 0.43 - */ - name: string; - /** - * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - * be the same as the display. - * - * Since: cosmos-sdk 0.43 - */ - symbol: string; -} -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -export declare const SendEnabled: { - encode(message: SendEnabled, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SendEnabled; - fromJSON(object: any): SendEnabled; - toJSON(message: SendEnabled): unknown; - fromPartial(object: DeepPartial): SendEnabled; -}; -export declare const Input: { - encode(message: Input, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Input; - fromJSON(object: any): Input; - toJSON(message: Input): unknown; - fromPartial(object: DeepPartial): Input; -}; -export declare const Output: { - encode(message: Output, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Output; - fromJSON(object: any): Output; - toJSON(message: Output): unknown; - fromPartial(object: DeepPartial): Output; -}; -export declare const Supply: { - encode(message: Supply, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Supply; - fromJSON(object: any): Supply; - toJSON(message: Supply): unknown; - fromPartial(object: DeepPartial): Supply; -}; -export declare const DenomUnit: { - encode(message: DenomUnit, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DenomUnit; - fromJSON(object: any): DenomUnit; - toJSON(message: DenomUnit): unknown; - fromPartial(object: DeepPartial): DenomUnit; -}; -export declare const Metadata: { - encode(message: Metadata, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Metadata; - fromJSON(object: any): Metadata; - toJSON(message: Metadata): unknown; - fromPartial(object: DeepPartial): Metadata; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/bank/v1beta1/bank.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/bank/v1beta1/bank.js deleted file mode 100644 index 4cf7c7e5f8..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/bank/v1beta1/bank.js +++ /dev/null @@ -1,616 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.bank.v1beta1"; -const baseParams = { defaultSendEnabled: false }; -export const Params = { - encode(message, writer = Writer.create()) { - for (const v of message.sendEnabled) { - SendEnabled.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.defaultSendEnabled === true) { - writer.uint32(16).bool(message.defaultSendEnabled); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - message.sendEnabled = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sendEnabled.push(SendEnabled.decode(reader, reader.uint32())); - break; - case 2: - message.defaultSendEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - message.sendEnabled = []; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - for (const e of object.sendEnabled) { - message.sendEnabled.push(SendEnabled.fromJSON(e)); - } - } - if (object.defaultSendEnabled !== undefined && - object.defaultSendEnabled !== null) { - message.defaultSendEnabled = Boolean(object.defaultSendEnabled); - } - else { - message.defaultSendEnabled = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.sendEnabled) { - obj.sendEnabled = message.sendEnabled.map((e) => e ? SendEnabled.toJSON(e) : undefined); - } - else { - obj.sendEnabled = []; - } - message.defaultSendEnabled !== undefined && - (obj.defaultSendEnabled = message.defaultSendEnabled); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - message.sendEnabled = []; - if (object.sendEnabled !== undefined && object.sendEnabled !== null) { - for (const e of object.sendEnabled) { - message.sendEnabled.push(SendEnabled.fromPartial(e)); - } - } - if (object.defaultSendEnabled !== undefined && - object.defaultSendEnabled !== null) { - message.defaultSendEnabled = object.defaultSendEnabled; - } - else { - message.defaultSendEnabled = false; - } - return message; - }, -}; -const baseSendEnabled = { denom: "", enabled: false }; -export const SendEnabled = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.enabled === true) { - writer.uint32(16).bool(message.enabled); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSendEnabled }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSendEnabled }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.enabled !== undefined && object.enabled !== null) { - message.enabled = Boolean(object.enabled); - } - else { - message.enabled = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.enabled !== undefined && (obj.enabled = message.enabled); - return obj; - }, - fromPartial(object) { - const message = { ...baseSendEnabled }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.enabled !== undefined && object.enabled !== null) { - message.enabled = object.enabled; - } - else { - message.enabled = false; - } - return message; - }, -}; -const baseInput = { address: "" }; -export const Input = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseInput }; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseInput }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.coins = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseInput }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseOutput = { address: "" }; -export const Output = { - encode(message, writer = Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOutput }; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOutput }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.coins = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOutput }; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseSupply = {}; -export const Supply = { - encode(message, writer = Writer.create()) { - for (const v of message.total) { - Coin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSupply }; - message.total = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSupply }; - message.total = []; - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.total) { - obj.total = message.total.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.total = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSupply }; - message.total = []; - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseDenomUnit = { denom: "", exponent: 0, aliases: "" }; -export const DenomUnit = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.exponent !== 0) { - writer.uint32(16).uint32(message.exponent); - } - for (const v of message.aliases) { - writer.uint32(26).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDenomUnit }; - message.aliases = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.exponent = reader.uint32(); - break; - case 3: - message.aliases.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDenomUnit }; - message.aliases = []; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.exponent !== undefined && object.exponent !== null) { - message.exponent = Number(object.exponent); - } - else { - message.exponent = 0; - } - if (object.aliases !== undefined && object.aliases !== null) { - for (const e of object.aliases) { - message.aliases.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.exponent !== undefined && (obj.exponent = message.exponent); - if (message.aliases) { - obj.aliases = message.aliases.map((e) => e); - } - else { - obj.aliases = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDenomUnit }; - message.aliases = []; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.exponent !== undefined && object.exponent !== null) { - message.exponent = object.exponent; - } - else { - message.exponent = 0; - } - if (object.aliases !== undefined && object.aliases !== null) { - for (const e of object.aliases) { - message.aliases.push(e); - } - } - return message; - }, -}; -const baseMetadata = { - description: "", - base: "", - display: "", - name: "", - symbol: "", -}; -export const Metadata = { - encode(message, writer = Writer.create()) { - if (message.description !== "") { - writer.uint32(10).string(message.description); - } - for (const v of message.denomUnits) { - DenomUnit.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.base !== "") { - writer.uint32(26).string(message.base); - } - if (message.display !== "") { - writer.uint32(34).string(message.display); - } - if (message.name !== "") { - writer.uint32(42).string(message.name); - } - if (message.symbol !== "") { - writer.uint32(50).string(message.symbol); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMetadata }; - message.denomUnits = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = reader.string(); - break; - case 2: - message.denomUnits.push(DenomUnit.decode(reader, reader.uint32())); - break; - case 3: - message.base = reader.string(); - break; - case 4: - message.display = reader.string(); - break; - case 5: - message.name = reader.string(); - break; - case 6: - message.symbol = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMetadata }; - message.denomUnits = []; - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.denomUnits !== undefined && object.denomUnits !== null) { - for (const e of object.denomUnits) { - message.denomUnits.push(DenomUnit.fromJSON(e)); - } - } - if (object.base !== undefined && object.base !== null) { - message.base = String(object.base); - } - else { - message.base = ""; - } - if (object.display !== undefined && object.display !== null) { - message.display = String(object.display); - } - else { - message.display = ""; - } - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.symbol !== undefined && object.symbol !== null) { - message.symbol = String(object.symbol); - } - else { - message.symbol = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.description !== undefined && - (obj.description = message.description); - if (message.denomUnits) { - obj.denomUnits = message.denomUnits.map((e) => e ? DenomUnit.toJSON(e) : undefined); - } - else { - obj.denomUnits = []; - } - message.base !== undefined && (obj.base = message.base); - message.display !== undefined && (obj.display = message.display); - message.name !== undefined && (obj.name = message.name); - message.symbol !== undefined && (obj.symbol = message.symbol); - return obj; - }, - fromPartial(object) { - const message = { ...baseMetadata }; - message.denomUnits = []; - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.denomUnits !== undefined && object.denomUnits !== null) { - for (const e of object.denomUnits) { - message.denomUnits.push(DenomUnit.fromPartial(e)); - } - } - if (object.base !== undefined && object.base !== null) { - message.base = object.base; - } - else { - message.base = ""; - } - if (object.display !== undefined && object.display !== null) { - message.display = object.display; - } - else { - message.display = ""; - } - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.symbol !== undefined && object.symbol !== null) { - message.symbol = object.symbol; - } - else { - message.symbol = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/bank/v1beta1/bank.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/bank/v1beta1/bank.ts deleted file mode 100644 index 8733932450..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/bank/v1beta1/bank.ts +++ /dev/null @@ -1,737 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.bank.v1beta1"; - -/** Params defines the parameters for the bank module. */ -export interface Params { - send_enabled: SendEnabled[]; - default_send_enabled: boolean; -} - -/** - * SendEnabled maps coin denom to a send_enabled status (whether a denom is - * sendable). - */ -export interface SendEnabled { - denom: string; - enabled: boolean; -} - -/** Input models transaction input. */ -export interface Input { - address: string; - coins: Coin[]; -} - -/** Output models transaction outputs. */ -export interface Output { - address: string; - coins: Coin[]; -} - -/** - * Supply represents a struct that passively keeps track of the total supply - * amounts in the network. - * This message is deprecated now that supply is indexed by denom. - * - * @deprecated - */ -export interface Supply { - total: Coin[]; -} - -/** - * DenomUnit represents a struct that describes a given - * denomination unit of the basic token. - */ -export interface DenomUnit { - /** denom represents the string name of the given denom unit (e.g uatom). */ - denom: string; - /** - * 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). - */ - exponent: number; - /** aliases is a list of string aliases for the given denom */ - aliases: string[]; -} - -/** - * Metadata represents a struct that describes - * a basic token. - */ -export interface Metadata { - description: string; - /** denom_units represents the list of DenomUnit's for a given coin */ - denom_units: DenomUnit[]; - /** base represents the base denom (should be the DenomUnit with exponent = 0). */ - base: string; - /** - * display indicates the suggested denom that should be - * displayed in clients. - */ - display: string; - /** - * name defines the name of the token (eg: Cosmos Atom) - * - * Since: cosmos-sdk 0.43 - */ - name: string; - /** - * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - * be the same as the display. - * - * Since: cosmos-sdk 0.43 - */ - symbol: string; -} - -const baseParams: object = { default_send_enabled: false }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - for (const v of message.send_enabled) { - SendEnabled.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.default_send_enabled === true) { - writer.uint32(16).bool(message.default_send_enabled); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - message.send_enabled = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.send_enabled.push( - SendEnabled.decode(reader, reader.uint32()) - ); - break; - case 2: - message.default_send_enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - message.send_enabled = []; - if (object.send_enabled !== undefined && object.send_enabled !== null) { - for (const e of object.send_enabled) { - message.send_enabled.push(SendEnabled.fromJSON(e)); - } - } - if ( - object.default_send_enabled !== undefined && - object.default_send_enabled !== null - ) { - message.default_send_enabled = Boolean(object.default_send_enabled); - } else { - message.default_send_enabled = false; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.send_enabled) { - obj.send_enabled = message.send_enabled.map((e) => - e ? SendEnabled.toJSON(e) : undefined - ); - } else { - obj.send_enabled = []; - } - message.default_send_enabled !== undefined && - (obj.default_send_enabled = message.default_send_enabled); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - message.send_enabled = []; - if (object.send_enabled !== undefined && object.send_enabled !== null) { - for (const e of object.send_enabled) { - message.send_enabled.push(SendEnabled.fromPartial(e)); - } - } - if ( - object.default_send_enabled !== undefined && - object.default_send_enabled !== null - ) { - message.default_send_enabled = object.default_send_enabled; - } else { - message.default_send_enabled = false; - } - return message; - }, -}; - -const baseSendEnabled: object = { denom: "", enabled: false }; - -export const SendEnabled = { - encode(message: SendEnabled, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.enabled === true) { - writer.uint32(16).bool(message.enabled); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SendEnabled { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSendEnabled } as SendEnabled; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SendEnabled { - const message = { ...baseSendEnabled } as SendEnabled; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.enabled !== undefined && object.enabled !== null) { - message.enabled = Boolean(object.enabled); - } else { - message.enabled = false; - } - return message; - }, - - toJSON(message: SendEnabled): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.enabled !== undefined && (obj.enabled = message.enabled); - return obj; - }, - - fromPartial(object: DeepPartial): SendEnabled { - const message = { ...baseSendEnabled } as SendEnabled; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.enabled !== undefined && object.enabled !== null) { - message.enabled = object.enabled; - } else { - message.enabled = false; - } - return message; - }, -}; - -const baseInput: object = { address: "" }; - -export const Input = { - encode(message: Input, writer: Writer = Writer.create()): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Input { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseInput } as Input; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Input { - const message = { ...baseInput } as Input; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Input): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.coins = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Input { - const message = { ...baseInput } as Input; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOutput: object = { address: "" }; - -export const Output = { - encode(message: Output, writer: Writer = Writer.create()): Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Output { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOutput } as Output; - message.coins = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Output { - const message = { ...baseOutput } as Output; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Output): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.coins = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Output { - const message = { ...baseOutput } as Output; - message.coins = []; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.coins !== undefined && object.coins !== null) { - for (const e of object.coins) { - message.coins.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSupply: object = {}; - -export const Supply = { - encode(message: Supply, writer: Writer = Writer.create()): Writer { - for (const v of message.total) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Supply { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSupply } as Supply; - message.total = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Supply { - const message = { ...baseSupply } as Supply; - message.total = []; - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Supply): unknown { - const obj: any = {}; - if (message.total) { - obj.total = message.total.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.total = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Supply { - const message = { ...baseSupply } as Supply; - message.total = []; - if (object.total !== undefined && object.total !== null) { - for (const e of object.total) { - message.total.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseDenomUnit: object = { denom: "", exponent: 0, aliases: "" }; - -export const DenomUnit = { - encode(message: DenomUnit, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.exponent !== 0) { - writer.uint32(16).uint32(message.exponent); - } - for (const v of message.aliases) { - writer.uint32(26).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DenomUnit { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDenomUnit } as DenomUnit; - message.aliases = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.exponent = reader.uint32(); - break; - case 3: - message.aliases.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DenomUnit { - const message = { ...baseDenomUnit } as DenomUnit; - message.aliases = []; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.exponent !== undefined && object.exponent !== null) { - message.exponent = Number(object.exponent); - } else { - message.exponent = 0; - } - if (object.aliases !== undefined && object.aliases !== null) { - for (const e of object.aliases) { - message.aliases.push(String(e)); - } - } - return message; - }, - - toJSON(message: DenomUnit): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.exponent !== undefined && (obj.exponent = message.exponent); - if (message.aliases) { - obj.aliases = message.aliases.map((e) => e); - } else { - obj.aliases = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DenomUnit { - const message = { ...baseDenomUnit } as DenomUnit; - message.aliases = []; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.exponent !== undefined && object.exponent !== null) { - message.exponent = object.exponent; - } else { - message.exponent = 0; - } - if (object.aliases !== undefined && object.aliases !== null) { - for (const e of object.aliases) { - message.aliases.push(e); - } - } - return message; - }, -}; - -const baseMetadata: object = { - description: "", - base: "", - display: "", - name: "", - symbol: "", -}; - -export const Metadata = { - encode(message: Metadata, writer: Writer = Writer.create()): Writer { - if (message.description !== "") { - writer.uint32(10).string(message.description); - } - for (const v of message.denom_units) { - DenomUnit.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.base !== "") { - writer.uint32(26).string(message.base); - } - if (message.display !== "") { - writer.uint32(34).string(message.display); - } - if (message.name !== "") { - writer.uint32(42).string(message.name); - } - if (message.symbol !== "") { - writer.uint32(50).string(message.symbol); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Metadata { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMetadata } as Metadata; - message.denom_units = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = reader.string(); - break; - case 2: - message.denom_units.push(DenomUnit.decode(reader, reader.uint32())); - break; - case 3: - message.base = reader.string(); - break; - case 4: - message.display = reader.string(); - break; - case 5: - message.name = reader.string(); - break; - case 6: - message.symbol = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Metadata { - const message = { ...baseMetadata } as Metadata; - message.denom_units = []; - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.denom_units !== undefined && object.denom_units !== null) { - for (const e of object.denom_units) { - message.denom_units.push(DenomUnit.fromJSON(e)); - } - } - if (object.base !== undefined && object.base !== null) { - message.base = String(object.base); - } else { - message.base = ""; - } - if (object.display !== undefined && object.display !== null) { - message.display = String(object.display); - } else { - message.display = ""; - } - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.symbol !== undefined && object.symbol !== null) { - message.symbol = String(object.symbol); - } else { - message.symbol = ""; - } - return message; - }, - - toJSON(message: Metadata): unknown { - const obj: any = {}; - message.description !== undefined && - (obj.description = message.description); - if (message.denom_units) { - obj.denom_units = message.denom_units.map((e) => - e ? DenomUnit.toJSON(e) : undefined - ); - } else { - obj.denom_units = []; - } - message.base !== undefined && (obj.base = message.base); - message.display !== undefined && (obj.display = message.display); - message.name !== undefined && (obj.name = message.name); - message.symbol !== undefined && (obj.symbol = message.symbol); - return obj; - }, - - fromPartial(object: DeepPartial): Metadata { - const message = { ...baseMetadata } as Metadata; - message.denom_units = []; - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.denom_units !== undefined && object.denom_units !== null) { - for (const e of object.denom_units) { - message.denom_units.push(DenomUnit.fromPartial(e)); - } - } - if (object.base !== undefined && object.base !== null) { - message.base = object.base; - } else { - message.base = ""; - } - if (object.display !== undefined && object.display !== null) { - message.display = object.display; - } else { - message.display = ""; - } - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.symbol !== undefined && object.symbol !== null) { - message.symbol = object.symbol; - } else { - message.symbol = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index 767d2c358f..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - countTotal: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; -} -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index b5f5ced3d6..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,242 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { - offset: 0, - limit: 0, - countTotal: false, - reverse: false, -}; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } - else { - message.reverse = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - message.reverse !== undefined && (obj.reverse = message.reverse); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } - else { - message.reverse = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 0bc568f477..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,300 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - count_total: boolean; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, count_total: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.count_total !== undefined && - (obj.count_total = message.count_total); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac6a3..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb30cd..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98406..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos_proto/cosmos.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos_proto/cosmos.d.ts deleted file mode 100644 index ac37814871..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos_proto/cosmos.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos_proto/cosmos.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos_proto/cosmos.js deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos_proto/cosmos.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/asset_list.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/asset_list.d.ts deleted file mode 100644 index 5ce0ace6a0..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/asset_list.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Metadata } from "../cosmos/bank/v1beta1/bank"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -export interface AssetIBCInfo { - sourceChannel: string; - dstChannel: string; - sourceDenom: string; - sourceChainID: string; -} -export interface AssetMetadata { - ibcInfo: AssetIBCInfo | undefined; - /** Ex: cw20, ics20, erc20 */ - typeAsset: string; - metadata: Metadata | undefined; -} -export declare const AssetIBCInfo: { - encode(message: AssetIBCInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): AssetIBCInfo; - fromJSON(object: any): AssetIBCInfo; - toJSON(message: AssetIBCInfo): unknown; - fromPartial(object: DeepPartial): AssetIBCInfo; -}; -export declare const AssetMetadata: { - encode(message: AssetMetadata, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): AssetMetadata; - fromJSON(object: any): AssetMetadata; - toJSON(message: AssetMetadata): unknown; - fromPartial(object: DeepPartial): AssetMetadata; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/asset_list.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/asset_list.js deleted file mode 100644 index e564c226ae..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/asset_list.js +++ /dev/null @@ -1,215 +0,0 @@ -/* eslint-disable */ -import { Metadata } from "../cosmos/bank/v1beta1/bank"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const baseAssetIBCInfo = { - sourceChannel: "", - dstChannel: "", - sourceDenom: "", - sourceChainID: "", -}; -export const AssetIBCInfo = { - encode(message, writer = Writer.create()) { - if (message.sourceChannel !== "") { - writer.uint32(10).string(message.sourceChannel); - } - if (message.dstChannel !== "") { - writer.uint32(18).string(message.dstChannel); - } - if (message.sourceDenom !== "") { - writer.uint32(26).string(message.sourceDenom); - } - if (message.sourceChainID !== "") { - writer.uint32(34).string(message.sourceChainID); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAssetIBCInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sourceChannel = reader.string(); - break; - case 2: - message.dstChannel = reader.string(); - break; - case 3: - message.sourceDenom = reader.string(); - break; - case 4: - message.sourceChainID = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAssetIBCInfo }; - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = String(object.sourceChannel); - } - else { - message.sourceChannel = ""; - } - if (object.dstChannel !== undefined && object.dstChannel !== null) { - message.dstChannel = String(object.dstChannel); - } - else { - message.dstChannel = ""; - } - if (object.sourceDenom !== undefined && object.sourceDenom !== null) { - message.sourceDenom = String(object.sourceDenom); - } - else { - message.sourceDenom = ""; - } - if (object.sourceChainID !== undefined && object.sourceChainID !== null) { - message.sourceChainID = String(object.sourceChainID); - } - else { - message.sourceChainID = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sourceChannel !== undefined && - (obj.sourceChannel = message.sourceChannel); - message.dstChannel !== undefined && (obj.dstChannel = message.dstChannel); - message.sourceDenom !== undefined && - (obj.sourceDenom = message.sourceDenom); - message.sourceChainID !== undefined && - (obj.sourceChainID = message.sourceChainID); - return obj; - }, - fromPartial(object) { - const message = { ...baseAssetIBCInfo }; - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = object.sourceChannel; - } - else { - message.sourceChannel = ""; - } - if (object.dstChannel !== undefined && object.dstChannel !== null) { - message.dstChannel = object.dstChannel; - } - else { - message.dstChannel = ""; - } - if (object.sourceDenom !== undefined && object.sourceDenom !== null) { - message.sourceDenom = object.sourceDenom; - } - else { - message.sourceDenom = ""; - } - if (object.sourceChainID !== undefined && object.sourceChainID !== null) { - message.sourceChainID = object.sourceChainID; - } - else { - message.sourceChainID = ""; - } - return message; - }, -}; -const baseAssetMetadata = { typeAsset: "" }; -export const AssetMetadata = { - encode(message, writer = Writer.create()) { - if (message.ibcInfo !== undefined) { - AssetIBCInfo.encode(message.ibcInfo, writer.uint32(10).fork()).ldelim(); - } - if (message.typeAsset !== "") { - writer.uint32(18).string(message.typeAsset); - } - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAssetMetadata }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ibcInfo = AssetIBCInfo.decode(reader, reader.uint32()); - break; - case 2: - message.typeAsset = reader.string(); - break; - case 3: - message.metadata = Metadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAssetMetadata }; - if (object.ibcInfo !== undefined && object.ibcInfo !== null) { - message.ibcInfo = AssetIBCInfo.fromJSON(object.ibcInfo); - } - else { - message.ibcInfo = undefined; - } - if (object.typeAsset !== undefined && object.typeAsset !== null) { - message.typeAsset = String(object.typeAsset); - } - else { - message.typeAsset = ""; - } - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = Metadata.fromJSON(object.metadata); - } - else { - message.metadata = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ibcInfo !== undefined && - (obj.ibcInfo = message.ibcInfo - ? AssetIBCInfo.toJSON(message.ibcInfo) - : undefined); - message.typeAsset !== undefined && (obj.typeAsset = message.typeAsset); - message.metadata !== undefined && - (obj.metadata = message.metadata - ? Metadata.toJSON(message.metadata) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseAssetMetadata }; - if (object.ibcInfo !== undefined && object.ibcInfo !== null) { - message.ibcInfo = AssetIBCInfo.fromPartial(object.ibcInfo); - } - else { - message.ibcInfo = undefined; - } - if (object.typeAsset !== undefined && object.typeAsset !== null) { - message.typeAsset = object.typeAsset; - } - else { - message.typeAsset = ""; - } - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = Metadata.fromPartial(object.metadata); - } - else { - message.metadata = undefined; - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/asset_list.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/asset_list.ts deleted file mode 100644 index 3ae297613f..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/asset_list.ts +++ /dev/null @@ -1,239 +0,0 @@ -/* eslint-disable */ -import { Metadata } from "../cosmos/bank/v1beta1/bank"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -export interface AssetIBCInfo { - sourceChannel: string; - dstChannel: string; - sourceDenom: string; - sourceChainID: string; -} - -export interface AssetMetadata { - ibcInfo: AssetIBCInfo | undefined; - /** Ex: cw20, ics20, erc20 */ - type_asset: string; - metadata: Metadata | undefined; -} - -const baseAssetIBCInfo: object = { - sourceChannel: "", - dstChannel: "", - sourceDenom: "", - sourceChainID: "", -}; - -export const AssetIBCInfo = { - encode(message: AssetIBCInfo, writer: Writer = Writer.create()): Writer { - if (message.sourceChannel !== "") { - writer.uint32(10).string(message.sourceChannel); - } - if (message.dstChannel !== "") { - writer.uint32(18).string(message.dstChannel); - } - if (message.sourceDenom !== "") { - writer.uint32(26).string(message.sourceDenom); - } - if (message.sourceChainID !== "") { - writer.uint32(34).string(message.sourceChainID); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): AssetIBCInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAssetIBCInfo } as AssetIBCInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sourceChannel = reader.string(); - break; - case 2: - message.dstChannel = reader.string(); - break; - case 3: - message.sourceDenom = reader.string(); - break; - case 4: - message.sourceChainID = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): AssetIBCInfo { - const message = { ...baseAssetIBCInfo } as AssetIBCInfo; - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = String(object.sourceChannel); - } else { - message.sourceChannel = ""; - } - if (object.dstChannel !== undefined && object.dstChannel !== null) { - message.dstChannel = String(object.dstChannel); - } else { - message.dstChannel = ""; - } - if (object.sourceDenom !== undefined && object.sourceDenom !== null) { - message.sourceDenom = String(object.sourceDenom); - } else { - message.sourceDenom = ""; - } - if (object.sourceChainID !== undefined && object.sourceChainID !== null) { - message.sourceChainID = String(object.sourceChainID); - } else { - message.sourceChainID = ""; - } - return message; - }, - - toJSON(message: AssetIBCInfo): unknown { - const obj: any = {}; - message.sourceChannel !== undefined && - (obj.sourceChannel = message.sourceChannel); - message.dstChannel !== undefined && (obj.dstChannel = message.dstChannel); - message.sourceDenom !== undefined && - (obj.sourceDenom = message.sourceDenom); - message.sourceChainID !== undefined && - (obj.sourceChainID = message.sourceChainID); - return obj; - }, - - fromPartial(object: DeepPartial): AssetIBCInfo { - const message = { ...baseAssetIBCInfo } as AssetIBCInfo; - if (object.sourceChannel !== undefined && object.sourceChannel !== null) { - message.sourceChannel = object.sourceChannel; - } else { - message.sourceChannel = ""; - } - if (object.dstChannel !== undefined && object.dstChannel !== null) { - message.dstChannel = object.dstChannel; - } else { - message.dstChannel = ""; - } - if (object.sourceDenom !== undefined && object.sourceDenom !== null) { - message.sourceDenom = object.sourceDenom; - } else { - message.sourceDenom = ""; - } - if (object.sourceChainID !== undefined && object.sourceChainID !== null) { - message.sourceChainID = object.sourceChainID; - } else { - message.sourceChainID = ""; - } - return message; - }, -}; - -const baseAssetMetadata: object = { type_asset: "" }; - -export const AssetMetadata = { - encode(message: AssetMetadata, writer: Writer = Writer.create()): Writer { - if (message.ibcInfo !== undefined) { - AssetIBCInfo.encode(message.ibcInfo, writer.uint32(10).fork()).ldelim(); - } - if (message.type_asset !== "") { - writer.uint32(18).string(message.type_asset); - } - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): AssetMetadata { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAssetMetadata } as AssetMetadata; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ibcInfo = AssetIBCInfo.decode(reader, reader.uint32()); - break; - case 2: - message.type_asset = reader.string(); - break; - case 3: - message.metadata = Metadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): AssetMetadata { - const message = { ...baseAssetMetadata } as AssetMetadata; - if (object.ibcInfo !== undefined && object.ibcInfo !== null) { - message.ibcInfo = AssetIBCInfo.fromJSON(object.ibcInfo); - } else { - message.ibcInfo = undefined; - } - if (object.type_asset !== undefined && object.type_asset !== null) { - message.type_asset = String(object.type_asset); - } else { - message.type_asset = ""; - } - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = Metadata.fromJSON(object.metadata); - } else { - message.metadata = undefined; - } - return message; - }, - - toJSON(message: AssetMetadata): unknown { - const obj: any = {}; - message.ibcInfo !== undefined && - (obj.ibcInfo = message.ibcInfo - ? AssetIBCInfo.toJSON(message.ibcInfo) - : undefined); - message.type_asset !== undefined && (obj.type_asset = message.type_asset); - message.metadata !== undefined && - (obj.metadata = message.metadata - ? Metadata.toJSON(message.metadata) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): AssetMetadata { - const message = { ...baseAssetMetadata } as AssetMetadata; - if (object.ibcInfo !== undefined && object.ibcInfo !== null) { - message.ibcInfo = AssetIBCInfo.fromPartial(object.ibcInfo); - } else { - message.ibcInfo = undefined; - } - if (object.type_asset !== undefined && object.type_asset !== null) { - message.type_asset = object.type_asset; - } else { - message.type_asset = ""; - } - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = Metadata.fromPartial(object.metadata); - } else { - message.metadata = undefined; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/contract.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/contract.d.ts deleted file mode 100644 index 5f22f76f35..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/contract.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -export interface ContractInfo { - codeId: number; - contractAddr: string; - needHook: boolean; - needOrderMatching: boolean; - dependencies: ContractDependencyInfo[]; - numIncomingDependencies: number; -} -export interface ContractDependencyInfo { - dependency: string; - immediateElderSibling: string; - immediateYoungerSibling: string; -} -export interface LegacyContractInfo { - codeId: number; - contractAddr: string; - needHook: boolean; - needOrderMatching: boolean; - dependentContractAddrs: string[]; -} -export declare const ContractInfo: { - encode(message: ContractInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ContractInfo; - fromJSON(object: any): ContractInfo; - toJSON(message: ContractInfo): unknown; - fromPartial(object: DeepPartial): ContractInfo; -}; -export declare const ContractDependencyInfo: { - encode(message: ContractDependencyInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ContractDependencyInfo; - fromJSON(object: any): ContractDependencyInfo; - toJSON(message: ContractDependencyInfo): unknown; - fromPartial(object: DeepPartial): ContractDependencyInfo; -}; -export declare const LegacyContractInfo: { - encode(message: LegacyContractInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): LegacyContractInfo; - fromJSON(object: any): LegacyContractInfo; - toJSON(message: LegacyContractInfo): unknown; - fromPartial(object: DeepPartial): LegacyContractInfo; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/contract.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/contract.js deleted file mode 100644 index 7721d0606e..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/contract.js +++ /dev/null @@ -1,434 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const baseContractInfo = { - codeId: 0, - contractAddr: "", - needHook: false, - needOrderMatching: false, - numIncomingDependencies: 0, -}; -export const ContractInfo = { - encode(message, writer = Writer.create()) { - if (message.codeId !== 0) { - writer.uint32(8).uint64(message.codeId); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - if (message.needHook === true) { - writer.uint32(24).bool(message.needHook); - } - if (message.needOrderMatching === true) { - writer.uint32(32).bool(message.needOrderMatching); - } - for (const v of message.dependencies) { - ContractDependencyInfo.encode(v, writer.uint32(42).fork()).ldelim(); - } - if (message.numIncomingDependencies !== 0) { - writer.uint32(48).int64(message.numIncomingDependencies); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseContractInfo }; - message.dependencies = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = longToNumber(reader.uint64()); - break; - case 2: - message.contractAddr = reader.string(); - break; - case 3: - message.needHook = reader.bool(); - break; - case 4: - message.needOrderMatching = reader.bool(); - break; - case 5: - message.dependencies.push(ContractDependencyInfo.decode(reader, reader.uint32())); - break; - case 6: - message.numIncomingDependencies = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseContractInfo }; - message.dependencies = []; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } - else { - message.codeId = 0; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.needHook !== undefined && object.needHook !== null) { - message.needHook = Boolean(object.needHook); - } - else { - message.needHook = false; - } - if (object.needOrderMatching !== undefined && - object.needOrderMatching !== null) { - message.needOrderMatching = Boolean(object.needOrderMatching); - } - else { - message.needOrderMatching = false; - } - if (object.dependencies !== undefined && object.dependencies !== null) { - for (const e of object.dependencies) { - message.dependencies.push(ContractDependencyInfo.fromJSON(e)); - } - } - if (object.numIncomingDependencies !== undefined && - object.numIncomingDependencies !== null) { - message.numIncomingDependencies = Number(object.numIncomingDependencies); - } - else { - message.numIncomingDependencies = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = message.codeId); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.needHook !== undefined && (obj.needHook = message.needHook); - message.needOrderMatching !== undefined && - (obj.needOrderMatching = message.needOrderMatching); - if (message.dependencies) { - obj.dependencies = message.dependencies.map((e) => e ? ContractDependencyInfo.toJSON(e) : undefined); - } - else { - obj.dependencies = []; - } - message.numIncomingDependencies !== undefined && - (obj.numIncomingDependencies = message.numIncomingDependencies); - return obj; - }, - fromPartial(object) { - const message = { ...baseContractInfo }; - message.dependencies = []; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = 0; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.needHook !== undefined && object.needHook !== null) { - message.needHook = object.needHook; - } - else { - message.needHook = false; - } - if (object.needOrderMatching !== undefined && - object.needOrderMatching !== null) { - message.needOrderMatching = object.needOrderMatching; - } - else { - message.needOrderMatching = false; - } - if (object.dependencies !== undefined && object.dependencies !== null) { - for (const e of object.dependencies) { - message.dependencies.push(ContractDependencyInfo.fromPartial(e)); - } - } - if (object.numIncomingDependencies !== undefined && - object.numIncomingDependencies !== null) { - message.numIncomingDependencies = object.numIncomingDependencies; - } - else { - message.numIncomingDependencies = 0; - } - return message; - }, -}; -const baseContractDependencyInfo = { - dependency: "", - immediateElderSibling: "", - immediateYoungerSibling: "", -}; -export const ContractDependencyInfo = { - encode(message, writer = Writer.create()) { - if (message.dependency !== "") { - writer.uint32(10).string(message.dependency); - } - if (message.immediateElderSibling !== "") { - writer.uint32(18).string(message.immediateElderSibling); - } - if (message.immediateYoungerSibling !== "") { - writer.uint32(26).string(message.immediateYoungerSibling); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseContractDependencyInfo }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dependency = reader.string(); - break; - case 2: - message.immediateElderSibling = reader.string(); - break; - case 3: - message.immediateYoungerSibling = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseContractDependencyInfo }; - if (object.dependency !== undefined && object.dependency !== null) { - message.dependency = String(object.dependency); - } - else { - message.dependency = ""; - } - if (object.immediateElderSibling !== undefined && - object.immediateElderSibling !== null) { - message.immediateElderSibling = String(object.immediateElderSibling); - } - else { - message.immediateElderSibling = ""; - } - if (object.immediateYoungerSibling !== undefined && - object.immediateYoungerSibling !== null) { - message.immediateYoungerSibling = String(object.immediateYoungerSibling); - } - else { - message.immediateYoungerSibling = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dependency !== undefined && (obj.dependency = message.dependency); - message.immediateElderSibling !== undefined && - (obj.immediateElderSibling = message.immediateElderSibling); - message.immediateYoungerSibling !== undefined && - (obj.immediateYoungerSibling = message.immediateYoungerSibling); - return obj; - }, - fromPartial(object) { - const message = { ...baseContractDependencyInfo }; - if (object.dependency !== undefined && object.dependency !== null) { - message.dependency = object.dependency; - } - else { - message.dependency = ""; - } - if (object.immediateElderSibling !== undefined && - object.immediateElderSibling !== null) { - message.immediateElderSibling = object.immediateElderSibling; - } - else { - message.immediateElderSibling = ""; - } - if (object.immediateYoungerSibling !== undefined && - object.immediateYoungerSibling !== null) { - message.immediateYoungerSibling = object.immediateYoungerSibling; - } - else { - message.immediateYoungerSibling = ""; - } - return message; - }, -}; -const baseLegacyContractInfo = { - codeId: 0, - contractAddr: "", - needHook: false, - needOrderMatching: false, - dependentContractAddrs: "", -}; -export const LegacyContractInfo = { - encode(message, writer = Writer.create()) { - if (message.codeId !== 0) { - writer.uint32(8).uint64(message.codeId); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - if (message.needHook === true) { - writer.uint32(24).bool(message.needHook); - } - if (message.needOrderMatching === true) { - writer.uint32(32).bool(message.needOrderMatching); - } - for (const v of message.dependentContractAddrs) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLegacyContractInfo }; - message.dependentContractAddrs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = longToNumber(reader.uint64()); - break; - case 2: - message.contractAddr = reader.string(); - break; - case 3: - message.needHook = reader.bool(); - break; - case 4: - message.needOrderMatching = reader.bool(); - break; - case 5: - message.dependentContractAddrs.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseLegacyContractInfo }; - message.dependentContractAddrs = []; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } - else { - message.codeId = 0; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.needHook !== undefined && object.needHook !== null) { - message.needHook = Boolean(object.needHook); - } - else { - message.needHook = false; - } - if (object.needOrderMatching !== undefined && - object.needOrderMatching !== null) { - message.needOrderMatching = Boolean(object.needOrderMatching); - } - else { - message.needOrderMatching = false; - } - if (object.dependentContractAddrs !== undefined && - object.dependentContractAddrs !== null) { - for (const e of object.dependentContractAddrs) { - message.dependentContractAddrs.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = message.codeId); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.needHook !== undefined && (obj.needHook = message.needHook); - message.needOrderMatching !== undefined && - (obj.needOrderMatching = message.needOrderMatching); - if (message.dependentContractAddrs) { - obj.dependentContractAddrs = message.dependentContractAddrs.map((e) => e); - } - else { - obj.dependentContractAddrs = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseLegacyContractInfo }; - message.dependentContractAddrs = []; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = 0; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.needHook !== undefined && object.needHook !== null) { - message.needHook = object.needHook; - } - else { - message.needHook = false; - } - if (object.needOrderMatching !== undefined && - object.needOrderMatching !== null) { - message.needOrderMatching = object.needOrderMatching; - } - else { - message.needOrderMatching = false; - } - if (object.dependentContractAddrs !== undefined && - object.dependentContractAddrs !== null) { - for (const e of object.dependentContractAddrs) { - message.dependentContractAddrs.push(e); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/contract.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/contract.ts deleted file mode 100644 index 9c9d2c851c..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/contract.ts +++ /dev/null @@ -1,500 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -export interface ContractInfo { - codeId: number; - contractAddr: string; - needHook: boolean; - needOrderMatching: boolean; - dependencies: ContractDependencyInfo[]; - numIncomingDependencies: number; -} - -export interface ContractDependencyInfo { - dependency: string; - immediateElderSibling: string; - immediateYoungerSibling: string; -} - -export interface LegacyContractInfo { - codeId: number; - contractAddr: string; - needHook: boolean; - needOrderMatching: boolean; - dependentContractAddrs: string[]; -} - -const baseContractInfo: object = { - codeId: 0, - contractAddr: "", - needHook: false, - needOrderMatching: false, - numIncomingDependencies: 0, -}; - -export const ContractInfo = { - encode(message: ContractInfo, writer: Writer = Writer.create()): Writer { - if (message.codeId !== 0) { - writer.uint32(8).uint64(message.codeId); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - if (message.needHook === true) { - writer.uint32(24).bool(message.needHook); - } - if (message.needOrderMatching === true) { - writer.uint32(32).bool(message.needOrderMatching); - } - for (const v of message.dependencies) { - ContractDependencyInfo.encode(v!, writer.uint32(42).fork()).ldelim(); - } - if (message.numIncomingDependencies !== 0) { - writer.uint32(48).int64(message.numIncomingDependencies); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ContractInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseContractInfo } as ContractInfo; - message.dependencies = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = longToNumber(reader.uint64() as Long); - break; - case 2: - message.contractAddr = reader.string(); - break; - case 3: - message.needHook = reader.bool(); - break; - case 4: - message.needOrderMatching = reader.bool(); - break; - case 5: - message.dependencies.push( - ContractDependencyInfo.decode(reader, reader.uint32()) - ); - break; - case 6: - message.numIncomingDependencies = longToNumber( - reader.int64() as Long - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ContractInfo { - const message = { ...baseContractInfo } as ContractInfo; - message.dependencies = []; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } else { - message.codeId = 0; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.needHook !== undefined && object.needHook !== null) { - message.needHook = Boolean(object.needHook); - } else { - message.needHook = false; - } - if ( - object.needOrderMatching !== undefined && - object.needOrderMatching !== null - ) { - message.needOrderMatching = Boolean(object.needOrderMatching); - } else { - message.needOrderMatching = false; - } - if (object.dependencies !== undefined && object.dependencies !== null) { - for (const e of object.dependencies) { - message.dependencies.push(ContractDependencyInfo.fromJSON(e)); - } - } - if ( - object.numIncomingDependencies !== undefined && - object.numIncomingDependencies !== null - ) { - message.numIncomingDependencies = Number(object.numIncomingDependencies); - } else { - message.numIncomingDependencies = 0; - } - return message; - }, - - toJSON(message: ContractInfo): unknown { - const obj: any = {}; - message.codeId !== undefined && (obj.codeId = message.codeId); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.needHook !== undefined && (obj.needHook = message.needHook); - message.needOrderMatching !== undefined && - (obj.needOrderMatching = message.needOrderMatching); - if (message.dependencies) { - obj.dependencies = message.dependencies.map((e) => - e ? ContractDependencyInfo.toJSON(e) : undefined - ); - } else { - obj.dependencies = []; - } - message.numIncomingDependencies !== undefined && - (obj.numIncomingDependencies = message.numIncomingDependencies); - return obj; - }, - - fromPartial(object: DeepPartial): ContractInfo { - const message = { ...baseContractInfo } as ContractInfo; - message.dependencies = []; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } else { - message.codeId = 0; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.needHook !== undefined && object.needHook !== null) { - message.needHook = object.needHook; - } else { - message.needHook = false; - } - if ( - object.needOrderMatching !== undefined && - object.needOrderMatching !== null - ) { - message.needOrderMatching = object.needOrderMatching; - } else { - message.needOrderMatching = false; - } - if (object.dependencies !== undefined && object.dependencies !== null) { - for (const e of object.dependencies) { - message.dependencies.push(ContractDependencyInfo.fromPartial(e)); - } - } - if ( - object.numIncomingDependencies !== undefined && - object.numIncomingDependencies !== null - ) { - message.numIncomingDependencies = object.numIncomingDependencies; - } else { - message.numIncomingDependencies = 0; - } - return message; - }, -}; - -const baseContractDependencyInfo: object = { - dependency: "", - immediateElderSibling: "", - immediateYoungerSibling: "", -}; - -export const ContractDependencyInfo = { - encode( - message: ContractDependencyInfo, - writer: Writer = Writer.create() - ): Writer { - if (message.dependency !== "") { - writer.uint32(10).string(message.dependency); - } - if (message.immediateElderSibling !== "") { - writer.uint32(18).string(message.immediateElderSibling); - } - if (message.immediateYoungerSibling !== "") { - writer.uint32(26).string(message.immediateYoungerSibling); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ContractDependencyInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseContractDependencyInfo } as ContractDependencyInfo; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dependency = reader.string(); - break; - case 2: - message.immediateElderSibling = reader.string(); - break; - case 3: - message.immediateYoungerSibling = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ContractDependencyInfo { - const message = { ...baseContractDependencyInfo } as ContractDependencyInfo; - if (object.dependency !== undefined && object.dependency !== null) { - message.dependency = String(object.dependency); - } else { - message.dependency = ""; - } - if ( - object.immediateElderSibling !== undefined && - object.immediateElderSibling !== null - ) { - message.immediateElderSibling = String(object.immediateElderSibling); - } else { - message.immediateElderSibling = ""; - } - if ( - object.immediateYoungerSibling !== undefined && - object.immediateYoungerSibling !== null - ) { - message.immediateYoungerSibling = String(object.immediateYoungerSibling); - } else { - message.immediateYoungerSibling = ""; - } - return message; - }, - - toJSON(message: ContractDependencyInfo): unknown { - const obj: any = {}; - message.dependency !== undefined && (obj.dependency = message.dependency); - message.immediateElderSibling !== undefined && - (obj.immediateElderSibling = message.immediateElderSibling); - message.immediateYoungerSibling !== undefined && - (obj.immediateYoungerSibling = message.immediateYoungerSibling); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ContractDependencyInfo { - const message = { ...baseContractDependencyInfo } as ContractDependencyInfo; - if (object.dependency !== undefined && object.dependency !== null) { - message.dependency = object.dependency; - } else { - message.dependency = ""; - } - if ( - object.immediateElderSibling !== undefined && - object.immediateElderSibling !== null - ) { - message.immediateElderSibling = object.immediateElderSibling; - } else { - message.immediateElderSibling = ""; - } - if ( - object.immediateYoungerSibling !== undefined && - object.immediateYoungerSibling !== null - ) { - message.immediateYoungerSibling = object.immediateYoungerSibling; - } else { - message.immediateYoungerSibling = ""; - } - return message; - }, -}; - -const baseLegacyContractInfo: object = { - codeId: 0, - contractAddr: "", - needHook: false, - needOrderMatching: false, - dependentContractAddrs: "", -}; - -export const LegacyContractInfo = { - encode( - message: LegacyContractInfo, - writer: Writer = Writer.create() - ): Writer { - if (message.codeId !== 0) { - writer.uint32(8).uint64(message.codeId); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - if (message.needHook === true) { - writer.uint32(24).bool(message.needHook); - } - if (message.needOrderMatching === true) { - writer.uint32(32).bool(message.needOrderMatching); - } - for (const v of message.dependentContractAddrs) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): LegacyContractInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLegacyContractInfo } as LegacyContractInfo; - message.dependentContractAddrs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = longToNumber(reader.uint64() as Long); - break; - case 2: - message.contractAddr = reader.string(); - break; - case 3: - message.needHook = reader.bool(); - break; - case 4: - message.needOrderMatching = reader.bool(); - break; - case 5: - message.dependentContractAddrs.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LegacyContractInfo { - const message = { ...baseLegacyContractInfo } as LegacyContractInfo; - message.dependentContractAddrs = []; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = Number(object.codeId); - } else { - message.codeId = 0; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.needHook !== undefined && object.needHook !== null) { - message.needHook = Boolean(object.needHook); - } else { - message.needHook = false; - } - if ( - object.needOrderMatching !== undefined && - object.needOrderMatching !== null - ) { - message.needOrderMatching = Boolean(object.needOrderMatching); - } else { - message.needOrderMatching = false; - } - if ( - object.dependentContractAddrs !== undefined && - object.dependentContractAddrs !== null - ) { - for (const e of object.dependentContractAddrs) { - message.dependentContractAddrs.push(String(e)); - } - } - return message; - }, - - toJSON(message: LegacyContractInfo): unknown { - const obj: any = {}; - message.codeId !== undefined && (obj.codeId = message.codeId); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.needHook !== undefined && (obj.needHook = message.needHook); - message.needOrderMatching !== undefined && - (obj.needOrderMatching = message.needOrderMatching); - if (message.dependentContractAddrs) { - obj.dependentContractAddrs = message.dependentContractAddrs.map((e) => e); - } else { - obj.dependentContractAddrs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): LegacyContractInfo { - const message = { ...baseLegacyContractInfo } as LegacyContractInfo; - message.dependentContractAddrs = []; - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } else { - message.codeId = 0; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.needHook !== undefined && object.needHook !== null) { - message.needHook = object.needHook; - } else { - message.needHook = false; - } - if ( - object.needOrderMatching !== undefined && - object.needOrderMatching !== null - ) { - message.needOrderMatching = object.needOrderMatching; - } else { - message.needOrderMatching = false; - } - if ( - object.dependentContractAddrs !== undefined && - object.dependentContractAddrs !== null - ) { - for (const e of object.dependentContractAddrs) { - message.dependentContractAddrs.push(e); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/enums.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/enums.d.ts deleted file mode 100644 index e31130d3a3..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/enums.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -export declare const protobufPackage = "seiprotocol.seichain.dex"; -export declare enum PositionDirection { - LONG = 0, - SHORT = 1, - UNRECOGNIZED = -1 -} -export declare function positionDirectionFromJSON(object: any): PositionDirection; -export declare function positionDirectionToJSON(object: PositionDirection): string; -export declare enum PositionEffect { - OPEN = 0, - CLOSE = 1, - UNRECOGNIZED = -1 -} -export declare function positionEffectFromJSON(object: any): PositionEffect; -export declare function positionEffectToJSON(object: PositionEffect): string; -export declare enum OrderType { - LIMIT = 0, - MARKET = 1, - LIQUIDATION = 2, - /** FOKMARKET - fill-or-kill market order */ - FOKMARKET = 3, - UNRECOGNIZED = -1 -} -export declare function orderTypeFromJSON(object: any): OrderType; -export declare function orderTypeToJSON(object: OrderType): string; -export declare enum Unit { - STANDARD = 0, - MILLI = 1, - MICRO = 2, - NANO = 3, - UNRECOGNIZED = -1 -} -export declare function unitFromJSON(object: any): Unit; -export declare function unitToJSON(object: Unit): string; -export declare enum OrderStatus { - PLACED = 0, - FAILED_TO_PLACE = 1, - CANCELLED = 2, - FULFILLED = 3, - UNRECOGNIZED = -1 -} -export declare function orderStatusFromJSON(object: any): OrderStatus; -export declare function orderStatusToJSON(object: OrderStatus): string; -export declare enum CancellationInitiator { - USER = 0, - LIQUIDATED = 1, - UNRECOGNIZED = -1 -} -export declare function cancellationInitiatorFromJSON(object: any): CancellationInitiator; -export declare function cancellationInitiatorToJSON(object: CancellationInitiator): string; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/enums.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/enums.js deleted file mode 100644 index 9603f7bcda..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/enums.js +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "seiprotocol.seichain.dex"; -export var PositionDirection; -(function (PositionDirection) { - PositionDirection[PositionDirection["LONG"] = 0] = "LONG"; - PositionDirection[PositionDirection["SHORT"] = 1] = "SHORT"; - PositionDirection[PositionDirection["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(PositionDirection || (PositionDirection = {})); -export function positionDirectionFromJSON(object) { - switch (object) { - case 0: - case "LONG": - return PositionDirection.LONG; - case 1: - case "SHORT": - return PositionDirection.SHORT; - case -1: - case "UNRECOGNIZED": - default: - return PositionDirection.UNRECOGNIZED; - } -} -export function positionDirectionToJSON(object) { - switch (object) { - case PositionDirection.LONG: - return "LONG"; - case PositionDirection.SHORT: - return "SHORT"; - default: - return "UNKNOWN"; - } -} -export var PositionEffect; -(function (PositionEffect) { - PositionEffect[PositionEffect["OPEN"] = 0] = "OPEN"; - PositionEffect[PositionEffect["CLOSE"] = 1] = "CLOSE"; - PositionEffect[PositionEffect["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(PositionEffect || (PositionEffect = {})); -export function positionEffectFromJSON(object) { - switch (object) { - case 0: - case "OPEN": - return PositionEffect.OPEN; - case 1: - case "CLOSE": - return PositionEffect.CLOSE; - case -1: - case "UNRECOGNIZED": - default: - return PositionEffect.UNRECOGNIZED; - } -} -export function positionEffectToJSON(object) { - switch (object) { - case PositionEffect.OPEN: - return "OPEN"; - case PositionEffect.CLOSE: - return "CLOSE"; - default: - return "UNKNOWN"; - } -} -export var OrderType; -(function (OrderType) { - OrderType[OrderType["LIMIT"] = 0] = "LIMIT"; - OrderType[OrderType["MARKET"] = 1] = "MARKET"; - OrderType[OrderType["LIQUIDATION"] = 2] = "LIQUIDATION"; - /** FOKMARKET - fill-or-kill market order */ - OrderType[OrderType["FOKMARKET"] = 3] = "FOKMARKET"; - OrderType[OrderType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(OrderType || (OrderType = {})); -export function orderTypeFromJSON(object) { - switch (object) { - case 0: - case "LIMIT": - return OrderType.LIMIT; - case 1: - case "MARKET": - return OrderType.MARKET; - case 2: - case "LIQUIDATION": - return OrderType.LIQUIDATION; - case 3: - case "FOKMARKET": - return OrderType.FOKMARKET; - case -1: - case "UNRECOGNIZED": - default: - return OrderType.UNRECOGNIZED; - } -} -export function orderTypeToJSON(object) { - switch (object) { - case OrderType.LIMIT: - return "LIMIT"; - case OrderType.MARKET: - return "MARKET"; - case OrderType.LIQUIDATION: - return "LIQUIDATION"; - case OrderType.FOKMARKET: - return "FOKMARKET"; - default: - return "UNKNOWN"; - } -} -export var Unit; -(function (Unit) { - Unit[Unit["STANDARD"] = 0] = "STANDARD"; - Unit[Unit["MILLI"] = 1] = "MILLI"; - Unit[Unit["MICRO"] = 2] = "MICRO"; - Unit[Unit["NANO"] = 3] = "NANO"; - Unit[Unit["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(Unit || (Unit = {})); -export function unitFromJSON(object) { - switch (object) { - case 0: - case "STANDARD": - return Unit.STANDARD; - case 1: - case "MILLI": - return Unit.MILLI; - case 2: - case "MICRO": - return Unit.MICRO; - case 3: - case "NANO": - return Unit.NANO; - case -1: - case "UNRECOGNIZED": - default: - return Unit.UNRECOGNIZED; - } -} -export function unitToJSON(object) { - switch (object) { - case Unit.STANDARD: - return "STANDARD"; - case Unit.MILLI: - return "MILLI"; - case Unit.MICRO: - return "MICRO"; - case Unit.NANO: - return "NANO"; - default: - return "UNKNOWN"; - } -} -export var OrderStatus; -(function (OrderStatus) { - OrderStatus[OrderStatus["PLACED"] = 0] = "PLACED"; - OrderStatus[OrderStatus["FAILED_TO_PLACE"] = 1] = "FAILED_TO_PLACE"; - OrderStatus[OrderStatus["CANCELLED"] = 2] = "CANCELLED"; - OrderStatus[OrderStatus["FULFILLED"] = 3] = "FULFILLED"; - OrderStatus[OrderStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(OrderStatus || (OrderStatus = {})); -export function orderStatusFromJSON(object) { - switch (object) { - case 0: - case "PLACED": - return OrderStatus.PLACED; - case 1: - case "FAILED_TO_PLACE": - return OrderStatus.FAILED_TO_PLACE; - case 2: - case "CANCELLED": - return OrderStatus.CANCELLED; - case 3: - case "FULFILLED": - return OrderStatus.FULFILLED; - case -1: - case "UNRECOGNIZED": - default: - return OrderStatus.UNRECOGNIZED; - } -} -export function orderStatusToJSON(object) { - switch (object) { - case OrderStatus.PLACED: - return "PLACED"; - case OrderStatus.FAILED_TO_PLACE: - return "FAILED_TO_PLACE"; - case OrderStatus.CANCELLED: - return "CANCELLED"; - case OrderStatus.FULFILLED: - return "FULFILLED"; - default: - return "UNKNOWN"; - } -} -export var CancellationInitiator; -(function (CancellationInitiator) { - CancellationInitiator[CancellationInitiator["USER"] = 0] = "USER"; - CancellationInitiator[CancellationInitiator["LIQUIDATED"] = 1] = "LIQUIDATED"; - CancellationInitiator[CancellationInitiator["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(CancellationInitiator || (CancellationInitiator = {})); -export function cancellationInitiatorFromJSON(object) { - switch (object) { - case 0: - case "USER": - return CancellationInitiator.USER; - case 1: - case "LIQUIDATED": - return CancellationInitiator.LIQUIDATED; - case -1: - case "UNRECOGNIZED": - default: - return CancellationInitiator.UNRECOGNIZED; - } -} -export function cancellationInitiatorToJSON(object) { - switch (object) { - case CancellationInitiator.USER: - return "USER"; - case CancellationInitiator.LIQUIDATED: - return "LIQUIDATED"; - default: - return "UNKNOWN"; - } -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/enums.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/enums.ts deleted file mode 100644 index 3011da9e9b..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/enums.ts +++ /dev/null @@ -1,235 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "seiprotocol.seichain.dex"; - -export enum PositionDirection { - LONG = 0, - SHORT = 1, - UNRECOGNIZED = -1, -} - -export function positionDirectionFromJSON(object: any): PositionDirection { - switch (object) { - case 0: - case "LONG": - return PositionDirection.LONG; - case 1: - case "SHORT": - return PositionDirection.SHORT; - case -1: - case "UNRECOGNIZED": - default: - return PositionDirection.UNRECOGNIZED; - } -} - -export function positionDirectionToJSON(object: PositionDirection): string { - switch (object) { - case PositionDirection.LONG: - return "LONG"; - case PositionDirection.SHORT: - return "SHORT"; - default: - return "UNKNOWN"; - } -} - -export enum PositionEffect { - OPEN = 0, - CLOSE = 1, - UNRECOGNIZED = -1, -} - -export function positionEffectFromJSON(object: any): PositionEffect { - switch (object) { - case 0: - case "OPEN": - return PositionEffect.OPEN; - case 1: - case "CLOSE": - return PositionEffect.CLOSE; - case -1: - case "UNRECOGNIZED": - default: - return PositionEffect.UNRECOGNIZED; - } -} - -export function positionEffectToJSON(object: PositionEffect): string { - switch (object) { - case PositionEffect.OPEN: - return "OPEN"; - case PositionEffect.CLOSE: - return "CLOSE"; - default: - return "UNKNOWN"; - } -} - -export enum OrderType { - LIMIT = 0, - MARKET = 1, - LIQUIDATION = 2, - /** FOKMARKET - fill-or-kill market order */ - FOKMARKET = 3, - UNRECOGNIZED = -1, -} - -export function orderTypeFromJSON(object: any): OrderType { - switch (object) { - case 0: - case "LIMIT": - return OrderType.LIMIT; - case 1: - case "MARKET": - return OrderType.MARKET; - case 2: - case "LIQUIDATION": - return OrderType.LIQUIDATION; - case 3: - case "FOKMARKET": - return OrderType.FOKMARKET; - case -1: - case "UNRECOGNIZED": - default: - return OrderType.UNRECOGNIZED; - } -} - -export function orderTypeToJSON(object: OrderType): string { - switch (object) { - case OrderType.LIMIT: - return "LIMIT"; - case OrderType.MARKET: - return "MARKET"; - case OrderType.LIQUIDATION: - return "LIQUIDATION"; - case OrderType.FOKMARKET: - return "FOKMARKET"; - default: - return "UNKNOWN"; - } -} - -export enum Unit { - STANDARD = 0, - MILLI = 1, - MICRO = 2, - NANO = 3, - UNRECOGNIZED = -1, -} - -export function unitFromJSON(object: any): Unit { - switch (object) { - case 0: - case "STANDARD": - return Unit.STANDARD; - case 1: - case "MILLI": - return Unit.MILLI; - case 2: - case "MICRO": - return Unit.MICRO; - case 3: - case "NANO": - return Unit.NANO; - case -1: - case "UNRECOGNIZED": - default: - return Unit.UNRECOGNIZED; - } -} - -export function unitToJSON(object: Unit): string { - switch (object) { - case Unit.STANDARD: - return "STANDARD"; - case Unit.MILLI: - return "MILLI"; - case Unit.MICRO: - return "MICRO"; - case Unit.NANO: - return "NANO"; - default: - return "UNKNOWN"; - } -} - -export enum OrderStatus { - PLACED = 0, - FAILED_TO_PLACE = 1, - CANCELLED = 2, - FULFILLED = 3, - UNRECOGNIZED = -1, -} - -export function orderStatusFromJSON(object: any): OrderStatus { - switch (object) { - case 0: - case "PLACED": - return OrderStatus.PLACED; - case 1: - case "FAILED_TO_PLACE": - return OrderStatus.FAILED_TO_PLACE; - case 2: - case "CANCELLED": - return OrderStatus.CANCELLED; - case 3: - case "FULFILLED": - return OrderStatus.FULFILLED; - case -1: - case "UNRECOGNIZED": - default: - return OrderStatus.UNRECOGNIZED; - } -} - -export function orderStatusToJSON(object: OrderStatus): string { - switch (object) { - case OrderStatus.PLACED: - return "PLACED"; - case OrderStatus.FAILED_TO_PLACE: - return "FAILED_TO_PLACE"; - case OrderStatus.CANCELLED: - return "CANCELLED"; - case OrderStatus.FULFILLED: - return "FULFILLED"; - default: - return "UNKNOWN"; - } -} - -export enum CancellationInitiator { - USER = 0, - LIQUIDATED = 1, - UNRECOGNIZED = -1, -} - -export function cancellationInitiatorFromJSON( - object: any -): CancellationInitiator { - switch (object) { - case 0: - case "USER": - return CancellationInitiator.USER; - case 1: - case "LIQUIDATED": - return CancellationInitiator.LIQUIDATED; - case -1: - case "UNRECOGNIZED": - default: - return CancellationInitiator.UNRECOGNIZED; - } -} - -export function cancellationInitiatorToJSON( - object: CancellationInitiator -): string { - switch (object) { - case CancellationInitiator.USER: - return "USER"; - case CancellationInitiator.LIQUIDATED: - return "LIQUIDATED"; - default: - return "UNKNOWN"; - } -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/genesis.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/genesis.d.ts deleted file mode 100644 index 6d8cbfce17..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/genesis.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Params } from "../dex/params"; -import { LongBook } from "../dex/long_book"; -import { ShortBook } from "../dex/short_book"; -import { Twap } from "../dex/twap"; -import { TickSize } from "../dex/tick_size"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -/** GenesisState defines the dex module's genesis state. */ -export interface GenesisState { - params: Params | undefined; - longBookList: LongBook[]; - shortBookList: ShortBook[]; - twapList: Twap[]; - /** if null, then no restriction, todo(zw) should set it to not nullable? */ - tickSizeList: TickSize[]; - /** this line is used by starport scaffolding # genesis/proto/state */ - lastEpoch: number; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/genesis.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/genesis.js deleted file mode 100644 index 91c13e856f..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/genesis.js +++ /dev/null @@ -1,201 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Params } from "../dex/params"; -import { LongBook } from "../dex/long_book"; -import { ShortBook } from "../dex/short_book"; -import { Twap } from "../dex/twap"; -import { TickSize } from "../dex/tick_size"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const baseGenesisState = { lastEpoch: 0 }; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.longBookList) { - LongBook.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.shortBookList) { - ShortBook.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.twapList) { - Twap.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.tickSizeList) { - TickSize.encode(v, writer.uint32(42).fork()).ldelim(); - } - if (message.lastEpoch !== 0) { - writer.uint32(48).uint64(message.lastEpoch); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.longBookList = []; - message.shortBookList = []; - message.twapList = []; - message.tickSizeList = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.longBookList.push(LongBook.decode(reader, reader.uint32())); - break; - case 3: - message.shortBookList.push(ShortBook.decode(reader, reader.uint32())); - break; - case 4: - message.twapList.push(Twap.decode(reader, reader.uint32())); - break; - case 5: - message.tickSizeList.push(TickSize.decode(reader, reader.uint32())); - break; - case 6: - message.lastEpoch = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.longBookList = []; - message.shortBookList = []; - message.twapList = []; - message.tickSizeList = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - if (object.longBookList !== undefined && object.longBookList !== null) { - for (const e of object.longBookList) { - message.longBookList.push(LongBook.fromJSON(e)); - } - } - if (object.shortBookList !== undefined && object.shortBookList !== null) { - for (const e of object.shortBookList) { - message.shortBookList.push(ShortBook.fromJSON(e)); - } - } - if (object.twapList !== undefined && object.twapList !== null) { - for (const e of object.twapList) { - message.twapList.push(Twap.fromJSON(e)); - } - } - if (object.tickSizeList !== undefined && object.tickSizeList !== null) { - for (const e of object.tickSizeList) { - message.tickSizeList.push(TickSize.fromJSON(e)); - } - } - if (object.lastEpoch !== undefined && object.lastEpoch !== null) { - message.lastEpoch = Number(object.lastEpoch); - } - else { - message.lastEpoch = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.longBookList) { - obj.longBookList = message.longBookList.map((e) => e ? LongBook.toJSON(e) : undefined); - } - else { - obj.longBookList = []; - } - if (message.shortBookList) { - obj.shortBookList = message.shortBookList.map((e) => e ? ShortBook.toJSON(e) : undefined); - } - else { - obj.shortBookList = []; - } - if (message.twapList) { - obj.twapList = message.twapList.map((e) => e ? Twap.toJSON(e) : undefined); - } - else { - obj.twapList = []; - } - if (message.tickSizeList) { - obj.tickSizeList = message.tickSizeList.map((e) => e ? TickSize.toJSON(e) : undefined); - } - else { - obj.tickSizeList = []; - } - message.lastEpoch !== undefined && (obj.lastEpoch = message.lastEpoch); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.longBookList = []; - message.shortBookList = []; - message.twapList = []; - message.tickSizeList = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - if (object.longBookList !== undefined && object.longBookList !== null) { - for (const e of object.longBookList) { - message.longBookList.push(LongBook.fromPartial(e)); - } - } - if (object.shortBookList !== undefined && object.shortBookList !== null) { - for (const e of object.shortBookList) { - message.shortBookList.push(ShortBook.fromPartial(e)); - } - } - if (object.twapList !== undefined && object.twapList !== null) { - for (const e of object.twapList) { - message.twapList.push(Twap.fromPartial(e)); - } - } - if (object.tickSizeList !== undefined && object.tickSizeList !== null) { - for (const e of object.tickSizeList) { - message.tickSizeList.push(TickSize.fromPartial(e)); - } - } - if (object.lastEpoch !== undefined && object.lastEpoch !== null) { - message.lastEpoch = object.lastEpoch; - } - else { - message.lastEpoch = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/genesis.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/genesis.ts deleted file mode 100644 index f37a21b811..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/genesis.ts +++ /dev/null @@ -1,232 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Params } from "../dex/params"; -import { LongBook } from "../dex/long_book"; -import { ShortBook } from "../dex/short_book"; -import { Twap } from "../dex/twap"; -import { TickSize } from "../dex/tick_size"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -/** GenesisState defines the dex module's genesis state. */ -export interface GenesisState { - params: Params | undefined; - longBookList: LongBook[]; - shortBookList: ShortBook[]; - twapList: Twap[]; - /** if null, then no restriction, todo(zw) should set it to not nullable? */ - tickSizeList: TickSize[]; - /** this line is used by starport scaffolding # genesis/proto/state */ - lastEpoch: number; -} - -const baseGenesisState: object = { lastEpoch: 0 }; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.longBookList) { - LongBook.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.shortBookList) { - ShortBook.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.twapList) { - Twap.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.tickSizeList) { - TickSize.encode(v!, writer.uint32(42).fork()).ldelim(); - } - if (message.lastEpoch !== 0) { - writer.uint32(48).uint64(message.lastEpoch); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.longBookList = []; - message.shortBookList = []; - message.twapList = []; - message.tickSizeList = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.longBookList.push(LongBook.decode(reader, reader.uint32())); - break; - case 3: - message.shortBookList.push(ShortBook.decode(reader, reader.uint32())); - break; - case 4: - message.twapList.push(Twap.decode(reader, reader.uint32())); - break; - case 5: - message.tickSizeList.push(TickSize.decode(reader, reader.uint32())); - break; - case 6: - message.lastEpoch = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.longBookList = []; - message.shortBookList = []; - message.twapList = []; - message.tickSizeList = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if (object.longBookList !== undefined && object.longBookList !== null) { - for (const e of object.longBookList) { - message.longBookList.push(LongBook.fromJSON(e)); - } - } - if (object.shortBookList !== undefined && object.shortBookList !== null) { - for (const e of object.shortBookList) { - message.shortBookList.push(ShortBook.fromJSON(e)); - } - } - if (object.twapList !== undefined && object.twapList !== null) { - for (const e of object.twapList) { - message.twapList.push(Twap.fromJSON(e)); - } - } - if (object.tickSizeList !== undefined && object.tickSizeList !== null) { - for (const e of object.tickSizeList) { - message.tickSizeList.push(TickSize.fromJSON(e)); - } - } - if (object.lastEpoch !== undefined && object.lastEpoch !== null) { - message.lastEpoch = Number(object.lastEpoch); - } else { - message.lastEpoch = 0; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.longBookList) { - obj.longBookList = message.longBookList.map((e) => - e ? LongBook.toJSON(e) : undefined - ); - } else { - obj.longBookList = []; - } - if (message.shortBookList) { - obj.shortBookList = message.shortBookList.map((e) => - e ? ShortBook.toJSON(e) : undefined - ); - } else { - obj.shortBookList = []; - } - if (message.twapList) { - obj.twapList = message.twapList.map((e) => - e ? Twap.toJSON(e) : undefined - ); - } else { - obj.twapList = []; - } - if (message.tickSizeList) { - obj.tickSizeList = message.tickSizeList.map((e) => - e ? TickSize.toJSON(e) : undefined - ); - } else { - obj.tickSizeList = []; - } - message.lastEpoch !== undefined && (obj.lastEpoch = message.lastEpoch); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.longBookList = []; - message.shortBookList = []; - message.twapList = []; - message.tickSizeList = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if (object.longBookList !== undefined && object.longBookList !== null) { - for (const e of object.longBookList) { - message.longBookList.push(LongBook.fromPartial(e)); - } - } - if (object.shortBookList !== undefined && object.shortBookList !== null) { - for (const e of object.shortBookList) { - message.shortBookList.push(ShortBook.fromPartial(e)); - } - } - if (object.twapList !== undefined && object.twapList !== null) { - for (const e of object.twapList) { - message.twapList.push(Twap.fromPartial(e)); - } - } - if (object.tickSizeList !== undefined && object.tickSizeList !== null) { - for (const e of object.tickSizeList) { - message.tickSizeList.push(TickSize.fromPartial(e)); - } - } - if (object.lastEpoch !== undefined && object.lastEpoch !== null) { - message.lastEpoch = object.lastEpoch; - } else { - message.lastEpoch = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/gov.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/gov.d.ts deleted file mode 100644 index 97c55fa074..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/gov.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { BatchContractPair } from "../dex/pair"; -import { TickSize } from "../dex/tick_size"; -import { AssetMetadata } from "../dex/asset_list"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -/** - * RegisterPairsProposal is a gov Content type for adding a new whitelisted token - * pair to the dex module. It must specify a list of contract addresses and their respective - * token pairs to be registered. - */ -export interface RegisterPairsProposal { - title: string; - description: string; - batchcontractpair: BatchContractPair[]; -} -export interface UpdateTickSizeProposal { - title: string; - description: string; - tickSizeList: TickSize[]; -} -/** - * AddAssetMetadataProposal is a gov Content type for adding a new asset - * to the dex module's asset list. - */ -export interface AddAssetMetadataProposal { - title: string; - description: string; - assetList: AssetMetadata[]; -} -export declare const RegisterPairsProposal: { - encode(message: RegisterPairsProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): RegisterPairsProposal; - fromJSON(object: any): RegisterPairsProposal; - toJSON(message: RegisterPairsProposal): unknown; - fromPartial(object: DeepPartial): RegisterPairsProposal; -}; -export declare const UpdateTickSizeProposal: { - encode(message: UpdateTickSizeProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UpdateTickSizeProposal; - fromJSON(object: any): UpdateTickSizeProposal; - toJSON(message: UpdateTickSizeProposal): unknown; - fromPartial(object: DeepPartial): UpdateTickSizeProposal; -}; -export declare const AddAssetMetadataProposal: { - encode(message: AddAssetMetadataProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): AddAssetMetadataProposal; - fromJSON(object: any): AddAssetMetadataProposal; - toJSON(message: AddAssetMetadataProposal): unknown; - fromPartial(object: DeepPartial): AddAssetMetadataProposal; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/gov.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/gov.js deleted file mode 100644 index 71cc484557..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/gov.js +++ /dev/null @@ -1,302 +0,0 @@ -/* eslint-disable */ -import { BatchContractPair } from "../dex/pair"; -import { TickSize } from "../dex/tick_size"; -import { AssetMetadata } from "../dex/asset_list"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const baseRegisterPairsProposal = { title: "", description: "" }; -export const RegisterPairsProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.batchcontractpair) { - BatchContractPair.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRegisterPairsProposal }; - message.batchcontractpair = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.batchcontractpair.push(BatchContractPair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseRegisterPairsProposal }; - message.batchcontractpair = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.batchcontractpair !== undefined && - object.batchcontractpair !== null) { - for (const e of object.batchcontractpair) { - message.batchcontractpair.push(BatchContractPair.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - if (message.batchcontractpair) { - obj.batchcontractpair = message.batchcontractpair.map((e) => e ? BatchContractPair.toJSON(e) : undefined); - } - else { - obj.batchcontractpair = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseRegisterPairsProposal }; - message.batchcontractpair = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.batchcontractpair !== undefined && - object.batchcontractpair !== null) { - for (const e of object.batchcontractpair) { - message.batchcontractpair.push(BatchContractPair.fromPartial(e)); - } - } - return message; - }, -}; -const baseUpdateTickSizeProposal = { title: "", description: "" }; -export const UpdateTickSizeProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.tickSizeList) { - TickSize.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUpdateTickSizeProposal }; - message.tickSizeList = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.tickSizeList.push(TickSize.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUpdateTickSizeProposal }; - message.tickSizeList = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.tickSizeList !== undefined && object.tickSizeList !== null) { - for (const e of object.tickSizeList) { - message.tickSizeList.push(TickSize.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - if (message.tickSizeList) { - obj.tickSizeList = message.tickSizeList.map((e) => e ? TickSize.toJSON(e) : undefined); - } - else { - obj.tickSizeList = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseUpdateTickSizeProposal }; - message.tickSizeList = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.tickSizeList !== undefined && object.tickSizeList !== null) { - for (const e of object.tickSizeList) { - message.tickSizeList.push(TickSize.fromPartial(e)); - } - } - return message; - }, -}; -const baseAddAssetMetadataProposal = { title: "", description: "" }; -export const AddAssetMetadataProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.assetList) { - AssetMetadata.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseAddAssetMetadataProposal, - }; - message.assetList = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.assetList.push(AssetMetadata.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseAddAssetMetadataProposal, - }; - message.assetList = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.assetList !== undefined && object.assetList !== null) { - for (const e of object.assetList) { - message.assetList.push(AssetMetadata.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - if (message.assetList) { - obj.assetList = message.assetList.map((e) => e ? AssetMetadata.toJSON(e) : undefined); - } - else { - obj.assetList = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseAddAssetMetadataProposal, - }; - message.assetList = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.assetList !== undefined && object.assetList !== null) { - for (const e of object.assetList) { - message.assetList.push(AssetMetadata.fromPartial(e)); - } - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/gov.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/gov.ts deleted file mode 100644 index b412b5286e..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/gov.ts +++ /dev/null @@ -1,374 +0,0 @@ -/* eslint-disable */ -import { BatchContractPair } from "../dex/pair"; -import { TickSize } from "../dex/tick_size"; -import { AssetMetadata } from "../dex/asset_list"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -/** - * RegisterPairsProposal is a gov Content type for adding a new whitelisted token - * pair to the dex module. It must specify a list of contract addresses and their respective - * token pairs to be registered. - */ -export interface RegisterPairsProposal { - title: string; - description: string; - batchcontractpair: BatchContractPair[]; -} - -export interface UpdateTickSizeProposal { - title: string; - description: string; - tickSizeList: TickSize[]; -} - -/** - * AddAssetMetadataProposal is a gov Content type for adding a new asset - * to the dex module's asset list. - */ -export interface AddAssetMetadataProposal { - title: string; - description: string; - assetList: AssetMetadata[]; -} - -const baseRegisterPairsProposal: object = { title: "", description: "" }; - -export const RegisterPairsProposal = { - encode( - message: RegisterPairsProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.batchcontractpair) { - BatchContractPair.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): RegisterPairsProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseRegisterPairsProposal } as RegisterPairsProposal; - message.batchcontractpair = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.batchcontractpair.push( - BatchContractPair.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RegisterPairsProposal { - const message = { ...baseRegisterPairsProposal } as RegisterPairsProposal; - message.batchcontractpair = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if ( - object.batchcontractpair !== undefined && - object.batchcontractpair !== null - ) { - for (const e of object.batchcontractpair) { - message.batchcontractpair.push(BatchContractPair.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: RegisterPairsProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - if (message.batchcontractpair) { - obj.batchcontractpair = message.batchcontractpair.map((e) => - e ? BatchContractPair.toJSON(e) : undefined - ); - } else { - obj.batchcontractpair = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): RegisterPairsProposal { - const message = { ...baseRegisterPairsProposal } as RegisterPairsProposal; - message.batchcontractpair = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if ( - object.batchcontractpair !== undefined && - object.batchcontractpair !== null - ) { - for (const e of object.batchcontractpair) { - message.batchcontractpair.push(BatchContractPair.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUpdateTickSizeProposal: object = { title: "", description: "" }; - -export const UpdateTickSizeProposal = { - encode( - message: UpdateTickSizeProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.tickSizeList) { - TickSize.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UpdateTickSizeProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUpdateTickSizeProposal } as UpdateTickSizeProposal; - message.tickSizeList = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.tickSizeList.push(TickSize.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateTickSizeProposal { - const message = { ...baseUpdateTickSizeProposal } as UpdateTickSizeProposal; - message.tickSizeList = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.tickSizeList !== undefined && object.tickSizeList !== null) { - for (const e of object.tickSizeList) { - message.tickSizeList.push(TickSize.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: UpdateTickSizeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - if (message.tickSizeList) { - obj.tickSizeList = message.tickSizeList.map((e) => - e ? TickSize.toJSON(e) : undefined - ); - } else { - obj.tickSizeList = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): UpdateTickSizeProposal { - const message = { ...baseUpdateTickSizeProposal } as UpdateTickSizeProposal; - message.tickSizeList = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.tickSizeList !== undefined && object.tickSizeList !== null) { - for (const e of object.tickSizeList) { - message.tickSizeList.push(TickSize.fromPartial(e)); - } - } - return message; - }, -}; - -const baseAddAssetMetadataProposal: object = { title: "", description: "" }; - -export const AddAssetMetadataProposal = { - encode( - message: AddAssetMetadataProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.assetList) { - AssetMetadata.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): AddAssetMetadataProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseAddAssetMetadataProposal, - } as AddAssetMetadataProposal; - message.assetList = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.assetList.push(AssetMetadata.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): AddAssetMetadataProposal { - const message = { - ...baseAddAssetMetadataProposal, - } as AddAssetMetadataProposal; - message.assetList = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.assetList !== undefined && object.assetList !== null) { - for (const e of object.assetList) { - message.assetList.push(AssetMetadata.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: AddAssetMetadataProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - if (message.assetList) { - obj.assetList = message.assetList.map((e) => - e ? AssetMetadata.toJSON(e) : undefined - ); - } else { - obj.assetList = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): AddAssetMetadataProposal { - const message = { - ...baseAddAssetMetadataProposal, - } as AddAssetMetadataProposal; - message.assetList = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.assetList !== undefined && object.assetList !== null) { - for (const e of object.assetList) { - message.assetList.push(AssetMetadata.fromPartial(e)); - } - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/long_book.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/long_book.d.ts deleted file mode 100644 index 378b419c7c..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/long_book.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { OrderEntry } from "../dex/order_entry"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -export interface LongBook { - price: string; - entry: OrderEntry | undefined; -} -export declare const LongBook: { - encode(message: LongBook, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): LongBook; - fromJSON(object: any): LongBook; - toJSON(message: LongBook): unknown; - fromPartial(object: DeepPartial): LongBook; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/long_book.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/long_book.js deleted file mode 100644 index 2886bad8d0..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/long_book.js +++ /dev/null @@ -1,77 +0,0 @@ -/* eslint-disable */ -import { OrderEntry } from "../dex/order_entry"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const baseLongBook = { price: "" }; -export const LongBook = { - encode(message, writer = Writer.create()) { - if (message.price !== "") { - writer.uint32(10).string(message.price); - } - if (message.entry !== undefined) { - OrderEntry.encode(message.entry, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLongBook }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.price = reader.string(); - break; - case 2: - message.entry = OrderEntry.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseLongBook }; - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } - else { - message.price = ""; - } - if (object.entry !== undefined && object.entry !== null) { - message.entry = OrderEntry.fromJSON(object.entry); - } - else { - message.entry = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.price !== undefined && (obj.price = message.price); - message.entry !== undefined && - (obj.entry = message.entry - ? OrderEntry.toJSON(message.entry) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseLongBook }; - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } - else { - message.price = ""; - } - if (object.entry !== undefined && object.entry !== null) { - message.entry = OrderEntry.fromPartial(object.entry); - } - else { - message.entry = undefined; - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/long_book.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/long_book.ts deleted file mode 100644 index e8c9d30666..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/long_book.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* eslint-disable */ -import { OrderEntry } from "../dex/order_entry"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -export interface LongBook { - price: string; - entry: OrderEntry | undefined; -} - -const baseLongBook: object = { price: "" }; - -export const LongBook = { - encode(message: LongBook, writer: Writer = Writer.create()): Writer { - if (message.price !== "") { - writer.uint32(10).string(message.price); - } - if (message.entry !== undefined) { - OrderEntry.encode(message.entry, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): LongBook { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseLongBook } as LongBook; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.price = reader.string(); - break; - case 2: - message.entry = OrderEntry.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LongBook { - const message = { ...baseLongBook } as LongBook; - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } else { - message.price = ""; - } - if (object.entry !== undefined && object.entry !== null) { - message.entry = OrderEntry.fromJSON(object.entry); - } else { - message.entry = undefined; - } - return message; - }, - - toJSON(message: LongBook): unknown { - const obj: any = {}; - message.price !== undefined && (obj.price = message.price); - message.entry !== undefined && - (obj.entry = message.entry - ? OrderEntry.toJSON(message.entry) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): LongBook { - const message = { ...baseLongBook } as LongBook; - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } else { - message.price = ""; - } - if (object.entry !== undefined && object.entry !== null) { - message.entry = OrderEntry.fromPartial(object.entry); - } else { - message.entry = undefined; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/match_result.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/match_result.d.ts deleted file mode 100644 index 1e62cc4f54..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/match_result.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Order, Cancellation } from "../dex/order"; -import { SettlementEntry } from "../dex/settlement"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -export interface MatchResult { - height: number; - contractAddr: string; - orders: Order[]; - settlements: SettlementEntry[]; - cancellations: Cancellation[]; -} -export declare const MatchResult: { - encode(message: MatchResult, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MatchResult; - fromJSON(object: any): MatchResult; - toJSON(message: MatchResult): unknown; - fromPartial(object: DeepPartial): MatchResult; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/match_result.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/match_result.js deleted file mode 100644 index 1dd5337f4c..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/match_result.js +++ /dev/null @@ -1,173 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Order, Cancellation } from "../dex/order"; -import { SettlementEntry } from "../dex/settlement"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const baseMatchResult = { height: 0, contractAddr: "" }; -export const MatchResult = { - encode(message, writer = Writer.create()) { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - for (const v of message.orders) { - Order.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.settlements) { - SettlementEntry.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.cancellations) { - Cancellation.encode(v, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMatchResult }; - message.orders = []; - message.settlements = []; - message.cancellations = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64()); - break; - case 2: - message.contractAddr = reader.string(); - break; - case 3: - message.orders.push(Order.decode(reader, reader.uint32())); - break; - case 4: - message.settlements.push(SettlementEntry.decode(reader, reader.uint32())); - break; - case 5: - message.cancellations.push(Cancellation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMatchResult }; - message.orders = []; - message.settlements = []; - message.cancellations = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.orders !== undefined && object.orders !== null) { - for (const e of object.orders) { - message.orders.push(Order.fromJSON(e)); - } - } - if (object.settlements !== undefined && object.settlements !== null) { - for (const e of object.settlements) { - message.settlements.push(SettlementEntry.fromJSON(e)); - } - } - if (object.cancellations !== undefined && object.cancellations !== null) { - for (const e of object.cancellations) { - message.cancellations.push(Cancellation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.height !== undefined && (obj.height = message.height); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - if (message.orders) { - obj.orders = message.orders.map((e) => (e ? Order.toJSON(e) : undefined)); - } - else { - obj.orders = []; - } - if (message.settlements) { - obj.settlements = message.settlements.map((e) => e ? SettlementEntry.toJSON(e) : undefined); - } - else { - obj.settlements = []; - } - if (message.cancellations) { - obj.cancellations = message.cancellations.map((e) => e ? Cancellation.toJSON(e) : undefined); - } - else { - obj.cancellations = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMatchResult }; - message.orders = []; - message.settlements = []; - message.cancellations = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.orders !== undefined && object.orders !== null) { - for (const e of object.orders) { - message.orders.push(Order.fromPartial(e)); - } - } - if (object.settlements !== undefined && object.settlements !== null) { - for (const e of object.settlements) { - message.settlements.push(SettlementEntry.fromPartial(e)); - } - } - if (object.cancellations !== undefined && object.cancellations !== null) { - for (const e of object.cancellations) { - message.cancellations.push(Cancellation.fromPartial(e)); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/match_result.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/match_result.ts deleted file mode 100644 index 4264c2b020..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/match_result.ts +++ /dev/null @@ -1,201 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Order, Cancellation } from "../dex/order"; -import { SettlementEntry } from "../dex/settlement"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -export interface MatchResult { - height: number; - contractAddr: string; - orders: Order[]; - settlements: SettlementEntry[]; - cancellations: Cancellation[]; -} - -const baseMatchResult: object = { height: 0, contractAddr: "" }; - -export const MatchResult = { - encode(message: MatchResult, writer: Writer = Writer.create()): Writer { - if (message.height !== 0) { - writer.uint32(8).int64(message.height); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - for (const v of message.orders) { - Order.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.settlements) { - SettlementEntry.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.cancellations) { - Cancellation.encode(v!, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MatchResult { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMatchResult } as MatchResult; - message.orders = []; - message.settlements = []; - message.cancellations = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = longToNumber(reader.int64() as Long); - break; - case 2: - message.contractAddr = reader.string(); - break; - case 3: - message.orders.push(Order.decode(reader, reader.uint32())); - break; - case 4: - message.settlements.push( - SettlementEntry.decode(reader, reader.uint32()) - ); - break; - case 5: - message.cancellations.push( - Cancellation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MatchResult { - const message = { ...baseMatchResult } as MatchResult; - message.orders = []; - message.settlements = []; - message.cancellations = []; - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.orders !== undefined && object.orders !== null) { - for (const e of object.orders) { - message.orders.push(Order.fromJSON(e)); - } - } - if (object.settlements !== undefined && object.settlements !== null) { - for (const e of object.settlements) { - message.settlements.push(SettlementEntry.fromJSON(e)); - } - } - if (object.cancellations !== undefined && object.cancellations !== null) { - for (const e of object.cancellations) { - message.cancellations.push(Cancellation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MatchResult): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - if (message.orders) { - obj.orders = message.orders.map((e) => (e ? Order.toJSON(e) : undefined)); - } else { - obj.orders = []; - } - if (message.settlements) { - obj.settlements = message.settlements.map((e) => - e ? SettlementEntry.toJSON(e) : undefined - ); - } else { - obj.settlements = []; - } - if (message.cancellations) { - obj.cancellations = message.cancellations.map((e) => - e ? Cancellation.toJSON(e) : undefined - ); - } else { - obj.cancellations = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MatchResult { - const message = { ...baseMatchResult } as MatchResult; - message.orders = []; - message.settlements = []; - message.cancellations = []; - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.orders !== undefined && object.orders !== null) { - for (const e of object.orders) { - message.orders.push(Order.fromPartial(e)); - } - } - if (object.settlements !== undefined && object.settlements !== null) { - for (const e of object.settlements) { - message.settlements.push(SettlementEntry.fromPartial(e)); - } - } - if (object.cancellations !== undefined && object.cancellations !== null) { - for (const e of object.cancellations) { - message.cancellations.push(Cancellation.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order.d.ts deleted file mode 100644 index ba5cdb5f3d..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { OrderStatus, OrderType, PositionDirection, CancellationInitiator } from "../dex/enums"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -export interface Order { - id: number; - status: OrderStatus; - account: string; - contractAddr: string; - price: string; - quantity: string; - priceDenom: string; - assetDenom: string; - orderType: OrderType; - positionDirection: PositionDirection; - data: string; - statusDescription: string; -} -export interface Cancellation { - id: number; - initiator: CancellationInitiator; - creator: string; - contractAddr: string; - priceDenom: string; - assetDenom: string; - positionDirection: PositionDirection; - price: string; -} -export interface ActiveOrders { - ids: number[]; -} -export declare const Order: { - encode(message: Order, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Order; - fromJSON(object: any): Order; - toJSON(message: Order): unknown; - fromPartial(object: DeepPartial): Order; -}; -export declare const Cancellation: { - encode(message: Cancellation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Cancellation; - fromJSON(object: any): Cancellation; - toJSON(message: Cancellation): unknown; - fromPartial(object: DeepPartial): Cancellation; -}; -export declare const ActiveOrders: { - encode(message: ActiveOrders, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ActiveOrders; - fromJSON(object: any): ActiveOrders; - toJSON(message: ActiveOrders): unknown; - fromPartial(object: DeepPartial): ActiveOrders; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order.js deleted file mode 100644 index 271068d2f1..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order.js +++ /dev/null @@ -1,573 +0,0 @@ -/* eslint-disable */ -import { orderStatusFromJSON, orderTypeFromJSON, positionDirectionFromJSON, orderStatusToJSON, orderTypeToJSON, positionDirectionToJSON, cancellationInitiatorFromJSON, cancellationInitiatorToJSON, } from "../dex/enums"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const baseOrder = { - id: 0, - status: 0, - account: "", - contractAddr: "", - price: "", - quantity: "", - priceDenom: "", - assetDenom: "", - orderType: 0, - positionDirection: 0, - data: "", - statusDescription: "", -}; -export const Order = { - encode(message, writer = Writer.create()) { - if (message.id !== 0) { - writer.uint32(8).uint64(message.id); - } - if (message.status !== 0) { - writer.uint32(16).int32(message.status); - } - if (message.account !== "") { - writer.uint32(26).string(message.account); - } - if (message.contractAddr !== "") { - writer.uint32(34).string(message.contractAddr); - } - if (message.price !== "") { - writer.uint32(42).string(message.price); - } - if (message.quantity !== "") { - writer.uint32(50).string(message.quantity); - } - if (message.priceDenom !== "") { - writer.uint32(58).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(66).string(message.assetDenom); - } - if (message.orderType !== 0) { - writer.uint32(72).int32(message.orderType); - } - if (message.positionDirection !== 0) { - writer.uint32(80).int32(message.positionDirection); - } - if (message.data !== "") { - writer.uint32(90).string(message.data); - } - if (message.statusDescription !== "") { - writer.uint32(98).string(message.statusDescription); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOrder }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = longToNumber(reader.uint64()); - break; - case 2: - message.status = reader.int32(); - break; - case 3: - message.account = reader.string(); - break; - case 4: - message.contractAddr = reader.string(); - break; - case 5: - message.price = reader.string(); - break; - case 6: - message.quantity = reader.string(); - break; - case 7: - message.priceDenom = reader.string(); - break; - case 8: - message.assetDenom = reader.string(); - break; - case 9: - message.orderType = reader.int32(); - break; - case 10: - message.positionDirection = reader.int32(); - break; - case 11: - message.data = reader.string(); - break; - case 12: - message.statusDescription = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOrder }; - if (object.id !== undefined && object.id !== null) { - message.id = Number(object.id); - } - else { - message.id = 0; - } - if (object.status !== undefined && object.status !== null) { - message.status = orderStatusFromJSON(object.status); - } - else { - message.status = 0; - } - if (object.account !== undefined && object.account !== null) { - message.account = String(object.account); - } - else { - message.account = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } - else { - message.price = ""; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = String(object.quantity); - } - else { - message.quantity = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } - else { - message.assetDenom = ""; - } - if (object.orderType !== undefined && object.orderType !== null) { - message.orderType = orderTypeFromJSON(object.orderType); - } - else { - message.orderType = 0; - } - if (object.positionDirection !== undefined && - object.positionDirection !== null) { - message.positionDirection = positionDirectionFromJSON(object.positionDirection); - } - else { - message.positionDirection = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = String(object.data); - } - else { - message.data = ""; - } - if (object.statusDescription !== undefined && - object.statusDescription !== null) { - message.statusDescription = String(object.statusDescription); - } - else { - message.statusDescription = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.id !== undefined && (obj.id = message.id); - message.status !== undefined && - (obj.status = orderStatusToJSON(message.status)); - message.account !== undefined && (obj.account = message.account); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.price !== undefined && (obj.price = message.price); - message.quantity !== undefined && (obj.quantity = message.quantity); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.orderType !== undefined && - (obj.orderType = orderTypeToJSON(message.orderType)); - message.positionDirection !== undefined && - (obj.positionDirection = positionDirectionToJSON(message.positionDirection)); - message.data !== undefined && (obj.data = message.data); - message.statusDescription !== undefined && - (obj.statusDescription = message.statusDescription); - return obj; - }, - fromPartial(object) { - const message = { ...baseOrder }; - if (object.id !== undefined && object.id !== null) { - message.id = object.id; - } - else { - message.id = 0; - } - if (object.status !== undefined && object.status !== null) { - message.status = object.status; - } - else { - message.status = 0; - } - if (object.account !== undefined && object.account !== null) { - message.account = object.account; - } - else { - message.account = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } - else { - message.price = ""; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = object.quantity; - } - else { - message.quantity = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } - else { - message.assetDenom = ""; - } - if (object.orderType !== undefined && object.orderType !== null) { - message.orderType = object.orderType; - } - else { - message.orderType = 0; - } - if (object.positionDirection !== undefined && - object.positionDirection !== null) { - message.positionDirection = object.positionDirection; - } - else { - message.positionDirection = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = ""; - } - if (object.statusDescription !== undefined && - object.statusDescription !== null) { - message.statusDescription = object.statusDescription; - } - else { - message.statusDescription = ""; - } - return message; - }, -}; -const baseCancellation = { - id: 0, - initiator: 0, - creator: "", - contractAddr: "", - priceDenom: "", - assetDenom: "", - positionDirection: 0, - price: "", -}; -export const Cancellation = { - encode(message, writer = Writer.create()) { - if (message.id !== 0) { - writer.uint32(8).uint64(message.id); - } - if (message.initiator !== 0) { - writer.uint32(16).int32(message.initiator); - } - if (message.creator !== "") { - writer.uint32(26).string(message.creator); - } - if (message.contractAddr !== "") { - writer.uint32(34).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(42).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(50).string(message.assetDenom); - } - if (message.positionDirection !== 0) { - writer.uint32(56).int32(message.positionDirection); - } - if (message.price !== "") { - writer.uint32(66).string(message.price); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCancellation }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = longToNumber(reader.uint64()); - break; - case 2: - message.initiator = reader.int32(); - break; - case 3: - message.creator = reader.string(); - break; - case 4: - message.contractAddr = reader.string(); - break; - case 5: - message.priceDenom = reader.string(); - break; - case 6: - message.assetDenom = reader.string(); - break; - case 7: - message.positionDirection = reader.int32(); - break; - case 8: - message.price = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCancellation }; - if (object.id !== undefined && object.id !== null) { - message.id = Number(object.id); - } - else { - message.id = 0; - } - if (object.initiator !== undefined && object.initiator !== null) { - message.initiator = cancellationInitiatorFromJSON(object.initiator); - } - else { - message.initiator = 0; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } - else { - message.creator = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } - else { - message.assetDenom = ""; - } - if (object.positionDirection !== undefined && - object.positionDirection !== null) { - message.positionDirection = positionDirectionFromJSON(object.positionDirection); - } - else { - message.positionDirection = 0; - } - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } - else { - message.price = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.id !== undefined && (obj.id = message.id); - message.initiator !== undefined && - (obj.initiator = cancellationInitiatorToJSON(message.initiator)); - message.creator !== undefined && (obj.creator = message.creator); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.positionDirection !== undefined && - (obj.positionDirection = positionDirectionToJSON(message.positionDirection)); - message.price !== undefined && (obj.price = message.price); - return obj; - }, - fromPartial(object) { - const message = { ...baseCancellation }; - if (object.id !== undefined && object.id !== null) { - message.id = object.id; - } - else { - message.id = 0; - } - if (object.initiator !== undefined && object.initiator !== null) { - message.initiator = object.initiator; - } - else { - message.initiator = 0; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } - else { - message.creator = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } - else { - message.assetDenom = ""; - } - if (object.positionDirection !== undefined && - object.positionDirection !== null) { - message.positionDirection = object.positionDirection; - } - else { - message.positionDirection = 0; - } - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } - else { - message.price = ""; - } - return message; - }, -}; -const baseActiveOrders = { ids: 0 }; -export const ActiveOrders = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.ids) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseActiveOrders }; - message.ids = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.ids.push(longToNumber(reader.uint64())); - } - } - else { - message.ids.push(longToNumber(reader.uint64())); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseActiveOrders }; - message.ids = []; - if (object.ids !== undefined && object.ids !== null) { - for (const e of object.ids) { - message.ids.push(Number(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.ids) { - obj.ids = message.ids.map((e) => e); - } - else { - obj.ids = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseActiveOrders }; - message.ids = []; - if (object.ids !== undefined && object.ids !== null) { - for (const e of object.ids) { - message.ids.push(e); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order.ts deleted file mode 100644 index bb414302df..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order.ts +++ /dev/null @@ -1,625 +0,0 @@ -/* eslint-disable */ -import { - OrderStatus, - OrderType, - PositionDirection, - CancellationInitiator, - orderStatusFromJSON, - orderTypeFromJSON, - positionDirectionFromJSON, - orderStatusToJSON, - orderTypeToJSON, - positionDirectionToJSON, - cancellationInitiatorFromJSON, - cancellationInitiatorToJSON, -} from "../dex/enums"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -export interface Order { - id: number; - status: OrderStatus; - account: string; - contractAddr: string; - price: string; - quantity: string; - priceDenom: string; - assetDenom: string; - orderType: OrderType; - positionDirection: PositionDirection; - data: string; - statusDescription: string; -} - -export interface Cancellation { - id: number; - initiator: CancellationInitiator; - creator: string; - contractAddr: string; - priceDenom: string; - assetDenom: string; - positionDirection: PositionDirection; - price: string; -} - -export interface ActiveOrders { - ids: number[]; -} - -const baseOrder: object = { - id: 0, - status: 0, - account: "", - contractAddr: "", - price: "", - quantity: "", - priceDenom: "", - assetDenom: "", - orderType: 0, - positionDirection: 0, - data: "", - statusDescription: "", -}; - -export const Order = { - encode(message: Order, writer: Writer = Writer.create()): Writer { - if (message.id !== 0) { - writer.uint32(8).uint64(message.id); - } - if (message.status !== 0) { - writer.uint32(16).int32(message.status); - } - if (message.account !== "") { - writer.uint32(26).string(message.account); - } - if (message.contractAddr !== "") { - writer.uint32(34).string(message.contractAddr); - } - if (message.price !== "") { - writer.uint32(42).string(message.price); - } - if (message.quantity !== "") { - writer.uint32(50).string(message.quantity); - } - if (message.priceDenom !== "") { - writer.uint32(58).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(66).string(message.assetDenom); - } - if (message.orderType !== 0) { - writer.uint32(72).int32(message.orderType); - } - if (message.positionDirection !== 0) { - writer.uint32(80).int32(message.positionDirection); - } - if (message.data !== "") { - writer.uint32(90).string(message.data); - } - if (message.statusDescription !== "") { - writer.uint32(98).string(message.statusDescription); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Order { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOrder } as Order; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.status = reader.int32() as any; - break; - case 3: - message.account = reader.string(); - break; - case 4: - message.contractAddr = reader.string(); - break; - case 5: - message.price = reader.string(); - break; - case 6: - message.quantity = reader.string(); - break; - case 7: - message.priceDenom = reader.string(); - break; - case 8: - message.assetDenom = reader.string(); - break; - case 9: - message.orderType = reader.int32() as any; - break; - case 10: - message.positionDirection = reader.int32() as any; - break; - case 11: - message.data = reader.string(); - break; - case 12: - message.statusDescription = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Order { - const message = { ...baseOrder } as Order; - if (object.id !== undefined && object.id !== null) { - message.id = Number(object.id); - } else { - message.id = 0; - } - if (object.status !== undefined && object.status !== null) { - message.status = orderStatusFromJSON(object.status); - } else { - message.status = 0; - } - if (object.account !== undefined && object.account !== null) { - message.account = String(object.account); - } else { - message.account = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } else { - message.price = ""; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = String(object.quantity); - } else { - message.quantity = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } else { - message.assetDenom = ""; - } - if (object.orderType !== undefined && object.orderType !== null) { - message.orderType = orderTypeFromJSON(object.orderType); - } else { - message.orderType = 0; - } - if ( - object.positionDirection !== undefined && - object.positionDirection !== null - ) { - message.positionDirection = positionDirectionFromJSON( - object.positionDirection - ); - } else { - message.positionDirection = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = String(object.data); - } else { - message.data = ""; - } - if ( - object.statusDescription !== undefined && - object.statusDescription !== null - ) { - message.statusDescription = String(object.statusDescription); - } else { - message.statusDescription = ""; - } - return message; - }, - - toJSON(message: Order): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.status !== undefined && - (obj.status = orderStatusToJSON(message.status)); - message.account !== undefined && (obj.account = message.account); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.price !== undefined && (obj.price = message.price); - message.quantity !== undefined && (obj.quantity = message.quantity); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.orderType !== undefined && - (obj.orderType = orderTypeToJSON(message.orderType)); - message.positionDirection !== undefined && - (obj.positionDirection = positionDirectionToJSON( - message.positionDirection - )); - message.data !== undefined && (obj.data = message.data); - message.statusDescription !== undefined && - (obj.statusDescription = message.statusDescription); - return obj; - }, - - fromPartial(object: DeepPartial): Order { - const message = { ...baseOrder } as Order; - if (object.id !== undefined && object.id !== null) { - message.id = object.id; - } else { - message.id = 0; - } - if (object.status !== undefined && object.status !== null) { - message.status = object.status; - } else { - message.status = 0; - } - if (object.account !== undefined && object.account !== null) { - message.account = object.account; - } else { - message.account = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } else { - message.price = ""; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = object.quantity; - } else { - message.quantity = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } else { - message.assetDenom = ""; - } - if (object.orderType !== undefined && object.orderType !== null) { - message.orderType = object.orderType; - } else { - message.orderType = 0; - } - if ( - object.positionDirection !== undefined && - object.positionDirection !== null - ) { - message.positionDirection = object.positionDirection; - } else { - message.positionDirection = 0; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } else { - message.data = ""; - } - if ( - object.statusDescription !== undefined && - object.statusDescription !== null - ) { - message.statusDescription = object.statusDescription; - } else { - message.statusDescription = ""; - } - return message; - }, -}; - -const baseCancellation: object = { - id: 0, - initiator: 0, - creator: "", - contractAddr: "", - priceDenom: "", - assetDenom: "", - positionDirection: 0, - price: "", -}; - -export const Cancellation = { - encode(message: Cancellation, writer: Writer = Writer.create()): Writer { - if (message.id !== 0) { - writer.uint32(8).uint64(message.id); - } - if (message.initiator !== 0) { - writer.uint32(16).int32(message.initiator); - } - if (message.creator !== "") { - writer.uint32(26).string(message.creator); - } - if (message.contractAddr !== "") { - writer.uint32(34).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(42).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(50).string(message.assetDenom); - } - if (message.positionDirection !== 0) { - writer.uint32(56).int32(message.positionDirection); - } - if (message.price !== "") { - writer.uint32(66).string(message.price); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Cancellation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCancellation } as Cancellation; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = longToNumber(reader.uint64() as Long); - break; - case 2: - message.initiator = reader.int32() as any; - break; - case 3: - message.creator = reader.string(); - break; - case 4: - message.contractAddr = reader.string(); - break; - case 5: - message.priceDenom = reader.string(); - break; - case 6: - message.assetDenom = reader.string(); - break; - case 7: - message.positionDirection = reader.int32() as any; - break; - case 8: - message.price = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Cancellation { - const message = { ...baseCancellation } as Cancellation; - if (object.id !== undefined && object.id !== null) { - message.id = Number(object.id); - } else { - message.id = 0; - } - if (object.initiator !== undefined && object.initiator !== null) { - message.initiator = cancellationInitiatorFromJSON(object.initiator); - } else { - message.initiator = 0; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } else { - message.creator = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } else { - message.assetDenom = ""; - } - if ( - object.positionDirection !== undefined && - object.positionDirection !== null - ) { - message.positionDirection = positionDirectionFromJSON( - object.positionDirection - ); - } else { - message.positionDirection = 0; - } - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } else { - message.price = ""; - } - return message; - }, - - toJSON(message: Cancellation): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.initiator !== undefined && - (obj.initiator = cancellationInitiatorToJSON(message.initiator)); - message.creator !== undefined && (obj.creator = message.creator); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.positionDirection !== undefined && - (obj.positionDirection = positionDirectionToJSON( - message.positionDirection - )); - message.price !== undefined && (obj.price = message.price); - return obj; - }, - - fromPartial(object: DeepPartial): Cancellation { - const message = { ...baseCancellation } as Cancellation; - if (object.id !== undefined && object.id !== null) { - message.id = object.id; - } else { - message.id = 0; - } - if (object.initiator !== undefined && object.initiator !== null) { - message.initiator = object.initiator; - } else { - message.initiator = 0; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } else { - message.creator = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } else { - message.assetDenom = ""; - } - if ( - object.positionDirection !== undefined && - object.positionDirection !== null - ) { - message.positionDirection = object.positionDirection; - } else { - message.positionDirection = 0; - } - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } else { - message.price = ""; - } - return message; - }, -}; - -const baseActiveOrders: object = { ids: 0 }; - -export const ActiveOrders = { - encode(message: ActiveOrders, writer: Writer = Writer.create()): Writer { - writer.uint32(10).fork(); - for (const v of message.ids) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ActiveOrders { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseActiveOrders } as ActiveOrders; - message.ids = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.ids.push(longToNumber(reader.uint64() as Long)); - } - } else { - message.ids.push(longToNumber(reader.uint64() as Long)); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ActiveOrders { - const message = { ...baseActiveOrders } as ActiveOrders; - message.ids = []; - if (object.ids !== undefined && object.ids !== null) { - for (const e of object.ids) { - message.ids.push(Number(e)); - } - } - return message; - }, - - toJSON(message: ActiveOrders): unknown { - const obj: any = {}; - if (message.ids) { - obj.ids = message.ids.map((e) => e); - } else { - obj.ids = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ActiveOrders { - const message = { ...baseActiveOrders } as ActiveOrders; - message.ids = []; - if (object.ids !== undefined && object.ids !== null) { - for (const e of object.ids) { - message.ids.push(e); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order_entry.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order_entry.d.ts deleted file mode 100644 index 36212b7363..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order_entry.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -export interface OrderEntry { - price: string; - quantity: string; - allocations: Allocation[]; - priceDenom: string; - assetDenom: string; -} -export interface Allocation { - orderId: number; - quantity: string; - account: string; -} -export declare const OrderEntry: { - encode(message: OrderEntry, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OrderEntry; - fromJSON(object: any): OrderEntry; - toJSON(message: OrderEntry): unknown; - fromPartial(object: DeepPartial): OrderEntry; -}; -export declare const Allocation: { - encode(message: Allocation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Allocation; - fromJSON(object: any): Allocation; - toJSON(message: Allocation): unknown; - fromPartial(object: DeepPartial): Allocation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order_entry.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order_entry.js deleted file mode 100644 index 8c7f609c4b..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order_entry.js +++ /dev/null @@ -1,252 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const baseOrderEntry = { - price: "", - quantity: "", - priceDenom: "", - assetDenom: "", -}; -export const OrderEntry = { - encode(message, writer = Writer.create()) { - if (message.price !== "") { - writer.uint32(10).string(message.price); - } - if (message.quantity !== "") { - writer.uint32(18).string(message.quantity); - } - for (const v of message.allocations) { - Allocation.encode(v, writer.uint32(26).fork()).ldelim(); - } - if (message.priceDenom !== "") { - writer.uint32(34).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(42).string(message.assetDenom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOrderEntry }; - message.allocations = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.price = reader.string(); - break; - case 2: - message.quantity = reader.string(); - break; - case 3: - message.allocations.push(Allocation.decode(reader, reader.uint32())); - break; - case 4: - message.priceDenom = reader.string(); - break; - case 5: - message.assetDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOrderEntry }; - message.allocations = []; - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } - else { - message.price = ""; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = String(object.quantity); - } - else { - message.quantity = ""; - } - if (object.allocations !== undefined && object.allocations !== null) { - for (const e of object.allocations) { - message.allocations.push(Allocation.fromJSON(e)); - } - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } - else { - message.assetDenom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.price !== undefined && (obj.price = message.price); - message.quantity !== undefined && (obj.quantity = message.quantity); - if (message.allocations) { - obj.allocations = message.allocations.map((e) => e ? Allocation.toJSON(e) : undefined); - } - else { - obj.allocations = []; - } - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - return obj; - }, - fromPartial(object) { - const message = { ...baseOrderEntry }; - message.allocations = []; - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } - else { - message.price = ""; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = object.quantity; - } - else { - message.quantity = ""; - } - if (object.allocations !== undefined && object.allocations !== null) { - for (const e of object.allocations) { - message.allocations.push(Allocation.fromPartial(e)); - } - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } - else { - message.assetDenom = ""; - } - return message; - }, -}; -const baseAllocation = { orderId: 0, quantity: "", account: "" }; -export const Allocation = { - encode(message, writer = Writer.create()) { - if (message.orderId !== 0) { - writer.uint32(8).uint64(message.orderId); - } - if (message.quantity !== "") { - writer.uint32(18).string(message.quantity); - } - if (message.account !== "") { - writer.uint32(26).string(message.account); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAllocation }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.orderId = longToNumber(reader.uint64()); - break; - case 2: - message.quantity = reader.string(); - break; - case 3: - message.account = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseAllocation }; - if (object.orderId !== undefined && object.orderId !== null) { - message.orderId = Number(object.orderId); - } - else { - message.orderId = 0; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = String(object.quantity); - } - else { - message.quantity = ""; - } - if (object.account !== undefined && object.account !== null) { - message.account = String(object.account); - } - else { - message.account = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.orderId !== undefined && (obj.orderId = message.orderId); - message.quantity !== undefined && (obj.quantity = message.quantity); - message.account !== undefined && (obj.account = message.account); - return obj; - }, - fromPartial(object) { - const message = { ...baseAllocation }; - if (object.orderId !== undefined && object.orderId !== null) { - message.orderId = object.orderId; - } - else { - message.orderId = 0; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = object.quantity; - } - else { - message.quantity = ""; - } - if (object.account !== undefined && object.account !== null) { - message.account = object.account; - } - else { - message.account = ""; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order_entry.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order_entry.ts deleted file mode 100644 index c1439f9189..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/order_entry.ts +++ /dev/null @@ -1,278 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -export interface OrderEntry { - price: string; - quantity: string; - allocations: Allocation[]; - priceDenom: string; - assetDenom: string; -} - -export interface Allocation { - orderId: number; - quantity: string; - account: string; -} - -const baseOrderEntry: object = { - price: "", - quantity: "", - priceDenom: "", - assetDenom: "", -}; - -export const OrderEntry = { - encode(message: OrderEntry, writer: Writer = Writer.create()): Writer { - if (message.price !== "") { - writer.uint32(10).string(message.price); - } - if (message.quantity !== "") { - writer.uint32(18).string(message.quantity); - } - for (const v of message.allocations) { - Allocation.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.priceDenom !== "") { - writer.uint32(34).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(42).string(message.assetDenom); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OrderEntry { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOrderEntry } as OrderEntry; - message.allocations = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.price = reader.string(); - break; - case 2: - message.quantity = reader.string(); - break; - case 3: - message.allocations.push(Allocation.decode(reader, reader.uint32())); - break; - case 4: - message.priceDenom = reader.string(); - break; - case 5: - message.assetDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OrderEntry { - const message = { ...baseOrderEntry } as OrderEntry; - message.allocations = []; - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } else { - message.price = ""; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = String(object.quantity); - } else { - message.quantity = ""; - } - if (object.allocations !== undefined && object.allocations !== null) { - for (const e of object.allocations) { - message.allocations.push(Allocation.fromJSON(e)); - } - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } else { - message.assetDenom = ""; - } - return message; - }, - - toJSON(message: OrderEntry): unknown { - const obj: any = {}; - message.price !== undefined && (obj.price = message.price); - message.quantity !== undefined && (obj.quantity = message.quantity); - if (message.allocations) { - obj.allocations = message.allocations.map((e) => - e ? Allocation.toJSON(e) : undefined - ); - } else { - obj.allocations = []; - } - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - return obj; - }, - - fromPartial(object: DeepPartial): OrderEntry { - const message = { ...baseOrderEntry } as OrderEntry; - message.allocations = []; - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } else { - message.price = ""; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = object.quantity; - } else { - message.quantity = ""; - } - if (object.allocations !== undefined && object.allocations !== null) { - for (const e of object.allocations) { - message.allocations.push(Allocation.fromPartial(e)); - } - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } else { - message.assetDenom = ""; - } - return message; - }, -}; - -const baseAllocation: object = { orderId: 0, quantity: "", account: "" }; - -export const Allocation = { - encode(message: Allocation, writer: Writer = Writer.create()): Writer { - if (message.orderId !== 0) { - writer.uint32(8).uint64(message.orderId); - } - if (message.quantity !== "") { - writer.uint32(18).string(message.quantity); - } - if (message.account !== "") { - writer.uint32(26).string(message.account); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Allocation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAllocation } as Allocation; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.orderId = longToNumber(reader.uint64() as Long); - break; - case 2: - message.quantity = reader.string(); - break; - case 3: - message.account = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Allocation { - const message = { ...baseAllocation } as Allocation; - if (object.orderId !== undefined && object.orderId !== null) { - message.orderId = Number(object.orderId); - } else { - message.orderId = 0; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = String(object.quantity); - } else { - message.quantity = ""; - } - if (object.account !== undefined && object.account !== null) { - message.account = String(object.account); - } else { - message.account = ""; - } - return message; - }, - - toJSON(message: Allocation): unknown { - const obj: any = {}; - message.orderId !== undefined && (obj.orderId = message.orderId); - message.quantity !== undefined && (obj.quantity = message.quantity); - message.account !== undefined && (obj.account = message.account); - return obj; - }, - - fromPartial(object: DeepPartial): Allocation { - const message = { ...baseAllocation } as Allocation; - if (object.orderId !== undefined && object.orderId !== null) { - message.orderId = object.orderId; - } else { - message.orderId = 0; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = object.quantity; - } else { - message.quantity = ""; - } - if (object.account !== undefined && object.account !== null) { - message.account = object.account; - } else { - message.account = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/pair.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/pair.d.ts deleted file mode 100644 index 02460bc8fa..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/pair.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -export interface Pair { - priceDenom: string; - assetDenom: string; - ticksize: string; -} -export interface BatchContractPair { - contractAddr: string; - pairs: Pair[]; -} -export declare const Pair: { - encode(message: Pair, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Pair; - fromJSON(object: any): Pair; - toJSON(message: Pair): unknown; - fromPartial(object: DeepPartial): Pair; -}; -export declare const BatchContractPair: { - encode(message: BatchContractPair, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): BatchContractPair; - fromJSON(object: any): BatchContractPair; - toJSON(message: BatchContractPair): unknown; - fromPartial(object: DeepPartial): BatchContractPair; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/pair.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/pair.js deleted file mode 100644 index 19b591398d..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/pair.js +++ /dev/null @@ -1,169 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const basePair = { priceDenom: "", assetDenom: "", ticksize: "" }; -export const Pair = { - encode(message, writer = Writer.create()) { - if (message.priceDenom !== "") { - writer.uint32(10).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(18).string(message.assetDenom); - } - if (message.ticksize !== "") { - writer.uint32(26).string(message.ticksize); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePair }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.priceDenom = reader.string(); - break; - case 2: - message.assetDenom = reader.string(); - break; - case 3: - message.ticksize = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePair }; - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } - else { - message.assetDenom = ""; - } - if (object.ticksize !== undefined && object.ticksize !== null) { - message.ticksize = String(object.ticksize); - } - else { - message.ticksize = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.ticksize !== undefined && (obj.ticksize = message.ticksize); - return obj; - }, - fromPartial(object) { - const message = { ...basePair }; - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } - else { - message.assetDenom = ""; - } - if (object.ticksize !== undefined && object.ticksize !== null) { - message.ticksize = object.ticksize; - } - else { - message.ticksize = ""; - } - return message; - }, -}; -const baseBatchContractPair = { contractAddr: "" }; -export const BatchContractPair = { - encode(message, writer = Writer.create()) { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - for (const v of message.pairs) { - Pair.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBatchContractPair }; - message.pairs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - case 2: - message.pairs.push(Pair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseBatchContractPair }; - message.pairs = []; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(Pair.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - if (message.pairs) { - obj.pairs = message.pairs.map((e) => (e ? Pair.toJSON(e) : undefined)); - } - else { - obj.pairs = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseBatchContractPair }; - message.pairs = []; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(Pair.fromPartial(e)); - } - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/pair.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/pair.ts deleted file mode 100644 index 67cd3fdbc7..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/pair.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -export interface Pair { - priceDenom: string; - assetDenom: string; - ticksize: string; -} - -export interface BatchContractPair { - contractAddr: string; - pairs: Pair[]; -} - -const basePair: object = { priceDenom: "", assetDenom: "", ticksize: "" }; - -export const Pair = { - encode(message: Pair, writer: Writer = Writer.create()): Writer { - if (message.priceDenom !== "") { - writer.uint32(10).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(18).string(message.assetDenom); - } - if (message.ticksize !== "") { - writer.uint32(26).string(message.ticksize); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Pair { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePair } as Pair; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.priceDenom = reader.string(); - break; - case 2: - message.assetDenom = reader.string(); - break; - case 3: - message.ticksize = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Pair { - const message = { ...basePair } as Pair; - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } else { - message.assetDenom = ""; - } - if (object.ticksize !== undefined && object.ticksize !== null) { - message.ticksize = String(object.ticksize); - } else { - message.ticksize = ""; - } - return message; - }, - - toJSON(message: Pair): unknown { - const obj: any = {}; - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.ticksize !== undefined && (obj.ticksize = message.ticksize); - return obj; - }, - - fromPartial(object: DeepPartial): Pair { - const message = { ...basePair } as Pair; - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } else { - message.assetDenom = ""; - } - if (object.ticksize !== undefined && object.ticksize !== null) { - message.ticksize = object.ticksize; - } else { - message.ticksize = ""; - } - return message; - }, -}; - -const baseBatchContractPair: object = { contractAddr: "" }; - -export const BatchContractPair = { - encode(message: BatchContractPair, writer: Writer = Writer.create()): Writer { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - for (const v of message.pairs) { - Pair.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): BatchContractPair { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseBatchContractPair } as BatchContractPair; - message.pairs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - case 2: - message.pairs.push(Pair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BatchContractPair { - const message = { ...baseBatchContractPair } as BatchContractPair; - message.pairs = []; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(Pair.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: BatchContractPair): unknown { - const obj: any = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - if (message.pairs) { - obj.pairs = message.pairs.map((e) => (e ? Pair.toJSON(e) : undefined)); - } else { - obj.pairs = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): BatchContractPair { - const message = { ...baseBatchContractPair } as BatchContractPair; - message.pairs = []; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(Pair.fromPartial(e)); - } - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/params.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/params.d.ts deleted file mode 100644 index 652895dd88..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/params.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -/** Params defines the parameters for the module. */ -export interface Params { - priceSnapshotRetention: number; -} -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/params.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/params.js deleted file mode 100644 index e94652f163..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/params.js +++ /dev/null @@ -1,79 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const baseParams = { priceSnapshotRetention: 0 }; -export const Params = { - encode(message, writer = Writer.create()) { - if (message.priceSnapshotRetention !== 0) { - writer.uint32(8).uint64(message.priceSnapshotRetention); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.priceSnapshotRetention = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - if (object.priceSnapshotRetention !== undefined && - object.priceSnapshotRetention !== null) { - message.priceSnapshotRetention = Number(object.priceSnapshotRetention); - } - else { - message.priceSnapshotRetention = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.priceSnapshotRetention !== undefined && - (obj.priceSnapshotRetention = message.priceSnapshotRetention); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - if (object.priceSnapshotRetention !== undefined && - object.priceSnapshotRetention !== null) { - message.priceSnapshotRetention = object.priceSnapshotRetention; - } - else { - message.priceSnapshotRetention = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/params.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/params.ts deleted file mode 100644 index b02bd8e2be..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/params.ts +++ /dev/null @@ -1,109 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -/** Params defines the parameters for the module. */ -export interface Params { - price_snapshot_retention: number; -} - -const baseParams: object = { price_snapshot_retention: 0 }; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.price_snapshot_retention !== 0) { - writer.uint32(8).uint64(message.price_snapshot_retention); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.price_snapshot_retention = longToNumber( - reader.uint64() as Long - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if ( - object.price_snapshot_retention !== undefined && - object.price_snapshot_retention !== null - ) { - message.price_snapshot_retention = Number( - object.price_snapshot_retention - ); - } else { - message.price_snapshot_retention = 0; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.price_snapshot_retention !== undefined && - (obj.price_snapshot_retention = message.price_snapshot_retention); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if ( - object.price_snapshot_retention !== undefined && - object.price_snapshot_retention !== null - ) { - message.price_snapshot_retention = object.price_snapshot_retention; - } else { - message.price_snapshot_retention = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/price.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/price.d.ts deleted file mode 100644 index f065b5cd2d..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/price.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Pair } from "../dex/pair"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -export interface Price { - snapshotTimestampInSeconds: number; - price: string; - pair: Pair | undefined; -} -export interface PriceCandlestick { - beginTimestamp: number; - endTimestamp: number; - open: string; - high: string; - low: string; - close: string; - volume: string; -} -export declare const Price: { - encode(message: Price, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Price; - fromJSON(object: any): Price; - toJSON(message: Price): unknown; - fromPartial(object: DeepPartial): Price; -}; -export declare const PriceCandlestick: { - encode(message: PriceCandlestick, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PriceCandlestick; - fromJSON(object: any): PriceCandlestick; - toJSON(message: PriceCandlestick): unknown; - fromPartial(object: DeepPartial): PriceCandlestick; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/price.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/price.js deleted file mode 100644 index 2e9c7fdff7..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/price.js +++ /dev/null @@ -1,294 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Pair } from "../dex/pair"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const basePrice = { snapshotTimestampInSeconds: 0, price: "" }; -export const Price = { - encode(message, writer = Writer.create()) { - if (message.snapshotTimestampInSeconds !== 0) { - writer.uint32(8).uint64(message.snapshotTimestampInSeconds); - } - if (message.price !== "") { - writer.uint32(18).string(message.price); - } - if (message.pair !== undefined) { - Pair.encode(message.pair, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePrice }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshotTimestampInSeconds = longToNumber(reader.uint64()); - break; - case 2: - message.price = reader.string(); - break; - case 3: - message.pair = Pair.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePrice }; - if (object.snapshotTimestampInSeconds !== undefined && - object.snapshotTimestampInSeconds !== null) { - message.snapshotTimestampInSeconds = Number(object.snapshotTimestampInSeconds); - } - else { - message.snapshotTimestampInSeconds = 0; - } - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } - else { - message.price = ""; - } - if (object.pair !== undefined && object.pair !== null) { - message.pair = Pair.fromJSON(object.pair); - } - else { - message.pair = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.snapshotTimestampInSeconds !== undefined && - (obj.snapshotTimestampInSeconds = message.snapshotTimestampInSeconds); - message.price !== undefined && (obj.price = message.price); - message.pair !== undefined && - (obj.pair = message.pair ? Pair.toJSON(message.pair) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...basePrice }; - if (object.snapshotTimestampInSeconds !== undefined && - object.snapshotTimestampInSeconds !== null) { - message.snapshotTimestampInSeconds = object.snapshotTimestampInSeconds; - } - else { - message.snapshotTimestampInSeconds = 0; - } - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } - else { - message.price = ""; - } - if (object.pair !== undefined && object.pair !== null) { - message.pair = Pair.fromPartial(object.pair); - } - else { - message.pair = undefined; - } - return message; - }, -}; -const basePriceCandlestick = { - beginTimestamp: 0, - endTimestamp: 0, - open: "", - high: "", - low: "", - close: "", - volume: "", -}; -export const PriceCandlestick = { - encode(message, writer = Writer.create()) { - if (message.beginTimestamp !== 0) { - writer.uint32(8).uint64(message.beginTimestamp); - } - if (message.endTimestamp !== 0) { - writer.uint32(16).uint64(message.endTimestamp); - } - if (message.open !== "") { - writer.uint32(26).string(message.open); - } - if (message.high !== "") { - writer.uint32(34).string(message.high); - } - if (message.low !== "") { - writer.uint32(42).string(message.low); - } - if (message.close !== "") { - writer.uint32(50).string(message.close); - } - if (message.volume !== "") { - writer.uint32(58).string(message.volume); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePriceCandlestick }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.beginTimestamp = longToNumber(reader.uint64()); - break; - case 2: - message.endTimestamp = longToNumber(reader.uint64()); - break; - case 3: - message.open = reader.string(); - break; - case 4: - message.high = reader.string(); - break; - case 5: - message.low = reader.string(); - break; - case 6: - message.close = reader.string(); - break; - case 7: - message.volume = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePriceCandlestick }; - if (object.beginTimestamp !== undefined && object.beginTimestamp !== null) { - message.beginTimestamp = Number(object.beginTimestamp); - } - else { - message.beginTimestamp = 0; - } - if (object.endTimestamp !== undefined && object.endTimestamp !== null) { - message.endTimestamp = Number(object.endTimestamp); - } - else { - message.endTimestamp = 0; - } - if (object.open !== undefined && object.open !== null) { - message.open = String(object.open); - } - else { - message.open = ""; - } - if (object.high !== undefined && object.high !== null) { - message.high = String(object.high); - } - else { - message.high = ""; - } - if (object.low !== undefined && object.low !== null) { - message.low = String(object.low); - } - else { - message.low = ""; - } - if (object.close !== undefined && object.close !== null) { - message.close = String(object.close); - } - else { - message.close = ""; - } - if (object.volume !== undefined && object.volume !== null) { - message.volume = String(object.volume); - } - else { - message.volume = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.beginTimestamp !== undefined && - (obj.beginTimestamp = message.beginTimestamp); - message.endTimestamp !== undefined && - (obj.endTimestamp = message.endTimestamp); - message.open !== undefined && (obj.open = message.open); - message.high !== undefined && (obj.high = message.high); - message.low !== undefined && (obj.low = message.low); - message.close !== undefined && (obj.close = message.close); - message.volume !== undefined && (obj.volume = message.volume); - return obj; - }, - fromPartial(object) { - const message = { ...basePriceCandlestick }; - if (object.beginTimestamp !== undefined && object.beginTimestamp !== null) { - message.beginTimestamp = object.beginTimestamp; - } - else { - message.beginTimestamp = 0; - } - if (object.endTimestamp !== undefined && object.endTimestamp !== null) { - message.endTimestamp = object.endTimestamp; - } - else { - message.endTimestamp = 0; - } - if (object.open !== undefined && object.open !== null) { - message.open = object.open; - } - else { - message.open = ""; - } - if (object.high !== undefined && object.high !== null) { - message.high = object.high; - } - else { - message.high = ""; - } - if (object.low !== undefined && object.low !== null) { - message.low = object.low; - } - else { - message.low = ""; - } - if (object.close !== undefined && object.close !== null) { - message.close = object.close; - } - else { - message.close = ""; - } - if (object.volume !== undefined && object.volume !== null) { - message.volume = object.volume; - } - else { - message.volume = ""; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/price.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/price.ts deleted file mode 100644 index 68f99dcd20..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/price.ts +++ /dev/null @@ -1,323 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Pair } from "../dex/pair"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -export interface Price { - snapshotTimestampInSeconds: number; - price: string; - pair: Pair | undefined; -} - -export interface PriceCandlestick { - beginTimestamp: number; - endTimestamp: number; - open: string; - high: string; - low: string; - close: string; - volume: string; -} - -const basePrice: object = { snapshotTimestampInSeconds: 0, price: "" }; - -export const Price = { - encode(message: Price, writer: Writer = Writer.create()): Writer { - if (message.snapshotTimestampInSeconds !== 0) { - writer.uint32(8).uint64(message.snapshotTimestampInSeconds); - } - if (message.price !== "") { - writer.uint32(18).string(message.price); - } - if (message.pair !== undefined) { - Pair.encode(message.pair, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Price { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePrice } as Price; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshotTimestampInSeconds = longToNumber( - reader.uint64() as Long - ); - break; - case 2: - message.price = reader.string(); - break; - case 3: - message.pair = Pair.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Price { - const message = { ...basePrice } as Price; - if ( - object.snapshotTimestampInSeconds !== undefined && - object.snapshotTimestampInSeconds !== null - ) { - message.snapshotTimestampInSeconds = Number( - object.snapshotTimestampInSeconds - ); - } else { - message.snapshotTimestampInSeconds = 0; - } - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } else { - message.price = ""; - } - if (object.pair !== undefined && object.pair !== null) { - message.pair = Pair.fromJSON(object.pair); - } else { - message.pair = undefined; - } - return message; - }, - - toJSON(message: Price): unknown { - const obj: any = {}; - message.snapshotTimestampInSeconds !== undefined && - (obj.snapshotTimestampInSeconds = message.snapshotTimestampInSeconds); - message.price !== undefined && (obj.price = message.price); - message.pair !== undefined && - (obj.pair = message.pair ? Pair.toJSON(message.pair) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): Price { - const message = { ...basePrice } as Price; - if ( - object.snapshotTimestampInSeconds !== undefined && - object.snapshotTimestampInSeconds !== null - ) { - message.snapshotTimestampInSeconds = object.snapshotTimestampInSeconds; - } else { - message.snapshotTimestampInSeconds = 0; - } - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } else { - message.price = ""; - } - if (object.pair !== undefined && object.pair !== null) { - message.pair = Pair.fromPartial(object.pair); - } else { - message.pair = undefined; - } - return message; - }, -}; - -const basePriceCandlestick: object = { - beginTimestamp: 0, - endTimestamp: 0, - open: "", - high: "", - low: "", - close: "", - volume: "", -}; - -export const PriceCandlestick = { - encode(message: PriceCandlestick, writer: Writer = Writer.create()): Writer { - if (message.beginTimestamp !== 0) { - writer.uint32(8).uint64(message.beginTimestamp); - } - if (message.endTimestamp !== 0) { - writer.uint32(16).uint64(message.endTimestamp); - } - if (message.open !== "") { - writer.uint32(26).string(message.open); - } - if (message.high !== "") { - writer.uint32(34).string(message.high); - } - if (message.low !== "") { - writer.uint32(42).string(message.low); - } - if (message.close !== "") { - writer.uint32(50).string(message.close); - } - if (message.volume !== "") { - writer.uint32(58).string(message.volume); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PriceCandlestick { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePriceCandlestick } as PriceCandlestick; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.beginTimestamp = longToNumber(reader.uint64() as Long); - break; - case 2: - message.endTimestamp = longToNumber(reader.uint64() as Long); - break; - case 3: - message.open = reader.string(); - break; - case 4: - message.high = reader.string(); - break; - case 5: - message.low = reader.string(); - break; - case 6: - message.close = reader.string(); - break; - case 7: - message.volume = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PriceCandlestick { - const message = { ...basePriceCandlestick } as PriceCandlestick; - if (object.beginTimestamp !== undefined && object.beginTimestamp !== null) { - message.beginTimestamp = Number(object.beginTimestamp); - } else { - message.beginTimestamp = 0; - } - if (object.endTimestamp !== undefined && object.endTimestamp !== null) { - message.endTimestamp = Number(object.endTimestamp); - } else { - message.endTimestamp = 0; - } - if (object.open !== undefined && object.open !== null) { - message.open = String(object.open); - } else { - message.open = ""; - } - if (object.high !== undefined && object.high !== null) { - message.high = String(object.high); - } else { - message.high = ""; - } - if (object.low !== undefined && object.low !== null) { - message.low = String(object.low); - } else { - message.low = ""; - } - if (object.close !== undefined && object.close !== null) { - message.close = String(object.close); - } else { - message.close = ""; - } - if (object.volume !== undefined && object.volume !== null) { - message.volume = String(object.volume); - } else { - message.volume = ""; - } - return message; - }, - - toJSON(message: PriceCandlestick): unknown { - const obj: any = {}; - message.beginTimestamp !== undefined && - (obj.beginTimestamp = message.beginTimestamp); - message.endTimestamp !== undefined && - (obj.endTimestamp = message.endTimestamp); - message.open !== undefined && (obj.open = message.open); - message.high !== undefined && (obj.high = message.high); - message.low !== undefined && (obj.low = message.low); - message.close !== undefined && (obj.close = message.close); - message.volume !== undefined && (obj.volume = message.volume); - return obj; - }, - - fromPartial(object: DeepPartial): PriceCandlestick { - const message = { ...basePriceCandlestick } as PriceCandlestick; - if (object.beginTimestamp !== undefined && object.beginTimestamp !== null) { - message.beginTimestamp = object.beginTimestamp; - } else { - message.beginTimestamp = 0; - } - if (object.endTimestamp !== undefined && object.endTimestamp !== null) { - message.endTimestamp = object.endTimestamp; - } else { - message.endTimestamp = 0; - } - if (object.open !== undefined && object.open !== null) { - message.open = object.open; - } else { - message.open = ""; - } - if (object.high !== undefined && object.high !== null) { - message.high = object.high; - } else { - message.high = ""; - } - if (object.low !== undefined && object.low !== null) { - message.low = object.low; - } else { - message.low = ""; - } - if (object.close !== undefined && object.close !== null) { - message.close = object.close; - } else { - message.close = ""; - } - if (object.volume !== undefined && object.volume !== null) { - message.volume = object.volume; - } else { - message.volume = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/query.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/query.d.ts deleted file mode 100644 index 56759aac1c..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/query.d.ts +++ /dev/null @@ -1,422 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Params } from "../dex/params"; -import { LongBook } from "../dex/long_book"; -import { PageRequest, PageResponse } from "../cosmos/base/query/v1beta1/pagination"; -import { ShortBook } from "../dex/short_book"; -import { Price, PriceCandlestick } from "../dex/price"; -import { Twap } from "../dex/twap"; -import { AssetMetadata } from "../dex/asset_list"; -import { Pair } from "../dex/pair"; -import { Order } from "../dex/order"; -import { MatchResult } from "../dex/match_result"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -/** QueryParamsRequest is request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { -} -/** QueryParamsResponse is response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params holds all the parameters of this module. */ - params: Params | undefined; -} -export interface QueryGetLongBookRequest { - price: string; - contractAddr: string; - priceDenom: string; - assetDenom: string; -} -export interface QueryGetLongBookResponse { - LongBook: LongBook | undefined; -} -export interface QueryAllLongBookRequest { - pagination: PageRequest | undefined; - contractAddr: string; - priceDenom: string; - assetDenom: string; -} -export interface QueryAllLongBookResponse { - LongBook: LongBook[]; - pagination: PageResponse | undefined; -} -export interface QueryGetShortBookRequest { - price: string; - contractAddr: string; - priceDenom: string; - assetDenom: string; -} -export interface QueryGetShortBookResponse { - ShortBook: ShortBook | undefined; -} -export interface QueryAllShortBookRequest { - pagination: PageRequest | undefined; - contractAddr: string; - priceDenom: string; - assetDenom: string; -} -export interface QueryAllShortBookResponse { - ShortBook: ShortBook[]; - pagination: PageResponse | undefined; -} -export interface QueryGetPricesRequest { - priceDenom: string; - assetDenom: string; - contractAddr: string; -} -export interface QueryGetPricesResponse { - prices: Price[]; -} -export interface QueryGetTwapsRequest { - contractAddr: string; - lookbackSeconds: number; -} -export interface QueryGetTwapsResponse { - twaps: Twap[]; -} -export interface QueryAssetListRequest { -} -export interface QueryAssetListResponse { - assetList: AssetMetadata[]; -} -export interface QueryAssetMetadataRequest { - denom: string; -} -export interface QueryAssetMetadataResponse { - metadata: AssetMetadata | undefined; -} -export interface QueryRegisteredPairsRequest { - contractAddr: string; -} -export interface QueryRegisteredPairsResponse { - pairs: Pair[]; -} -export interface QueryGetOrdersRequest { - contractAddr: string; - account: string; -} -export interface QueryGetOrdersResponse { - orders: Order[]; -} -export interface QueryGetOrderByIDRequest { - contractAddr: string; - priceDenom: string; - assetDenom: string; - id: number; -} -export interface QueryGetOrderByIDResponse { - order: Order | undefined; -} -export interface QueryGetHistoricalPricesRequest { - contractAddr: string; - priceDenom: string; - assetDenom: string; - periodLengthInSeconds: number; - numOfPeriods: number; -} -export interface QueryGetHistoricalPricesResponse { - prices: PriceCandlestick[]; -} -export interface QueryGetMarketSummaryRequest { - contractAddr: string; - priceDenom: string; - assetDenom: string; - lookbackInSeconds: number; -} -export interface QueryGetMarketSummaryResponse { - totalVolume: string; - totalVolumeNotional: string; - highPrice: string; - lowPrice: string; - lastPrice: string; -} -export interface QueryOrderSimulationRequest { - order: Order | undefined; - contractAddr: string; -} -export interface QueryOrderSimulationResponse { - ExecutedQuantity: string; -} -export interface QueryGetMatchResultRequest { - contractAddr: string; - height: number; -} -export interface QueryGetMatchResultResponse { - result: MatchResult | undefined; -} -export declare const QueryParamsRequest: { - encode(_: QueryParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest; - fromJSON(_: any): QueryParamsRequest; - toJSON(_: QueryParamsRequest): unknown; - fromPartial(_: DeepPartial): QueryParamsRequest; -}; -export declare const QueryParamsResponse: { - encode(message: QueryParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse; - fromJSON(object: any): QueryParamsResponse; - toJSON(message: QueryParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryParamsResponse; -}; -export declare const QueryGetLongBookRequest: { - encode(message: QueryGetLongBookRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetLongBookRequest; - fromJSON(object: any): QueryGetLongBookRequest; - toJSON(message: QueryGetLongBookRequest): unknown; - fromPartial(object: DeepPartial): QueryGetLongBookRequest; -}; -export declare const QueryGetLongBookResponse: { - encode(message: QueryGetLongBookResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetLongBookResponse; - fromJSON(object: any): QueryGetLongBookResponse; - toJSON(message: QueryGetLongBookResponse): unknown; - fromPartial(object: DeepPartial): QueryGetLongBookResponse; -}; -export declare const QueryAllLongBookRequest: { - encode(message: QueryAllLongBookRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllLongBookRequest; - fromJSON(object: any): QueryAllLongBookRequest; - toJSON(message: QueryAllLongBookRequest): unknown; - fromPartial(object: DeepPartial): QueryAllLongBookRequest; -}; -export declare const QueryAllLongBookResponse: { - encode(message: QueryAllLongBookResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllLongBookResponse; - fromJSON(object: any): QueryAllLongBookResponse; - toJSON(message: QueryAllLongBookResponse): unknown; - fromPartial(object: DeepPartial): QueryAllLongBookResponse; -}; -export declare const QueryGetShortBookRequest: { - encode(message: QueryGetShortBookRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetShortBookRequest; - fromJSON(object: any): QueryGetShortBookRequest; - toJSON(message: QueryGetShortBookRequest): unknown; - fromPartial(object: DeepPartial): QueryGetShortBookRequest; -}; -export declare const QueryGetShortBookResponse: { - encode(message: QueryGetShortBookResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetShortBookResponse; - fromJSON(object: any): QueryGetShortBookResponse; - toJSON(message: QueryGetShortBookResponse): unknown; - fromPartial(object: DeepPartial): QueryGetShortBookResponse; -}; -export declare const QueryAllShortBookRequest: { - encode(message: QueryAllShortBookRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllShortBookRequest; - fromJSON(object: any): QueryAllShortBookRequest; - toJSON(message: QueryAllShortBookRequest): unknown; - fromPartial(object: DeepPartial): QueryAllShortBookRequest; -}; -export declare const QueryAllShortBookResponse: { - encode(message: QueryAllShortBookResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAllShortBookResponse; - fromJSON(object: any): QueryAllShortBookResponse; - toJSON(message: QueryAllShortBookResponse): unknown; - fromPartial(object: DeepPartial): QueryAllShortBookResponse; -}; -export declare const QueryGetPricesRequest: { - encode(message: QueryGetPricesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetPricesRequest; - fromJSON(object: any): QueryGetPricesRequest; - toJSON(message: QueryGetPricesRequest): unknown; - fromPartial(object: DeepPartial): QueryGetPricesRequest; -}; -export declare const QueryGetPricesResponse: { - encode(message: QueryGetPricesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetPricesResponse; - fromJSON(object: any): QueryGetPricesResponse; - toJSON(message: QueryGetPricesResponse): unknown; - fromPartial(object: DeepPartial): QueryGetPricesResponse; -}; -export declare const QueryGetTwapsRequest: { - encode(message: QueryGetTwapsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetTwapsRequest; - fromJSON(object: any): QueryGetTwapsRequest; - toJSON(message: QueryGetTwapsRequest): unknown; - fromPartial(object: DeepPartial): QueryGetTwapsRequest; -}; -export declare const QueryGetTwapsResponse: { - encode(message: QueryGetTwapsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetTwapsResponse; - fromJSON(object: any): QueryGetTwapsResponse; - toJSON(message: QueryGetTwapsResponse): unknown; - fromPartial(object: DeepPartial): QueryGetTwapsResponse; -}; -export declare const QueryAssetListRequest: { - encode(_: QueryAssetListRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAssetListRequest; - fromJSON(_: any): QueryAssetListRequest; - toJSON(_: QueryAssetListRequest): unknown; - fromPartial(_: DeepPartial): QueryAssetListRequest; -}; -export declare const QueryAssetListResponse: { - encode(message: QueryAssetListResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAssetListResponse; - fromJSON(object: any): QueryAssetListResponse; - toJSON(message: QueryAssetListResponse): unknown; - fromPartial(object: DeepPartial): QueryAssetListResponse; -}; -export declare const QueryAssetMetadataRequest: { - encode(message: QueryAssetMetadataRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAssetMetadataRequest; - fromJSON(object: any): QueryAssetMetadataRequest; - toJSON(message: QueryAssetMetadataRequest): unknown; - fromPartial(object: DeepPartial): QueryAssetMetadataRequest; -}; -export declare const QueryAssetMetadataResponse: { - encode(message: QueryAssetMetadataResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAssetMetadataResponse; - fromJSON(object: any): QueryAssetMetadataResponse; - toJSON(message: QueryAssetMetadataResponse): unknown; - fromPartial(object: DeepPartial): QueryAssetMetadataResponse; -}; -export declare const QueryRegisteredPairsRequest: { - encode(message: QueryRegisteredPairsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryRegisteredPairsRequest; - fromJSON(object: any): QueryRegisteredPairsRequest; - toJSON(message: QueryRegisteredPairsRequest): unknown; - fromPartial(object: DeepPartial): QueryRegisteredPairsRequest; -}; -export declare const QueryRegisteredPairsResponse: { - encode(message: QueryRegisteredPairsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryRegisteredPairsResponse; - fromJSON(object: any): QueryRegisteredPairsResponse; - toJSON(message: QueryRegisteredPairsResponse): unknown; - fromPartial(object: DeepPartial): QueryRegisteredPairsResponse; -}; -export declare const QueryGetOrdersRequest: { - encode(message: QueryGetOrdersRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetOrdersRequest; - fromJSON(object: any): QueryGetOrdersRequest; - toJSON(message: QueryGetOrdersRequest): unknown; - fromPartial(object: DeepPartial): QueryGetOrdersRequest; -}; -export declare const QueryGetOrdersResponse: { - encode(message: QueryGetOrdersResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetOrdersResponse; - fromJSON(object: any): QueryGetOrdersResponse; - toJSON(message: QueryGetOrdersResponse): unknown; - fromPartial(object: DeepPartial): QueryGetOrdersResponse; -}; -export declare const QueryGetOrderByIDRequest: { - encode(message: QueryGetOrderByIDRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetOrderByIDRequest; - fromJSON(object: any): QueryGetOrderByIDRequest; - toJSON(message: QueryGetOrderByIDRequest): unknown; - fromPartial(object: DeepPartial): QueryGetOrderByIDRequest; -}; -export declare const QueryGetOrderByIDResponse: { - encode(message: QueryGetOrderByIDResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetOrderByIDResponse; - fromJSON(object: any): QueryGetOrderByIDResponse; - toJSON(message: QueryGetOrderByIDResponse): unknown; - fromPartial(object: DeepPartial): QueryGetOrderByIDResponse; -}; -export declare const QueryGetHistoricalPricesRequest: { - encode(message: QueryGetHistoricalPricesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetHistoricalPricesRequest; - fromJSON(object: any): QueryGetHistoricalPricesRequest; - toJSON(message: QueryGetHistoricalPricesRequest): unknown; - fromPartial(object: DeepPartial): QueryGetHistoricalPricesRequest; -}; -export declare const QueryGetHistoricalPricesResponse: { - encode(message: QueryGetHistoricalPricesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetHistoricalPricesResponse; - fromJSON(object: any): QueryGetHistoricalPricesResponse; - toJSON(message: QueryGetHistoricalPricesResponse): unknown; - fromPartial(object: DeepPartial): QueryGetHistoricalPricesResponse; -}; -export declare const QueryGetMarketSummaryRequest: { - encode(message: QueryGetMarketSummaryRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetMarketSummaryRequest; - fromJSON(object: any): QueryGetMarketSummaryRequest; - toJSON(message: QueryGetMarketSummaryRequest): unknown; - fromPartial(object: DeepPartial): QueryGetMarketSummaryRequest; -}; -export declare const QueryGetMarketSummaryResponse: { - encode(message: QueryGetMarketSummaryResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetMarketSummaryResponse; - fromJSON(object: any): QueryGetMarketSummaryResponse; - toJSON(message: QueryGetMarketSummaryResponse): unknown; - fromPartial(object: DeepPartial): QueryGetMarketSummaryResponse; -}; -export declare const QueryOrderSimulationRequest: { - encode(message: QueryOrderSimulationRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryOrderSimulationRequest; - fromJSON(object: any): QueryOrderSimulationRequest; - toJSON(message: QueryOrderSimulationRequest): unknown; - fromPartial(object: DeepPartial): QueryOrderSimulationRequest; -}; -export declare const QueryOrderSimulationResponse: { - encode(message: QueryOrderSimulationResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryOrderSimulationResponse; - fromJSON(object: any): QueryOrderSimulationResponse; - toJSON(message: QueryOrderSimulationResponse): unknown; - fromPartial(object: DeepPartial): QueryOrderSimulationResponse; -}; -export declare const QueryGetMatchResultRequest: { - encode(message: QueryGetMatchResultRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetMatchResultRequest; - fromJSON(object: any): QueryGetMatchResultRequest; - toJSON(message: QueryGetMatchResultRequest): unknown; - fromPartial(object: DeepPartial): QueryGetMatchResultRequest; -}; -export declare const QueryGetMatchResultResponse: { - encode(message: QueryGetMatchResultResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryGetMatchResultResponse; - fromJSON(object: any): QueryGetMatchResultResponse; - toJSON(message: QueryGetMatchResultResponse): unknown; - fromPartial(object: DeepPartial): QueryGetMatchResultResponse; -}; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Parameters queries the parameters of the module. */ - Params(request: QueryParamsRequest): Promise; - /** Queries a LongBook by id. */ - LongBook(request: QueryGetLongBookRequest): Promise; - /** Queries a list of LongBook items. */ - LongBookAll(request: QueryAllLongBookRequest): Promise; - /** Queries a ShortBook by id. */ - ShortBook(request: QueryGetShortBookRequest): Promise; - /** Queries a list of ShortBook items. */ - ShortBookAll(request: QueryAllShortBookRequest): Promise; - GetPrices(request: QueryGetPricesRequest): Promise; - GetTwaps(request: QueryGetTwapsRequest): Promise; - /** Returns the metadata for a specified denom / display type */ - AssetMetadata(request: QueryAssetMetadataRequest): Promise; - /** Returns metadata for all the assets */ - AssetList(request: QueryAssetListRequest): Promise; - /** Returns all registered pairs for specified contract address */ - GetRegisteredPairs(request: QueryRegisteredPairsRequest): Promise; - GetOrders(request: QueryGetOrdersRequest): Promise; - GetOrder(request: QueryGetOrderByIDRequest): Promise; - GetHistoricalPrices(request: QueryGetHistoricalPricesRequest): Promise; - GetMarketSummary(request: QueryGetMarketSummaryRequest): Promise; - GetOrderSimulation(request: QueryOrderSimulationRequest): Promise; - GetMatchResult(request: QueryGetMatchResultRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Params(request: QueryParamsRequest): Promise; - LongBook(request: QueryGetLongBookRequest): Promise; - LongBookAll(request: QueryAllLongBookRequest): Promise; - ShortBook(request: QueryGetShortBookRequest): Promise; - ShortBookAll(request: QueryAllShortBookRequest): Promise; - GetPrices(request: QueryGetPricesRequest): Promise; - GetTwaps(request: QueryGetTwapsRequest): Promise; - AssetMetadata(request: QueryAssetMetadataRequest): Promise; - AssetList(request: QueryAssetListRequest): Promise; - GetRegisteredPairs(request: QueryRegisteredPairsRequest): Promise; - GetOrders(request: QueryGetOrdersRequest): Promise; - GetOrder(request: QueryGetOrderByIDRequest): Promise; - GetHistoricalPrices(request: QueryGetHistoricalPricesRequest): Promise; - GetMarketSummary(request: QueryGetMarketSummaryRequest): Promise; - GetOrderSimulation(request: QueryOrderSimulationRequest): Promise; - GetMatchResult(request: QueryGetMatchResultRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/query.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/query.js deleted file mode 100644 index 54ddc4fb58..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/query.js +++ /dev/null @@ -1,2644 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Params } from "../dex/params"; -import { LongBook } from "../dex/long_book"; -import { PageRequest, PageResponse, } from "../cosmos/base/query/v1beta1/pagination"; -import { ShortBook } from "../dex/short_book"; -import { Price, PriceCandlestick } from "../dex/price"; -import { Twap } from "../dex/twap"; -import { AssetMetadata } from "../dex/asset_list"; -import { Pair } from "../dex/pair"; -import { Order } from "../dex/order"; -import { MatchResult } from "../dex/match_result"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const baseQueryParamsRequest = {}; -export const QueryParamsRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, -}; -const baseQueryParamsResponse = {}; -export const QueryParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; -const baseQueryGetLongBookRequest = { - price: "", - contractAddr: "", - priceDenom: "", - assetDenom: "", -}; -export const QueryGetLongBookRequest = { - encode(message, writer = Writer.create()) { - if (message.price !== "") { - writer.uint32(10).string(message.price); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(26).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(34).string(message.assetDenom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetLongBookRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.price = reader.string(); - break; - case 2: - message.contractAddr = reader.string(); - break; - case 3: - message.priceDenom = reader.string(); - break; - case 4: - message.assetDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGetLongBookRequest, - }; - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } - else { - message.price = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } - else { - message.assetDenom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.price !== undefined && (obj.price = message.price); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGetLongBookRequest, - }; - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } - else { - message.price = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } - else { - message.assetDenom = ""; - } - return message; - }, -}; -const baseQueryGetLongBookResponse = {}; -export const QueryGetLongBookResponse = { - encode(message, writer = Writer.create()) { - if (message.LongBook !== undefined) { - LongBook.encode(message.LongBook, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetLongBookResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.LongBook = LongBook.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGetLongBookResponse, - }; - if (object.LongBook !== undefined && object.LongBook !== null) { - message.LongBook = LongBook.fromJSON(object.LongBook); - } - else { - message.LongBook = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.LongBook !== undefined && - (obj.LongBook = message.LongBook - ? LongBook.toJSON(message.LongBook) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGetLongBookResponse, - }; - if (object.LongBook !== undefined && object.LongBook !== null) { - message.LongBook = LongBook.fromPartial(object.LongBook); - } - else { - message.LongBook = undefined; - } - return message; - }, -}; -const baseQueryAllLongBookRequest = { - contractAddr: "", - priceDenom: "", - assetDenom: "", -}; -export const QueryAllLongBookRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(26).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(34).string(message.assetDenom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllLongBookRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - case 2: - message.contractAddr = reader.string(); - break; - case 3: - message.priceDenom = reader.string(); - break; - case 4: - message.assetDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAllLongBookRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } - else { - message.assetDenom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAllLongBookRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } - else { - message.assetDenom = ""; - } - return message; - }, -}; -const baseQueryAllLongBookResponse = {}; -export const QueryAllLongBookResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.LongBook) { - LongBook.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllLongBookResponse, - }; - message.LongBook = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.LongBook.push(LongBook.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAllLongBookResponse, - }; - message.LongBook = []; - if (object.LongBook !== undefined && object.LongBook !== null) { - for (const e of object.LongBook) { - message.LongBook.push(LongBook.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.LongBook) { - obj.LongBook = message.LongBook.map((e) => e ? LongBook.toJSON(e) : undefined); - } - else { - obj.LongBook = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAllLongBookResponse, - }; - message.LongBook = []; - if (object.LongBook !== undefined && object.LongBook !== null) { - for (const e of object.LongBook) { - message.LongBook.push(LongBook.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryGetShortBookRequest = { - price: "", - contractAddr: "", - priceDenom: "", - assetDenom: "", -}; -export const QueryGetShortBookRequest = { - encode(message, writer = Writer.create()) { - if (message.price !== "") { - writer.uint32(10).string(message.price); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(26).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(34).string(message.assetDenom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetShortBookRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.price = reader.string(); - break; - case 2: - message.contractAddr = reader.string(); - break; - case 3: - message.priceDenom = reader.string(); - break; - case 4: - message.assetDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGetShortBookRequest, - }; - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } - else { - message.price = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } - else { - message.assetDenom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.price !== undefined && (obj.price = message.price); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGetShortBookRequest, - }; - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } - else { - message.price = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } - else { - message.assetDenom = ""; - } - return message; - }, -}; -const baseQueryGetShortBookResponse = {}; -export const QueryGetShortBookResponse = { - encode(message, writer = Writer.create()) { - if (message.ShortBook !== undefined) { - ShortBook.encode(message.ShortBook, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetShortBookResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ShortBook = ShortBook.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGetShortBookResponse, - }; - if (object.ShortBook !== undefined && object.ShortBook !== null) { - message.ShortBook = ShortBook.fromJSON(object.ShortBook); - } - else { - message.ShortBook = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ShortBook !== undefined && - (obj.ShortBook = message.ShortBook - ? ShortBook.toJSON(message.ShortBook) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGetShortBookResponse, - }; - if (object.ShortBook !== undefined && object.ShortBook !== null) { - message.ShortBook = ShortBook.fromPartial(object.ShortBook); - } - else { - message.ShortBook = undefined; - } - return message; - }, -}; -const baseQueryAllShortBookRequest = { - contractAddr: "", - priceDenom: "", - assetDenom: "", -}; -export const QueryAllShortBookRequest = { - encode(message, writer = Writer.create()) { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(26).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(34).string(message.assetDenom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllShortBookRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - case 2: - message.contractAddr = reader.string(); - break; - case 3: - message.priceDenom = reader.string(); - break; - case 4: - message.assetDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAllShortBookRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } - else { - message.assetDenom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAllShortBookRequest, - }; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } - else { - message.assetDenom = ""; - } - return message; - }, -}; -const baseQueryAllShortBookResponse = {}; -export const QueryAllShortBookResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.ShortBook) { - ShortBook.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllShortBookResponse, - }; - message.ShortBook = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ShortBook.push(ShortBook.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAllShortBookResponse, - }; - message.ShortBook = []; - if (object.ShortBook !== undefined && object.ShortBook !== null) { - for (const e of object.ShortBook) { - message.ShortBook.push(ShortBook.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.ShortBook) { - obj.ShortBook = message.ShortBook.map((e) => e ? ShortBook.toJSON(e) : undefined); - } - else { - obj.ShortBook = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAllShortBookResponse, - }; - message.ShortBook = []; - if (object.ShortBook !== undefined && object.ShortBook !== null) { - for (const e of object.ShortBook) { - message.ShortBook.push(ShortBook.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryGetPricesRequest = { - priceDenom: "", - assetDenom: "", - contractAddr: "", -}; -export const QueryGetPricesRequest = { - encode(message, writer = Writer.create()) { - if (message.priceDenom !== "") { - writer.uint32(10).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(18).string(message.assetDenom); - } - if (message.contractAddr !== "") { - writer.uint32(26).string(message.contractAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetPricesRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.priceDenom = reader.string(); - break; - case 2: - message.assetDenom = reader.string(); - break; - case 3: - message.contractAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryGetPricesRequest }; - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } - else { - message.assetDenom = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryGetPricesRequest }; - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } - else { - message.assetDenom = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - return message; - }, -}; -const baseQueryGetPricesResponse = {}; -export const QueryGetPricesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.prices) { - Price.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetPricesResponse }; - message.prices = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.prices.push(Price.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryGetPricesResponse }; - message.prices = []; - if (object.prices !== undefined && object.prices !== null) { - for (const e of object.prices) { - message.prices.push(Price.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.prices) { - obj.prices = message.prices.map((e) => (e ? Price.toJSON(e) : undefined)); - } - else { - obj.prices = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryGetPricesResponse }; - message.prices = []; - if (object.prices !== undefined && object.prices !== null) { - for (const e of object.prices) { - message.prices.push(Price.fromPartial(e)); - } - } - return message; - }, -}; -const baseQueryGetTwapsRequest = { - contractAddr: "", - lookbackSeconds: 0, -}; -export const QueryGetTwapsRequest = { - encode(message, writer = Writer.create()) { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - if (message.lookbackSeconds !== 0) { - writer.uint32(16).uint64(message.lookbackSeconds); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetTwapsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - case 2: - message.lookbackSeconds = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryGetTwapsRequest }; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.lookbackSeconds !== undefined && - object.lookbackSeconds !== null) { - message.lookbackSeconds = Number(object.lookbackSeconds); - } - else { - message.lookbackSeconds = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.lookbackSeconds !== undefined && - (obj.lookbackSeconds = message.lookbackSeconds); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryGetTwapsRequest }; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.lookbackSeconds !== undefined && - object.lookbackSeconds !== null) { - message.lookbackSeconds = object.lookbackSeconds; - } - else { - message.lookbackSeconds = 0; - } - return message; - }, -}; -const baseQueryGetTwapsResponse = {}; -export const QueryGetTwapsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.twaps) { - Twap.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetTwapsResponse }; - message.twaps = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.twaps.push(Twap.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryGetTwapsResponse }; - message.twaps = []; - if (object.twaps !== undefined && object.twaps !== null) { - for (const e of object.twaps) { - message.twaps.push(Twap.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.twaps) { - obj.twaps = message.twaps.map((e) => (e ? Twap.toJSON(e) : undefined)); - } - else { - obj.twaps = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryGetTwapsResponse }; - message.twaps = []; - if (object.twaps !== undefined && object.twaps !== null) { - for (const e of object.twaps) { - message.twaps.push(Twap.fromPartial(e)); - } - } - return message; - }, -}; -const baseQueryAssetListRequest = {}; -export const QueryAssetListRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAssetListRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryAssetListRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryAssetListRequest }; - return message; - }, -}; -const baseQueryAssetListResponse = {}; -export const QueryAssetListResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.assetList) { - AssetMetadata.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAssetListResponse }; - message.assetList = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.assetList.push(AssetMetadata.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryAssetListResponse }; - message.assetList = []; - if (object.assetList !== undefined && object.assetList !== null) { - for (const e of object.assetList) { - message.assetList.push(AssetMetadata.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.assetList) { - obj.assetList = message.assetList.map((e) => e ? AssetMetadata.toJSON(e) : undefined); - } - else { - obj.assetList = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryAssetListResponse }; - message.assetList = []; - if (object.assetList !== undefined && object.assetList !== null) { - for (const e of object.assetList) { - message.assetList.push(AssetMetadata.fromPartial(e)); - } - } - return message; - }, -}; -const baseQueryAssetMetadataRequest = { denom: "" }; -export const QueryAssetMetadataRequest = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAssetMetadataRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAssetMetadataRequest, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAssetMetadataRequest, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - return message; - }, -}; -const baseQueryAssetMetadataResponse = {}; -export const QueryAssetMetadataResponse = { - encode(message, writer = Writer.create()) { - if (message.metadata !== undefined) { - AssetMetadata.encode(message.metadata, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAssetMetadataResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadata = AssetMetadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAssetMetadataResponse, - }; - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = AssetMetadata.fromJSON(object.metadata); - } - else { - message.metadata = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.metadata !== undefined && - (obj.metadata = message.metadata - ? AssetMetadata.toJSON(message.metadata) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAssetMetadataResponse, - }; - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = AssetMetadata.fromPartial(object.metadata); - } - else { - message.metadata = undefined; - } - return message; - }, -}; -const baseQueryRegisteredPairsRequest = { contractAddr: "" }; -export const QueryRegisteredPairsRequest = { - encode(message, writer = Writer.create()) { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRegisteredPairsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryRegisteredPairsRequest, - }; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryRegisteredPairsRequest, - }; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - return message; - }, -}; -const baseQueryRegisteredPairsResponse = {}; -export const QueryRegisteredPairsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.pairs) { - Pair.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRegisteredPairsResponse, - }; - message.pairs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pairs.push(Pair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryRegisteredPairsResponse, - }; - message.pairs = []; - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(Pair.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.pairs) { - obj.pairs = message.pairs.map((e) => (e ? Pair.toJSON(e) : undefined)); - } - else { - obj.pairs = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryRegisteredPairsResponse, - }; - message.pairs = []; - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(Pair.fromPartial(e)); - } - } - return message; - }, -}; -const baseQueryGetOrdersRequest = { contractAddr: "", account: "" }; -export const QueryGetOrdersRequest = { - encode(message, writer = Writer.create()) { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - if (message.account !== "") { - writer.uint32(18).string(message.account); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetOrdersRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - case 2: - message.account = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryGetOrdersRequest }; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.account !== undefined && object.account !== null) { - message.account = String(object.account); - } - else { - message.account = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.account !== undefined && (obj.account = message.account); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryGetOrdersRequest }; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.account !== undefined && object.account !== null) { - message.account = object.account; - } - else { - message.account = ""; - } - return message; - }, -}; -const baseQueryGetOrdersResponse = {}; -export const QueryGetOrdersResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.orders) { - Order.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetOrdersResponse }; - message.orders = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.orders.push(Order.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryGetOrdersResponse }; - message.orders = []; - if (object.orders !== undefined && object.orders !== null) { - for (const e of object.orders) { - message.orders.push(Order.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.orders) { - obj.orders = message.orders.map((e) => (e ? Order.toJSON(e) : undefined)); - } - else { - obj.orders = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryGetOrdersResponse }; - message.orders = []; - if (object.orders !== undefined && object.orders !== null) { - for (const e of object.orders) { - message.orders.push(Order.fromPartial(e)); - } - } - return message; - }, -}; -const baseQueryGetOrderByIDRequest = { - contractAddr: "", - priceDenom: "", - assetDenom: "", - id: 0, -}; -export const QueryGetOrderByIDRequest = { - encode(message, writer = Writer.create()) { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(18).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(26).string(message.assetDenom); - } - if (message.id !== 0) { - writer.uint32(32).uint64(message.id); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetOrderByIDRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - case 2: - message.priceDenom = reader.string(); - break; - case 3: - message.assetDenom = reader.string(); - break; - case 4: - message.id = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGetOrderByIDRequest, - }; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } - else { - message.assetDenom = ""; - } - if (object.id !== undefined && object.id !== null) { - message.id = Number(object.id); - } - else { - message.id = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.id !== undefined && (obj.id = message.id); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGetOrderByIDRequest, - }; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } - else { - message.assetDenom = ""; - } - if (object.id !== undefined && object.id !== null) { - message.id = object.id; - } - else { - message.id = 0; - } - return message; - }, -}; -const baseQueryGetOrderByIDResponse = {}; -export const QueryGetOrderByIDResponse = { - encode(message, writer = Writer.create()) { - if (message.order !== undefined) { - Order.encode(message.order, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetOrderByIDResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.order = Order.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGetOrderByIDResponse, - }; - if (object.order !== undefined && object.order !== null) { - message.order = Order.fromJSON(object.order); - } - else { - message.order = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.order !== undefined && - (obj.order = message.order ? Order.toJSON(message.order) : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGetOrderByIDResponse, - }; - if (object.order !== undefined && object.order !== null) { - message.order = Order.fromPartial(object.order); - } - else { - message.order = undefined; - } - return message; - }, -}; -const baseQueryGetHistoricalPricesRequest = { - contractAddr: "", - priceDenom: "", - assetDenom: "", - periodLengthInSeconds: 0, - numOfPeriods: 0, -}; -export const QueryGetHistoricalPricesRequest = { - encode(message, writer = Writer.create()) { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(18).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(26).string(message.assetDenom); - } - if (message.periodLengthInSeconds !== 0) { - writer.uint32(32).uint64(message.periodLengthInSeconds); - } - if (message.numOfPeriods !== 0) { - writer.uint32(40).uint64(message.numOfPeriods); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetHistoricalPricesRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - case 2: - message.priceDenom = reader.string(); - break; - case 3: - message.assetDenom = reader.string(); - break; - case 4: - message.periodLengthInSeconds = longToNumber(reader.uint64()); - break; - case 5: - message.numOfPeriods = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGetHistoricalPricesRequest, - }; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } - else { - message.assetDenom = ""; - } - if (object.periodLengthInSeconds !== undefined && - object.periodLengthInSeconds !== null) { - message.periodLengthInSeconds = Number(object.periodLengthInSeconds); - } - else { - message.periodLengthInSeconds = 0; - } - if (object.numOfPeriods !== undefined && object.numOfPeriods !== null) { - message.numOfPeriods = Number(object.numOfPeriods); - } - else { - message.numOfPeriods = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.periodLengthInSeconds !== undefined && - (obj.periodLengthInSeconds = message.periodLengthInSeconds); - message.numOfPeriods !== undefined && - (obj.numOfPeriods = message.numOfPeriods); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGetHistoricalPricesRequest, - }; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } - else { - message.assetDenom = ""; - } - if (object.periodLengthInSeconds !== undefined && - object.periodLengthInSeconds !== null) { - message.periodLengthInSeconds = object.periodLengthInSeconds; - } - else { - message.periodLengthInSeconds = 0; - } - if (object.numOfPeriods !== undefined && object.numOfPeriods !== null) { - message.numOfPeriods = object.numOfPeriods; - } - else { - message.numOfPeriods = 0; - } - return message; - }, -}; -const baseQueryGetHistoricalPricesResponse = {}; -export const QueryGetHistoricalPricesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.prices) { - PriceCandlestick.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetHistoricalPricesResponse, - }; - message.prices = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.prices.push(PriceCandlestick.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGetHistoricalPricesResponse, - }; - message.prices = []; - if (object.prices !== undefined && object.prices !== null) { - for (const e of object.prices) { - message.prices.push(PriceCandlestick.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.prices) { - obj.prices = message.prices.map((e) => e ? PriceCandlestick.toJSON(e) : undefined); - } - else { - obj.prices = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGetHistoricalPricesResponse, - }; - message.prices = []; - if (object.prices !== undefined && object.prices !== null) { - for (const e of object.prices) { - message.prices.push(PriceCandlestick.fromPartial(e)); - } - } - return message; - }, -}; -const baseQueryGetMarketSummaryRequest = { - contractAddr: "", - priceDenom: "", - assetDenom: "", - lookbackInSeconds: 0, -}; -export const QueryGetMarketSummaryRequest = { - encode(message, writer = Writer.create()) { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(18).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(26).string(message.assetDenom); - } - if (message.lookbackInSeconds !== 0) { - writer.uint32(32).uint64(message.lookbackInSeconds); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetMarketSummaryRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - case 2: - message.priceDenom = reader.string(); - break; - case 3: - message.assetDenom = reader.string(); - break; - case 4: - message.lookbackInSeconds = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGetMarketSummaryRequest, - }; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } - else { - message.assetDenom = ""; - } - if (object.lookbackInSeconds !== undefined && - object.lookbackInSeconds !== null) { - message.lookbackInSeconds = Number(object.lookbackInSeconds); - } - else { - message.lookbackInSeconds = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.lookbackInSeconds !== undefined && - (obj.lookbackInSeconds = message.lookbackInSeconds); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGetMarketSummaryRequest, - }; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } - else { - message.assetDenom = ""; - } - if (object.lookbackInSeconds !== undefined && - object.lookbackInSeconds !== null) { - message.lookbackInSeconds = object.lookbackInSeconds; - } - else { - message.lookbackInSeconds = 0; - } - return message; - }, -}; -const baseQueryGetMarketSummaryResponse = { - totalVolume: "", - totalVolumeNotional: "", - highPrice: "", - lowPrice: "", - lastPrice: "", -}; -export const QueryGetMarketSummaryResponse = { - encode(message, writer = Writer.create()) { - if (message.totalVolume !== "") { - writer.uint32(10).string(message.totalVolume); - } - if (message.totalVolumeNotional !== "") { - writer.uint32(18).string(message.totalVolumeNotional); - } - if (message.highPrice !== "") { - writer.uint32(26).string(message.highPrice); - } - if (message.lowPrice !== "") { - writer.uint32(34).string(message.lowPrice); - } - if (message.lastPrice !== "") { - writer.uint32(42).string(message.lastPrice); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetMarketSummaryResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.totalVolume = reader.string(); - break; - case 2: - message.totalVolumeNotional = reader.string(); - break; - case 3: - message.highPrice = reader.string(); - break; - case 4: - message.lowPrice = reader.string(); - break; - case 5: - message.lastPrice = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGetMarketSummaryResponse, - }; - if (object.totalVolume !== undefined && object.totalVolume !== null) { - message.totalVolume = String(object.totalVolume); - } - else { - message.totalVolume = ""; - } - if (object.totalVolumeNotional !== undefined && - object.totalVolumeNotional !== null) { - message.totalVolumeNotional = String(object.totalVolumeNotional); - } - else { - message.totalVolumeNotional = ""; - } - if (object.highPrice !== undefined && object.highPrice !== null) { - message.highPrice = String(object.highPrice); - } - else { - message.highPrice = ""; - } - if (object.lowPrice !== undefined && object.lowPrice !== null) { - message.lowPrice = String(object.lowPrice); - } - else { - message.lowPrice = ""; - } - if (object.lastPrice !== undefined && object.lastPrice !== null) { - message.lastPrice = String(object.lastPrice); - } - else { - message.lastPrice = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.totalVolume !== undefined && - (obj.totalVolume = message.totalVolume); - message.totalVolumeNotional !== undefined && - (obj.totalVolumeNotional = message.totalVolumeNotional); - message.highPrice !== undefined && (obj.highPrice = message.highPrice); - message.lowPrice !== undefined && (obj.lowPrice = message.lowPrice); - message.lastPrice !== undefined && (obj.lastPrice = message.lastPrice); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGetMarketSummaryResponse, - }; - if (object.totalVolume !== undefined && object.totalVolume !== null) { - message.totalVolume = object.totalVolume; - } - else { - message.totalVolume = ""; - } - if (object.totalVolumeNotional !== undefined && - object.totalVolumeNotional !== null) { - message.totalVolumeNotional = object.totalVolumeNotional; - } - else { - message.totalVolumeNotional = ""; - } - if (object.highPrice !== undefined && object.highPrice !== null) { - message.highPrice = object.highPrice; - } - else { - message.highPrice = ""; - } - if (object.lowPrice !== undefined && object.lowPrice !== null) { - message.lowPrice = object.lowPrice; - } - else { - message.lowPrice = ""; - } - if (object.lastPrice !== undefined && object.lastPrice !== null) { - message.lastPrice = object.lastPrice; - } - else { - message.lastPrice = ""; - } - return message; - }, -}; -const baseQueryOrderSimulationRequest = { contractAddr: "" }; -export const QueryOrderSimulationRequest = { - encode(message, writer = Writer.create()) { - if (message.order !== undefined) { - Order.encode(message.order, writer.uint32(10).fork()).ldelim(); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryOrderSimulationRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.order = Order.decode(reader, reader.uint32()); - break; - case 2: - message.contractAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryOrderSimulationRequest, - }; - if (object.order !== undefined && object.order !== null) { - message.order = Order.fromJSON(object.order); - } - else { - message.order = undefined; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.order !== undefined && - (obj.order = message.order ? Order.toJSON(message.order) : undefined); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryOrderSimulationRequest, - }; - if (object.order !== undefined && object.order !== null) { - message.order = Order.fromPartial(object.order); - } - else { - message.order = undefined; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - return message; - }, -}; -const baseQueryOrderSimulationResponse = { ExecutedQuantity: "" }; -export const QueryOrderSimulationResponse = { - encode(message, writer = Writer.create()) { - if (message.ExecutedQuantity !== "") { - writer.uint32(10).string(message.ExecutedQuantity); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryOrderSimulationResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ExecutedQuantity = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryOrderSimulationResponse, - }; - if (object.ExecutedQuantity !== undefined && - object.ExecutedQuantity !== null) { - message.ExecutedQuantity = String(object.ExecutedQuantity); - } - else { - message.ExecutedQuantity = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ExecutedQuantity !== undefined && - (obj.ExecutedQuantity = message.ExecutedQuantity); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryOrderSimulationResponse, - }; - if (object.ExecutedQuantity !== undefined && - object.ExecutedQuantity !== null) { - message.ExecutedQuantity = object.ExecutedQuantity; - } - else { - message.ExecutedQuantity = ""; - } - return message; - }, -}; -const baseQueryGetMatchResultRequest = { contractAddr: "", height: 0 }; -export const QueryGetMatchResultRequest = { - encode(message, writer = Writer.create()) { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetMatchResultRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - case 2: - message.height = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGetMatchResultRequest, - }; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.height !== undefined && (obj.height = message.height); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGetMatchResultRequest, - }; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - return message; - }, -}; -const baseQueryGetMatchResultResponse = {}; -export const QueryGetMatchResultResponse = { - encode(message, writer = Writer.create()) { - if (message.result !== undefined) { - MatchResult.encode(message.result, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetMatchResultResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = MatchResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryGetMatchResultResponse, - }; - if (object.result !== undefined && object.result !== null) { - message.result = MatchResult.fromJSON(object.result); - } - else { - message.result = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.result !== undefined && - (obj.result = message.result - ? MatchResult.toJSON(message.result) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryGetMatchResultResponse, - }; - if (object.result !== undefined && object.result !== null) { - message.result = MatchResult.fromPartial(object.result); - } - else { - message.result = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Params(request) { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - LongBook(request) { - const data = QueryGetLongBookRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "LongBook", data); - return promise.then((data) => QueryGetLongBookResponse.decode(new Reader(data))); - } - LongBookAll(request) { - const data = QueryAllLongBookRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "LongBookAll", data); - return promise.then((data) => QueryAllLongBookResponse.decode(new Reader(data))); - } - ShortBook(request) { - const data = QueryGetShortBookRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "ShortBook", data); - return promise.then((data) => QueryGetShortBookResponse.decode(new Reader(data))); - } - ShortBookAll(request) { - const data = QueryAllShortBookRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "ShortBookAll", data); - return promise.then((data) => QueryAllShortBookResponse.decode(new Reader(data))); - } - GetPrices(request) { - const data = QueryGetPricesRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "GetPrices", data); - return promise.then((data) => QueryGetPricesResponse.decode(new Reader(data))); - } - GetTwaps(request) { - const data = QueryGetTwapsRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "GetTwaps", data); - return promise.then((data) => QueryGetTwapsResponse.decode(new Reader(data))); - } - AssetMetadata(request) { - const data = QueryAssetMetadataRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "AssetMetadata", data); - return promise.then((data) => QueryAssetMetadataResponse.decode(new Reader(data))); - } - AssetList(request) { - const data = QueryAssetListRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "AssetList", data); - return promise.then((data) => QueryAssetListResponse.decode(new Reader(data))); - } - GetRegisteredPairs(request) { - const data = QueryRegisteredPairsRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "GetRegisteredPairs", data); - return promise.then((data) => QueryRegisteredPairsResponse.decode(new Reader(data))); - } - GetOrders(request) { - const data = QueryGetOrdersRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "GetOrders", data); - return promise.then((data) => QueryGetOrdersResponse.decode(new Reader(data))); - } - GetOrder(request) { - const data = QueryGetOrderByIDRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "GetOrder", data); - return promise.then((data) => QueryGetOrderByIDResponse.decode(new Reader(data))); - } - GetHistoricalPrices(request) { - const data = QueryGetHistoricalPricesRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "GetHistoricalPrices", data); - return promise.then((data) => QueryGetHistoricalPricesResponse.decode(new Reader(data))); - } - GetMarketSummary(request) { - const data = QueryGetMarketSummaryRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "GetMarketSummary", data); - return promise.then((data) => QueryGetMarketSummaryResponse.decode(new Reader(data))); - } - GetOrderSimulation(request) { - const data = QueryOrderSimulationRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "GetOrderSimulation", data); - return promise.then((data) => QueryOrderSimulationResponse.decode(new Reader(data))); - } - GetMatchResult(request) { - const data = QueryGetMatchResultRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Query", "GetMatchResult", data); - return promise.then((data) => QueryGetMatchResultResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/query.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/query.ts deleted file mode 100644 index 41cd3ab726..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/query.ts +++ /dev/null @@ -1,3322 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Params } from "../dex/params"; -import { LongBook } from "../dex/long_book"; -import { - PageRequest, - PageResponse, -} from "../cosmos/base/query/v1beta1/pagination"; -import { ShortBook } from "../dex/short_book"; -import { Price, PriceCandlestick } from "../dex/price"; -import { Twap } from "../dex/twap"; -import { AssetMetadata } from "../dex/asset_list"; -import { Pair } from "../dex/pair"; -import { Order } from "../dex/order"; -import { MatchResult } from "../dex/match_result"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -/** QueryParamsRequest is request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params holds all the parameters of this module. */ - params: Params | undefined; -} - -export interface QueryGetLongBookRequest { - price: string; - contractAddr: string; - priceDenom: string; - assetDenom: string; -} - -export interface QueryGetLongBookResponse { - LongBook: LongBook | undefined; -} - -export interface QueryAllLongBookRequest { - pagination: PageRequest | undefined; - contractAddr: string; - priceDenom: string; - assetDenom: string; -} - -export interface QueryAllLongBookResponse { - LongBook: LongBook[]; - pagination: PageResponse | undefined; -} - -export interface QueryGetShortBookRequest { - price: string; - contractAddr: string; - priceDenom: string; - assetDenom: string; -} - -export interface QueryGetShortBookResponse { - ShortBook: ShortBook | undefined; -} - -export interface QueryAllShortBookRequest { - pagination: PageRequest | undefined; - contractAddr: string; - priceDenom: string; - assetDenom: string; -} - -export interface QueryAllShortBookResponse { - ShortBook: ShortBook[]; - pagination: PageResponse | undefined; -} - -export interface QueryGetPricesRequest { - priceDenom: string; - assetDenom: string; - contractAddr: string; -} - -export interface QueryGetPricesResponse { - prices: Price[]; -} - -export interface QueryGetTwapsRequest { - contractAddr: string; - lookbackSeconds: number; -} - -export interface QueryGetTwapsResponse { - twaps: Twap[]; -} - -export interface QueryAssetListRequest {} - -export interface QueryAssetListResponse { - assetList: AssetMetadata[]; -} - -export interface QueryAssetMetadataRequest { - denom: string; -} - -export interface QueryAssetMetadataResponse { - metadata: AssetMetadata | undefined; -} - -export interface QueryRegisteredPairsRequest { - contractAddr: string; -} - -export interface QueryRegisteredPairsResponse { - pairs: Pair[]; -} - -export interface QueryGetOrdersRequest { - contractAddr: string; - account: string; -} - -export interface QueryGetOrdersResponse { - orders: Order[]; -} - -export interface QueryGetOrderByIDRequest { - contractAddr: string; - priceDenom: string; - assetDenom: string; - id: number; -} - -export interface QueryGetOrderByIDResponse { - order: Order | undefined; -} - -export interface QueryGetHistoricalPricesRequest { - contractAddr: string; - priceDenom: string; - assetDenom: string; - periodLengthInSeconds: number; - numOfPeriods: number; -} - -export interface QueryGetHistoricalPricesResponse { - prices: PriceCandlestick[]; -} - -export interface QueryGetMarketSummaryRequest { - contractAddr: string; - priceDenom: string; - assetDenom: string; - lookbackInSeconds: number; -} - -export interface QueryGetMarketSummaryResponse { - totalVolume: string; - totalVolumeNotional: string; - highPrice: string; - lowPrice: string; - lastPrice: string; -} - -export interface QueryOrderSimulationRequest { - order: Order | undefined; - contractAddr: string; -} - -export interface QueryOrderSimulationResponse { - ExecutedQuantity: string; -} - -export interface QueryGetMatchResultRequest { - contractAddr: string; - height: number; -} - -export interface QueryGetMatchResultResponse { - result: MatchResult | undefined; -} - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -const baseQueryGetLongBookRequest: object = { - price: "", - contractAddr: "", - priceDenom: "", - assetDenom: "", -}; - -export const QueryGetLongBookRequest = { - encode( - message: QueryGetLongBookRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.price !== "") { - writer.uint32(10).string(message.price); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(26).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(34).string(message.assetDenom); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryGetLongBookRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetLongBookRequest, - } as QueryGetLongBookRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.price = reader.string(); - break; - case 2: - message.contractAddr = reader.string(); - break; - case 3: - message.priceDenom = reader.string(); - break; - case 4: - message.assetDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetLongBookRequest { - const message = { - ...baseQueryGetLongBookRequest, - } as QueryGetLongBookRequest; - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } else { - message.price = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } else { - message.assetDenom = ""; - } - return message; - }, - - toJSON(message: QueryGetLongBookRequest): unknown { - const obj: any = {}; - message.price !== undefined && (obj.price = message.price); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetLongBookRequest { - const message = { - ...baseQueryGetLongBookRequest, - } as QueryGetLongBookRequest; - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } else { - message.price = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } else { - message.assetDenom = ""; - } - return message; - }, -}; - -const baseQueryGetLongBookResponse: object = {}; - -export const QueryGetLongBookResponse = { - encode( - message: QueryGetLongBookResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.LongBook !== undefined) { - LongBook.encode(message.LongBook, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryGetLongBookResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetLongBookResponse, - } as QueryGetLongBookResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.LongBook = LongBook.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetLongBookResponse { - const message = { - ...baseQueryGetLongBookResponse, - } as QueryGetLongBookResponse; - if (object.LongBook !== undefined && object.LongBook !== null) { - message.LongBook = LongBook.fromJSON(object.LongBook); - } else { - message.LongBook = undefined; - } - return message; - }, - - toJSON(message: QueryGetLongBookResponse): unknown { - const obj: any = {}; - message.LongBook !== undefined && - (obj.LongBook = message.LongBook - ? LongBook.toJSON(message.LongBook) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetLongBookResponse { - const message = { - ...baseQueryGetLongBookResponse, - } as QueryGetLongBookResponse; - if (object.LongBook !== undefined && object.LongBook !== null) { - message.LongBook = LongBook.fromPartial(object.LongBook); - } else { - message.LongBook = undefined; - } - return message; - }, -}; - -const baseQueryAllLongBookRequest: object = { - contractAddr: "", - priceDenom: "", - assetDenom: "", -}; - -export const QueryAllLongBookRequest = { - encode( - message: QueryAllLongBookRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(26).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(34).string(message.assetDenom); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryAllLongBookRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllLongBookRequest, - } as QueryAllLongBookRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - case 2: - message.contractAddr = reader.string(); - break; - case 3: - message.priceDenom = reader.string(); - break; - case 4: - message.assetDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllLongBookRequest { - const message = { - ...baseQueryAllLongBookRequest, - } as QueryAllLongBookRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } else { - message.assetDenom = ""; - } - return message; - }, - - toJSON(message: QueryAllLongBookRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllLongBookRequest { - const message = { - ...baseQueryAllLongBookRequest, - } as QueryAllLongBookRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } else { - message.assetDenom = ""; - } - return message; - }, -}; - -const baseQueryAllLongBookResponse: object = {}; - -export const QueryAllLongBookResponse = { - encode( - message: QueryAllLongBookResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.LongBook) { - LongBook.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAllLongBookResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllLongBookResponse, - } as QueryAllLongBookResponse; - message.LongBook = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.LongBook.push(LongBook.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllLongBookResponse { - const message = { - ...baseQueryAllLongBookResponse, - } as QueryAllLongBookResponse; - message.LongBook = []; - if (object.LongBook !== undefined && object.LongBook !== null) { - for (const e of object.LongBook) { - message.LongBook.push(LongBook.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllLongBookResponse): unknown { - const obj: any = {}; - if (message.LongBook) { - obj.LongBook = message.LongBook.map((e) => - e ? LongBook.toJSON(e) : undefined - ); - } else { - obj.LongBook = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllLongBookResponse { - const message = { - ...baseQueryAllLongBookResponse, - } as QueryAllLongBookResponse; - message.LongBook = []; - if (object.LongBook !== undefined && object.LongBook !== null) { - for (const e of object.LongBook) { - message.LongBook.push(LongBook.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryGetShortBookRequest: object = { - price: "", - contractAddr: "", - priceDenom: "", - assetDenom: "", -}; - -export const QueryGetShortBookRequest = { - encode( - message: QueryGetShortBookRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.price !== "") { - writer.uint32(10).string(message.price); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(26).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(34).string(message.assetDenom); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryGetShortBookRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetShortBookRequest, - } as QueryGetShortBookRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.price = reader.string(); - break; - case 2: - message.contractAddr = reader.string(); - break; - case 3: - message.priceDenom = reader.string(); - break; - case 4: - message.assetDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetShortBookRequest { - const message = { - ...baseQueryGetShortBookRequest, - } as QueryGetShortBookRequest; - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } else { - message.price = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } else { - message.assetDenom = ""; - } - return message; - }, - - toJSON(message: QueryGetShortBookRequest): unknown { - const obj: any = {}; - message.price !== undefined && (obj.price = message.price); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetShortBookRequest { - const message = { - ...baseQueryGetShortBookRequest, - } as QueryGetShortBookRequest; - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } else { - message.price = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } else { - message.assetDenom = ""; - } - return message; - }, -}; - -const baseQueryGetShortBookResponse: object = {}; - -export const QueryGetShortBookResponse = { - encode( - message: QueryGetShortBookResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.ShortBook !== undefined) { - ShortBook.encode(message.ShortBook, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryGetShortBookResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetShortBookResponse, - } as QueryGetShortBookResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ShortBook = ShortBook.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetShortBookResponse { - const message = { - ...baseQueryGetShortBookResponse, - } as QueryGetShortBookResponse; - if (object.ShortBook !== undefined && object.ShortBook !== null) { - message.ShortBook = ShortBook.fromJSON(object.ShortBook); - } else { - message.ShortBook = undefined; - } - return message; - }, - - toJSON(message: QueryGetShortBookResponse): unknown { - const obj: any = {}; - message.ShortBook !== undefined && - (obj.ShortBook = message.ShortBook - ? ShortBook.toJSON(message.ShortBook) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetShortBookResponse { - const message = { - ...baseQueryGetShortBookResponse, - } as QueryGetShortBookResponse; - if (object.ShortBook !== undefined && object.ShortBook !== null) { - message.ShortBook = ShortBook.fromPartial(object.ShortBook); - } else { - message.ShortBook = undefined; - } - return message; - }, -}; - -const baseQueryAllShortBookRequest: object = { - contractAddr: "", - priceDenom: "", - assetDenom: "", -}; - -export const QueryAllShortBookRequest = { - encode( - message: QueryAllShortBookRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(26).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(34).string(message.assetDenom); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAllShortBookRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllShortBookRequest, - } as QueryAllShortBookRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - case 2: - message.contractAddr = reader.string(); - break; - case 3: - message.priceDenom = reader.string(); - break; - case 4: - message.assetDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllShortBookRequest { - const message = { - ...baseQueryAllShortBookRequest, - } as QueryAllShortBookRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } else { - message.assetDenom = ""; - } - return message; - }, - - toJSON(message: QueryAllShortBookRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllShortBookRequest { - const message = { - ...baseQueryAllShortBookRequest, - } as QueryAllShortBookRequest; - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } else { - message.assetDenom = ""; - } - return message; - }, -}; - -const baseQueryAllShortBookResponse: object = {}; - -export const QueryAllShortBookResponse = { - encode( - message: QueryAllShortBookResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.ShortBook) { - ShortBook.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAllShortBookResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAllShortBookResponse, - } as QueryAllShortBookResponse; - message.ShortBook = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ShortBook.push(ShortBook.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllShortBookResponse { - const message = { - ...baseQueryAllShortBookResponse, - } as QueryAllShortBookResponse; - message.ShortBook = []; - if (object.ShortBook !== undefined && object.ShortBook !== null) { - for (const e of object.ShortBook) { - message.ShortBook.push(ShortBook.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllShortBookResponse): unknown { - const obj: any = {}; - if (message.ShortBook) { - obj.ShortBook = message.ShortBook.map((e) => - e ? ShortBook.toJSON(e) : undefined - ); - } else { - obj.ShortBook = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAllShortBookResponse { - const message = { - ...baseQueryAllShortBookResponse, - } as QueryAllShortBookResponse; - message.ShortBook = []; - if (object.ShortBook !== undefined && object.ShortBook !== null) { - for (const e of object.ShortBook) { - message.ShortBook.push(ShortBook.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryGetPricesRequest: object = { - priceDenom: "", - assetDenom: "", - contractAddr: "", -}; - -export const QueryGetPricesRequest = { - encode( - message: QueryGetPricesRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.priceDenom !== "") { - writer.uint32(10).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(18).string(message.assetDenom); - } - if (message.contractAddr !== "") { - writer.uint32(26).string(message.contractAddr); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryGetPricesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetPricesRequest } as QueryGetPricesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.priceDenom = reader.string(); - break; - case 2: - message.assetDenom = reader.string(); - break; - case 3: - message.contractAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetPricesRequest { - const message = { ...baseQueryGetPricesRequest } as QueryGetPricesRequest; - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } else { - message.assetDenom = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - return message; - }, - - toJSON(message: QueryGetPricesRequest): unknown { - const obj: any = {}; - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetPricesRequest { - const message = { ...baseQueryGetPricesRequest } as QueryGetPricesRequest; - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } else { - message.assetDenom = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - return message; - }, -}; - -const baseQueryGetPricesResponse: object = {}; - -export const QueryGetPricesResponse = { - encode( - message: QueryGetPricesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.prices) { - Price.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryGetPricesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetPricesResponse } as QueryGetPricesResponse; - message.prices = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.prices.push(Price.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetPricesResponse { - const message = { ...baseQueryGetPricesResponse } as QueryGetPricesResponse; - message.prices = []; - if (object.prices !== undefined && object.prices !== null) { - for (const e of object.prices) { - message.prices.push(Price.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryGetPricesResponse): unknown { - const obj: any = {}; - if (message.prices) { - obj.prices = message.prices.map((e) => (e ? Price.toJSON(e) : undefined)); - } else { - obj.prices = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetPricesResponse { - const message = { ...baseQueryGetPricesResponse } as QueryGetPricesResponse; - message.prices = []; - if (object.prices !== undefined && object.prices !== null) { - for (const e of object.prices) { - message.prices.push(Price.fromPartial(e)); - } - } - return message; - }, -}; - -const baseQueryGetTwapsRequest: object = { - contractAddr: "", - lookbackSeconds: 0, -}; - -export const QueryGetTwapsRequest = { - encode( - message: QueryGetTwapsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - if (message.lookbackSeconds !== 0) { - writer.uint32(16).uint64(message.lookbackSeconds); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryGetTwapsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetTwapsRequest } as QueryGetTwapsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - case 2: - message.lookbackSeconds = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetTwapsRequest { - const message = { ...baseQueryGetTwapsRequest } as QueryGetTwapsRequest; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if ( - object.lookbackSeconds !== undefined && - object.lookbackSeconds !== null - ) { - message.lookbackSeconds = Number(object.lookbackSeconds); - } else { - message.lookbackSeconds = 0; - } - return message; - }, - - toJSON(message: QueryGetTwapsRequest): unknown { - const obj: any = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.lookbackSeconds !== undefined && - (obj.lookbackSeconds = message.lookbackSeconds); - return obj; - }, - - fromPartial(object: DeepPartial): QueryGetTwapsRequest { - const message = { ...baseQueryGetTwapsRequest } as QueryGetTwapsRequest; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if ( - object.lookbackSeconds !== undefined && - object.lookbackSeconds !== null - ) { - message.lookbackSeconds = object.lookbackSeconds; - } else { - message.lookbackSeconds = 0; - } - return message; - }, -}; - -const baseQueryGetTwapsResponse: object = {}; - -export const QueryGetTwapsResponse = { - encode( - message: QueryGetTwapsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.twaps) { - Twap.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryGetTwapsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetTwapsResponse } as QueryGetTwapsResponse; - message.twaps = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.twaps.push(Twap.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetTwapsResponse { - const message = { ...baseQueryGetTwapsResponse } as QueryGetTwapsResponse; - message.twaps = []; - if (object.twaps !== undefined && object.twaps !== null) { - for (const e of object.twaps) { - message.twaps.push(Twap.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryGetTwapsResponse): unknown { - const obj: any = {}; - if (message.twaps) { - obj.twaps = message.twaps.map((e) => (e ? Twap.toJSON(e) : undefined)); - } else { - obj.twaps = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetTwapsResponse { - const message = { ...baseQueryGetTwapsResponse } as QueryGetTwapsResponse; - message.twaps = []; - if (object.twaps !== undefined && object.twaps !== null) { - for (const e of object.twaps) { - message.twaps.push(Twap.fromPartial(e)); - } - } - return message; - }, -}; - -const baseQueryAssetListRequest: object = {}; - -export const QueryAssetListRequest = { - encode(_: QueryAssetListRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryAssetListRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAssetListRequest } as QueryAssetListRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryAssetListRequest { - const message = { ...baseQueryAssetListRequest } as QueryAssetListRequest; - return message; - }, - - toJSON(_: QueryAssetListRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryAssetListRequest { - const message = { ...baseQueryAssetListRequest } as QueryAssetListRequest; - return message; - }, -}; - -const baseQueryAssetListResponse: object = {}; - -export const QueryAssetListResponse = { - encode( - message: QueryAssetListResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.assetList) { - AssetMetadata.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryAssetListResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAssetListResponse } as QueryAssetListResponse; - message.assetList = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.assetList.push(AssetMetadata.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAssetListResponse { - const message = { ...baseQueryAssetListResponse } as QueryAssetListResponse; - message.assetList = []; - if (object.assetList !== undefined && object.assetList !== null) { - for (const e of object.assetList) { - message.assetList.push(AssetMetadata.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryAssetListResponse): unknown { - const obj: any = {}; - if (message.assetList) { - obj.assetList = message.assetList.map((e) => - e ? AssetMetadata.toJSON(e) : undefined - ); - } else { - obj.assetList = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAssetListResponse { - const message = { ...baseQueryAssetListResponse } as QueryAssetListResponse; - message.assetList = []; - if (object.assetList !== undefined && object.assetList !== null) { - for (const e of object.assetList) { - message.assetList.push(AssetMetadata.fromPartial(e)); - } - } - return message; - }, -}; - -const baseQueryAssetMetadataRequest: object = { denom: "" }; - -export const QueryAssetMetadataRequest = { - encode( - message: QueryAssetMetadataRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAssetMetadataRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAssetMetadataRequest, - } as QueryAssetMetadataRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAssetMetadataRequest { - const message = { - ...baseQueryAssetMetadataRequest, - } as QueryAssetMetadataRequest; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - return message; - }, - - toJSON(message: QueryAssetMetadataRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAssetMetadataRequest { - const message = { - ...baseQueryAssetMetadataRequest, - } as QueryAssetMetadataRequest; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - return message; - }, -}; - -const baseQueryAssetMetadataResponse: object = {}; - -export const QueryAssetMetadataResponse = { - encode( - message: QueryAssetMetadataResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.metadata !== undefined) { - AssetMetadata.encode(message.metadata, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAssetMetadataResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAssetMetadataResponse, - } as QueryAssetMetadataResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadata = AssetMetadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAssetMetadataResponse { - const message = { - ...baseQueryAssetMetadataResponse, - } as QueryAssetMetadataResponse; - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = AssetMetadata.fromJSON(object.metadata); - } else { - message.metadata = undefined; - } - return message; - }, - - toJSON(message: QueryAssetMetadataResponse): unknown { - const obj: any = {}; - message.metadata !== undefined && - (obj.metadata = message.metadata - ? AssetMetadata.toJSON(message.metadata) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAssetMetadataResponse { - const message = { - ...baseQueryAssetMetadataResponse, - } as QueryAssetMetadataResponse; - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = AssetMetadata.fromPartial(object.metadata); - } else { - message.metadata = undefined; - } - return message; - }, -}; - -const baseQueryRegisteredPairsRequest: object = { contractAddr: "" }; - -export const QueryRegisteredPairsRequest = { - encode( - message: QueryRegisteredPairsRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryRegisteredPairsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRegisteredPairsRequest, - } as QueryRegisteredPairsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryRegisteredPairsRequest { - const message = { - ...baseQueryRegisteredPairsRequest, - } as QueryRegisteredPairsRequest; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - return message; - }, - - toJSON(message: QueryRegisteredPairsRequest): unknown { - const obj: any = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryRegisteredPairsRequest { - const message = { - ...baseQueryRegisteredPairsRequest, - } as QueryRegisteredPairsRequest; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - return message; - }, -}; - -const baseQueryRegisteredPairsResponse: object = {}; - -export const QueryRegisteredPairsResponse = { - encode( - message: QueryRegisteredPairsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.pairs) { - Pair.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryRegisteredPairsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryRegisteredPairsResponse, - } as QueryRegisteredPairsResponse; - message.pairs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pairs.push(Pair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryRegisteredPairsResponse { - const message = { - ...baseQueryRegisteredPairsResponse, - } as QueryRegisteredPairsResponse; - message.pairs = []; - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(Pair.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryRegisteredPairsResponse): unknown { - const obj: any = {}; - if (message.pairs) { - obj.pairs = message.pairs.map((e) => (e ? Pair.toJSON(e) : undefined)); - } else { - obj.pairs = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryRegisteredPairsResponse { - const message = { - ...baseQueryRegisteredPairsResponse, - } as QueryRegisteredPairsResponse; - message.pairs = []; - if (object.pairs !== undefined && object.pairs !== null) { - for (const e of object.pairs) { - message.pairs.push(Pair.fromPartial(e)); - } - } - return message; - }, -}; - -const baseQueryGetOrdersRequest: object = { contractAddr: "", account: "" }; - -export const QueryGetOrdersRequest = { - encode( - message: QueryGetOrdersRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - if (message.account !== "") { - writer.uint32(18).string(message.account); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryGetOrdersRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetOrdersRequest } as QueryGetOrdersRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - case 2: - message.account = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetOrdersRequest { - const message = { ...baseQueryGetOrdersRequest } as QueryGetOrdersRequest; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.account !== undefined && object.account !== null) { - message.account = String(object.account); - } else { - message.account = ""; - } - return message; - }, - - toJSON(message: QueryGetOrdersRequest): unknown { - const obj: any = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.account !== undefined && (obj.account = message.account); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetOrdersRequest { - const message = { ...baseQueryGetOrdersRequest } as QueryGetOrdersRequest; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.account !== undefined && object.account !== null) { - message.account = object.account; - } else { - message.account = ""; - } - return message; - }, -}; - -const baseQueryGetOrdersResponse: object = {}; - -export const QueryGetOrdersResponse = { - encode( - message: QueryGetOrdersResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.orders) { - Order.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryGetOrdersResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetOrdersResponse } as QueryGetOrdersResponse; - message.orders = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.orders.push(Order.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetOrdersResponse { - const message = { ...baseQueryGetOrdersResponse } as QueryGetOrdersResponse; - message.orders = []; - if (object.orders !== undefined && object.orders !== null) { - for (const e of object.orders) { - message.orders.push(Order.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryGetOrdersResponse): unknown { - const obj: any = {}; - if (message.orders) { - obj.orders = message.orders.map((e) => (e ? Order.toJSON(e) : undefined)); - } else { - obj.orders = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetOrdersResponse { - const message = { ...baseQueryGetOrdersResponse } as QueryGetOrdersResponse; - message.orders = []; - if (object.orders !== undefined && object.orders !== null) { - for (const e of object.orders) { - message.orders.push(Order.fromPartial(e)); - } - } - return message; - }, -}; - -const baseQueryGetOrderByIDRequest: object = { - contractAddr: "", - priceDenom: "", - assetDenom: "", - id: 0, -}; - -export const QueryGetOrderByIDRequest = { - encode( - message: QueryGetOrderByIDRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(18).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(26).string(message.assetDenom); - } - if (message.id !== 0) { - writer.uint32(32).uint64(message.id); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryGetOrderByIDRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetOrderByIDRequest, - } as QueryGetOrderByIDRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - case 2: - message.priceDenom = reader.string(); - break; - case 3: - message.assetDenom = reader.string(); - break; - case 4: - message.id = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetOrderByIDRequest { - const message = { - ...baseQueryGetOrderByIDRequest, - } as QueryGetOrderByIDRequest; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } else { - message.assetDenom = ""; - } - if (object.id !== undefined && object.id !== null) { - message.id = Number(object.id); - } else { - message.id = 0; - } - return message; - }, - - toJSON(message: QueryGetOrderByIDRequest): unknown { - const obj: any = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.id !== undefined && (obj.id = message.id); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetOrderByIDRequest { - const message = { - ...baseQueryGetOrderByIDRequest, - } as QueryGetOrderByIDRequest; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } else { - message.assetDenom = ""; - } - if (object.id !== undefined && object.id !== null) { - message.id = object.id; - } else { - message.id = 0; - } - return message; - }, -}; - -const baseQueryGetOrderByIDResponse: object = {}; - -export const QueryGetOrderByIDResponse = { - encode( - message: QueryGetOrderByIDResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.order !== undefined) { - Order.encode(message.order, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryGetOrderByIDResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetOrderByIDResponse, - } as QueryGetOrderByIDResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.order = Order.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetOrderByIDResponse { - const message = { - ...baseQueryGetOrderByIDResponse, - } as QueryGetOrderByIDResponse; - if (object.order !== undefined && object.order !== null) { - message.order = Order.fromJSON(object.order); - } else { - message.order = undefined; - } - return message; - }, - - toJSON(message: QueryGetOrderByIDResponse): unknown { - const obj: any = {}; - message.order !== undefined && - (obj.order = message.order ? Order.toJSON(message.order) : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetOrderByIDResponse { - const message = { - ...baseQueryGetOrderByIDResponse, - } as QueryGetOrderByIDResponse; - if (object.order !== undefined && object.order !== null) { - message.order = Order.fromPartial(object.order); - } else { - message.order = undefined; - } - return message; - }, -}; - -const baseQueryGetHistoricalPricesRequest: object = { - contractAddr: "", - priceDenom: "", - assetDenom: "", - periodLengthInSeconds: 0, - numOfPeriods: 0, -}; - -export const QueryGetHistoricalPricesRequest = { - encode( - message: QueryGetHistoricalPricesRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(18).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(26).string(message.assetDenom); - } - if (message.periodLengthInSeconds !== 0) { - writer.uint32(32).uint64(message.periodLengthInSeconds); - } - if (message.numOfPeriods !== 0) { - writer.uint32(40).uint64(message.numOfPeriods); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryGetHistoricalPricesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetHistoricalPricesRequest, - } as QueryGetHistoricalPricesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - case 2: - message.priceDenom = reader.string(); - break; - case 3: - message.assetDenom = reader.string(); - break; - case 4: - message.periodLengthInSeconds = longToNumber(reader.uint64() as Long); - break; - case 5: - message.numOfPeriods = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetHistoricalPricesRequest { - const message = { - ...baseQueryGetHistoricalPricesRequest, - } as QueryGetHistoricalPricesRequest; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } else { - message.assetDenom = ""; - } - if ( - object.periodLengthInSeconds !== undefined && - object.periodLengthInSeconds !== null - ) { - message.periodLengthInSeconds = Number(object.periodLengthInSeconds); - } else { - message.periodLengthInSeconds = 0; - } - if (object.numOfPeriods !== undefined && object.numOfPeriods !== null) { - message.numOfPeriods = Number(object.numOfPeriods); - } else { - message.numOfPeriods = 0; - } - return message; - }, - - toJSON(message: QueryGetHistoricalPricesRequest): unknown { - const obj: any = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.periodLengthInSeconds !== undefined && - (obj.periodLengthInSeconds = message.periodLengthInSeconds); - message.numOfPeriods !== undefined && - (obj.numOfPeriods = message.numOfPeriods); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetHistoricalPricesRequest { - const message = { - ...baseQueryGetHistoricalPricesRequest, - } as QueryGetHistoricalPricesRequest; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } else { - message.assetDenom = ""; - } - if ( - object.periodLengthInSeconds !== undefined && - object.periodLengthInSeconds !== null - ) { - message.periodLengthInSeconds = object.periodLengthInSeconds; - } else { - message.periodLengthInSeconds = 0; - } - if (object.numOfPeriods !== undefined && object.numOfPeriods !== null) { - message.numOfPeriods = object.numOfPeriods; - } else { - message.numOfPeriods = 0; - } - return message; - }, -}; - -const baseQueryGetHistoricalPricesResponse: object = {}; - -export const QueryGetHistoricalPricesResponse = { - encode( - message: QueryGetHistoricalPricesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.prices) { - PriceCandlestick.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryGetHistoricalPricesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetHistoricalPricesResponse, - } as QueryGetHistoricalPricesResponse; - message.prices = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.prices.push(PriceCandlestick.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetHistoricalPricesResponse { - const message = { - ...baseQueryGetHistoricalPricesResponse, - } as QueryGetHistoricalPricesResponse; - message.prices = []; - if (object.prices !== undefined && object.prices !== null) { - for (const e of object.prices) { - message.prices.push(PriceCandlestick.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryGetHistoricalPricesResponse): unknown { - const obj: any = {}; - if (message.prices) { - obj.prices = message.prices.map((e) => - e ? PriceCandlestick.toJSON(e) : undefined - ); - } else { - obj.prices = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetHistoricalPricesResponse { - const message = { - ...baseQueryGetHistoricalPricesResponse, - } as QueryGetHistoricalPricesResponse; - message.prices = []; - if (object.prices !== undefined && object.prices !== null) { - for (const e of object.prices) { - message.prices.push(PriceCandlestick.fromPartial(e)); - } - } - return message; - }, -}; - -const baseQueryGetMarketSummaryRequest: object = { - contractAddr: "", - priceDenom: "", - assetDenom: "", - lookbackInSeconds: 0, -}; - -export const QueryGetMarketSummaryRequest = { - encode( - message: QueryGetMarketSummaryRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - if (message.priceDenom !== "") { - writer.uint32(18).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(26).string(message.assetDenom); - } - if (message.lookbackInSeconds !== 0) { - writer.uint32(32).uint64(message.lookbackInSeconds); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryGetMarketSummaryRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetMarketSummaryRequest, - } as QueryGetMarketSummaryRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - case 2: - message.priceDenom = reader.string(); - break; - case 3: - message.assetDenom = reader.string(); - break; - case 4: - message.lookbackInSeconds = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetMarketSummaryRequest { - const message = { - ...baseQueryGetMarketSummaryRequest, - } as QueryGetMarketSummaryRequest; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } else { - message.assetDenom = ""; - } - if ( - object.lookbackInSeconds !== undefined && - object.lookbackInSeconds !== null - ) { - message.lookbackInSeconds = Number(object.lookbackInSeconds); - } else { - message.lookbackInSeconds = 0; - } - return message; - }, - - toJSON(message: QueryGetMarketSummaryRequest): unknown { - const obj: any = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.lookbackInSeconds !== undefined && - (obj.lookbackInSeconds = message.lookbackInSeconds); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetMarketSummaryRequest { - const message = { - ...baseQueryGetMarketSummaryRequest, - } as QueryGetMarketSummaryRequest; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } else { - message.assetDenom = ""; - } - if ( - object.lookbackInSeconds !== undefined && - object.lookbackInSeconds !== null - ) { - message.lookbackInSeconds = object.lookbackInSeconds; - } else { - message.lookbackInSeconds = 0; - } - return message; - }, -}; - -const baseQueryGetMarketSummaryResponse: object = { - totalVolume: "", - totalVolumeNotional: "", - highPrice: "", - lowPrice: "", - lastPrice: "", -}; - -export const QueryGetMarketSummaryResponse = { - encode( - message: QueryGetMarketSummaryResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.totalVolume !== "") { - writer.uint32(10).string(message.totalVolume); - } - if (message.totalVolumeNotional !== "") { - writer.uint32(18).string(message.totalVolumeNotional); - } - if (message.highPrice !== "") { - writer.uint32(26).string(message.highPrice); - } - if (message.lowPrice !== "") { - writer.uint32(34).string(message.lowPrice); - } - if (message.lastPrice !== "") { - writer.uint32(42).string(message.lastPrice); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryGetMarketSummaryResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetMarketSummaryResponse, - } as QueryGetMarketSummaryResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.totalVolume = reader.string(); - break; - case 2: - message.totalVolumeNotional = reader.string(); - break; - case 3: - message.highPrice = reader.string(); - break; - case 4: - message.lowPrice = reader.string(); - break; - case 5: - message.lastPrice = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetMarketSummaryResponse { - const message = { - ...baseQueryGetMarketSummaryResponse, - } as QueryGetMarketSummaryResponse; - if (object.totalVolume !== undefined && object.totalVolume !== null) { - message.totalVolume = String(object.totalVolume); - } else { - message.totalVolume = ""; - } - if ( - object.totalVolumeNotional !== undefined && - object.totalVolumeNotional !== null - ) { - message.totalVolumeNotional = String(object.totalVolumeNotional); - } else { - message.totalVolumeNotional = ""; - } - if (object.highPrice !== undefined && object.highPrice !== null) { - message.highPrice = String(object.highPrice); - } else { - message.highPrice = ""; - } - if (object.lowPrice !== undefined && object.lowPrice !== null) { - message.lowPrice = String(object.lowPrice); - } else { - message.lowPrice = ""; - } - if (object.lastPrice !== undefined && object.lastPrice !== null) { - message.lastPrice = String(object.lastPrice); - } else { - message.lastPrice = ""; - } - return message; - }, - - toJSON(message: QueryGetMarketSummaryResponse): unknown { - const obj: any = {}; - message.totalVolume !== undefined && - (obj.totalVolume = message.totalVolume); - message.totalVolumeNotional !== undefined && - (obj.totalVolumeNotional = message.totalVolumeNotional); - message.highPrice !== undefined && (obj.highPrice = message.highPrice); - message.lowPrice !== undefined && (obj.lowPrice = message.lowPrice); - message.lastPrice !== undefined && (obj.lastPrice = message.lastPrice); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetMarketSummaryResponse { - const message = { - ...baseQueryGetMarketSummaryResponse, - } as QueryGetMarketSummaryResponse; - if (object.totalVolume !== undefined && object.totalVolume !== null) { - message.totalVolume = object.totalVolume; - } else { - message.totalVolume = ""; - } - if ( - object.totalVolumeNotional !== undefined && - object.totalVolumeNotional !== null - ) { - message.totalVolumeNotional = object.totalVolumeNotional; - } else { - message.totalVolumeNotional = ""; - } - if (object.highPrice !== undefined && object.highPrice !== null) { - message.highPrice = object.highPrice; - } else { - message.highPrice = ""; - } - if (object.lowPrice !== undefined && object.lowPrice !== null) { - message.lowPrice = object.lowPrice; - } else { - message.lowPrice = ""; - } - if (object.lastPrice !== undefined && object.lastPrice !== null) { - message.lastPrice = object.lastPrice; - } else { - message.lastPrice = ""; - } - return message; - }, -}; - -const baseQueryOrderSimulationRequest: object = { contractAddr: "" }; - -export const QueryOrderSimulationRequest = { - encode( - message: QueryOrderSimulationRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.order !== undefined) { - Order.encode(message.order, writer.uint32(10).fork()).ldelim(); - } - if (message.contractAddr !== "") { - writer.uint32(18).string(message.contractAddr); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryOrderSimulationRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryOrderSimulationRequest, - } as QueryOrderSimulationRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.order = Order.decode(reader, reader.uint32()); - break; - case 2: - message.contractAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryOrderSimulationRequest { - const message = { - ...baseQueryOrderSimulationRequest, - } as QueryOrderSimulationRequest; - if (object.order !== undefined && object.order !== null) { - message.order = Order.fromJSON(object.order); - } else { - message.order = undefined; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - return message; - }, - - toJSON(message: QueryOrderSimulationRequest): unknown { - const obj: any = {}; - message.order !== undefined && - (obj.order = message.order ? Order.toJSON(message.order) : undefined); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryOrderSimulationRequest { - const message = { - ...baseQueryOrderSimulationRequest, - } as QueryOrderSimulationRequest; - if (object.order !== undefined && object.order !== null) { - message.order = Order.fromPartial(object.order); - } else { - message.order = undefined; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - return message; - }, -}; - -const baseQueryOrderSimulationResponse: object = { ExecutedQuantity: "" }; - -export const QueryOrderSimulationResponse = { - encode( - message: QueryOrderSimulationResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.ExecutedQuantity !== "") { - writer.uint32(10).string(message.ExecutedQuantity); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryOrderSimulationResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryOrderSimulationResponse, - } as QueryOrderSimulationResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ExecutedQuantity = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryOrderSimulationResponse { - const message = { - ...baseQueryOrderSimulationResponse, - } as QueryOrderSimulationResponse; - if ( - object.ExecutedQuantity !== undefined && - object.ExecutedQuantity !== null - ) { - message.ExecutedQuantity = String(object.ExecutedQuantity); - } else { - message.ExecutedQuantity = ""; - } - return message; - }, - - toJSON(message: QueryOrderSimulationResponse): unknown { - const obj: any = {}; - message.ExecutedQuantity !== undefined && - (obj.ExecutedQuantity = message.ExecutedQuantity); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryOrderSimulationResponse { - const message = { - ...baseQueryOrderSimulationResponse, - } as QueryOrderSimulationResponse; - if ( - object.ExecutedQuantity !== undefined && - object.ExecutedQuantity !== null - ) { - message.ExecutedQuantity = object.ExecutedQuantity; - } else { - message.ExecutedQuantity = ""; - } - return message; - }, -}; - -const baseQueryGetMatchResultRequest: object = { contractAddr: "", height: 0 }; - -export const QueryGetMatchResultRequest = { - encode( - message: QueryGetMatchResultRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.contractAddr !== "") { - writer.uint32(10).string(message.contractAddr); - } - if (message.height !== 0) { - writer.uint32(16).int64(message.height); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryGetMatchResultRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetMatchResultRequest, - } as QueryGetMatchResultRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddr = reader.string(); - break; - case 2: - message.height = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetMatchResultRequest { - const message = { - ...baseQueryGetMatchResultRequest, - } as QueryGetMatchResultRequest; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - return message; - }, - - toJSON(message: QueryGetMatchResultRequest): unknown { - const obj: any = {}; - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - message.height !== undefined && (obj.height = message.height); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetMatchResultRequest { - const message = { - ...baseQueryGetMatchResultRequest, - } as QueryGetMatchResultRequest; - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - return message; - }, -}; - -const baseQueryGetMatchResultResponse: object = {}; - -export const QueryGetMatchResultResponse = { - encode( - message: QueryGetMatchResultResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.result !== undefined) { - MatchResult.encode(message.result, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryGetMatchResultResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryGetMatchResultResponse, - } as QueryGetMatchResultResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = MatchResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetMatchResultResponse { - const message = { - ...baseQueryGetMatchResultResponse, - } as QueryGetMatchResultResponse; - if (object.result !== undefined && object.result !== null) { - message.result = MatchResult.fromJSON(object.result); - } else { - message.result = undefined; - } - return message; - }, - - toJSON(message: QueryGetMatchResultResponse): unknown { - const obj: any = {}; - message.result !== undefined && - (obj.result = message.result - ? MatchResult.toJSON(message.result) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryGetMatchResultResponse { - const message = { - ...baseQueryGetMatchResultResponse, - } as QueryGetMatchResultResponse; - if (object.result !== undefined && object.result !== null) { - message.result = MatchResult.fromPartial(object.result); - } else { - message.result = undefined; - } - return message; - }, -}; - -/** Query defines the gRPC querier service. */ -export interface Query { - /** Parameters queries the parameters of the module. */ - Params(request: QueryParamsRequest): Promise; - /** Queries a LongBook by id. */ - LongBook(request: QueryGetLongBookRequest): Promise; - /** Queries a list of LongBook items. */ - LongBookAll( - request: QueryAllLongBookRequest - ): Promise; - /** Queries a ShortBook by id. */ - ShortBook( - request: QueryGetShortBookRequest - ): Promise; - /** Queries a list of ShortBook items. */ - ShortBookAll( - request: QueryAllShortBookRequest - ): Promise; - GetPrices(request: QueryGetPricesRequest): Promise; - GetTwaps(request: QueryGetTwapsRequest): Promise; - /** Returns the metadata for a specified denom / display type */ - AssetMetadata( - request: QueryAssetMetadataRequest - ): Promise; - /** Returns metadata for all the assets */ - AssetList(request: QueryAssetListRequest): Promise; - /** Returns all registered pairs for specified contract address */ - GetRegisteredPairs( - request: QueryRegisteredPairsRequest - ): Promise; - GetOrders(request: QueryGetOrdersRequest): Promise; - GetOrder( - request: QueryGetOrderByIDRequest - ): Promise; - GetHistoricalPrices( - request: QueryGetHistoricalPricesRequest - ): Promise; - GetMarketSummary( - request: QueryGetMarketSummaryRequest - ): Promise; - GetOrderSimulation( - request: QueryOrderSimulationRequest - ): Promise; - GetMatchResult( - request: QueryGetMatchResultRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - - LongBook( - request: QueryGetLongBookRequest - ): Promise { - const data = QueryGetLongBookRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "LongBook", - data - ); - return promise.then((data) => - QueryGetLongBookResponse.decode(new Reader(data)) - ); - } - - LongBookAll( - request: QueryAllLongBookRequest - ): Promise { - const data = QueryAllLongBookRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "LongBookAll", - data - ); - return promise.then((data) => - QueryAllLongBookResponse.decode(new Reader(data)) - ); - } - - ShortBook( - request: QueryGetShortBookRequest - ): Promise { - const data = QueryGetShortBookRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "ShortBook", - data - ); - return promise.then((data) => - QueryGetShortBookResponse.decode(new Reader(data)) - ); - } - - ShortBookAll( - request: QueryAllShortBookRequest - ): Promise { - const data = QueryAllShortBookRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "ShortBookAll", - data - ); - return promise.then((data) => - QueryAllShortBookResponse.decode(new Reader(data)) - ); - } - - GetPrices(request: QueryGetPricesRequest): Promise { - const data = QueryGetPricesRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "GetPrices", - data - ); - return promise.then((data) => - QueryGetPricesResponse.decode(new Reader(data)) - ); - } - - GetTwaps(request: QueryGetTwapsRequest): Promise { - const data = QueryGetTwapsRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "GetTwaps", - data - ); - return promise.then((data) => - QueryGetTwapsResponse.decode(new Reader(data)) - ); - } - - AssetMetadata( - request: QueryAssetMetadataRequest - ): Promise { - const data = QueryAssetMetadataRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "AssetMetadata", - data - ); - return promise.then((data) => - QueryAssetMetadataResponse.decode(new Reader(data)) - ); - } - - AssetList(request: QueryAssetListRequest): Promise { - const data = QueryAssetListRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "AssetList", - data - ); - return promise.then((data) => - QueryAssetListResponse.decode(new Reader(data)) - ); - } - - GetRegisteredPairs( - request: QueryRegisteredPairsRequest - ): Promise { - const data = QueryRegisteredPairsRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "GetRegisteredPairs", - data - ); - return promise.then((data) => - QueryRegisteredPairsResponse.decode(new Reader(data)) - ); - } - - GetOrders(request: QueryGetOrdersRequest): Promise { - const data = QueryGetOrdersRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "GetOrders", - data - ); - return promise.then((data) => - QueryGetOrdersResponse.decode(new Reader(data)) - ); - } - - GetOrder( - request: QueryGetOrderByIDRequest - ): Promise { - const data = QueryGetOrderByIDRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "GetOrder", - data - ); - return promise.then((data) => - QueryGetOrderByIDResponse.decode(new Reader(data)) - ); - } - - GetHistoricalPrices( - request: QueryGetHistoricalPricesRequest - ): Promise { - const data = QueryGetHistoricalPricesRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "GetHistoricalPrices", - data - ); - return promise.then((data) => - QueryGetHistoricalPricesResponse.decode(new Reader(data)) - ); - } - - GetMarketSummary( - request: QueryGetMarketSummaryRequest - ): Promise { - const data = QueryGetMarketSummaryRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "GetMarketSummary", - data - ); - return promise.then((data) => - QueryGetMarketSummaryResponse.decode(new Reader(data)) - ); - } - - GetOrderSimulation( - request: QueryOrderSimulationRequest - ): Promise { - const data = QueryOrderSimulationRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "GetOrderSimulation", - data - ); - return promise.then((data) => - QueryOrderSimulationResponse.decode(new Reader(data)) - ); - } - - GetMatchResult( - request: QueryGetMatchResultRequest - ): Promise { - const data = QueryGetMatchResultRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Query", - "GetMatchResult", - data - ); - return promise.then((data) => - QueryGetMatchResultResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/settlement.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/settlement.d.ts deleted file mode 100644 index 6e3b23b2c7..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/settlement.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -export interface SettlementEntry { - account: string; - priceDenom: string; - assetDenom: string; - quantity: string; - executionCostOrProceed: string; - expectedCostOrProceed: string; - positionDirection: string; - orderType: string; - orderId: number; - timestamp: number; - height: number; - settlementId: number; -} -export interface Settlements { - epoch: number; - entries: SettlementEntry[]; -} -export declare const SettlementEntry: { - encode(message: SettlementEntry, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SettlementEntry; - fromJSON(object: any): SettlementEntry; - toJSON(message: SettlementEntry): unknown; - fromPartial(object: DeepPartial): SettlementEntry; -}; -export declare const Settlements: { - encode(message: Settlements, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Settlements; - fromJSON(object: any): Settlements; - toJSON(message: Settlements): unknown; - fromPartial(object: DeepPartial): Settlements; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/settlement.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/settlement.js deleted file mode 100644 index 05455ca7f2..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/settlement.js +++ /dev/null @@ -1,384 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const baseSettlementEntry = { - account: "", - priceDenom: "", - assetDenom: "", - quantity: "", - executionCostOrProceed: "", - expectedCostOrProceed: "", - positionDirection: "", - orderType: "", - orderId: 0, - timestamp: 0, - height: 0, - settlementId: 0, -}; -export const SettlementEntry = { - encode(message, writer = Writer.create()) { - if (message.account !== "") { - writer.uint32(10).string(message.account); - } - if (message.priceDenom !== "") { - writer.uint32(18).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(26).string(message.assetDenom); - } - if (message.quantity !== "") { - writer.uint32(34).string(message.quantity); - } - if (message.executionCostOrProceed !== "") { - writer.uint32(42).string(message.executionCostOrProceed); - } - if (message.expectedCostOrProceed !== "") { - writer.uint32(50).string(message.expectedCostOrProceed); - } - if (message.positionDirection !== "") { - writer.uint32(58).string(message.positionDirection); - } - if (message.orderType !== "") { - writer.uint32(66).string(message.orderType); - } - if (message.orderId !== 0) { - writer.uint32(72).uint64(message.orderId); - } - if (message.timestamp !== 0) { - writer.uint32(80).uint64(message.timestamp); - } - if (message.height !== 0) { - writer.uint32(88).uint64(message.height); - } - if (message.settlementId !== 0) { - writer.uint32(96).uint64(message.settlementId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSettlementEntry }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account = reader.string(); - break; - case 2: - message.priceDenom = reader.string(); - break; - case 3: - message.assetDenom = reader.string(); - break; - case 4: - message.quantity = reader.string(); - break; - case 5: - message.executionCostOrProceed = reader.string(); - break; - case 6: - message.expectedCostOrProceed = reader.string(); - break; - case 7: - message.positionDirection = reader.string(); - break; - case 8: - message.orderType = reader.string(); - break; - case 9: - message.orderId = longToNumber(reader.uint64()); - break; - case 10: - message.timestamp = longToNumber(reader.uint64()); - break; - case 11: - message.height = longToNumber(reader.uint64()); - break; - case 12: - message.settlementId = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSettlementEntry }; - if (object.account !== undefined && object.account !== null) { - message.account = String(object.account); - } - else { - message.account = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } - else { - message.assetDenom = ""; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = String(object.quantity); - } - else { - message.quantity = ""; - } - if (object.executionCostOrProceed !== undefined && - object.executionCostOrProceed !== null) { - message.executionCostOrProceed = String(object.executionCostOrProceed); - } - else { - message.executionCostOrProceed = ""; - } - if (object.expectedCostOrProceed !== undefined && - object.expectedCostOrProceed !== null) { - message.expectedCostOrProceed = String(object.expectedCostOrProceed); - } - else { - message.expectedCostOrProceed = ""; - } - if (object.positionDirection !== undefined && - object.positionDirection !== null) { - message.positionDirection = String(object.positionDirection); - } - else { - message.positionDirection = ""; - } - if (object.orderType !== undefined && object.orderType !== null) { - message.orderType = String(object.orderType); - } - else { - message.orderType = ""; - } - if (object.orderId !== undefined && object.orderId !== null) { - message.orderId = Number(object.orderId); - } - else { - message.orderId = 0; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = Number(object.timestamp); - } - else { - message.timestamp = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } - else { - message.height = 0; - } - if (object.settlementId !== undefined && object.settlementId !== null) { - message.settlementId = Number(object.settlementId); - } - else { - message.settlementId = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.account !== undefined && (obj.account = message.account); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.quantity !== undefined && (obj.quantity = message.quantity); - message.executionCostOrProceed !== undefined && - (obj.executionCostOrProceed = message.executionCostOrProceed); - message.expectedCostOrProceed !== undefined && - (obj.expectedCostOrProceed = message.expectedCostOrProceed); - message.positionDirection !== undefined && - (obj.positionDirection = message.positionDirection); - message.orderType !== undefined && (obj.orderType = message.orderType); - message.orderId !== undefined && (obj.orderId = message.orderId); - message.timestamp !== undefined && (obj.timestamp = message.timestamp); - message.height !== undefined && (obj.height = message.height); - message.settlementId !== undefined && - (obj.settlementId = message.settlementId); - return obj; - }, - fromPartial(object) { - const message = { ...baseSettlementEntry }; - if (object.account !== undefined && object.account !== null) { - message.account = object.account; - } - else { - message.account = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } - else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } - else { - message.assetDenom = ""; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = object.quantity; - } - else { - message.quantity = ""; - } - if (object.executionCostOrProceed !== undefined && - object.executionCostOrProceed !== null) { - message.executionCostOrProceed = object.executionCostOrProceed; - } - else { - message.executionCostOrProceed = ""; - } - if (object.expectedCostOrProceed !== undefined && - object.expectedCostOrProceed !== null) { - message.expectedCostOrProceed = object.expectedCostOrProceed; - } - else { - message.expectedCostOrProceed = ""; - } - if (object.positionDirection !== undefined && - object.positionDirection !== null) { - message.positionDirection = object.positionDirection; - } - else { - message.positionDirection = ""; - } - if (object.orderType !== undefined && object.orderType !== null) { - message.orderType = object.orderType; - } - else { - message.orderType = ""; - } - if (object.orderId !== undefined && object.orderId !== null) { - message.orderId = object.orderId; - } - else { - message.orderId = 0; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } - else { - message.timestamp = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } - else { - message.height = 0; - } - if (object.settlementId !== undefined && object.settlementId !== null) { - message.settlementId = object.settlementId; - } - else { - message.settlementId = 0; - } - return message; - }, -}; -const baseSettlements = { epoch: 0 }; -export const Settlements = { - encode(message, writer = Writer.create()) { - if (message.epoch !== 0) { - writer.uint32(8).int64(message.epoch); - } - for (const v of message.entries) { - SettlementEntry.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSettlements }; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.epoch = longToNumber(reader.int64()); - break; - case 2: - message.entries.push(SettlementEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSettlements }; - message.entries = []; - if (object.epoch !== undefined && object.epoch !== null) { - message.epoch = Number(object.epoch); - } - else { - message.epoch = 0; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(SettlementEntry.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.epoch !== undefined && (obj.epoch = message.epoch); - if (message.entries) { - obj.entries = message.entries.map((e) => e ? SettlementEntry.toJSON(e) : undefined); - } - else { - obj.entries = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSettlements }; - message.entries = []; - if (object.epoch !== undefined && object.epoch !== null) { - message.epoch = object.epoch; - } - else { - message.epoch = 0; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(SettlementEntry.fromPartial(e)); - } - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/settlement.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/settlement.ts deleted file mode 100644 index 80db545da1..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/settlement.ts +++ /dev/null @@ -1,416 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -export interface SettlementEntry { - account: string; - priceDenom: string; - assetDenom: string; - quantity: string; - executionCostOrProceed: string; - expectedCostOrProceed: string; - positionDirection: string; - orderType: string; - orderId: number; - timestamp: number; - height: number; - settlementId: number; -} - -export interface Settlements { - epoch: number; - entries: SettlementEntry[]; -} - -const baseSettlementEntry: object = { - account: "", - priceDenom: "", - assetDenom: "", - quantity: "", - executionCostOrProceed: "", - expectedCostOrProceed: "", - positionDirection: "", - orderType: "", - orderId: 0, - timestamp: 0, - height: 0, - settlementId: 0, -}; - -export const SettlementEntry = { - encode(message: SettlementEntry, writer: Writer = Writer.create()): Writer { - if (message.account !== "") { - writer.uint32(10).string(message.account); - } - if (message.priceDenom !== "") { - writer.uint32(18).string(message.priceDenom); - } - if (message.assetDenom !== "") { - writer.uint32(26).string(message.assetDenom); - } - if (message.quantity !== "") { - writer.uint32(34).string(message.quantity); - } - if (message.executionCostOrProceed !== "") { - writer.uint32(42).string(message.executionCostOrProceed); - } - if (message.expectedCostOrProceed !== "") { - writer.uint32(50).string(message.expectedCostOrProceed); - } - if (message.positionDirection !== "") { - writer.uint32(58).string(message.positionDirection); - } - if (message.orderType !== "") { - writer.uint32(66).string(message.orderType); - } - if (message.orderId !== 0) { - writer.uint32(72).uint64(message.orderId); - } - if (message.timestamp !== 0) { - writer.uint32(80).uint64(message.timestamp); - } - if (message.height !== 0) { - writer.uint32(88).uint64(message.height); - } - if (message.settlementId !== 0) { - writer.uint32(96).uint64(message.settlementId); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SettlementEntry { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSettlementEntry } as SettlementEntry; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account = reader.string(); - break; - case 2: - message.priceDenom = reader.string(); - break; - case 3: - message.assetDenom = reader.string(); - break; - case 4: - message.quantity = reader.string(); - break; - case 5: - message.executionCostOrProceed = reader.string(); - break; - case 6: - message.expectedCostOrProceed = reader.string(); - break; - case 7: - message.positionDirection = reader.string(); - break; - case 8: - message.orderType = reader.string(); - break; - case 9: - message.orderId = longToNumber(reader.uint64() as Long); - break; - case 10: - message.timestamp = longToNumber(reader.uint64() as Long); - break; - case 11: - message.height = longToNumber(reader.uint64() as Long); - break; - case 12: - message.settlementId = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SettlementEntry { - const message = { ...baseSettlementEntry } as SettlementEntry; - if (object.account !== undefined && object.account !== null) { - message.account = String(object.account); - } else { - message.account = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = String(object.priceDenom); - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = String(object.assetDenom); - } else { - message.assetDenom = ""; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = String(object.quantity); - } else { - message.quantity = ""; - } - if ( - object.executionCostOrProceed !== undefined && - object.executionCostOrProceed !== null - ) { - message.executionCostOrProceed = String(object.executionCostOrProceed); - } else { - message.executionCostOrProceed = ""; - } - if ( - object.expectedCostOrProceed !== undefined && - object.expectedCostOrProceed !== null - ) { - message.expectedCostOrProceed = String(object.expectedCostOrProceed); - } else { - message.expectedCostOrProceed = ""; - } - if ( - object.positionDirection !== undefined && - object.positionDirection !== null - ) { - message.positionDirection = String(object.positionDirection); - } else { - message.positionDirection = ""; - } - if (object.orderType !== undefined && object.orderType !== null) { - message.orderType = String(object.orderType); - } else { - message.orderType = ""; - } - if (object.orderId !== undefined && object.orderId !== null) { - message.orderId = Number(object.orderId); - } else { - message.orderId = 0; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = Number(object.timestamp); - } else { - message.timestamp = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - if (object.settlementId !== undefined && object.settlementId !== null) { - message.settlementId = Number(object.settlementId); - } else { - message.settlementId = 0; - } - return message; - }, - - toJSON(message: SettlementEntry): unknown { - const obj: any = {}; - message.account !== undefined && (obj.account = message.account); - message.priceDenom !== undefined && (obj.priceDenom = message.priceDenom); - message.assetDenom !== undefined && (obj.assetDenom = message.assetDenom); - message.quantity !== undefined && (obj.quantity = message.quantity); - message.executionCostOrProceed !== undefined && - (obj.executionCostOrProceed = message.executionCostOrProceed); - message.expectedCostOrProceed !== undefined && - (obj.expectedCostOrProceed = message.expectedCostOrProceed); - message.positionDirection !== undefined && - (obj.positionDirection = message.positionDirection); - message.orderType !== undefined && (obj.orderType = message.orderType); - message.orderId !== undefined && (obj.orderId = message.orderId); - message.timestamp !== undefined && (obj.timestamp = message.timestamp); - message.height !== undefined && (obj.height = message.height); - message.settlementId !== undefined && - (obj.settlementId = message.settlementId); - return obj; - }, - - fromPartial(object: DeepPartial): SettlementEntry { - const message = { ...baseSettlementEntry } as SettlementEntry; - if (object.account !== undefined && object.account !== null) { - message.account = object.account; - } else { - message.account = ""; - } - if (object.priceDenom !== undefined && object.priceDenom !== null) { - message.priceDenom = object.priceDenom; - } else { - message.priceDenom = ""; - } - if (object.assetDenom !== undefined && object.assetDenom !== null) { - message.assetDenom = object.assetDenom; - } else { - message.assetDenom = ""; - } - if (object.quantity !== undefined && object.quantity !== null) { - message.quantity = object.quantity; - } else { - message.quantity = ""; - } - if ( - object.executionCostOrProceed !== undefined && - object.executionCostOrProceed !== null - ) { - message.executionCostOrProceed = object.executionCostOrProceed; - } else { - message.executionCostOrProceed = ""; - } - if ( - object.expectedCostOrProceed !== undefined && - object.expectedCostOrProceed !== null - ) { - message.expectedCostOrProceed = object.expectedCostOrProceed; - } else { - message.expectedCostOrProceed = ""; - } - if ( - object.positionDirection !== undefined && - object.positionDirection !== null - ) { - message.positionDirection = object.positionDirection; - } else { - message.positionDirection = ""; - } - if (object.orderType !== undefined && object.orderType !== null) { - message.orderType = object.orderType; - } else { - message.orderType = ""; - } - if (object.orderId !== undefined && object.orderId !== null) { - message.orderId = object.orderId; - } else { - message.orderId = 0; - } - if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; - } else { - message.timestamp = 0; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - if (object.settlementId !== undefined && object.settlementId !== null) { - message.settlementId = object.settlementId; - } else { - message.settlementId = 0; - } - return message; - }, -}; - -const baseSettlements: object = { epoch: 0 }; - -export const Settlements = { - encode(message: Settlements, writer: Writer = Writer.create()): Writer { - if (message.epoch !== 0) { - writer.uint32(8).int64(message.epoch); - } - for (const v of message.entries) { - SettlementEntry.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Settlements { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSettlements } as Settlements; - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.epoch = longToNumber(reader.int64() as Long); - break; - case 2: - message.entries.push(SettlementEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Settlements { - const message = { ...baseSettlements } as Settlements; - message.entries = []; - if (object.epoch !== undefined && object.epoch !== null) { - message.epoch = Number(object.epoch); - } else { - message.epoch = 0; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(SettlementEntry.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Settlements): unknown { - const obj: any = {}; - message.epoch !== undefined && (obj.epoch = message.epoch); - if (message.entries) { - obj.entries = message.entries.map((e) => - e ? SettlementEntry.toJSON(e) : undefined - ); - } else { - obj.entries = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Settlements { - const message = { ...baseSettlements } as Settlements; - message.entries = []; - if (object.epoch !== undefined && object.epoch !== null) { - message.epoch = object.epoch; - } else { - message.epoch = 0; - } - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(SettlementEntry.fromPartial(e)); - } - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/short_book.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/short_book.d.ts deleted file mode 100644 index 6826dc4e62..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/short_book.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { OrderEntry } from "../dex/order_entry"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -export interface ShortBook { - price: string; - entry: OrderEntry | undefined; -} -export declare const ShortBook: { - encode(message: ShortBook, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ShortBook; - fromJSON(object: any): ShortBook; - toJSON(message: ShortBook): unknown; - fromPartial(object: DeepPartial): ShortBook; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/short_book.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/short_book.js deleted file mode 100644 index 0efa72ebda..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/short_book.js +++ /dev/null @@ -1,77 +0,0 @@ -/* eslint-disable */ -import { OrderEntry } from "../dex/order_entry"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const baseShortBook = { price: "" }; -export const ShortBook = { - encode(message, writer = Writer.create()) { - if (message.price !== "") { - writer.uint32(10).string(message.price); - } - if (message.entry !== undefined) { - OrderEntry.encode(message.entry, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseShortBook }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.price = reader.string(); - break; - case 2: - message.entry = OrderEntry.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseShortBook }; - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } - else { - message.price = ""; - } - if (object.entry !== undefined && object.entry !== null) { - message.entry = OrderEntry.fromJSON(object.entry); - } - else { - message.entry = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.price !== undefined && (obj.price = message.price); - message.entry !== undefined && - (obj.entry = message.entry - ? OrderEntry.toJSON(message.entry) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseShortBook }; - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } - else { - message.price = ""; - } - if (object.entry !== undefined && object.entry !== null) { - message.entry = OrderEntry.fromPartial(object.entry); - } - else { - message.entry = undefined; - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/short_book.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/short_book.ts deleted file mode 100644 index 13b4d18f2d..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/short_book.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* eslint-disable */ -import { OrderEntry } from "../dex/order_entry"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -export interface ShortBook { - price: string; - entry: OrderEntry | undefined; -} - -const baseShortBook: object = { price: "" }; - -export const ShortBook = { - encode(message: ShortBook, writer: Writer = Writer.create()): Writer { - if (message.price !== "") { - writer.uint32(10).string(message.price); - } - if (message.entry !== undefined) { - OrderEntry.encode(message.entry, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ShortBook { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseShortBook } as ShortBook; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.price = reader.string(); - break; - case 2: - message.entry = OrderEntry.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ShortBook { - const message = { ...baseShortBook } as ShortBook; - if (object.price !== undefined && object.price !== null) { - message.price = String(object.price); - } else { - message.price = ""; - } - if (object.entry !== undefined && object.entry !== null) { - message.entry = OrderEntry.fromJSON(object.entry); - } else { - message.entry = undefined; - } - return message; - }, - - toJSON(message: ShortBook): unknown { - const obj: any = {}; - message.price !== undefined && (obj.price = message.price); - message.entry !== undefined && - (obj.entry = message.entry - ? OrderEntry.toJSON(message.entry) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): ShortBook { - const message = { ...baseShortBook } as ShortBook; - if (object.price !== undefined && object.price !== null) { - message.price = object.price; - } else { - message.price = ""; - } - if (object.entry !== undefined && object.entry !== null) { - message.entry = OrderEntry.fromPartial(object.entry); - } else { - message.entry = undefined; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tick_size.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tick_size.d.ts deleted file mode 100644 index adcd887d3f..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tick_size.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Pair } from "../dex/pair"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -export interface TickSize { - pair: Pair | undefined; - ticksize: string; - contractAddr: string; -} -export declare const TickSize: { - encode(message: TickSize, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): TickSize; - fromJSON(object: any): TickSize; - toJSON(message: TickSize): unknown; - fromPartial(object: DeepPartial): TickSize; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tick_size.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tick_size.js deleted file mode 100644 index fc987a56d5..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tick_size.js +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -import { Pair } from "../dex/pair"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const baseTickSize = { ticksize: "", contractAddr: "" }; -export const TickSize = { - encode(message, writer = Writer.create()) { - if (message.pair !== undefined) { - Pair.encode(message.pair, writer.uint32(10).fork()).ldelim(); - } - if (message.ticksize !== "") { - writer.uint32(18).string(message.ticksize); - } - if (message.contractAddr !== "") { - writer.uint32(26).string(message.contractAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTickSize }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pair = Pair.decode(reader, reader.uint32()); - break; - case 2: - message.ticksize = reader.string(); - break; - case 3: - message.contractAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTickSize }; - if (object.pair !== undefined && object.pair !== null) { - message.pair = Pair.fromJSON(object.pair); - } - else { - message.pair = undefined; - } - if (object.ticksize !== undefined && object.ticksize !== null) { - message.ticksize = String(object.ticksize); - } - else { - message.ticksize = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pair !== undefined && - (obj.pair = message.pair ? Pair.toJSON(message.pair) : undefined); - message.ticksize !== undefined && (obj.ticksize = message.ticksize); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - return obj; - }, - fromPartial(object) { - const message = { ...baseTickSize }; - if (object.pair !== undefined && object.pair !== null) { - message.pair = Pair.fromPartial(object.pair); - } - else { - message.pair = undefined; - } - if (object.ticksize !== undefined && object.ticksize !== null) { - message.ticksize = object.ticksize; - } - else { - message.ticksize = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tick_size.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tick_size.ts deleted file mode 100644 index 1570e14f7c..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tick_size.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* eslint-disable */ -import { Pair } from "../dex/pair"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -export interface TickSize { - pair: Pair | undefined; - ticksize: string; - contractAddr: string; -} - -const baseTickSize: object = { ticksize: "", contractAddr: "" }; - -export const TickSize = { - encode(message: TickSize, writer: Writer = Writer.create()): Writer { - if (message.pair !== undefined) { - Pair.encode(message.pair, writer.uint32(10).fork()).ldelim(); - } - if (message.ticksize !== "") { - writer.uint32(18).string(message.ticksize); - } - if (message.contractAddr !== "") { - writer.uint32(26).string(message.contractAddr); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): TickSize { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTickSize } as TickSize; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pair = Pair.decode(reader, reader.uint32()); - break; - case 2: - message.ticksize = reader.string(); - break; - case 3: - message.contractAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TickSize { - const message = { ...baseTickSize } as TickSize; - if (object.pair !== undefined && object.pair !== null) { - message.pair = Pair.fromJSON(object.pair); - } else { - message.pair = undefined; - } - if (object.ticksize !== undefined && object.ticksize !== null) { - message.ticksize = String(object.ticksize); - } else { - message.ticksize = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - return message; - }, - - toJSON(message: TickSize): unknown { - const obj: any = {}; - message.pair !== undefined && - (obj.pair = message.pair ? Pair.toJSON(message.pair) : undefined); - message.ticksize !== undefined && (obj.ticksize = message.ticksize); - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - return obj; - }, - - fromPartial(object: DeepPartial): TickSize { - const message = { ...baseTickSize } as TickSize; - if (object.pair !== undefined && object.pair !== null) { - message.pair = Pair.fromPartial(object.pair); - } else { - message.pair = undefined; - } - if (object.ticksize !== undefined && object.ticksize !== null) { - message.ticksize = object.ticksize; - } else { - message.ticksize = ""; - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/twap.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/twap.d.ts deleted file mode 100644 index 5e3efa5236..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/twap.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -import { Pair } from "../dex/pair"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -export interface Twap { - pair: Pair | undefined; - twap: string; - lookbackSeconds: number; -} -export declare const Twap: { - encode(message: Twap, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Twap; - fromJSON(object: any): Twap; - toJSON(message: Twap): unknown; - fromPartial(object: DeepPartial): Twap; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/twap.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/twap.js deleted file mode 100644 index c4480917de..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/twap.js +++ /dev/null @@ -1,119 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Pair } from "../dex/pair"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const baseTwap = { twap: "", lookbackSeconds: 0 }; -export const Twap = { - encode(message, writer = Writer.create()) { - if (message.pair !== undefined) { - Pair.encode(message.pair, writer.uint32(10).fork()).ldelim(); - } - if (message.twap !== "") { - writer.uint32(18).string(message.twap); - } - if (message.lookbackSeconds !== 0) { - writer.uint32(24).uint64(message.lookbackSeconds); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTwap }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pair = Pair.decode(reader, reader.uint32()); - break; - case 2: - message.twap = reader.string(); - break; - case 3: - message.lookbackSeconds = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseTwap }; - if (object.pair !== undefined && object.pair !== null) { - message.pair = Pair.fromJSON(object.pair); - } - else { - message.pair = undefined; - } - if (object.twap !== undefined && object.twap !== null) { - message.twap = String(object.twap); - } - else { - message.twap = ""; - } - if (object.lookbackSeconds !== undefined && - object.lookbackSeconds !== null) { - message.lookbackSeconds = Number(object.lookbackSeconds); - } - else { - message.lookbackSeconds = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pair !== undefined && - (obj.pair = message.pair ? Pair.toJSON(message.pair) : undefined); - message.twap !== undefined && (obj.twap = message.twap); - message.lookbackSeconds !== undefined && - (obj.lookbackSeconds = message.lookbackSeconds); - return obj; - }, - fromPartial(object) { - const message = { ...baseTwap }; - if (object.pair !== undefined && object.pair !== null) { - message.pair = Pair.fromPartial(object.pair); - } - else { - message.pair = undefined; - } - if (object.twap !== undefined && object.twap !== null) { - message.twap = object.twap; - } - else { - message.twap = ""; - } - if (object.lookbackSeconds !== undefined && - object.lookbackSeconds !== null) { - message.lookbackSeconds = object.lookbackSeconds; - } - else { - message.lookbackSeconds = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/twap.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/twap.ts deleted file mode 100644 index cb6971c48e..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/twap.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Pair } from "../dex/pair"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -export interface Twap { - pair: Pair | undefined; - twap: string; - lookbackSeconds: number; -} - -const baseTwap: object = { twap: "", lookbackSeconds: 0 }; - -export const Twap = { - encode(message: Twap, writer: Writer = Writer.create()): Writer { - if (message.pair !== undefined) { - Pair.encode(message.pair, writer.uint32(10).fork()).ldelim(); - } - if (message.twap !== "") { - writer.uint32(18).string(message.twap); - } - if (message.lookbackSeconds !== 0) { - writer.uint32(24).uint64(message.lookbackSeconds); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Twap { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTwap } as Twap; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pair = Pair.decode(reader, reader.uint32()); - break; - case 2: - message.twap = reader.string(); - break; - case 3: - message.lookbackSeconds = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Twap { - const message = { ...baseTwap } as Twap; - if (object.pair !== undefined && object.pair !== null) { - message.pair = Pair.fromJSON(object.pair); - } else { - message.pair = undefined; - } - if (object.twap !== undefined && object.twap !== null) { - message.twap = String(object.twap); - } else { - message.twap = ""; - } - if ( - object.lookbackSeconds !== undefined && - object.lookbackSeconds !== null - ) { - message.lookbackSeconds = Number(object.lookbackSeconds); - } else { - message.lookbackSeconds = 0; - } - return message; - }, - - toJSON(message: Twap): unknown { - const obj: any = {}; - message.pair !== undefined && - (obj.pair = message.pair ? Pair.toJSON(message.pair) : undefined); - message.twap !== undefined && (obj.twap = message.twap); - message.lookbackSeconds !== undefined && - (obj.lookbackSeconds = message.lookbackSeconds); - return obj; - }, - - fromPartial(object: DeepPartial): Twap { - const message = { ...baseTwap } as Twap; - if (object.pair !== undefined && object.pair !== null) { - message.pair = Pair.fromPartial(object.pair); - } else { - message.pair = undefined; - } - if (object.twap !== undefined && object.twap !== null) { - message.twap = object.twap; - } else { - message.twap = ""; - } - if ( - object.lookbackSeconds !== undefined && - object.lookbackSeconds !== null - ) { - message.lookbackSeconds = object.lookbackSeconds; - } else { - message.lookbackSeconds = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tx.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tx.d.ts deleted file mode 100644 index 0b463d036d..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tx.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Order, Cancellation } from "../dex/order"; -import { Coin } from "../cosmos/base/v1beta1/coin"; -import { ContractInfo } from "../dex/contract"; -export declare const protobufPackage = "seiprotocol.seichain.dex"; -export interface MsgPlaceOrders { - creator: string; - orders: Order[]; - contractAddr: string; - funds: Coin[]; -} -export interface MsgPlaceOrdersResponse { - orderIds: number[]; -} -export interface MsgCancelOrders { - creator: string; - cancellations: Cancellation[]; - contractAddr: string; -} -export interface MsgCancelOrdersResponse { -} -export interface MsgRegisterContract { - creator: string; - contract: ContractInfo | undefined; -} -export interface MsgRegisterContractResponse { -} -export declare const MsgPlaceOrders: { - encode(message: MsgPlaceOrders, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgPlaceOrders; - fromJSON(object: any): MsgPlaceOrders; - toJSON(message: MsgPlaceOrders): unknown; - fromPartial(object: DeepPartial): MsgPlaceOrders; -}; -export declare const MsgPlaceOrdersResponse: { - encode(message: MsgPlaceOrdersResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgPlaceOrdersResponse; - fromJSON(object: any): MsgPlaceOrdersResponse; - toJSON(message: MsgPlaceOrdersResponse): unknown; - fromPartial(object: DeepPartial): MsgPlaceOrdersResponse; -}; -export declare const MsgCancelOrders: { - encode(message: MsgCancelOrders, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgCancelOrders; - fromJSON(object: any): MsgCancelOrders; - toJSON(message: MsgCancelOrders): unknown; - fromPartial(object: DeepPartial): MsgCancelOrders; -}; -export declare const MsgCancelOrdersResponse: { - encode(_: MsgCancelOrdersResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgCancelOrdersResponse; - fromJSON(_: any): MsgCancelOrdersResponse; - toJSON(_: MsgCancelOrdersResponse): unknown; - fromPartial(_: DeepPartial): MsgCancelOrdersResponse; -}; -export declare const MsgRegisterContract: { - encode(message: MsgRegisterContract, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgRegisterContract; - fromJSON(object: any): MsgRegisterContract; - toJSON(message: MsgRegisterContract): unknown; - fromPartial(object: DeepPartial): MsgRegisterContract; -}; -export declare const MsgRegisterContractResponse: { - encode(_: MsgRegisterContractResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgRegisterContractResponse; - fromJSON(_: any): MsgRegisterContractResponse; - toJSON(_: MsgRegisterContractResponse): unknown; - fromPartial(_: DeepPartial): MsgRegisterContractResponse; -}; -/** Msg defines the Msg service. */ -export interface Msg { - PlaceOrders(request: MsgPlaceOrders): Promise; - CancelOrders(request: MsgCancelOrders): Promise; - /** privileged endpoints below */ - RegisterContract(request: MsgRegisterContract): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - PlaceOrders(request: MsgPlaceOrders): Promise; - CancelOrders(request: MsgCancelOrders): Promise; - RegisterContract(request: MsgRegisterContract): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tx.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tx.js deleted file mode 100644 index 191eb9ddf4..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tx.js +++ /dev/null @@ -1,481 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Order, Cancellation } from "../dex/order"; -import { Coin } from "../cosmos/base/v1beta1/coin"; -import { ContractInfo } from "../dex/contract"; -export const protobufPackage = "seiprotocol.seichain.dex"; -const baseMsgPlaceOrders = { creator: "", contractAddr: "" }; -export const MsgPlaceOrders = { - encode(message, writer = Writer.create()) { - if (message.creator !== "") { - writer.uint32(10).string(message.creator); - } - for (const v of message.orders) { - Order.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.contractAddr !== "") { - writer.uint32(26).string(message.contractAddr); - } - for (const v of message.funds) { - Coin.encode(v, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgPlaceOrders }; - message.orders = []; - message.funds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.orders.push(Order.decode(reader, reader.uint32())); - break; - case 3: - message.contractAddr = reader.string(); - break; - case 4: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgPlaceOrders }; - message.orders = []; - message.funds = []; - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } - else { - message.creator = ""; - } - if (object.orders !== undefined && object.orders !== null) { - for (const e of object.orders) { - message.orders.push(Order.fromJSON(e)); - } - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.creator !== undefined && (obj.creator = message.creator); - if (message.orders) { - obj.orders = message.orders.map((e) => (e ? Order.toJSON(e) : undefined)); - } - else { - obj.orders = []; - } - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - if (message.funds) { - obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined)); - } - else { - obj.funds = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgPlaceOrders }; - message.orders = []; - message.funds = []; - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } - else { - message.creator = ""; - } - if (object.orders !== undefined && object.orders !== null) { - for (const e of object.orders) { - message.orders.push(Order.fromPartial(e)); - } - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseMsgPlaceOrdersResponse = { orderIds: 0 }; -export const MsgPlaceOrdersResponse = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.orderIds) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgPlaceOrdersResponse }; - message.orderIds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.orderIds.push(longToNumber(reader.uint64())); - } - } - else { - message.orderIds.push(longToNumber(reader.uint64())); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgPlaceOrdersResponse }; - message.orderIds = []; - if (object.orderIds !== undefined && object.orderIds !== null) { - for (const e of object.orderIds) { - message.orderIds.push(Number(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.orderIds) { - obj.orderIds = message.orderIds.map((e) => e); - } - else { - obj.orderIds = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgPlaceOrdersResponse }; - message.orderIds = []; - if (object.orderIds !== undefined && object.orderIds !== null) { - for (const e of object.orderIds) { - message.orderIds.push(e); - } - } - return message; - }, -}; -const baseMsgCancelOrders = { creator: "", contractAddr: "" }; -export const MsgCancelOrders = { - encode(message, writer = Writer.create()) { - if (message.creator !== "") { - writer.uint32(10).string(message.creator); - } - for (const v of message.cancellations) { - Cancellation.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.contractAddr !== "") { - writer.uint32(26).string(message.contractAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgCancelOrders }; - message.cancellations = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.cancellations.push(Cancellation.decode(reader, reader.uint32())); - break; - case 3: - message.contractAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgCancelOrders }; - message.cancellations = []; - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } - else { - message.creator = ""; - } - if (object.cancellations !== undefined && object.cancellations !== null) { - for (const e of object.cancellations) { - message.cancellations.push(Cancellation.fromJSON(e)); - } - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } - else { - message.contractAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.creator !== undefined && (obj.creator = message.creator); - if (message.cancellations) { - obj.cancellations = message.cancellations.map((e) => e ? Cancellation.toJSON(e) : undefined); - } - else { - obj.cancellations = []; - } - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgCancelOrders }; - message.cancellations = []; - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } - else { - message.creator = ""; - } - if (object.cancellations !== undefined && object.cancellations !== null) { - for (const e of object.cancellations) { - message.cancellations.push(Cancellation.fromPartial(e)); - } - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } - else { - message.contractAddr = ""; - } - return message; - }, -}; -const baseMsgCancelOrdersResponse = {}; -export const MsgCancelOrdersResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCancelOrdersResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgCancelOrdersResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgCancelOrdersResponse, - }; - return message; - }, -}; -const baseMsgRegisterContract = { creator: "" }; -export const MsgRegisterContract = { - encode(message, writer = Writer.create()) { - if (message.creator !== "") { - writer.uint32(10).string(message.creator); - } - if (message.contract !== undefined) { - ContractInfo.encode(message.contract, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgRegisterContract }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.contract = ContractInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgRegisterContract }; - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } - else { - message.creator = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = ContractInfo.fromJSON(object.contract); - } - else { - message.contract = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.creator !== undefined && (obj.creator = message.creator); - message.contract !== undefined && - (obj.contract = message.contract - ? ContractInfo.toJSON(message.contract) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgRegisterContract }; - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } - else { - message.creator = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = ContractInfo.fromPartial(object.contract); - } - else { - message.contract = undefined; - } - return message; - }, -}; -const baseMsgRegisterContractResponse = {}; -export const MsgRegisterContractResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgRegisterContractResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgRegisterContractResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgRegisterContractResponse, - }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - PlaceOrders(request) { - const data = MsgPlaceOrders.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Msg", "PlaceOrders", data); - return promise.then((data) => MsgPlaceOrdersResponse.decode(new Reader(data))); - } - CancelOrders(request) { - const data = MsgCancelOrders.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Msg", "CancelOrders", data); - return promise.then((data) => MsgCancelOrdersResponse.decode(new Reader(data))); - } - RegisterContract(request) { - const data = MsgRegisterContract.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.dex.Msg", "RegisterContract", data); - return promise.then((data) => MsgRegisterContractResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tx.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tx.ts deleted file mode 100644 index e4a54705c3..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/dex/tx.ts +++ /dev/null @@ -1,603 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { Order, Cancellation } from "../dex/order"; -import { Coin } from "../cosmos/base/v1beta1/coin"; -import { ContractInfo } from "../dex/contract"; - -export const protobufPackage = "seiprotocol.seichain.dex"; - -export interface MsgPlaceOrders { - creator: string; - orders: Order[]; - contractAddr: string; - funds: Coin[]; -} - -export interface MsgPlaceOrdersResponse { - orderIds: number[]; -} - -export interface MsgCancelOrders { - creator: string; - cancellations: Cancellation[]; - contractAddr: string; -} - -export interface MsgCancelOrdersResponse {} - -export interface MsgRegisterContract { - creator: string; - contract: ContractInfo | undefined; -} - -export interface MsgRegisterContractResponse {} - -const baseMsgPlaceOrders: object = { creator: "", contractAddr: "" }; - -export const MsgPlaceOrders = { - encode(message: MsgPlaceOrders, writer: Writer = Writer.create()): Writer { - if (message.creator !== "") { - writer.uint32(10).string(message.creator); - } - for (const v of message.orders) { - Order.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.contractAddr !== "") { - writer.uint32(26).string(message.contractAddr); - } - for (const v of message.funds) { - Coin.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgPlaceOrders { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgPlaceOrders } as MsgPlaceOrders; - message.orders = []; - message.funds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.orders.push(Order.decode(reader, reader.uint32())); - break; - case 3: - message.contractAddr = reader.string(); - break; - case 4: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgPlaceOrders { - const message = { ...baseMsgPlaceOrders } as MsgPlaceOrders; - message.orders = []; - message.funds = []; - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } else { - message.creator = ""; - } - if (object.orders !== undefined && object.orders !== null) { - for (const e of object.orders) { - message.orders.push(Order.fromJSON(e)); - } - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MsgPlaceOrders): unknown { - const obj: any = {}; - message.creator !== undefined && (obj.creator = message.creator); - if (message.orders) { - obj.orders = message.orders.map((e) => (e ? Order.toJSON(e) : undefined)); - } else { - obj.orders = []; - } - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - if (message.funds) { - obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.funds = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MsgPlaceOrders { - const message = { ...baseMsgPlaceOrders } as MsgPlaceOrders; - message.orders = []; - message.funds = []; - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } else { - message.creator = ""; - } - if (object.orders !== undefined && object.orders !== null) { - for (const e of object.orders) { - message.orders.push(Order.fromPartial(e)); - } - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMsgPlaceOrdersResponse: object = { orderIds: 0 }; - -export const MsgPlaceOrdersResponse = { - encode( - message: MsgPlaceOrdersResponse, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.orderIds) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgPlaceOrdersResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgPlaceOrdersResponse } as MsgPlaceOrdersResponse; - message.orderIds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.orderIds.push(longToNumber(reader.uint64() as Long)); - } - } else { - message.orderIds.push(longToNumber(reader.uint64() as Long)); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgPlaceOrdersResponse { - const message = { ...baseMsgPlaceOrdersResponse } as MsgPlaceOrdersResponse; - message.orderIds = []; - if (object.orderIds !== undefined && object.orderIds !== null) { - for (const e of object.orderIds) { - message.orderIds.push(Number(e)); - } - } - return message; - }, - - toJSON(message: MsgPlaceOrdersResponse): unknown { - const obj: any = {}; - if (message.orderIds) { - obj.orderIds = message.orderIds.map((e) => e); - } else { - obj.orderIds = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgPlaceOrdersResponse { - const message = { ...baseMsgPlaceOrdersResponse } as MsgPlaceOrdersResponse; - message.orderIds = []; - if (object.orderIds !== undefined && object.orderIds !== null) { - for (const e of object.orderIds) { - message.orderIds.push(e); - } - } - return message; - }, -}; - -const baseMsgCancelOrders: object = { creator: "", contractAddr: "" }; - -export const MsgCancelOrders = { - encode(message: MsgCancelOrders, writer: Writer = Writer.create()): Writer { - if (message.creator !== "") { - writer.uint32(10).string(message.creator); - } - for (const v of message.cancellations) { - Cancellation.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.contractAddr !== "") { - writer.uint32(26).string(message.contractAddr); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgCancelOrders { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgCancelOrders } as MsgCancelOrders; - message.cancellations = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.cancellations.push( - Cancellation.decode(reader, reader.uint32()) - ); - break; - case 3: - message.contractAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgCancelOrders { - const message = { ...baseMsgCancelOrders } as MsgCancelOrders; - message.cancellations = []; - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } else { - message.creator = ""; - } - if (object.cancellations !== undefined && object.cancellations !== null) { - for (const e of object.cancellations) { - message.cancellations.push(Cancellation.fromJSON(e)); - } - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = String(object.contractAddr); - } else { - message.contractAddr = ""; - } - return message; - }, - - toJSON(message: MsgCancelOrders): unknown { - const obj: any = {}; - message.creator !== undefined && (obj.creator = message.creator); - if (message.cancellations) { - obj.cancellations = message.cancellations.map((e) => - e ? Cancellation.toJSON(e) : undefined - ); - } else { - obj.cancellations = []; - } - message.contractAddr !== undefined && - (obj.contractAddr = message.contractAddr); - return obj; - }, - - fromPartial(object: DeepPartial): MsgCancelOrders { - const message = { ...baseMsgCancelOrders } as MsgCancelOrders; - message.cancellations = []; - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } else { - message.creator = ""; - } - if (object.cancellations !== undefined && object.cancellations !== null) { - for (const e of object.cancellations) { - message.cancellations.push(Cancellation.fromPartial(e)); - } - } - if (object.contractAddr !== undefined && object.contractAddr !== null) { - message.contractAddr = object.contractAddr; - } else { - message.contractAddr = ""; - } - return message; - }, -}; - -const baseMsgCancelOrdersResponse: object = {}; - -export const MsgCancelOrdersResponse = { - encode(_: MsgCancelOrdersResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgCancelOrdersResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCancelOrdersResponse, - } as MsgCancelOrdersResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgCancelOrdersResponse { - const message = { - ...baseMsgCancelOrdersResponse, - } as MsgCancelOrdersResponse; - return message; - }, - - toJSON(_: MsgCancelOrdersResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgCancelOrdersResponse { - const message = { - ...baseMsgCancelOrdersResponse, - } as MsgCancelOrdersResponse; - return message; - }, -}; - -const baseMsgRegisterContract: object = { creator: "" }; - -export const MsgRegisterContract = { - encode( - message: MsgRegisterContract, - writer: Writer = Writer.create() - ): Writer { - if (message.creator !== "") { - writer.uint32(10).string(message.creator); - } - if (message.contract !== undefined) { - ContractInfo.encode(message.contract, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgRegisterContract { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgRegisterContract } as MsgRegisterContract; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.contract = ContractInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgRegisterContract { - const message = { ...baseMsgRegisterContract } as MsgRegisterContract; - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } else { - message.creator = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = ContractInfo.fromJSON(object.contract); - } else { - message.contract = undefined; - } - return message; - }, - - toJSON(message: MsgRegisterContract): unknown { - const obj: any = {}; - message.creator !== undefined && (obj.creator = message.creator); - message.contract !== undefined && - (obj.contract = message.contract - ? ContractInfo.toJSON(message.contract) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgRegisterContract { - const message = { ...baseMsgRegisterContract } as MsgRegisterContract; - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } else { - message.creator = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = ContractInfo.fromPartial(object.contract); - } else { - message.contract = undefined; - } - return message; - }, -}; - -const baseMsgRegisterContractResponse: object = {}; - -export const MsgRegisterContractResponse = { - encode( - _: MsgRegisterContractResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgRegisterContractResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgRegisterContractResponse, - } as MsgRegisterContractResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgRegisterContractResponse { - const message = { - ...baseMsgRegisterContractResponse, - } as MsgRegisterContractResponse; - return message; - }, - - toJSON(_: MsgRegisterContractResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgRegisterContractResponse { - const message = { - ...baseMsgRegisterContractResponse, - } as MsgRegisterContractResponse; - return message; - }, -}; - -/** Msg defines the Msg service. */ -export interface Msg { - PlaceOrders(request: MsgPlaceOrders): Promise; - CancelOrders(request: MsgCancelOrders): Promise; - /** privileged endpoints below */ - RegisterContract( - request: MsgRegisterContract - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - PlaceOrders(request: MsgPlaceOrders): Promise { - const data = MsgPlaceOrders.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Msg", - "PlaceOrders", - data - ); - return promise.then((data) => - MsgPlaceOrdersResponse.decode(new Reader(data)) - ); - } - - CancelOrders(request: MsgCancelOrders): Promise { - const data = MsgCancelOrders.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Msg", - "CancelOrders", - data - ); - return promise.then((data) => - MsgCancelOrdersResponse.decode(new Reader(data)) - ); - } - - RegisterContract( - request: MsgRegisterContract - ): Promise { - const data = MsgRegisterContract.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.dex.Msg", - "RegisterContract", - data - ); - return promise.then((data) => - MsgRegisterContractResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30bdc6..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/gogoproto/gogo.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/gogoproto/gogo.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/annotations.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0776..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/annotations.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/annotations.js deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/annotations.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/http.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7fb6d..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/http.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/http.js deleted file mode 100644 index eb14b5b699..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/http.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index a3076569af..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,1022 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 252725808b..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4144 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } - else { - message.proto3Optional = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } - else { - message.proto3Optional = false; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/package.json b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/package.json deleted file mode 100755 index de88b022e9..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "seiprotocol-seichain-dex-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module seiprotocol.seichain.dex", - "author": "Starport Codegen ", - "homepage": "http://github.com/sei-protocol/sei-chain/x/dex/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/vuex-root b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.dex/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/index.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/index.ts deleted file mode 100755 index 7f3353071d..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/index.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { Epoch } from "./module/types/epoch/epoch" -import { Params } from "./module/types/epoch/params" - - -export { Epoch, Params }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Epoch: {}, - Params: {}, - - _Structure: { - Epoch: getStructure(Epoch.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getEpoch: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Epoch[JSON.stringify(params)] ?? {} - }, - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: seiprotocol.seichain.epoch initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryEpoch({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryEpoch()).data - - - commit('QUERY', { query: 'Epoch', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryEpoch', payload: { options: { all }, params: {...key},query }}) - return getters['getEpoch']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryEpoch API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams()).data - - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - } -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/index.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/index.ts deleted file mode 100755 index 67d4b093f0..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; - - -const types = [ - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/rest.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/rest.ts deleted file mode 100644 index f3f5234120..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/rest.ts +++ /dev/null @@ -1,282 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface EpochEpoch { - /** @format date-time */ - genesis_time?: string; - epoch_duration?: string; - - /** @format uint64 */ - current_epoch?: string; - - /** @format date-time */ - current_epoch_start_time?: string; - - /** @format int64 */ - current_epoch_height?: string; -} - -/** - * Params defines the parameters for the module. - */ -export type EpochParams = object; - -export interface EpochQueryEpochResponse { - epoch?: EpochEpoch; -} - -/** - * QueryParamsResponse is response type for the Query/Params RPC method. - */ -export interface EpochQueryParamsResponse { - /** params holds all the parameters of this module. */ - params?: EpochParams; -} - -export interface ProtobufAny { - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title epoch/epoch.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryEpoch - * @summary Query the epoch in the chain - * @request GET:/sei-protocol/seichain/epoch/epoch - */ - queryEpoch = (params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/seichain/epoch/epoch`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Parameters queries the parameters of the module. - * @request GET:/sei-protocol/seichain/epoch/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/seichain/epoch/params`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 0bc568f477..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,300 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - count_total: boolean; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, count_total: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.count_total !== undefined && - (obj.count_total = message.count_total); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/epoch.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/epoch.ts deleted file mode 100644 index ca68078a13..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/epoch.ts +++ /dev/null @@ -1,233 +0,0 @@ -/* eslint-disable */ -import { Timestamp } from "../google/protobuf/timestamp"; -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Duration } from "../google/protobuf/duration"; - -export const protobufPackage = "seiprotocol.seichain.epoch"; - -export interface Epoch { - genesis_time: Date | undefined; - epoch_duration: Duration | undefined; - current_epoch: number; - current_epoch_start_time: Date | undefined; - current_epoch_height: number; -} - -const baseEpoch: object = { current_epoch: 0, current_epoch_height: 0 }; - -export const Epoch = { - encode(message: Epoch, writer: Writer = Writer.create()): Writer { - if (message.genesis_time !== undefined) { - Timestamp.encode( - toTimestamp(message.genesis_time), - writer.uint32(10).fork() - ).ldelim(); - } - if (message.epoch_duration !== undefined) { - Duration.encode( - message.epoch_duration, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.current_epoch !== 0) { - writer.uint32(24).uint64(message.current_epoch); - } - if (message.current_epoch_start_time !== undefined) { - Timestamp.encode( - toTimestamp(message.current_epoch_start_time), - writer.uint32(34).fork() - ).ldelim(); - } - if (message.current_epoch_height !== 0) { - writer.uint32(40).int64(message.current_epoch_height); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Epoch { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEpoch } as Epoch; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.genesis_time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 2: - message.epoch_duration = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.current_epoch = longToNumber(reader.uint64() as Long); - break; - case 4: - message.current_epoch_start_time = fromTimestamp( - Timestamp.decode(reader, reader.uint32()) - ); - break; - case 5: - message.current_epoch_height = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Epoch { - const message = { ...baseEpoch } as Epoch; - if (object.genesis_time !== undefined && object.genesis_time !== null) { - message.genesis_time = fromJsonTimestamp(object.genesis_time); - } else { - message.genesis_time = undefined; - } - if (object.epoch_duration !== undefined && object.epoch_duration !== null) { - message.epoch_duration = Duration.fromJSON(object.epoch_duration); - } else { - message.epoch_duration = undefined; - } - if (object.current_epoch !== undefined && object.current_epoch !== null) { - message.current_epoch = Number(object.current_epoch); - } else { - message.current_epoch = 0; - } - if ( - object.current_epoch_start_time !== undefined && - object.current_epoch_start_time !== null - ) { - message.current_epoch_start_time = fromJsonTimestamp( - object.current_epoch_start_time - ); - } else { - message.current_epoch_start_time = undefined; - } - if ( - object.current_epoch_height !== undefined && - object.current_epoch_height !== null - ) { - message.current_epoch_height = Number(object.current_epoch_height); - } else { - message.current_epoch_height = 0; - } - return message; - }, - - toJSON(message: Epoch): unknown { - const obj: any = {}; - message.genesis_time !== undefined && - (obj.genesis_time = - message.genesis_time !== undefined - ? message.genesis_time.toISOString() - : null); - message.epoch_duration !== undefined && - (obj.epoch_duration = message.epoch_duration - ? Duration.toJSON(message.epoch_duration) - : undefined); - message.current_epoch !== undefined && - (obj.current_epoch = message.current_epoch); - message.current_epoch_start_time !== undefined && - (obj.current_epoch_start_time = - message.current_epoch_start_time !== undefined - ? message.current_epoch_start_time.toISOString() - : null); - message.current_epoch_height !== undefined && - (obj.current_epoch_height = message.current_epoch_height); - return obj; - }, - - fromPartial(object: DeepPartial): Epoch { - const message = { ...baseEpoch } as Epoch; - if (object.genesis_time !== undefined && object.genesis_time !== null) { - message.genesis_time = object.genesis_time; - } else { - message.genesis_time = undefined; - } - if (object.epoch_duration !== undefined && object.epoch_duration !== null) { - message.epoch_duration = Duration.fromPartial(object.epoch_duration); - } else { - message.epoch_duration = undefined; - } - if (object.current_epoch !== undefined && object.current_epoch !== null) { - message.current_epoch = object.current_epoch; - } else { - message.current_epoch = 0; - } - if ( - object.current_epoch_start_time !== undefined && - object.current_epoch_start_time !== null - ) { - message.current_epoch_start_time = object.current_epoch_start_time; - } else { - message.current_epoch_start_time = undefined; - } - if ( - object.current_epoch_height !== undefined && - object.current_epoch_height !== null - ) { - message.current_epoch_height = object.current_epoch_height; - } else { - message.current_epoch_height = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = date.getTime() / 1_000; - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = t.seconds * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { - return o; - } else if (typeof o === "string") { - return new Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/genesis.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/genesis.ts deleted file mode 100644 index 480150eea5..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/genesis.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* eslint-disable */ -import { Params } from "../epoch/params"; -import { Epoch } from "../epoch/epoch"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.epoch"; - -/** GenesisState defines the epoch module's genesis state. */ -export interface GenesisState { - params: Params | undefined; - /** this line is used by starport scaffolding # genesis/proto/state */ - epoch: Epoch | undefined; -} - -const baseGenesisState: object = {}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - if (message.epoch !== undefined) { - Epoch.encode(message.epoch, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.epoch = Epoch.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if (object.epoch !== undefined && object.epoch !== null) { - message.epoch = Epoch.fromJSON(object.epoch); - } else { - message.epoch = undefined; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.epoch !== undefined && - (obj.epoch = message.epoch ? Epoch.toJSON(message.epoch) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if (object.epoch !== undefined && object.epoch !== null) { - message.epoch = Epoch.fromPartial(object.epoch); - } else { - message.epoch = undefined; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/params.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/params.ts deleted file mode 100644 index 4765e3f5de..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/params.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.epoch"; - -/** Params defines the parameters for the module. */ -export interface Params {} - -const baseParams: object = {}; - -export const Params = { - encode(_: Params, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): Params { - const message = { ...baseParams } as Params; - return message; - }, - - toJSON(_: Params): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): Params { - const message = { ...baseParams } as Params; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/query.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/query.ts deleted file mode 100644 index 9bc5d2e538..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/query.ts +++ /dev/null @@ -1,268 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Params } from "../epoch/params"; -import { Epoch } from "../epoch/epoch"; - -export const protobufPackage = "seiprotocol.seichain.epoch"; - -/** QueryParamsRequest is request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params holds all the parameters of this module. */ - params: Params | undefined; -} - -export interface QueryEpochRequest {} - -export interface QueryEpochResponse { - epoch: Epoch | undefined; -} - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -const baseQueryEpochRequest: object = {}; - -export const QueryEpochRequest = { - encode(_: QueryEpochRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryEpochRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryEpochRequest } as QueryEpochRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryEpochRequest { - const message = { ...baseQueryEpochRequest } as QueryEpochRequest; - return message; - }, - - toJSON(_: QueryEpochRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryEpochRequest { - const message = { ...baseQueryEpochRequest } as QueryEpochRequest; - return message; - }, -}; - -const baseQueryEpochResponse: object = {}; - -export const QueryEpochResponse = { - encode( - message: QueryEpochResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.epoch !== undefined) { - Epoch.encode(message.epoch, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryEpochResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryEpochResponse } as QueryEpochResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.epoch = Epoch.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryEpochResponse { - const message = { ...baseQueryEpochResponse } as QueryEpochResponse; - if (object.epoch !== undefined && object.epoch !== null) { - message.epoch = Epoch.fromJSON(object.epoch); - } else { - message.epoch = undefined; - } - return message; - }, - - toJSON(message: QueryEpochResponse): unknown { - const obj: any = {}; - message.epoch !== undefined && - (obj.epoch = message.epoch ? Epoch.toJSON(message.epoch) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryEpochResponse { - const message = { ...baseQueryEpochResponse } as QueryEpochResponse; - if (object.epoch !== undefined && object.epoch !== null) { - message.epoch = Epoch.fromPartial(object.epoch); - } else { - message.epoch = undefined; - } - return message; - }, -}; - -/** Query defines the gRPC querier service. */ -export interface Query { - /** Query the epoch in the chain */ - Epoch(request: QueryEpochRequest): Promise; - /** Parameters queries the parameters of the module. */ - Params(request: QueryParamsRequest): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Epoch(request: QueryEpochRequest): Promise { - const data = QueryEpochRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.epoch.Query", - "Epoch", - data - ); - return promise.then((data) => QueryEpochResponse.decode(new Reader(data))); - } - - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.epoch.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/tx.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/tx.ts deleted file mode 100644 index 130b67d4c3..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/epoch/tx.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "seiprotocol.seichain.epoch"; - -/** Msg defines the Msg service. */ -export interface Msg {} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/gogoproto/gogo.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/api/annotations.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/api/http.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/protobuf/duration.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/protobuf/duration.ts deleted file mode 100644 index fffd5b14ef..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/protobuf/duration.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (duration.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: number; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} - -const baseDuration: object = { seconds: 0, nanos: 0 }; - -export const Duration = { - encode(message: Duration, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Duration { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDuration } as Duration; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Duration): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Duration { - const message = { ...baseDuration } as Duration; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/protobuf/timestamp.ts deleted file mode 100644 index 11864afc86..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/module/types/google/protobuf/timestamp.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} - -const baseTimestamp: object = { seconds: 0, nanos: 0 }; - -export const Timestamp = { - encode(message: Timestamp, writer: Writer = Writer.create()): Writer { - if (message.seconds !== 0) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseTimestamp } as Timestamp; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = longToNumber(reader.int64() as Long); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = Number(object.seconds); - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = Number(object.nanos); - } else { - message.nanos = 0; - } - return message; - }, - - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = message.nanos); - return obj; - }, - - fromPartial(object: DeepPartial): Timestamp { - const message = { ...baseTimestamp } as Timestamp; - if (object.seconds !== undefined && object.seconds !== null) { - message.seconds = object.seconds; - } else { - message.seconds = 0; - } - if (object.nanos !== undefined && object.nanos !== null) { - message.nanos = object.nanos; - } else { - message.nanos = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/package.json b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/package.json deleted file mode 100755 index 2f6cf77f07..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "seiprotocol-seichain-epoch-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module seiprotocol.seichain.epoch", - "author": "Starport Codegen ", - "homepage": "http://github.com/sei-protocol/sei-chain/x/epoch/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/vuex-root b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.epoch/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/index.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/index.ts deleted file mode 100755 index 5d7ff433b0..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/index.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { Minter } from "./module/types/mint/v1beta1/mint" -import { Params } from "./module/types/mint/v1beta1/mint" - - -export { Minter, Params }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Params: {}, - EpochProvisions: {}, - - _Structure: { - Minter: getStructure(Minter.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - getEpochProvisions: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.EpochProvisions[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: seiprotocol.seichain.mint initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams()).data - - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryEpochProvisions({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryEpochProvisions()).data - - - commit('QUERY', { query: 'EpochProvisions', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryEpochProvisions', payload: { options: { all }, params: {...key},query }}) - return getters['getEpochProvisions']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryEpochProvisions API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - } -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/index.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/index.ts deleted file mode 100755 index 67d4b093f0..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; - - -const types = [ - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/rest.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/rest.ts deleted file mode 100644 index 3e5c3d4036..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/rest.ts +++ /dev/null @@ -1,282 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -/** - * Params holds parameters for the mint module. - */ -export interface MintParams { - mint_denom?: string; - genesis_epoch_provisions?: string; - - /** @format int64 */ - reduction_period_in_epochs?: string; - reduction_factor?: string; -} - -/** -* QueryEpochProvisionsResponse is the response type for the -Query/EpochProvisions RPC method. -*/ -export interface MintQueryEpochProvisionsResponse { - /** - * epoch_provisions is the current minting per epoch provisions value. - * @format byte - */ - epoch_provisions?: string; -} - -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface MintQueryParamsResponse { - /** params defines the parameters of the module. */ - params?: MintParams; -} - -export interface ProtobufAny { - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title mint/v1beta1/genesis.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryEpochProvisions - * @summary EpochProvisions current minting epoch provisions value. - * @request GET:/seichain/mint/v1beta1/epoch_provisions - */ - queryEpochProvisions = (params: RequestParams = {}) => - this.request({ - path: `/seichain/mint/v1beta1/epoch_provisions`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params returns the total set of minting parameters. - * @request GET:/seichain/mint/v1beta1/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/seichain/mint/v1beta1/params`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/gogoproto/gogo.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/google/api/annotations.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/google/api/http.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/mint/v1beta1/genesis.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/mint/v1beta1/genesis.ts deleted file mode 100644 index 561b7233e0..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/mint/v1beta1/genesis.ts +++ /dev/null @@ -1,147 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -import { Minter, Params } from "../../mint/v1beta1/mint"; - -export const protobufPackage = "seiprotocol.seichain.mint"; - -/** GenesisState defines the mint module's genesis state. */ -export interface GenesisState { - /** minter is a space for holding current inflation information. */ - minter: Minter | undefined; - /** params defines all the paramaters of the module. */ - params: Params | undefined; - /** current halven period start epoch */ - halven_started_epoch: number; -} - -const baseGenesisState: object = { halven_started_epoch: 0 }; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.minter !== undefined) { - Minter.encode(message.minter, writer.uint32(10).fork()).ldelim(); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(18).fork()).ldelim(); - } - if (message.halven_started_epoch !== 0) { - writer.uint32(24).int64(message.halven_started_epoch); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.minter = Minter.decode(reader, reader.uint32()); - break; - case 2: - message.params = Params.decode(reader, reader.uint32()); - break; - case 3: - message.halven_started_epoch = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - if (object.minter !== undefined && object.minter !== null) { - message.minter = Minter.fromJSON(object.minter); - } else { - message.minter = undefined; - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if ( - object.halven_started_epoch !== undefined && - object.halven_started_epoch !== null - ) { - message.halven_started_epoch = Number(object.halven_started_epoch); - } else { - message.halven_started_epoch = 0; - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.minter !== undefined && - (obj.minter = message.minter ? Minter.toJSON(message.minter) : undefined); - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.halven_started_epoch !== undefined && - (obj.halven_started_epoch = message.halven_started_epoch); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - if (object.minter !== undefined && object.minter !== null) { - message.minter = Minter.fromPartial(object.minter); - } else { - message.minter = undefined; - } - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if ( - object.halven_started_epoch !== undefined && - object.halven_started_epoch !== null - ) { - message.halven_started_epoch = object.halven_started_epoch; - } else { - message.halven_started_epoch = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/mint/v1beta1/mint.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/mint/v1beta1/mint.ts deleted file mode 100644 index 1a0e26974c..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/mint/v1beta1/mint.ts +++ /dev/null @@ -1,256 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.mint"; - -/** Minter represents the minting state. */ -export interface Minter { - /** current epoch provisions */ - epoch_provisions: string; -} - -/** Params holds parameters for the mint module. */ -export interface Params { - /** type of coin to mint */ - mint_denom: string; - /** epoch provisions from the first epoch */ - genesis_epoch_provisions: string; - /** number of epochs to take to reduce rewards */ - reduction_period_in_epochs: number; - /** reduction multiplier to execute on each period */ - reduction_factor: string; -} - -const baseMinter: object = { epoch_provisions: "" }; - -export const Minter = { - encode(message: Minter, writer: Writer = Writer.create()): Writer { - if (message.epoch_provisions !== "") { - writer.uint32(10).string(message.epoch_provisions); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Minter { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMinter } as Minter; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.epoch_provisions = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Minter { - const message = { ...baseMinter } as Minter; - if ( - object.epoch_provisions !== undefined && - object.epoch_provisions !== null - ) { - message.epoch_provisions = String(object.epoch_provisions); - } else { - message.epoch_provisions = ""; - } - return message; - }, - - toJSON(message: Minter): unknown { - const obj: any = {}; - message.epoch_provisions !== undefined && - (obj.epoch_provisions = message.epoch_provisions); - return obj; - }, - - fromPartial(object: DeepPartial): Minter { - const message = { ...baseMinter } as Minter; - if ( - object.epoch_provisions !== undefined && - object.epoch_provisions !== null - ) { - message.epoch_provisions = object.epoch_provisions; - } else { - message.epoch_provisions = ""; - } - return message; - }, -}; - -const baseParams: object = { - mint_denom: "", - genesis_epoch_provisions: "", - reduction_period_in_epochs: 0, - reduction_factor: "", -}; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.mint_denom !== "") { - writer.uint32(10).string(message.mint_denom); - } - if (message.genesis_epoch_provisions !== "") { - writer.uint32(18).string(message.genesis_epoch_provisions); - } - if (message.reduction_period_in_epochs !== 0) { - writer.uint32(24).int64(message.reduction_period_in_epochs); - } - if (message.reduction_factor !== "") { - writer.uint32(34).string(message.reduction_factor); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mint_denom = reader.string(); - break; - case 2: - message.genesis_epoch_provisions = reader.string(); - break; - case 3: - message.reduction_period_in_epochs = longToNumber( - reader.int64() as Long - ); - break; - case 4: - message.reduction_factor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - if (object.mint_denom !== undefined && object.mint_denom !== null) { - message.mint_denom = String(object.mint_denom); - } else { - message.mint_denom = ""; - } - if ( - object.genesis_epoch_provisions !== undefined && - object.genesis_epoch_provisions !== null - ) { - message.genesis_epoch_provisions = String( - object.genesis_epoch_provisions - ); - } else { - message.genesis_epoch_provisions = ""; - } - if ( - object.reduction_period_in_epochs !== undefined && - object.reduction_period_in_epochs !== null - ) { - message.reduction_period_in_epochs = Number( - object.reduction_period_in_epochs - ); - } else { - message.reduction_period_in_epochs = 0; - } - if ( - object.reduction_factor !== undefined && - object.reduction_factor !== null - ) { - message.reduction_factor = String(object.reduction_factor); - } else { - message.reduction_factor = ""; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.mint_denom !== undefined && (obj.mint_denom = message.mint_denom); - message.genesis_epoch_provisions !== undefined && - (obj.genesis_epoch_provisions = message.genesis_epoch_provisions); - message.reduction_period_in_epochs !== undefined && - (obj.reduction_period_in_epochs = message.reduction_period_in_epochs); - message.reduction_factor !== undefined && - (obj.reduction_factor = message.reduction_factor); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - if (object.mint_denom !== undefined && object.mint_denom !== null) { - message.mint_denom = object.mint_denom; - } else { - message.mint_denom = ""; - } - if ( - object.genesis_epoch_provisions !== undefined && - object.genesis_epoch_provisions !== null - ) { - message.genesis_epoch_provisions = object.genesis_epoch_provisions; - } else { - message.genesis_epoch_provisions = ""; - } - if ( - object.reduction_period_in_epochs !== undefined && - object.reduction_period_in_epochs !== null - ) { - message.reduction_period_in_epochs = object.reduction_period_in_epochs; - } else { - message.reduction_period_in_epochs = 0; - } - if ( - object.reduction_factor !== undefined && - object.reduction_factor !== null - ) { - message.reduction_factor = object.reduction_factor; - } else { - message.reduction_factor = ""; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/mint/v1beta1/query.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/mint/v1beta1/query.ts deleted file mode 100644 index 083728772f..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/module/types/mint/v1beta1/query.ts +++ /dev/null @@ -1,348 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Params } from "../../mint/v1beta1/mint"; - -export const protobufPackage = "seiprotocol.seichain.mint"; - -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} - -/** - * QueryEpochProvisionsRequest is the request type for the - * Query/EpochProvisions RPC method. - */ -export interface QueryEpochProvisionsRequest {} - -/** - * QueryEpochProvisionsResponse is the response type for the - * Query/EpochProvisions RPC method. - */ -export interface QueryEpochProvisionsResponse { - /** epoch_provisions is the current minting per epoch provisions value. */ - epoch_provisions: Uint8Array; -} - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -const baseQueryEpochProvisionsRequest: object = {}; - -export const QueryEpochProvisionsRequest = { - encode( - _: QueryEpochProvisionsRequest, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryEpochProvisionsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryEpochProvisionsRequest, - } as QueryEpochProvisionsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryEpochProvisionsRequest { - const message = { - ...baseQueryEpochProvisionsRequest, - } as QueryEpochProvisionsRequest; - return message; - }, - - toJSON(_: QueryEpochProvisionsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): QueryEpochProvisionsRequest { - const message = { - ...baseQueryEpochProvisionsRequest, - } as QueryEpochProvisionsRequest; - return message; - }, -}; - -const baseQueryEpochProvisionsResponse: object = {}; - -export const QueryEpochProvisionsResponse = { - encode( - message: QueryEpochProvisionsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.epoch_provisions.length !== 0) { - writer.uint32(10).bytes(message.epoch_provisions); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryEpochProvisionsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryEpochProvisionsResponse, - } as QueryEpochProvisionsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.epoch_provisions = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryEpochProvisionsResponse { - const message = { - ...baseQueryEpochProvisionsResponse, - } as QueryEpochProvisionsResponse; - if ( - object.epoch_provisions !== undefined && - object.epoch_provisions !== null - ) { - message.epoch_provisions = bytesFromBase64(object.epoch_provisions); - } - return message; - }, - - toJSON(message: QueryEpochProvisionsResponse): unknown { - const obj: any = {}; - message.epoch_provisions !== undefined && - (obj.epoch_provisions = base64FromBytes( - message.epoch_provisions !== undefined - ? message.epoch_provisions - : new Uint8Array() - )); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryEpochProvisionsResponse { - const message = { - ...baseQueryEpochProvisionsResponse, - } as QueryEpochProvisionsResponse; - if ( - object.epoch_provisions !== undefined && - object.epoch_provisions !== null - ) { - message.epoch_provisions = object.epoch_provisions; - } else { - message.epoch_provisions = new Uint8Array(); - } - return message; - }, -}; - -/** Query provides defines the gRPC querier service. */ -export interface Query { - /** Params returns the total set of minting parameters. */ - Params(request: QueryParamsRequest): Promise; - /** EpochProvisions current minting epoch provisions value. */ - EpochProvisions( - request: QueryEpochProvisionsRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.mint.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - - EpochProvisions( - request: QueryEpochProvisionsRequest - ): Promise { - const data = QueryEpochProvisionsRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.mint.Query", - "EpochProvisions", - data - ); - return promise.then((data) => - QueryEpochProvisionsResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/package.json b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/package.json deleted file mode 100755 index c48051702f..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "seiprotocol-seichain-mint-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module seiprotocol.seichain.mint", - "author": "Starport Codegen ", - "homepage": "http://github.com/sei-protocol/sei-chain/x/mint/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/vuex-root b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.mint/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/index.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/index.d.ts deleted file mode 100644 index e5e0f57a4e..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/index.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { FeederDelegation } from "./module/types/oracle/genesis"; -import { PenaltyCounter } from "./module/types/oracle/genesis"; -import { Params } from "./module/types/oracle/oracle"; -import { Denom } from "./module/types/oracle/oracle"; -import { AggregateExchangeRatePrevote } from "./module/types/oracle/oracle"; -import { AggregateExchangeRateVote } from "./module/types/oracle/oracle"; -import { ExchangeRateTuple } from "./module/types/oracle/oracle"; -import { OracleExchangeRate } from "./module/types/oracle/oracle"; -import { PriceSnapshotItem } from "./module/types/oracle/oracle"; -import { PriceSnapshot } from "./module/types/oracle/oracle"; -import { OracleTwap } from "./module/types/oracle/oracle"; -import { VotePenaltyCounter } from "./module/types/oracle/oracle"; -import { DenomOracleExchangeRatePair } from "./module/types/oracle/query"; -export { FeederDelegation, PenaltyCounter, Params, Denom, AggregateExchangeRatePrevote, AggregateExchangeRateVote, ExchangeRateTuple, OracleExchangeRate, PriceSnapshotItem, PriceSnapshot, OracleTwap, VotePenaltyCounter, DenomOracleExchangeRatePair }; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/index.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/index.js deleted file mode 100644 index 70f972b70c..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/index.js +++ /dev/null @@ -1,529 +0,0 @@ -import { txClient, queryClient, MissingWalletError, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { FeederDelegation } from "./module/types/oracle/genesis"; -import { PenaltyCounter } from "./module/types/oracle/genesis"; -import { Params } from "./module/types/oracle/oracle"; -import { Denom } from "./module/types/oracle/oracle"; -import { AggregateExchangeRatePrevote } from "./module/types/oracle/oracle"; -import { AggregateExchangeRateVote } from "./module/types/oracle/oracle"; -import { ExchangeRateTuple } from "./module/types/oracle/oracle"; -import { OracleExchangeRate } from "./module/types/oracle/oracle"; -import { PriceSnapshotItem } from "./module/types/oracle/oracle"; -import { PriceSnapshot } from "./module/types/oracle/oracle"; -import { OracleTwap } from "./module/types/oracle/oracle"; -import { VotePenaltyCounter } from "./module/types/oracle/oracle"; -import { DenomOracleExchangeRatePair } from "./module/types/oracle/query"; -export { FeederDelegation, PenaltyCounter, Params, Denom, AggregateExchangeRatePrevote, AggregateExchangeRateVote, ExchangeRateTuple, OracleExchangeRate, PriceSnapshotItem, PriceSnapshot, OracleTwap, VotePenaltyCounter, DenomOracleExchangeRatePair }; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - ExchangeRate: {}, - ExchangeRates: {}, - Actives: {}, - VoteTargets: {}, - PriceSnapshotHistory: {}, - Twaps: {}, - FeederDelegation: {}, - VotePenaltyCounter: {}, - AggregatePrevote: {}, - AggregatePrevotes: {}, - AggregateVote: {}, - AggregateVotes: {}, - Params: {}, - _Structure: { - FeederDelegation: getStructure(FeederDelegation.fromPartial({})), - PenaltyCounter: getStructure(PenaltyCounter.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - Denom: getStructure(Denom.fromPartial({})), - AggregateExchangeRatePrevote: getStructure(AggregateExchangeRatePrevote.fromPartial({})), - AggregateExchangeRateVote: getStructure(AggregateExchangeRateVote.fromPartial({})), - ExchangeRateTuple: getStructure(ExchangeRateTuple.fromPartial({})), - OracleExchangeRate: getStructure(OracleExchangeRate.fromPartial({})), - PriceSnapshotItem: getStructure(PriceSnapshotItem.fromPartial({})), - PriceSnapshot: getStructure(PriceSnapshot.fromPartial({})), - OracleTwap: getStructure(OracleTwap.fromPartial({})), - VotePenaltyCounter: getStructure(VotePenaltyCounter.fromPartial({})), - DenomOracleExchangeRatePair: getStructure(DenomOracleExchangeRatePair.fromPartial({})), - }, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getExchangeRate: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.ExchangeRate[JSON.stringify(params)] ?? {}; - }, - getExchangeRates: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.ExchangeRates[JSON.stringify(params)] ?? {}; - }, - getActives: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Actives[JSON.stringify(params)] ?? {}; - }, - getVoteTargets: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.VoteTargets[JSON.stringify(params)] ?? {}; - }, - getPriceSnapshotHistory: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.PriceSnapshotHistory[JSON.stringify(params)] ?? {}; - }, - getTwaps: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Twaps[JSON.stringify(params)] ?? {}; - }, - getFeederDelegation: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.FeederDelegation[JSON.stringify(params)] ?? {}; - }, - getVotePenaltyCounter: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.VotePenaltyCounter[JSON.stringify(params)] ?? {}; - }, - getAggregatePrevote: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.AggregatePrevote[JSON.stringify(params)] ?? {}; - }, - getAggregatePrevotes: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.AggregatePrevotes[JSON.stringify(params)] ?? {}; - }, - getAggregateVote: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.AggregateVote[JSON.stringify(params)] ?? {}; - }, - getAggregateVotes: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.AggregateVotes[JSON.stringify(params)] ?? {}; - }, - getParams: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Params[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: seiprotocol.seichain.oracle initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - async QueryExchangeRate({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryExchangeRate(key.denom)).data; - commit('QUERY', { query: 'ExchangeRate', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryExchangeRate', payload: { options: { all }, params: { ...key }, query } }); - return getters['getExchangeRate']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryExchangeRate', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryExchangeRates({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryExchangeRates()).data; - commit('QUERY', { query: 'ExchangeRates', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryExchangeRates', payload: { options: { all }, params: { ...key }, query } }); - return getters['getExchangeRates']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryExchangeRates', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryActives({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryActives()).data; - commit('QUERY', { query: 'Actives', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryActives', payload: { options: { all }, params: { ...key }, query } }); - return getters['getActives']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryActives', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryVoteTargets({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryVoteTargets()).data; - commit('QUERY', { query: 'VoteTargets', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryVoteTargets', payload: { options: { all }, params: { ...key }, query } }); - return getters['getVoteTargets']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryVoteTargets', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryPriceSnapshotHistory({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryPriceSnapshotHistory()).data; - commit('QUERY', { query: 'PriceSnapshotHistory', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryPriceSnapshotHistory', payload: { options: { all }, params: { ...key }, query } }); - return getters['getPriceSnapshotHistory']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryPriceSnapshotHistory', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryTwaps({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryTwaps(query)).data; - while (all && value.pagination && value.pagination.next_key != null) { - let next_values = (await queryClient.queryTwaps({ ...query, 'pagination.key': value.pagination.next_key })).data; - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Twaps', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryTwaps', payload: { options: { all }, params: { ...key }, query } }); - return getters['getTwaps']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryTwaps', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryFeederDelegation({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryFeederDelegation(key.validator_addr)).data; - commit('QUERY', { query: 'FeederDelegation', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryFeederDelegation', payload: { options: { all }, params: { ...key }, query } }); - return getters['getFeederDelegation']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryFeederDelegation', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryVotePenaltyCounter({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryVotePenaltyCounter(key.validator_addr)).data; - commit('QUERY', { query: 'VotePenaltyCounter', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryVotePenaltyCounter', payload: { options: { all }, params: { ...key }, query } }); - return getters['getVotePenaltyCounter']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryVotePenaltyCounter', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryAggregatePrevote({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryAggregatePrevote(key.validator_addr)).data; - commit('QUERY', { query: 'AggregatePrevote', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryAggregatePrevote', payload: { options: { all }, params: { ...key }, query } }); - return getters['getAggregatePrevote']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryAggregatePrevote', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryAggregatePrevotes({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryAggregatePrevotes()).data; - commit('QUERY', { query: 'AggregatePrevotes', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryAggregatePrevotes', payload: { options: { all }, params: { ...key }, query } }); - return getters['getAggregatePrevotes']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryAggregatePrevotes', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryAggregateVote({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryAggregateVote(key.validator_addr)).data; - commit('QUERY', { query: 'AggregateVote', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryAggregateVote', payload: { options: { all }, params: { ...key }, query } }); - return getters['getAggregateVote']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryAggregateVote', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryAggregateVotes({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryAggregateVotes()).data; - commit('QUERY', { query: 'AggregateVotes', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryAggregateVotes', payload: { options: { all }, params: { ...key }, query } }); - return getters['getAggregateVotes']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryAggregateVotes', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryParams()).data; - commit('QUERY', { query: 'Params', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async sendMsgAggregateExchangeRateVote({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgAggregateExchangeRateVote(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgAggregateExchangeRateVote:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgAggregateExchangeRateVote:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgAggregateExchangeRatePrevote({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgAggregateExchangeRatePrevote(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgAggregateExchangeRatePrevote:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgAggregateExchangeRatePrevote:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgAggregateExchangeRateCombinedVote({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgAggregateExchangeRateCombinedVote(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgAggregateExchangeRateCombinedVote:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgAggregateExchangeRateCombinedVote:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgDelegateFeedConsent({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgDelegateFeedConsent(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgDelegateFeedConsent:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgDelegateFeedConsent:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async MsgAggregateExchangeRateVote({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgAggregateExchangeRateVote(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgAggregateExchangeRateVote:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgAggregateExchangeRateVote:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgAggregateExchangeRatePrevote({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgAggregateExchangeRatePrevote(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgAggregateExchangeRatePrevote:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgAggregateExchangeRatePrevote:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgAggregateExchangeRateCombinedVote({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgAggregateExchangeRateCombinedVote(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgAggregateExchangeRateCombinedVote:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgAggregateExchangeRateCombinedVote:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgDelegateFeedConsent({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgDelegateFeedConsent(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgDelegateFeedConsent:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgDelegateFeedConsent:Create', 'Could not create message: ' + e.message); - } - } - }, - } -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/index.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/index.ts deleted file mode 100755 index c9dfb65a1f..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/index.ts +++ /dev/null @@ -1,629 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { FeederDelegation } from "./module/types/oracle/genesis" -import { PenaltyCounter } from "./module/types/oracle/genesis" -import { Params } from "./module/types/oracle/oracle" -import { Denom } from "./module/types/oracle/oracle" -import { AggregateExchangeRatePrevote } from "./module/types/oracle/oracle" -import { AggregateExchangeRateVote } from "./module/types/oracle/oracle" -import { ExchangeRateTuple } from "./module/types/oracle/oracle" -import { OracleExchangeRate } from "./module/types/oracle/oracle" -import { PriceSnapshotItem } from "./module/types/oracle/oracle" -import { PriceSnapshot } from "./module/types/oracle/oracle" -import { OracleTwap } from "./module/types/oracle/oracle" -import { VotePenaltyCounter } from "./module/types/oracle/oracle" -import { DenomOracleExchangeRatePair } from "./module/types/oracle/query" - - -export { FeederDelegation, PenaltyCounter, Params, Denom, AggregateExchangeRatePrevote, AggregateExchangeRateVote, ExchangeRateTuple, OracleExchangeRate, PriceSnapshotItem, PriceSnapshot, OracleTwap, VotePenaltyCounter, DenomOracleExchangeRatePair }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - ExchangeRate: {}, - ExchangeRates: {}, - Actives: {}, - VoteTargets: {}, - PriceSnapshotHistory: {}, - Twaps: {}, - FeederDelegation: {}, - VotePenaltyCounter: {}, - AggregatePrevote: {}, - AggregatePrevotes: {}, - AggregateVote: {}, - AggregateVotes: {}, - Params: {}, - - _Structure: { - FeederDelegation: getStructure(FeederDelegation.fromPartial({})), - PenaltyCounter: getStructure(PenaltyCounter.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - Denom: getStructure(Denom.fromPartial({})), - AggregateExchangeRatePrevote: getStructure(AggregateExchangeRatePrevote.fromPartial({})), - AggregateExchangeRateVote: getStructure(AggregateExchangeRateVote.fromPartial({})), - ExchangeRateTuple: getStructure(ExchangeRateTuple.fromPartial({})), - OracleExchangeRate: getStructure(OracleExchangeRate.fromPartial({})), - PriceSnapshotItem: getStructure(PriceSnapshotItem.fromPartial({})), - PriceSnapshot: getStructure(PriceSnapshot.fromPartial({})), - OracleTwap: getStructure(OracleTwap.fromPartial({})), - VotePenaltyCounter: getStructure(VotePenaltyCounter.fromPartial({})), - DenomOracleExchangeRatePair: getStructure(DenomOracleExchangeRatePair.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getExchangeRate: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ExchangeRate[JSON.stringify(params)] ?? {} - }, - getExchangeRates: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.ExchangeRates[JSON.stringify(params)] ?? {} - }, - getActives: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Actives[JSON.stringify(params)] ?? {} - }, - getVoteTargets: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.VoteTargets[JSON.stringify(params)] ?? {} - }, - getPriceSnapshotHistory: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.PriceSnapshotHistory[JSON.stringify(params)] ?? {} - }, - getTwaps: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Twaps[JSON.stringify(params)] ?? {} - }, - getFeederDelegation: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.FeederDelegation[JSON.stringify(params)] ?? {} - }, - getVotePenaltyCounter: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.VotePenaltyCounter[JSON.stringify(params)] ?? {} - }, - getAggregatePrevote: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.AggregatePrevote[JSON.stringify(params)] ?? {} - }, - getAggregatePrevotes: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.AggregatePrevotes[JSON.stringify(params)] ?? {} - }, - getAggregateVote: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.AggregateVote[JSON.stringify(params)] ?? {} - }, - getAggregateVotes: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.AggregateVotes[JSON.stringify(params)] ?? {} - }, - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: seiprotocol.seichain.oracle initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryExchangeRate({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryExchangeRate( key.denom)).data - - - commit('QUERY', { query: 'ExchangeRate', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryExchangeRate', payload: { options: { all }, params: {...key},query }}) - return getters['getExchangeRate']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryExchangeRate API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryExchangeRates({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryExchangeRates()).data - - - commit('QUERY', { query: 'ExchangeRates', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryExchangeRates', payload: { options: { all }, params: {...key},query }}) - return getters['getExchangeRates']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryExchangeRates API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryActives({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryActives()).data - - - commit('QUERY', { query: 'Actives', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryActives', payload: { options: { all }, params: {...key},query }}) - return getters['getActives']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryActives API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryVoteTargets({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryVoteTargets()).data - - - commit('QUERY', { query: 'VoteTargets', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryVoteTargets', payload: { options: { all }, params: {...key},query }}) - return getters['getVoteTargets']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryVoteTargets API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryPriceSnapshotHistory({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryPriceSnapshotHistory()).data - - - commit('QUERY', { query: 'PriceSnapshotHistory', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryPriceSnapshotHistory', payload: { options: { all }, params: {...key},query }}) - return getters['getPriceSnapshotHistory']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryPriceSnapshotHistory API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryTwaps({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryTwaps(query)).data - - - while (all && ( value).pagination && ( value).pagination.next_key!=null) { - let next_values=(await queryClient.queryTwaps({...query, 'pagination.key':( value).pagination.next_key})).data - value = mergeResults(value, next_values); - } - commit('QUERY', { query: 'Twaps', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryTwaps', payload: { options: { all }, params: {...key},query }}) - return getters['getTwaps']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryTwaps API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryFeederDelegation({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryFeederDelegation( key.validator_addr)).data - - - commit('QUERY', { query: 'FeederDelegation', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryFeederDelegation', payload: { options: { all }, params: {...key},query }}) - return getters['getFeederDelegation']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryFeederDelegation API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryVotePenaltyCounter({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryVotePenaltyCounter( key.validator_addr)).data - - - commit('QUERY', { query: 'VotePenaltyCounter', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryVotePenaltyCounter', payload: { options: { all }, params: {...key},query }}) - return getters['getVotePenaltyCounter']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryVotePenaltyCounter API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryAggregatePrevote({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryAggregatePrevote( key.validator_addr)).data - - - commit('QUERY', { query: 'AggregatePrevote', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAggregatePrevote', payload: { options: { all }, params: {...key},query }}) - return getters['getAggregatePrevote']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryAggregatePrevote API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryAggregatePrevotes({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryAggregatePrevotes()).data - - - commit('QUERY', { query: 'AggregatePrevotes', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAggregatePrevotes', payload: { options: { all }, params: {...key},query }}) - return getters['getAggregatePrevotes']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryAggregatePrevotes API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryAggregateVote({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryAggregateVote( key.validator_addr)).data - - - commit('QUERY', { query: 'AggregateVote', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAggregateVote', payload: { options: { all }, params: {...key},query }}) - return getters['getAggregateVote']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryAggregateVote API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryAggregateVotes({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryAggregateVotes()).data - - - commit('QUERY', { query: 'AggregateVotes', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryAggregateVotes', payload: { options: { all }, params: {...key},query }}) - return getters['getAggregateVotes']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryAggregateVotes API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams()).data - - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - async sendMsgAggregateExchangeRatePrevote({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAggregateExchangeRatePrevote(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgAggregateExchangeRatePrevote:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgAggregateExchangeRatePrevote:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgAggregateExchangeRateCombinedVote({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAggregateExchangeRateCombinedVote(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgAggregateExchangeRateCombinedVote:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgAggregateExchangeRateCombinedVote:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgDelegateFeedConsent({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgDelegateFeedConsent(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgDelegateFeedConsent:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgDelegateFeedConsent:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgAggregateExchangeRateVote({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAggregateExchangeRateVote(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgAggregateExchangeRateVote:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgAggregateExchangeRateVote:Send Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgAggregateExchangeRatePrevote({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAggregateExchangeRatePrevote(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgAggregateExchangeRatePrevote:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgAggregateExchangeRatePrevote:Create Could not create message: ' + e.message) - } - } - }, - async MsgAggregateExchangeRateCombinedVote({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAggregateExchangeRateCombinedVote(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgAggregateExchangeRateCombinedVote:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgAggregateExchangeRateCombinedVote:Create Could not create message: ' + e.message) - } - } - }, - async MsgDelegateFeedConsent({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgDelegateFeedConsent(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgDelegateFeedConsent:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgDelegateFeedConsent:Create Could not create message: ' + e.message) - } - } - }, - async MsgAggregateExchangeRateVote({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAggregateExchangeRateVote(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgAggregateExchangeRateVote:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgAggregateExchangeRateVote:Create Could not create message: ' + e.message) - } - } - }, - - } -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/index.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/index.d.ts deleted file mode 100644 index 91689a0b4d..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgAggregateExchangeRateVote } from "./types/oracle/tx"; -import { MsgAggregateExchangeRatePrevote } from "./types/oracle/tx"; -import { MsgAggregateExchangeRateCombinedVote } from "./types/oracle/tx"; -import { MsgDelegateFeedConsent } from "./types/oracle/tx"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; - msgAggregateExchangeRateVote: (data: MsgAggregateExchangeRateVote) => EncodeObject; - msgAggregateExchangeRatePrevote: (data: MsgAggregateExchangeRatePrevote) => EncodeObject; - msgAggregateExchangeRateCombinedVote: (data: MsgAggregateExchangeRateCombinedVote) => EncodeObject; - msgDelegateFeedConsent: (data: MsgDelegateFeedConsent) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/index.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/index.js deleted file mode 100644 index 58703d1c07..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/index.js +++ /dev/null @@ -1,43 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgAggregateExchangeRateVote } from "./types/oracle/tx"; -import { MsgAggregateExchangeRatePrevote } from "./types/oracle/tx"; -import { MsgAggregateExchangeRateCombinedVote } from "./types/oracle/tx"; -import { MsgDelegateFeedConsent } from "./types/oracle/tx"; -const types = [ - ["/seiprotocol.seichain.oracle.MsgAggregateExchangeRateVote", MsgAggregateExchangeRateVote], - ["/seiprotocol.seichain.oracle.MsgAggregateExchangeRatePrevote", MsgAggregateExchangeRatePrevote], - ["/seiprotocol.seichain.oracle.MsgAggregateExchangeRateCombinedVote", MsgAggregateExchangeRateCombinedVote], - ["/seiprotocol.seichain.oracle.MsgDelegateFeedConsent", MsgDelegateFeedConsent], -]; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - msgAggregateExchangeRateVote: (data) => ({ typeUrl: "/seiprotocol.seichain.oracle.MsgAggregateExchangeRateVote", value: MsgAggregateExchangeRateVote.fromPartial(data) }), - msgAggregateExchangeRatePrevote: (data) => ({ typeUrl: "/seiprotocol.seichain.oracle.MsgAggregateExchangeRatePrevote", value: MsgAggregateExchangeRatePrevote.fromPartial(data) }), - msgAggregateExchangeRateCombinedVote: (data) => ({ typeUrl: "/seiprotocol.seichain.oracle.MsgAggregateExchangeRateCombinedVote", value: MsgAggregateExchangeRateCombinedVote.fromPartial(data) }), - msgDelegateFeedConsent: (data) => ({ typeUrl: "/seiprotocol.seichain.oracle.MsgDelegateFeedConsent", value: MsgDelegateFeedConsent.fromPartial(data) }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/index.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/index.ts deleted file mode 100755 index a4011a41d6..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/index.ts +++ /dev/null @@ -1,69 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgAggregateExchangeRatePrevote } from "./types/oracle/tx"; -import { MsgAggregateExchangeRateCombinedVote } from "./types/oracle/tx"; -import { MsgDelegateFeedConsent } from "./types/oracle/tx"; -import { MsgAggregateExchangeRateVote } from "./types/oracle/tx"; - - -const types = [ - ["/seiprotocol.seichain.oracle.MsgAggregateExchangeRatePrevote", MsgAggregateExchangeRatePrevote], - ["/seiprotocol.seichain.oracle.MsgAggregateExchangeRateCombinedVote", MsgAggregateExchangeRateCombinedVote], - ["/seiprotocol.seichain.oracle.MsgDelegateFeedConsent", MsgDelegateFeedConsent], - ["/seiprotocol.seichain.oracle.MsgAggregateExchangeRateVote", MsgAggregateExchangeRateVote], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgAggregateExchangeRatePrevote: (data: MsgAggregateExchangeRatePrevote): EncodeObject => ({ typeUrl: "/seiprotocol.seichain.oracle.MsgAggregateExchangeRatePrevote", value: MsgAggregateExchangeRatePrevote.fromPartial( data ) }), - msgAggregateExchangeRateCombinedVote: (data: MsgAggregateExchangeRateCombinedVote): EncodeObject => ({ typeUrl: "/seiprotocol.seichain.oracle.MsgAggregateExchangeRateCombinedVote", value: MsgAggregateExchangeRateCombinedVote.fromPartial( data ) }), - msgDelegateFeedConsent: (data: MsgDelegateFeedConsent): EncodeObject => ({ typeUrl: "/seiprotocol.seichain.oracle.MsgDelegateFeedConsent", value: MsgDelegateFeedConsent.fromPartial( data ) }), - msgAggregateExchangeRateVote: (data: MsgAggregateExchangeRateVote): EncodeObject => ({ typeUrl: "/seiprotocol.seichain.oracle.MsgAggregateExchangeRateVote", value: MsgAggregateExchangeRateVote.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/rest.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/rest.d.ts deleted file mode 100644 index 694845f93b..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/rest.d.ts +++ /dev/null @@ -1,351 +0,0 @@ -export interface OracleAggregateExchangeRatePrevote { - hash?: string; - voter?: string; - /** @format uint64 */ - submitBlock?: string; -} -export interface OracleAggregateExchangeRateVote { - exchangeRateTuples?: OracleExchangeRateTuple[]; - voter?: string; -} -export interface OracleDenom { - name?: string; -} -export interface OracleDenomOracleExchangeRatePair { - denom?: string; - oracleExchangeRate?: OracleOracleExchangeRate; -} -export interface OracleExchangeRateTuple { - denom?: string; - exchangeRate?: string; -} -/** - * MsgAggregateExchangeRateVoteResponse defines the Msg/AggregateExchangeRateVote response type. - */ -export declare type OracleMsgAggregateExchangeRateCombinedVoteResponse = object; -/** - * MsgAggregateExchangeRatePrevoteResponse defines the Msg/AggregateExchangeRatePrevote response type. - */ -export declare type OracleMsgAggregateExchangeRatePrevoteResponse = object; -/** - * MsgAggregateExchangeRateVoteResponse defines the Msg/AggregateExchangeRateVote response type. - */ -export declare type OracleMsgAggregateExchangeRateVoteResponse = object; -/** - * MsgDelegateFeedConsentResponse defines the Msg/DelegateFeedConsent response type. - */ -export declare type OracleMsgDelegateFeedConsentResponse = object; -export interface OracleOracleExchangeRate { - exchangeRate?: string; - lastUpdate?: string; -} -export interface OracleOracleTwap { - denom?: string; - twap?: string; - /** @format int64 */ - lookbackSeconds?: string; -} -export interface OracleParams { - /** @format uint64 */ - votePeriod?: string; - voteThreshold?: string; - rewardBand?: string; - whitelist?: OracleDenom[]; - slashFraction?: string; - /** @format uint64 */ - slashWindow?: string; - minValidPerWindow?: string; - /** @format int64 */ - lookbackDuration?: string; -} -export interface OraclePriceSnapshot { - /** @format int64 */ - snapshotTimestamp?: string; - priceSnapshotItems?: OraclePriceSnapshotItem[]; -} -export interface OraclePriceSnapshotItem { - denom?: string; - oracleExchangeRate?: OracleOracleExchangeRate; -} -/** -* QueryActivesResponse is response type for the -Query/Actives RPC method. -*/ -export interface OracleQueryActivesResponse { - /** actives defines a list of the denomination which oracle prices aggreed upon. */ - actives?: string[]; -} -/** -* QueryAggregatePrevoteResponse is response type for the -Query/AggregatePrevote RPC method. -*/ -export interface OracleQueryAggregatePrevoteResponse { - aggregatePrevote?: OracleAggregateExchangeRatePrevote; -} -/** -* QueryAggregatePrevotesResponse is response type for the -Query/AggregatePrevotes RPC method. -*/ -export interface OracleQueryAggregatePrevotesResponse { - aggregatePrevotes?: OracleAggregateExchangeRatePrevote[]; -} -/** -* QueryAggregateVoteResponse is response type for the -Query/AggregateVote RPC method. -*/ -export interface OracleQueryAggregateVoteResponse { - aggregateVote?: OracleAggregateExchangeRateVote; -} -/** -* QueryAggregateVotesResponse is response type for the -Query/AggregateVotes RPC method. -*/ -export interface OracleQueryAggregateVotesResponse { - aggregateVotes?: OracleAggregateExchangeRateVote[]; -} -/** -* QueryExchangeRateResponse is response type for the -Query/ExchangeRate RPC method. -*/ -export interface OracleQueryExchangeRateResponse { - oracleExchangeRate?: OracleOracleExchangeRate; -} -/** -* QueryExchangeRatesResponse is response type for the -Query/ExchangeRates RPC method. -*/ -export interface OracleQueryExchangeRatesResponse { - /** exchange_rates defines a list of the exchange rate for all whitelisted denoms. */ - denomOracleExchangeRatePairs?: OracleDenomOracleExchangeRatePair[]; -} -/** -* QueryFeederDelegationResponse is response type for the -Query/FeederDelegation RPC method. -*/ -export interface OracleQueryFeederDelegationResponse { - feederAddr?: string; -} -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface OracleQueryParamsResponse { - /** params defines the parameters of the module. */ - params?: OracleParams; -} -export interface OracleQueryPriceSnapshotHistoryResponse { - priceSnapshots?: OraclePriceSnapshot[]; -} -export interface OracleQueryTwapsResponse { - oracleTwaps?: OracleOracleTwap[]; -} -/** -* QueryVotePenaltyCounterResponse is response type for the -Query/VotePenaltyCounter RPC method. -*/ -export interface OracleQueryVotePenaltyCounterResponse { - votePenaltyCounter?: OracleVotePenaltyCounter; -} -/** -* QueryVoteTargetsResponse is response type for the -Query/VoteTargets RPC method. -*/ -export interface OracleQueryVoteTargetsResponse { - /** - * vote_targets defines a list of the denomination in which everyone - * should vote in the current vote period. - */ - voteTargets?: string[]; -} -export interface OracleVotePenaltyCounter { - /** @format uint64 */ - missCount?: string; - /** @format uint64 */ - abstainCount?: string; -} -export interface ProtobufAny { - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title oracle/genesis.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryActives - * @summary Actives returns all active denoms - * @request GET:/sei-protocol/sei-chain/oracle/denoms/actives - */ - queryActives: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryExchangeRates - * @summary ExchangeRates returns exchange rates of all denoms - * @request GET:/sei-protocol/sei-chain/oracle/denoms/exchange_rates - */ - queryExchangeRates: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryPriceSnapshotHistory - * @summary PriceSnapshotHistory returns the history of price snapshots for all assets - * @request GET:/sei-protocol/sei-chain/oracle/denoms/price_snapshot_history - */ - queryPriceSnapshotHistory: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryTwaps - * @request GET:/sei-protocol/sei-chain/oracle/denoms/twaps - */ - queryTwaps: (query?: { - lookbackSeconds?: string; - }, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryVoteTargets - * @summary VoteTargets returns all vote target denoms - * @request GET:/sei-protocol/sei-chain/oracle/denoms/vote_targets - */ - queryVoteTargets: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryExchangeRate - * @summary ExchangeRate returns exchange rate of a denom - * @request GET:/sei-protocol/sei-chain/oracle/denoms/{denom}/exchange_rate - */ - queryExchangeRate: (denom: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters. - * @request GET:/sei-protocol/sei-chain/oracle/params - */ - queryParams: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryAggregatePrevotes - * @summary AggregatePrevotes returns aggregate prevotes of all validators - * @request GET:/sei-protocol/sei-chain/oracle/validators/aggregate_prevotes - */ - queryAggregatePrevotes: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryAggregateVotes - * @summary AggregateVotes returns aggregate votes of all validators - * @request GET:/sei-protocol/sei-chain/oracle/validators/aggregate_votes - */ - queryAggregateVotes: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryAggregatePrevote - * @summary AggregatePrevote returns an aggregate prevote of a validator - * @request GET:/sei-protocol/sei-chain/oracle/validators/{validatorAddr}/aggregate_prevote - */ - queryAggregatePrevote: (validatorAddr: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryAggregateVote - * @summary AggregateVote returns an aggregate vote of a validator - * @request GET:/sei-protocol/sei-chain/oracle/validators/{validatorAddr}/aggregate_vote - */ - queryAggregateVote: (validatorAddr: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryFeederDelegation - * @summary FeederDelegation returns feeder delegation of a validator - * @request GET:/sei-protocol/sei-chain/oracle/validators/{validatorAddr}/feeder - */ - queryFeederDelegation: (validatorAddr: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryVotePenaltyCounter - * @summary MissCounter returns oracle miss counter of a validator - * @request GET:/sei-protocol/sei-chain/oracle/validators/{validatorAddr}/vote_penalty_counter - */ - queryVotePenaltyCounter: (validatorAddr: string, params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/rest.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/rest.js deleted file mode 100644 index 7f29682269..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/rest.js +++ /dev/null @@ -1,322 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title oracle/genesis.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryActives - * @summary Actives returns all active denoms - * @request GET:/sei-protocol/sei-chain/oracle/denoms/actives - */ - this.queryActives = (params = {}) => this.request({ - path: `/sei-protocol/sei-chain/oracle/denoms/actives`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryExchangeRates - * @summary ExchangeRates returns exchange rates of all denoms - * @request GET:/sei-protocol/sei-chain/oracle/denoms/exchange_rates - */ - this.queryExchangeRates = (params = {}) => this.request({ - path: `/sei-protocol/sei-chain/oracle/denoms/exchange_rates`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryPriceSnapshotHistory - * @summary PriceSnapshotHistory returns the history of price snapshots for all assets - * @request GET:/sei-protocol/sei-chain/oracle/denoms/price_snapshot_history - */ - this.queryPriceSnapshotHistory = (params = {}) => this.request({ - path: `/sei-protocol/sei-chain/oracle/denoms/price_snapshot_history`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryTwaps - * @request GET:/sei-protocol/sei-chain/oracle/denoms/twaps - */ - this.queryTwaps = (query, params = {}) => this.request({ - path: `/sei-protocol/sei-chain/oracle/denoms/twaps`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryVoteTargets - * @summary VoteTargets returns all vote target denoms - * @request GET:/sei-protocol/sei-chain/oracle/denoms/vote_targets - */ - this.queryVoteTargets = (params = {}) => this.request({ - path: `/sei-protocol/sei-chain/oracle/denoms/vote_targets`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryExchangeRate - * @summary ExchangeRate returns exchange rate of a denom - * @request GET:/sei-protocol/sei-chain/oracle/denoms/{denom}/exchange_rate - */ - this.queryExchangeRate = (denom, params = {}) => this.request({ - path: `/sei-protocol/sei-chain/oracle/denoms/${denom}/exchange_rate`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters. - * @request GET:/sei-protocol/sei-chain/oracle/params - */ - this.queryParams = (params = {}) => this.request({ - path: `/sei-protocol/sei-chain/oracle/params`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryAggregatePrevotes - * @summary AggregatePrevotes returns aggregate prevotes of all validators - * @request GET:/sei-protocol/sei-chain/oracle/validators/aggregate_prevotes - */ - this.queryAggregatePrevotes = (params = {}) => this.request({ - path: `/sei-protocol/sei-chain/oracle/validators/aggregate_prevotes`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryAggregateVotes - * @summary AggregateVotes returns aggregate votes of all validators - * @request GET:/sei-protocol/sei-chain/oracle/validators/aggregate_votes - */ - this.queryAggregateVotes = (params = {}) => this.request({ - path: `/sei-protocol/sei-chain/oracle/validators/aggregate_votes`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryAggregatePrevote - * @summary AggregatePrevote returns an aggregate prevote of a validator - * @request GET:/sei-protocol/sei-chain/oracle/validators/{validatorAddr}/aggregate_prevote - */ - this.queryAggregatePrevote = (validatorAddr, params = {}) => this.request({ - path: `/sei-protocol/sei-chain/oracle/validators/${validatorAddr}/aggregate_prevote`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryAggregateVote - * @summary AggregateVote returns an aggregate vote of a validator - * @request GET:/sei-protocol/sei-chain/oracle/validators/{validatorAddr}/aggregate_vote - */ - this.queryAggregateVote = (validatorAddr, params = {}) => this.request({ - path: `/sei-protocol/sei-chain/oracle/validators/${validatorAddr}/aggregate_vote`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryFeederDelegation - * @summary FeederDelegation returns feeder delegation of a validator - * @request GET:/sei-protocol/sei-chain/oracle/validators/{validatorAddr}/feeder - */ - this.queryFeederDelegation = (validatorAddr, params = {}) => this.request({ - path: `/sei-protocol/sei-chain/oracle/validators/${validatorAddr}/feeder`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryVotePenaltyCounter - * @summary MissCounter returns oracle miss counter of a validator - * @request GET:/sei-protocol/sei-chain/oracle/validators/{validatorAddr}/vote_penalty_counter - */ - this.queryVotePenaltyCounter = (validatorAddr, params = {}) => this.request({ - path: `/sei-protocol/sei-chain/oracle/validators/${validatorAddr}/vote_penalty_counter`, - method: "GET", - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/rest.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/rest.ts deleted file mode 100644 index 558ed6fcd4..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/rest.ts +++ /dev/null @@ -1,623 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface OracleAggregateExchangeRatePrevote { - hash?: string; - voter?: string; - - /** @format uint64 */ - submit_block?: string; -} - -export interface OracleAggregateExchangeRateVote { - exchange_rate_tuples?: OracleExchangeRateTuple[]; - voter?: string; -} - -export interface OracleDenom { - name?: string; -} - -export interface OracleDenomOracleExchangeRatePair { - denom?: string; - oracle_exchange_rate?: OracleOracleExchangeRate; -} - -export interface OracleExchangeRateTuple { - denom?: string; - exchange_rate?: string; -} - -/** - * MsgAggregateExchangeRateVoteResponse defines the Msg/AggregateExchangeRateVote response type. - */ -export type OracleMsgAggregateExchangeRateCombinedVoteResponse = object; - -/** - * MsgAggregateExchangeRatePrevoteResponse defines the Msg/AggregateExchangeRatePrevote response type. - */ -export type OracleMsgAggregateExchangeRatePrevoteResponse = object; - -/** - * MsgAggregateExchangeRateVoteResponse defines the Msg/AggregateExchangeRateVote response type. - */ -export type OracleMsgAggregateExchangeRateVoteResponse = object; - -/** - * MsgDelegateFeedConsentResponse defines the Msg/DelegateFeedConsent response type. - */ -export type OracleMsgDelegateFeedConsentResponse = object; - -export interface OracleOracleExchangeRate { - exchange_rate?: string; - last_update?: string; -} - -export interface OracleOracleTwap { - denom?: string; - twap?: string; - - /** @format int64 */ - lookback_seconds?: string; -} - -export interface OracleParams { - /** @format uint64 */ - vote_period?: string; - vote_threshold?: string; - reward_band?: string; - whitelist?: OracleDenom[]; - slash_fraction?: string; - - /** @format uint64 */ - slash_window?: string; - min_valid_per_window?: string; - - /** @format int64 */ - lookback_duration?: string; -} - -export interface OraclePriceSnapshot { - /** @format int64 */ - snapshotTimestamp?: string; - price_snapshot_items?: OraclePriceSnapshotItem[]; -} - -export interface OraclePriceSnapshotItem { - denom?: string; - oracle_exchange_rate?: OracleOracleExchangeRate; -} - -/** -* QueryActivesResponse is response type for the -Query/Actives RPC method. -*/ -export interface OracleQueryActivesResponse { - /** actives defines a list of the denomination which oracle prices aggreed upon. */ - actives?: string[]; -} - -/** -* QueryAggregatePrevoteResponse is response type for the -Query/AggregatePrevote RPC method. -*/ -export interface OracleQueryAggregatePrevoteResponse { - aggregate_prevote?: OracleAggregateExchangeRatePrevote; -} - -/** -* QueryAggregatePrevotesResponse is response type for the -Query/AggregatePrevotes RPC method. -*/ -export interface OracleQueryAggregatePrevotesResponse { - aggregate_prevotes?: OracleAggregateExchangeRatePrevote[]; -} - -/** -* QueryAggregateVoteResponse is response type for the -Query/AggregateVote RPC method. -*/ -export interface OracleQueryAggregateVoteResponse { - aggregate_vote?: OracleAggregateExchangeRateVote; -} - -/** -* QueryAggregateVotesResponse is response type for the -Query/AggregateVotes RPC method. -*/ -export interface OracleQueryAggregateVotesResponse { - aggregate_votes?: OracleAggregateExchangeRateVote[]; -} - -/** -* QueryExchangeRateResponse is response type for the -Query/ExchangeRate RPC method. -*/ -export interface OracleQueryExchangeRateResponse { - oracle_exchange_rate?: OracleOracleExchangeRate; -} - -/** -* QueryExchangeRatesResponse is response type for the -Query/ExchangeRates RPC method. -*/ -export interface OracleQueryExchangeRatesResponse { - /** exchange_rates defines a list of the exchange rate for all whitelisted denoms. */ - denom_oracle_exchange_rate_pairs?: OracleDenomOracleExchangeRatePair[]; -} - -/** -* QueryFeederDelegationResponse is response type for the -Query/FeederDelegation RPC method. -*/ -export interface OracleQueryFeederDelegationResponse { - feeder_addr?: string; -} - -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface OracleQueryParamsResponse { - /** params defines the parameters of the module. */ - params?: OracleParams; -} - -export interface OracleQueryPriceSnapshotHistoryResponse { - price_snapshots?: OraclePriceSnapshot[]; -} - -export interface OracleQueryTwapsResponse { - oracle_twaps?: OracleOracleTwap[]; -} - -/** -* QueryVotePenaltyCounterResponse is response type for the -Query/VotePenaltyCounter RPC method. -*/ -export interface OracleQueryVotePenaltyCounterResponse { - vote_penalty_counter?: OracleVotePenaltyCounter; -} - -/** -* QueryVoteTargetsResponse is response type for the -Query/VoteTargets RPC method. -*/ -export interface OracleQueryVoteTargetsResponse { - /** - * vote_targets defines a list of the denomination in which everyone - * should vote in the current vote period. - */ - vote_targets?: string[]; -} - -export interface OracleVotePenaltyCounter { - /** @format uint64 */ - miss_count?: string; - - /** @format uint64 */ - abstain_count?: string; -} - -export interface ProtobufAny { - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title oracle/genesis.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryActives - * @summary Actives returns all active denoms - * @request GET:/sei-protocol/sei-chain/oracle/denoms/actives - */ - queryActives = (params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/sei-chain/oracle/denoms/actives`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryExchangeRates - * @summary ExchangeRates returns exchange rates of all denoms - * @request GET:/sei-protocol/sei-chain/oracle/denoms/exchange_rates - */ - queryExchangeRates = (params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/sei-chain/oracle/denoms/exchange_rates`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryPriceSnapshotHistory - * @summary PriceSnapshotHistory returns the history of price snapshots for all assets - * @request GET:/sei-protocol/sei-chain/oracle/denoms/price_snapshot_history - */ - queryPriceSnapshotHistory = (params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/sei-chain/oracle/denoms/price_snapshot_history`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryTwaps - * @request GET:/sei-protocol/sei-chain/oracle/denoms/twaps - */ - queryTwaps = (query?: { lookback_seconds?: string }, params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/sei-chain/oracle/denoms/twaps`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryVoteTargets - * @summary VoteTargets returns all vote target denoms - * @request GET:/sei-protocol/sei-chain/oracle/denoms/vote_targets - */ - queryVoteTargets = (params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/sei-chain/oracle/denoms/vote_targets`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryExchangeRate - * @summary ExchangeRate returns exchange rate of a denom - * @request GET:/sei-protocol/sei-chain/oracle/denoms/{denom}/exchange_rate - */ - queryExchangeRate = (denom: string, params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/sei-chain/oracle/denoms/${denom}/exchange_rate`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params queries all parameters. - * @request GET:/sei-protocol/sei-chain/oracle/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/sei-chain/oracle/params`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryAggregatePrevotes - * @summary AggregatePrevotes returns aggregate prevotes of all validators - * @request GET:/sei-protocol/sei-chain/oracle/validators/aggregate_prevotes - */ - queryAggregatePrevotes = (params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/sei-chain/oracle/validators/aggregate_prevotes`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryAggregateVotes - * @summary AggregateVotes returns aggregate votes of all validators - * @request GET:/sei-protocol/sei-chain/oracle/validators/aggregate_votes - */ - queryAggregateVotes = (params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/sei-chain/oracle/validators/aggregate_votes`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryAggregatePrevote - * @summary AggregatePrevote returns an aggregate prevote of a validator - * @request GET:/sei-protocol/sei-chain/oracle/validators/{validator_addr}/aggregate_prevote - */ - queryAggregatePrevote = (validator_addr: string, params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/sei-chain/oracle/validators/${validator_addr}/aggregate_prevote`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryAggregateVote - * @summary AggregateVote returns an aggregate vote of a validator - * @request GET:/sei-protocol/sei-chain/oracle/validators/{validator_addr}/aggregate_vote - */ - queryAggregateVote = (validator_addr: string, params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/sei-chain/oracle/validators/${validator_addr}/aggregate_vote`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryFeederDelegation - * @summary FeederDelegation returns feeder delegation of a validator - * @request GET:/sei-protocol/sei-chain/oracle/validators/{validator_addr}/feeder - */ - queryFeederDelegation = (validator_addr: string, params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/sei-chain/oracle/validators/${validator_addr}/feeder`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryVotePenaltyCounter - * @summary MissCounter returns oracle miss counter of a validator - * @request GET:/sei-protocol/sei-chain/oracle/validators/{validator_addr}/vote_penalty_counter - */ - queryVotePenaltyCounter = (validator_addr: string, params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/sei-chain/oracle/validators/${validator_addr}/vote_penalty_counter`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac6a3..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb30cd..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98406..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30bdc6..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/gogoproto/gogo.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/gogoproto/gogo.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/annotations.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0776..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/annotations.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/annotations.js deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/annotations.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/http.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7fb6d..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/http.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/http.js deleted file mode 100644 index eb14b5b699..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/http.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index a3076569af..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,1022 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 252725808b..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4144 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } - else { - message.proto3Optional = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } - else { - message.proto3Optional = false; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/genesis.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/genesis.d.ts deleted file mode 100644 index a6be9bd9ec..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/genesis.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Params, ExchangeRateTuple, AggregateExchangeRatePrevote, AggregateExchangeRateVote, VotePenaltyCounter } from "../oracle/oracle"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.oracle"; -export interface GenesisState { - params: Params | undefined; - feederDelegations: FeederDelegation[]; - exchangeRates: ExchangeRateTuple[]; - penaltyCounters: PenaltyCounter[]; - aggregateExchangeRatePrevotes: AggregateExchangeRatePrevote[]; - aggregateExchangeRateVotes: AggregateExchangeRateVote[]; -} -export interface FeederDelegation { - feederAddress: string; - validatorAddress: string; -} -export interface PenaltyCounter { - validatorAddress: string; - votePenaltyCounter: VotePenaltyCounter | undefined; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -export declare const FeederDelegation: { - encode(message: FeederDelegation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FeederDelegation; - fromJSON(object: any): FeederDelegation; - toJSON(message: FeederDelegation): unknown; - fromPartial(object: DeepPartial): FeederDelegation; -}; -export declare const PenaltyCounter: { - encode(message: PenaltyCounter, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PenaltyCounter; - fromJSON(object: any): PenaltyCounter; - toJSON(message: PenaltyCounter): unknown; - fromPartial(object: DeepPartial): PenaltyCounter; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/genesis.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/genesis.js deleted file mode 100644 index 995f3df1fd..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/genesis.js +++ /dev/null @@ -1,344 +0,0 @@ -/* eslint-disable */ -import { Params, ExchangeRateTuple, AggregateExchangeRatePrevote, AggregateExchangeRateVote, VotePenaltyCounter, } from "../oracle/oracle"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.oracle"; -const baseGenesisState = {}; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.feederDelegations) { - FeederDelegation.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.exchangeRates) { - ExchangeRateTuple.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.penaltyCounters) { - PenaltyCounter.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.aggregateExchangeRatePrevotes) { - AggregateExchangeRatePrevote.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.aggregateExchangeRateVotes) { - AggregateExchangeRateVote.encode(v, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.feederDelegations = []; - message.exchangeRates = []; - message.penaltyCounters = []; - message.aggregateExchangeRatePrevotes = []; - message.aggregateExchangeRateVotes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.feederDelegations.push(FeederDelegation.decode(reader, reader.uint32())); - break; - case 3: - message.exchangeRates.push(ExchangeRateTuple.decode(reader, reader.uint32())); - break; - case 4: - message.penaltyCounters.push(PenaltyCounter.decode(reader, reader.uint32())); - break; - case 5: - message.aggregateExchangeRatePrevotes.push(AggregateExchangeRatePrevote.decode(reader, reader.uint32())); - break; - case 6: - message.aggregateExchangeRateVotes.push(AggregateExchangeRateVote.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.feederDelegations = []; - message.exchangeRates = []; - message.penaltyCounters = []; - message.aggregateExchangeRatePrevotes = []; - message.aggregateExchangeRateVotes = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - if (object.feederDelegations !== undefined && - object.feederDelegations !== null) { - for (const e of object.feederDelegations) { - message.feederDelegations.push(FeederDelegation.fromJSON(e)); - } - } - if (object.exchangeRates !== undefined && object.exchangeRates !== null) { - for (const e of object.exchangeRates) { - message.exchangeRates.push(ExchangeRateTuple.fromJSON(e)); - } - } - if (object.penaltyCounters !== undefined && - object.penaltyCounters !== null) { - for (const e of object.penaltyCounters) { - message.penaltyCounters.push(PenaltyCounter.fromJSON(e)); - } - } - if (object.aggregateExchangeRatePrevotes !== undefined && - object.aggregateExchangeRatePrevotes !== null) { - for (const e of object.aggregateExchangeRatePrevotes) { - message.aggregateExchangeRatePrevotes.push(AggregateExchangeRatePrevote.fromJSON(e)); - } - } - if (object.aggregateExchangeRateVotes !== undefined && - object.aggregateExchangeRateVotes !== null) { - for (const e of object.aggregateExchangeRateVotes) { - message.aggregateExchangeRateVotes.push(AggregateExchangeRateVote.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.feederDelegations) { - obj.feederDelegations = message.feederDelegations.map((e) => e ? FeederDelegation.toJSON(e) : undefined); - } - else { - obj.feederDelegations = []; - } - if (message.exchangeRates) { - obj.exchangeRates = message.exchangeRates.map((e) => e ? ExchangeRateTuple.toJSON(e) : undefined); - } - else { - obj.exchangeRates = []; - } - if (message.penaltyCounters) { - obj.penaltyCounters = message.penaltyCounters.map((e) => e ? PenaltyCounter.toJSON(e) : undefined); - } - else { - obj.penaltyCounters = []; - } - if (message.aggregateExchangeRatePrevotes) { - obj.aggregateExchangeRatePrevotes = message.aggregateExchangeRatePrevotes.map((e) => (e ? AggregateExchangeRatePrevote.toJSON(e) : undefined)); - } - else { - obj.aggregateExchangeRatePrevotes = []; - } - if (message.aggregateExchangeRateVotes) { - obj.aggregateExchangeRateVotes = message.aggregateExchangeRateVotes.map((e) => (e ? AggregateExchangeRateVote.toJSON(e) : undefined)); - } - else { - obj.aggregateExchangeRateVotes = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.feederDelegations = []; - message.exchangeRates = []; - message.penaltyCounters = []; - message.aggregateExchangeRatePrevotes = []; - message.aggregateExchangeRateVotes = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - if (object.feederDelegations !== undefined && - object.feederDelegations !== null) { - for (const e of object.feederDelegations) { - message.feederDelegations.push(FeederDelegation.fromPartial(e)); - } - } - if (object.exchangeRates !== undefined && object.exchangeRates !== null) { - for (const e of object.exchangeRates) { - message.exchangeRates.push(ExchangeRateTuple.fromPartial(e)); - } - } - if (object.penaltyCounters !== undefined && - object.penaltyCounters !== null) { - for (const e of object.penaltyCounters) { - message.penaltyCounters.push(PenaltyCounter.fromPartial(e)); - } - } - if (object.aggregateExchangeRatePrevotes !== undefined && - object.aggregateExchangeRatePrevotes !== null) { - for (const e of object.aggregateExchangeRatePrevotes) { - message.aggregateExchangeRatePrevotes.push(AggregateExchangeRatePrevote.fromPartial(e)); - } - } - if (object.aggregateExchangeRateVotes !== undefined && - object.aggregateExchangeRateVotes !== null) { - for (const e of object.aggregateExchangeRateVotes) { - message.aggregateExchangeRateVotes.push(AggregateExchangeRateVote.fromPartial(e)); - } - } - return message; - }, -}; -const baseFeederDelegation = { - feederAddress: "", - validatorAddress: "", -}; -export const FeederDelegation = { - encode(message, writer = Writer.create()) { - if (message.feederAddress !== "") { - writer.uint32(10).string(message.feederAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFeederDelegation }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.feederAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFeederDelegation }; - if (object.feederAddress !== undefined && object.feederAddress !== null) { - message.feederAddress = String(object.feederAddress); - } - else { - message.feederAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.feederAddress !== undefined && - (obj.feederAddress = message.feederAddress); - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object) { - const message = { ...baseFeederDelegation }; - if (object.feederAddress !== undefined && object.feederAddress !== null) { - message.feederAddress = object.feederAddress; - } - else { - message.feederAddress = ""; - } - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - return message; - }, -}; -const basePenaltyCounter = { validatorAddress: "" }; -export const PenaltyCounter = { - encode(message, writer = Writer.create()) { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.votePenaltyCounter !== undefined) { - VotePenaltyCounter.encode(message.votePenaltyCounter, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePenaltyCounter }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.votePenaltyCounter = VotePenaltyCounter.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePenaltyCounter }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = String(object.validatorAddress); - } - else { - message.validatorAddress = ""; - } - if (object.votePenaltyCounter !== undefined && - object.votePenaltyCounter !== null) { - message.votePenaltyCounter = VotePenaltyCounter.fromJSON(object.votePenaltyCounter); - } - else { - message.votePenaltyCounter = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddress !== undefined && - (obj.validatorAddress = message.validatorAddress); - message.votePenaltyCounter !== undefined && - (obj.votePenaltyCounter = message.votePenaltyCounter - ? VotePenaltyCounter.toJSON(message.votePenaltyCounter) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...basePenaltyCounter }; - if (object.validatorAddress !== undefined && - object.validatorAddress !== null) { - message.validatorAddress = object.validatorAddress; - } - else { - message.validatorAddress = ""; - } - if (object.votePenaltyCounter !== undefined && - object.votePenaltyCounter !== null) { - message.votePenaltyCounter = VotePenaltyCounter.fromPartial(object.votePenaltyCounter); - } - else { - message.votePenaltyCounter = undefined; - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/genesis.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/genesis.ts deleted file mode 100644 index eb99c9f4b1..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/genesis.ts +++ /dev/null @@ -1,453 +0,0 @@ -/* eslint-disable */ -import { - Params, - ExchangeRateTuple, - AggregateExchangeRatePrevote, - AggregateExchangeRateVote, - VotePenaltyCounter, -} from "../oracle/oracle"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.oracle"; - -export interface GenesisState { - params: Params | undefined; - feeder_delegations: FeederDelegation[]; - exchange_rates: ExchangeRateTuple[]; - penalty_counters: PenaltyCounter[]; - aggregate_exchange_rate_prevotes: AggregateExchangeRatePrevote[]; - aggregate_exchange_rate_votes: AggregateExchangeRateVote[]; -} - -export interface FeederDelegation { - feeder_address: string; - validator_address: string; -} - -export interface PenaltyCounter { - validator_address: string; - vote_penalty_counter: VotePenaltyCounter | undefined; -} - -const baseGenesisState: object = {}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.feeder_delegations) { - FeederDelegation.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.exchange_rates) { - ExchangeRateTuple.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.penalty_counters) { - PenaltyCounter.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.aggregate_exchange_rate_prevotes) { - AggregateExchangeRatePrevote.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.aggregate_exchange_rate_votes) { - AggregateExchangeRateVote.encode(v!, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.feeder_delegations = []; - message.exchange_rates = []; - message.penalty_counters = []; - message.aggregate_exchange_rate_prevotes = []; - message.aggregate_exchange_rate_votes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.feeder_delegations.push( - FeederDelegation.decode(reader, reader.uint32()) - ); - break; - case 3: - message.exchange_rates.push( - ExchangeRateTuple.decode(reader, reader.uint32()) - ); - break; - case 4: - message.penalty_counters.push( - PenaltyCounter.decode(reader, reader.uint32()) - ); - break; - case 5: - message.aggregate_exchange_rate_prevotes.push( - AggregateExchangeRatePrevote.decode(reader, reader.uint32()) - ); - break; - case 6: - message.aggregate_exchange_rate_votes.push( - AggregateExchangeRateVote.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.feeder_delegations = []; - message.exchange_rates = []; - message.penalty_counters = []; - message.aggregate_exchange_rate_prevotes = []; - message.aggregate_exchange_rate_votes = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if ( - object.feeder_delegations !== undefined && - object.feeder_delegations !== null - ) { - for (const e of object.feeder_delegations) { - message.feeder_delegations.push(FeederDelegation.fromJSON(e)); - } - } - if (object.exchange_rates !== undefined && object.exchange_rates !== null) { - for (const e of object.exchange_rates) { - message.exchange_rates.push(ExchangeRateTuple.fromJSON(e)); - } - } - if ( - object.penalty_counters !== undefined && - object.penalty_counters !== null - ) { - for (const e of object.penalty_counters) { - message.penalty_counters.push(PenaltyCounter.fromJSON(e)); - } - } - if ( - object.aggregate_exchange_rate_prevotes !== undefined && - object.aggregate_exchange_rate_prevotes !== null - ) { - for (const e of object.aggregate_exchange_rate_prevotes) { - message.aggregate_exchange_rate_prevotes.push( - AggregateExchangeRatePrevote.fromJSON(e) - ); - } - } - if ( - object.aggregate_exchange_rate_votes !== undefined && - object.aggregate_exchange_rate_votes !== null - ) { - for (const e of object.aggregate_exchange_rate_votes) { - message.aggregate_exchange_rate_votes.push( - AggregateExchangeRateVote.fromJSON(e) - ); - } - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.feeder_delegations) { - obj.feeder_delegations = message.feeder_delegations.map((e) => - e ? FeederDelegation.toJSON(e) : undefined - ); - } else { - obj.feeder_delegations = []; - } - if (message.exchange_rates) { - obj.exchange_rates = message.exchange_rates.map((e) => - e ? ExchangeRateTuple.toJSON(e) : undefined - ); - } else { - obj.exchange_rates = []; - } - if (message.penalty_counters) { - obj.penalty_counters = message.penalty_counters.map((e) => - e ? PenaltyCounter.toJSON(e) : undefined - ); - } else { - obj.penalty_counters = []; - } - if (message.aggregate_exchange_rate_prevotes) { - obj.aggregate_exchange_rate_prevotes = message.aggregate_exchange_rate_prevotes.map( - (e) => (e ? AggregateExchangeRatePrevote.toJSON(e) : undefined) - ); - } else { - obj.aggregate_exchange_rate_prevotes = []; - } - if (message.aggregate_exchange_rate_votes) { - obj.aggregate_exchange_rate_votes = message.aggregate_exchange_rate_votes.map( - (e) => (e ? AggregateExchangeRateVote.toJSON(e) : undefined) - ); - } else { - obj.aggregate_exchange_rate_votes = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.feeder_delegations = []; - message.exchange_rates = []; - message.penalty_counters = []; - message.aggregate_exchange_rate_prevotes = []; - message.aggregate_exchange_rate_votes = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if ( - object.feeder_delegations !== undefined && - object.feeder_delegations !== null - ) { - for (const e of object.feeder_delegations) { - message.feeder_delegations.push(FeederDelegation.fromPartial(e)); - } - } - if (object.exchange_rates !== undefined && object.exchange_rates !== null) { - for (const e of object.exchange_rates) { - message.exchange_rates.push(ExchangeRateTuple.fromPartial(e)); - } - } - if ( - object.penalty_counters !== undefined && - object.penalty_counters !== null - ) { - for (const e of object.penalty_counters) { - message.penalty_counters.push(PenaltyCounter.fromPartial(e)); - } - } - if ( - object.aggregate_exchange_rate_prevotes !== undefined && - object.aggregate_exchange_rate_prevotes !== null - ) { - for (const e of object.aggregate_exchange_rate_prevotes) { - message.aggregate_exchange_rate_prevotes.push( - AggregateExchangeRatePrevote.fromPartial(e) - ); - } - } - if ( - object.aggregate_exchange_rate_votes !== undefined && - object.aggregate_exchange_rate_votes !== null - ) { - for (const e of object.aggregate_exchange_rate_votes) { - message.aggregate_exchange_rate_votes.push( - AggregateExchangeRateVote.fromPartial(e) - ); - } - } - return message; - }, -}; - -const baseFeederDelegation: object = { - feeder_address: "", - validator_address: "", -}; - -export const FeederDelegation = { - encode(message: FeederDelegation, writer: Writer = Writer.create()): Writer { - if (message.feeder_address !== "") { - writer.uint32(10).string(message.feeder_address); - } - if (message.validator_address !== "") { - writer.uint32(18).string(message.validator_address); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FeederDelegation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFeederDelegation } as FeederDelegation; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.feeder_address = reader.string(); - break; - case 2: - message.validator_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FeederDelegation { - const message = { ...baseFeederDelegation } as FeederDelegation; - if (object.feeder_address !== undefined && object.feeder_address !== null) { - message.feeder_address = String(object.feeder_address); - } else { - message.feeder_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - return message; - }, - - toJSON(message: FeederDelegation): unknown { - const obj: any = {}; - message.feeder_address !== undefined && - (obj.feeder_address = message.feeder_address); - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - return obj; - }, - - fromPartial(object: DeepPartial): FeederDelegation { - const message = { ...baseFeederDelegation } as FeederDelegation; - if (object.feeder_address !== undefined && object.feeder_address !== null) { - message.feeder_address = object.feeder_address; - } else { - message.feeder_address = ""; - } - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - return message; - }, -}; - -const basePenaltyCounter: object = { validator_address: "" }; - -export const PenaltyCounter = { - encode(message: PenaltyCounter, writer: Writer = Writer.create()): Writer { - if (message.validator_address !== "") { - writer.uint32(10).string(message.validator_address); - } - if (message.vote_penalty_counter !== undefined) { - VotePenaltyCounter.encode( - message.vote_penalty_counter, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PenaltyCounter { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePenaltyCounter } as PenaltyCounter; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_address = reader.string(); - break; - case 2: - message.vote_penalty_counter = VotePenaltyCounter.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PenaltyCounter { - const message = { ...basePenaltyCounter } as PenaltyCounter; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = String(object.validator_address); - } else { - message.validator_address = ""; - } - if ( - object.vote_penalty_counter !== undefined && - object.vote_penalty_counter !== null - ) { - message.vote_penalty_counter = VotePenaltyCounter.fromJSON( - object.vote_penalty_counter - ); - } else { - message.vote_penalty_counter = undefined; - } - return message; - }, - - toJSON(message: PenaltyCounter): unknown { - const obj: any = {}; - message.validator_address !== undefined && - (obj.validator_address = message.validator_address); - message.vote_penalty_counter !== undefined && - (obj.vote_penalty_counter = message.vote_penalty_counter - ? VotePenaltyCounter.toJSON(message.vote_penalty_counter) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): PenaltyCounter { - const message = { ...basePenaltyCounter } as PenaltyCounter; - if ( - object.validator_address !== undefined && - object.validator_address !== null - ) { - message.validator_address = object.validator_address; - } else { - message.validator_address = ""; - } - if ( - object.vote_penalty_counter !== undefined && - object.vote_penalty_counter !== null - ) { - message.vote_penalty_counter = VotePenaltyCounter.fromPartial( - object.vote_penalty_counter - ); - } else { - message.vote_penalty_counter = undefined; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/oracle.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/oracle.d.ts deleted file mode 100644 index 214e3398f3..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/oracle.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.oracle"; -export interface Params { - votePeriod: number; - voteThreshold: string; - rewardBand: string; - whitelist: Denom[]; - slashFraction: string; - slashWindow: number; - minValidPerWindow: string; - lookbackDuration: number; -} -export interface Denom { - name: string; -} -export interface AggregateExchangeRatePrevote { - hash: string; - voter: string; - submitBlock: number; -} -export interface AggregateExchangeRateVote { - exchangeRateTuples: ExchangeRateTuple[]; - voter: string; -} -export interface ExchangeRateTuple { - denom: string; - exchangeRate: string; -} -export interface OracleExchangeRate { - exchangeRate: string; - lastUpdate: string; -} -export interface PriceSnapshotItem { - denom: string; - oracleExchangeRate: OracleExchangeRate | undefined; -} -export interface PriceSnapshot { - snapshotTimestamp: number; - priceSnapshotItems: PriceSnapshotItem[]; -} -export interface OracleTwap { - denom: string; - twap: string; - lookbackSeconds: number; -} -export interface VotePenaltyCounter { - missCount: number; - abstainCount: number; -} -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -export declare const Denom: { - encode(message: Denom, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Denom; - fromJSON(object: any): Denom; - toJSON(message: Denom): unknown; - fromPartial(object: DeepPartial): Denom; -}; -export declare const AggregateExchangeRatePrevote: { - encode(message: AggregateExchangeRatePrevote, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): AggregateExchangeRatePrevote; - fromJSON(object: any): AggregateExchangeRatePrevote; - toJSON(message: AggregateExchangeRatePrevote): unknown; - fromPartial(object: DeepPartial): AggregateExchangeRatePrevote; -}; -export declare const AggregateExchangeRateVote: { - encode(message: AggregateExchangeRateVote, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): AggregateExchangeRateVote; - fromJSON(object: any): AggregateExchangeRateVote; - toJSON(message: AggregateExchangeRateVote): unknown; - fromPartial(object: DeepPartial): AggregateExchangeRateVote; -}; -export declare const ExchangeRateTuple: { - encode(message: ExchangeRateTuple, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExchangeRateTuple; - fromJSON(object: any): ExchangeRateTuple; - toJSON(message: ExchangeRateTuple): unknown; - fromPartial(object: DeepPartial): ExchangeRateTuple; -}; -export declare const OracleExchangeRate: { - encode(message: OracleExchangeRate, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OracleExchangeRate; - fromJSON(object: any): OracleExchangeRate; - toJSON(message: OracleExchangeRate): unknown; - fromPartial(object: DeepPartial): OracleExchangeRate; -}; -export declare const PriceSnapshotItem: { - encode(message: PriceSnapshotItem, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PriceSnapshotItem; - fromJSON(object: any): PriceSnapshotItem; - toJSON(message: PriceSnapshotItem): unknown; - fromPartial(object: DeepPartial): PriceSnapshotItem; -}; -export declare const PriceSnapshot: { - encode(message: PriceSnapshot, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PriceSnapshot; - fromJSON(object: any): PriceSnapshot; - toJSON(message: PriceSnapshot): unknown; - fromPartial(object: DeepPartial): PriceSnapshot; -}; -export declare const OracleTwap: { - encode(message: OracleTwap, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OracleTwap; - fromJSON(object: any): OracleTwap; - toJSON(message: OracleTwap): unknown; - fromPartial(object: DeepPartial): OracleTwap; -}; -export declare const VotePenaltyCounter: { - encode(message: VotePenaltyCounter, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): VotePenaltyCounter; - fromJSON(object: any): VotePenaltyCounter; - toJSON(message: VotePenaltyCounter): unknown; - fromPartial(object: DeepPartial): VotePenaltyCounter; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/oracle.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/oracle.js deleted file mode 100644 index 4e6196c57e..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/oracle.js +++ /dev/null @@ -1,928 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.oracle"; -const baseParams = { - votePeriod: 0, - voteThreshold: "", - rewardBand: "", - slashFraction: "", - slashWindow: 0, - minValidPerWindow: "", - lookbackDuration: 0, -}; -export const Params = { - encode(message, writer = Writer.create()) { - if (message.votePeriod !== 0) { - writer.uint32(8).uint64(message.votePeriod); - } - if (message.voteThreshold !== "") { - writer.uint32(18).string(message.voteThreshold); - } - if (message.rewardBand !== "") { - writer.uint32(26).string(message.rewardBand); - } - for (const v of message.whitelist) { - Denom.encode(v, writer.uint32(34).fork()).ldelim(); - } - if (message.slashFraction !== "") { - writer.uint32(42).string(message.slashFraction); - } - if (message.slashWindow !== 0) { - writer.uint32(48).uint64(message.slashWindow); - } - if (message.minValidPerWindow !== "") { - writer.uint32(58).string(message.minValidPerWindow); - } - if (message.lookbackDuration !== 0) { - writer.uint32(72).int64(message.lookbackDuration); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - message.whitelist = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votePeriod = longToNumber(reader.uint64()); - break; - case 2: - message.voteThreshold = reader.string(); - break; - case 3: - message.rewardBand = reader.string(); - break; - case 4: - message.whitelist.push(Denom.decode(reader, reader.uint32())); - break; - case 5: - message.slashFraction = reader.string(); - break; - case 6: - message.slashWindow = longToNumber(reader.uint64()); - break; - case 7: - message.minValidPerWindow = reader.string(); - break; - case 9: - message.lookbackDuration = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - message.whitelist = []; - if (object.votePeriod !== undefined && object.votePeriod !== null) { - message.votePeriod = Number(object.votePeriod); - } - else { - message.votePeriod = 0; - } - if (object.voteThreshold !== undefined && object.voteThreshold !== null) { - message.voteThreshold = String(object.voteThreshold); - } - else { - message.voteThreshold = ""; - } - if (object.rewardBand !== undefined && object.rewardBand !== null) { - message.rewardBand = String(object.rewardBand); - } - else { - message.rewardBand = ""; - } - if (object.whitelist !== undefined && object.whitelist !== null) { - for (const e of object.whitelist) { - message.whitelist.push(Denom.fromJSON(e)); - } - } - if (object.slashFraction !== undefined && object.slashFraction !== null) { - message.slashFraction = String(object.slashFraction); - } - else { - message.slashFraction = ""; - } - if (object.slashWindow !== undefined && object.slashWindow !== null) { - message.slashWindow = Number(object.slashWindow); - } - else { - message.slashWindow = 0; - } - if (object.minValidPerWindow !== undefined && - object.minValidPerWindow !== null) { - message.minValidPerWindow = String(object.minValidPerWindow); - } - else { - message.minValidPerWindow = ""; - } - if (object.lookbackDuration !== undefined && - object.lookbackDuration !== null) { - message.lookbackDuration = Number(object.lookbackDuration); - } - else { - message.lookbackDuration = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.votePeriod !== undefined && (obj.votePeriod = message.votePeriod); - message.voteThreshold !== undefined && - (obj.voteThreshold = message.voteThreshold); - message.rewardBand !== undefined && (obj.rewardBand = message.rewardBand); - if (message.whitelist) { - obj.whitelist = message.whitelist.map((e) => e ? Denom.toJSON(e) : undefined); - } - else { - obj.whitelist = []; - } - message.slashFraction !== undefined && - (obj.slashFraction = message.slashFraction); - message.slashWindow !== undefined && - (obj.slashWindow = message.slashWindow); - message.minValidPerWindow !== undefined && - (obj.minValidPerWindow = message.minValidPerWindow); - message.lookbackDuration !== undefined && - (obj.lookbackDuration = message.lookbackDuration); - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - message.whitelist = []; - if (object.votePeriod !== undefined && object.votePeriod !== null) { - message.votePeriod = object.votePeriod; - } - else { - message.votePeriod = 0; - } - if (object.voteThreshold !== undefined && object.voteThreshold !== null) { - message.voteThreshold = object.voteThreshold; - } - else { - message.voteThreshold = ""; - } - if (object.rewardBand !== undefined && object.rewardBand !== null) { - message.rewardBand = object.rewardBand; - } - else { - message.rewardBand = ""; - } - if (object.whitelist !== undefined && object.whitelist !== null) { - for (const e of object.whitelist) { - message.whitelist.push(Denom.fromPartial(e)); - } - } - if (object.slashFraction !== undefined && object.slashFraction !== null) { - message.slashFraction = object.slashFraction; - } - else { - message.slashFraction = ""; - } - if (object.slashWindow !== undefined && object.slashWindow !== null) { - message.slashWindow = object.slashWindow; - } - else { - message.slashWindow = 0; - } - if (object.minValidPerWindow !== undefined && - object.minValidPerWindow !== null) { - message.minValidPerWindow = object.minValidPerWindow; - } - else { - message.minValidPerWindow = ""; - } - if (object.lookbackDuration !== undefined && - object.lookbackDuration !== null) { - message.lookbackDuration = object.lookbackDuration; - } - else { - message.lookbackDuration = 0; - } - return message; - }, -}; -const baseDenom = { name: "" }; -export const Denom = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDenom }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDenom }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - return obj; - }, - fromPartial(object) { - const message = { ...baseDenom }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - return message; - }, -}; -const baseAggregateExchangeRatePrevote = { - hash: "", - voter: "", - submitBlock: 0, -}; -export const AggregateExchangeRatePrevote = { - encode(message, writer = Writer.create()) { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.submitBlock !== 0) { - writer.uint32(24).uint64(message.submitBlock); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseAggregateExchangeRatePrevote, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.submitBlock = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseAggregateExchangeRatePrevote, - }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = String(object.hash); - } - else { - message.hash = ""; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } - else { - message.voter = ""; - } - if (object.submitBlock !== undefined && object.submitBlock !== null) { - message.submitBlock = Number(object.submitBlock); - } - else { - message.submitBlock = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && (obj.hash = message.hash); - message.voter !== undefined && (obj.voter = message.voter); - message.submitBlock !== undefined && - (obj.submitBlock = message.submitBlock); - return obj; - }, - fromPartial(object) { - const message = { - ...baseAggregateExchangeRatePrevote, - }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = ""; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } - else { - message.voter = ""; - } - if (object.submitBlock !== undefined && object.submitBlock !== null) { - message.submitBlock = object.submitBlock; - } - else { - message.submitBlock = 0; - } - return message; - }, -}; -const baseAggregateExchangeRateVote = { voter: "" }; -export const AggregateExchangeRateVote = { - encode(message, writer = Writer.create()) { - for (const v of message.exchangeRateTuples) { - ExchangeRateTuple.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseAggregateExchangeRateVote, - }; - message.exchangeRateTuples = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exchangeRateTuples.push(ExchangeRateTuple.decode(reader, reader.uint32())); - break; - case 2: - message.voter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseAggregateExchangeRateVote, - }; - message.exchangeRateTuples = []; - if (object.exchangeRateTuples !== undefined && - object.exchangeRateTuples !== null) { - for (const e of object.exchangeRateTuples) { - message.exchangeRateTuples.push(ExchangeRateTuple.fromJSON(e)); - } - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } - else { - message.voter = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.exchangeRateTuples) { - obj.exchangeRateTuples = message.exchangeRateTuples.map((e) => e ? ExchangeRateTuple.toJSON(e) : undefined); - } - else { - obj.exchangeRateTuples = []; - } - message.voter !== undefined && (obj.voter = message.voter); - return obj; - }, - fromPartial(object) { - const message = { - ...baseAggregateExchangeRateVote, - }; - message.exchangeRateTuples = []; - if (object.exchangeRateTuples !== undefined && - object.exchangeRateTuples !== null) { - for (const e of object.exchangeRateTuples) { - message.exchangeRateTuples.push(ExchangeRateTuple.fromPartial(e)); - } - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } - else { - message.voter = ""; - } - return message; - }, -}; -const baseExchangeRateTuple = { denom: "", exchangeRate: "" }; -export const ExchangeRateTuple = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.exchangeRate !== "") { - writer.uint32(18).string(message.exchangeRate); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExchangeRateTuple }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.exchangeRate = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExchangeRateTuple }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.exchangeRate !== undefined && object.exchangeRate !== null) { - message.exchangeRate = String(object.exchangeRate); - } - else { - message.exchangeRate = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.exchangeRate !== undefined && - (obj.exchangeRate = message.exchangeRate); - return obj; - }, - fromPartial(object) { - const message = { ...baseExchangeRateTuple }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.exchangeRate !== undefined && object.exchangeRate !== null) { - message.exchangeRate = object.exchangeRate; - } - else { - message.exchangeRate = ""; - } - return message; - }, -}; -const baseOracleExchangeRate = { exchangeRate: "", lastUpdate: "" }; -export const OracleExchangeRate = { - encode(message, writer = Writer.create()) { - if (message.exchangeRate !== "") { - writer.uint32(10).string(message.exchangeRate); - } - if (message.lastUpdate !== "") { - writer.uint32(18).string(message.lastUpdate); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOracleExchangeRate }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exchangeRate = reader.string(); - break; - case 2: - message.lastUpdate = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOracleExchangeRate }; - if (object.exchangeRate !== undefined && object.exchangeRate !== null) { - message.exchangeRate = String(object.exchangeRate); - } - else { - message.exchangeRate = ""; - } - if (object.lastUpdate !== undefined && object.lastUpdate !== null) { - message.lastUpdate = String(object.lastUpdate); - } - else { - message.lastUpdate = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.exchangeRate !== undefined && - (obj.exchangeRate = message.exchangeRate); - message.lastUpdate !== undefined && (obj.lastUpdate = message.lastUpdate); - return obj; - }, - fromPartial(object) { - const message = { ...baseOracleExchangeRate }; - if (object.exchangeRate !== undefined && object.exchangeRate !== null) { - message.exchangeRate = object.exchangeRate; - } - else { - message.exchangeRate = ""; - } - if (object.lastUpdate !== undefined && object.lastUpdate !== null) { - message.lastUpdate = object.lastUpdate; - } - else { - message.lastUpdate = ""; - } - return message; - }, -}; -const basePriceSnapshotItem = { denom: "" }; -export const PriceSnapshotItem = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.oracleExchangeRate !== undefined) { - OracleExchangeRate.encode(message.oracleExchangeRate, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePriceSnapshotItem }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.oracleExchangeRate = OracleExchangeRate.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePriceSnapshotItem }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.oracleExchangeRate !== undefined && - object.oracleExchangeRate !== null) { - message.oracleExchangeRate = OracleExchangeRate.fromJSON(object.oracleExchangeRate); - } - else { - message.oracleExchangeRate = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.oracleExchangeRate !== undefined && - (obj.oracleExchangeRate = message.oracleExchangeRate - ? OracleExchangeRate.toJSON(message.oracleExchangeRate) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...basePriceSnapshotItem }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.oracleExchangeRate !== undefined && - object.oracleExchangeRate !== null) { - message.oracleExchangeRate = OracleExchangeRate.fromPartial(object.oracleExchangeRate); - } - else { - message.oracleExchangeRate = undefined; - } - return message; - }, -}; -const basePriceSnapshot = { snapshotTimestamp: 0 }; -export const PriceSnapshot = { - encode(message, writer = Writer.create()) { - if (message.snapshotTimestamp !== 0) { - writer.uint32(8).int64(message.snapshotTimestamp); - } - for (const v of message.priceSnapshotItems) { - PriceSnapshotItem.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePriceSnapshot }; - message.priceSnapshotItems = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshotTimestamp = longToNumber(reader.int64()); - break; - case 2: - message.priceSnapshotItems.push(PriceSnapshotItem.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePriceSnapshot }; - message.priceSnapshotItems = []; - if (object.snapshotTimestamp !== undefined && - object.snapshotTimestamp !== null) { - message.snapshotTimestamp = Number(object.snapshotTimestamp); - } - else { - message.snapshotTimestamp = 0; - } - if (object.priceSnapshotItems !== undefined && - object.priceSnapshotItems !== null) { - for (const e of object.priceSnapshotItems) { - message.priceSnapshotItems.push(PriceSnapshotItem.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.snapshotTimestamp !== undefined && - (obj.snapshotTimestamp = message.snapshotTimestamp); - if (message.priceSnapshotItems) { - obj.priceSnapshotItems = message.priceSnapshotItems.map((e) => e ? PriceSnapshotItem.toJSON(e) : undefined); - } - else { - obj.priceSnapshotItems = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...basePriceSnapshot }; - message.priceSnapshotItems = []; - if (object.snapshotTimestamp !== undefined && - object.snapshotTimestamp !== null) { - message.snapshotTimestamp = object.snapshotTimestamp; - } - else { - message.snapshotTimestamp = 0; - } - if (object.priceSnapshotItems !== undefined && - object.priceSnapshotItems !== null) { - for (const e of object.priceSnapshotItems) { - message.priceSnapshotItems.push(PriceSnapshotItem.fromPartial(e)); - } - } - return message; - }, -}; -const baseOracleTwap = { denom: "", twap: "", lookbackSeconds: 0 }; -export const OracleTwap = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.twap !== "") { - writer.uint32(18).string(message.twap); - } - if (message.lookbackSeconds !== 0) { - writer.uint32(24).int64(message.lookbackSeconds); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOracleTwap }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.twap = reader.string(); - break; - case 3: - message.lookbackSeconds = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOracleTwap }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.twap !== undefined && object.twap !== null) { - message.twap = String(object.twap); - } - else { - message.twap = ""; - } - if (object.lookbackSeconds !== undefined && - object.lookbackSeconds !== null) { - message.lookbackSeconds = Number(object.lookbackSeconds); - } - else { - message.lookbackSeconds = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.twap !== undefined && (obj.twap = message.twap); - message.lookbackSeconds !== undefined && - (obj.lookbackSeconds = message.lookbackSeconds); - return obj; - }, - fromPartial(object) { - const message = { ...baseOracleTwap }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.twap !== undefined && object.twap !== null) { - message.twap = object.twap; - } - else { - message.twap = ""; - } - if (object.lookbackSeconds !== undefined && - object.lookbackSeconds !== null) { - message.lookbackSeconds = object.lookbackSeconds; - } - else { - message.lookbackSeconds = 0; - } - return message; - }, -}; -const baseVotePenaltyCounter = { missCount: 0, abstainCount: 0 }; -export const VotePenaltyCounter = { - encode(message, writer = Writer.create()) { - if (message.missCount !== 0) { - writer.uint32(8).uint64(message.missCount); - } - if (message.abstainCount !== 0) { - writer.uint32(16).uint64(message.abstainCount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVotePenaltyCounter }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.missCount = longToNumber(reader.uint64()); - break; - case 2: - message.abstainCount = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseVotePenaltyCounter }; - if (object.missCount !== undefined && object.missCount !== null) { - message.missCount = Number(object.missCount); - } - else { - message.missCount = 0; - } - if (object.abstainCount !== undefined && object.abstainCount !== null) { - message.abstainCount = Number(object.abstainCount); - } - else { - message.abstainCount = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.missCount !== undefined && (obj.missCount = message.missCount); - message.abstainCount !== undefined && - (obj.abstainCount = message.abstainCount); - return obj; - }, - fromPartial(object) { - const message = { ...baseVotePenaltyCounter }; - if (object.missCount !== undefined && object.missCount !== null) { - message.missCount = object.missCount; - } - else { - message.missCount = 0; - } - if (object.abstainCount !== undefined && object.abstainCount !== null) { - message.abstainCount = object.abstainCount; - } - else { - message.abstainCount = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/oracle.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/oracle.ts deleted file mode 100644 index 53c57fd967..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/oracle.ts +++ /dev/null @@ -1,1080 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.oracle"; - -export interface Params { - vote_period: number; - vote_threshold: string; - reward_band: string; - whitelist: Denom[]; - slash_fraction: string; - slash_window: number; - min_valid_per_window: string; - lookback_duration: number; -} - -export interface Denom { - name: string; -} - -export interface AggregateExchangeRatePrevote { - hash: string; - voter: string; - submit_block: number; -} - -export interface AggregateExchangeRateVote { - exchange_rate_tuples: ExchangeRateTuple[]; - voter: string; -} - -export interface ExchangeRateTuple { - denom: string; - exchange_rate: string; -} - -export interface OracleExchangeRate { - exchange_rate: string; - last_update: string; -} - -export interface PriceSnapshotItem { - denom: string; - oracle_exchange_rate: OracleExchangeRate | undefined; -} - -export interface PriceSnapshot { - snapshotTimestamp: number; - price_snapshot_items: PriceSnapshotItem[]; -} - -export interface OracleTwap { - denom: string; - twap: string; - lookback_seconds: number; -} - -export interface VotePenaltyCounter { - miss_count: number; - abstain_count: number; -} - -const baseParams: object = { - vote_period: 0, - vote_threshold: "", - reward_band: "", - slash_fraction: "", - slash_window: 0, - min_valid_per_window: "", - lookback_duration: 0, -}; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - if (message.vote_period !== 0) { - writer.uint32(8).uint64(message.vote_period); - } - if (message.vote_threshold !== "") { - writer.uint32(18).string(message.vote_threshold); - } - if (message.reward_band !== "") { - writer.uint32(26).string(message.reward_band); - } - for (const v of message.whitelist) { - Denom.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.slash_fraction !== "") { - writer.uint32(42).string(message.slash_fraction); - } - if (message.slash_window !== 0) { - writer.uint32(48).uint64(message.slash_window); - } - if (message.min_valid_per_window !== "") { - writer.uint32(58).string(message.min_valid_per_window); - } - if (message.lookback_duration !== 0) { - writer.uint32(72).int64(message.lookback_duration); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - message.whitelist = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.vote_period = longToNumber(reader.uint64() as Long); - break; - case 2: - message.vote_threshold = reader.string(); - break; - case 3: - message.reward_band = reader.string(); - break; - case 4: - message.whitelist.push(Denom.decode(reader, reader.uint32())); - break; - case 5: - message.slash_fraction = reader.string(); - break; - case 6: - message.slash_window = longToNumber(reader.uint64() as Long); - break; - case 7: - message.min_valid_per_window = reader.string(); - break; - case 9: - message.lookback_duration = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - message.whitelist = []; - if (object.vote_period !== undefined && object.vote_period !== null) { - message.vote_period = Number(object.vote_period); - } else { - message.vote_period = 0; - } - if (object.vote_threshold !== undefined && object.vote_threshold !== null) { - message.vote_threshold = String(object.vote_threshold); - } else { - message.vote_threshold = ""; - } - if (object.reward_band !== undefined && object.reward_band !== null) { - message.reward_band = String(object.reward_band); - } else { - message.reward_band = ""; - } - if (object.whitelist !== undefined && object.whitelist !== null) { - for (const e of object.whitelist) { - message.whitelist.push(Denom.fromJSON(e)); - } - } - if (object.slash_fraction !== undefined && object.slash_fraction !== null) { - message.slash_fraction = String(object.slash_fraction); - } else { - message.slash_fraction = ""; - } - if (object.slash_window !== undefined && object.slash_window !== null) { - message.slash_window = Number(object.slash_window); - } else { - message.slash_window = 0; - } - if ( - object.min_valid_per_window !== undefined && - object.min_valid_per_window !== null - ) { - message.min_valid_per_window = String(object.min_valid_per_window); - } else { - message.min_valid_per_window = ""; - } - if ( - object.lookback_duration !== undefined && - object.lookback_duration !== null - ) { - message.lookback_duration = Number(object.lookback_duration); - } else { - message.lookback_duration = 0; - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - message.vote_period !== undefined && - (obj.vote_period = message.vote_period); - message.vote_threshold !== undefined && - (obj.vote_threshold = message.vote_threshold); - message.reward_band !== undefined && - (obj.reward_band = message.reward_band); - if (message.whitelist) { - obj.whitelist = message.whitelist.map((e) => - e ? Denom.toJSON(e) : undefined - ); - } else { - obj.whitelist = []; - } - message.slash_fraction !== undefined && - (obj.slash_fraction = message.slash_fraction); - message.slash_window !== undefined && - (obj.slash_window = message.slash_window); - message.min_valid_per_window !== undefined && - (obj.min_valid_per_window = message.min_valid_per_window); - message.lookback_duration !== undefined && - (obj.lookback_duration = message.lookback_duration); - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - message.whitelist = []; - if (object.vote_period !== undefined && object.vote_period !== null) { - message.vote_period = object.vote_period; - } else { - message.vote_period = 0; - } - if (object.vote_threshold !== undefined && object.vote_threshold !== null) { - message.vote_threshold = object.vote_threshold; - } else { - message.vote_threshold = ""; - } - if (object.reward_band !== undefined && object.reward_band !== null) { - message.reward_band = object.reward_band; - } else { - message.reward_band = ""; - } - if (object.whitelist !== undefined && object.whitelist !== null) { - for (const e of object.whitelist) { - message.whitelist.push(Denom.fromPartial(e)); - } - } - if (object.slash_fraction !== undefined && object.slash_fraction !== null) { - message.slash_fraction = object.slash_fraction; - } else { - message.slash_fraction = ""; - } - if (object.slash_window !== undefined && object.slash_window !== null) { - message.slash_window = object.slash_window; - } else { - message.slash_window = 0; - } - if ( - object.min_valid_per_window !== undefined && - object.min_valid_per_window !== null - ) { - message.min_valid_per_window = object.min_valid_per_window; - } else { - message.min_valid_per_window = ""; - } - if ( - object.lookback_duration !== undefined && - object.lookback_duration !== null - ) { - message.lookback_duration = object.lookback_duration; - } else { - message.lookback_duration = 0; - } - return message; - }, -}; - -const baseDenom: object = { name: "" }; - -export const Denom = { - encode(message: Denom, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Denom { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDenom } as Denom; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Denom { - const message = { ...baseDenom } as Denom; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - return message; - }, - - toJSON(message: Denom): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - return obj; - }, - - fromPartial(object: DeepPartial): Denom { - const message = { ...baseDenom } as Denom; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - return message; - }, -}; - -const baseAggregateExchangeRatePrevote: object = { - hash: "", - voter: "", - submit_block: 0, -}; - -export const AggregateExchangeRatePrevote = { - encode( - message: AggregateExchangeRatePrevote, - writer: Writer = Writer.create() - ): Writer { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.submit_block !== 0) { - writer.uint32(24).uint64(message.submit_block); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): AggregateExchangeRatePrevote { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseAggregateExchangeRatePrevote, - } as AggregateExchangeRatePrevote; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.submit_block = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): AggregateExchangeRatePrevote { - const message = { - ...baseAggregateExchangeRatePrevote, - } as AggregateExchangeRatePrevote; - if (object.hash !== undefined && object.hash !== null) { - message.hash = String(object.hash); - } else { - message.hash = ""; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } else { - message.voter = ""; - } - if (object.submit_block !== undefined && object.submit_block !== null) { - message.submit_block = Number(object.submit_block); - } else { - message.submit_block = 0; - } - return message; - }, - - toJSON(message: AggregateExchangeRatePrevote): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = message.hash); - message.voter !== undefined && (obj.voter = message.voter); - message.submit_block !== undefined && - (obj.submit_block = message.submit_block); - return obj; - }, - - fromPartial( - object: DeepPartial - ): AggregateExchangeRatePrevote { - const message = { - ...baseAggregateExchangeRatePrevote, - } as AggregateExchangeRatePrevote; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = ""; - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } else { - message.voter = ""; - } - if (object.submit_block !== undefined && object.submit_block !== null) { - message.submit_block = object.submit_block; - } else { - message.submit_block = 0; - } - return message; - }, -}; - -const baseAggregateExchangeRateVote: object = { voter: "" }; - -export const AggregateExchangeRateVote = { - encode( - message: AggregateExchangeRateVote, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.exchange_rate_tuples) { - ExchangeRateTuple.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): AggregateExchangeRateVote { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseAggregateExchangeRateVote, - } as AggregateExchangeRateVote; - message.exchange_rate_tuples = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exchange_rate_tuples.push( - ExchangeRateTuple.decode(reader, reader.uint32()) - ); - break; - case 2: - message.voter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): AggregateExchangeRateVote { - const message = { - ...baseAggregateExchangeRateVote, - } as AggregateExchangeRateVote; - message.exchange_rate_tuples = []; - if ( - object.exchange_rate_tuples !== undefined && - object.exchange_rate_tuples !== null - ) { - for (const e of object.exchange_rate_tuples) { - message.exchange_rate_tuples.push(ExchangeRateTuple.fromJSON(e)); - } - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = String(object.voter); - } else { - message.voter = ""; - } - return message; - }, - - toJSON(message: AggregateExchangeRateVote): unknown { - const obj: any = {}; - if (message.exchange_rate_tuples) { - obj.exchange_rate_tuples = message.exchange_rate_tuples.map((e) => - e ? ExchangeRateTuple.toJSON(e) : undefined - ); - } else { - obj.exchange_rate_tuples = []; - } - message.voter !== undefined && (obj.voter = message.voter); - return obj; - }, - - fromPartial( - object: DeepPartial - ): AggregateExchangeRateVote { - const message = { - ...baseAggregateExchangeRateVote, - } as AggregateExchangeRateVote; - message.exchange_rate_tuples = []; - if ( - object.exchange_rate_tuples !== undefined && - object.exchange_rate_tuples !== null - ) { - for (const e of object.exchange_rate_tuples) { - message.exchange_rate_tuples.push(ExchangeRateTuple.fromPartial(e)); - } - } - if (object.voter !== undefined && object.voter !== null) { - message.voter = object.voter; - } else { - message.voter = ""; - } - return message; - }, -}; - -const baseExchangeRateTuple: object = { denom: "", exchange_rate: "" }; - -export const ExchangeRateTuple = { - encode(message: ExchangeRateTuple, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.exchange_rate !== "") { - writer.uint32(18).string(message.exchange_rate); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExchangeRateTuple { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExchangeRateTuple } as ExchangeRateTuple; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.exchange_rate = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExchangeRateTuple { - const message = { ...baseExchangeRateTuple } as ExchangeRateTuple; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.exchange_rate !== undefined && object.exchange_rate !== null) { - message.exchange_rate = String(object.exchange_rate); - } else { - message.exchange_rate = ""; - } - return message; - }, - - toJSON(message: ExchangeRateTuple): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.exchange_rate !== undefined && - (obj.exchange_rate = message.exchange_rate); - return obj; - }, - - fromPartial(object: DeepPartial): ExchangeRateTuple { - const message = { ...baseExchangeRateTuple } as ExchangeRateTuple; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.exchange_rate !== undefined && object.exchange_rate !== null) { - message.exchange_rate = object.exchange_rate; - } else { - message.exchange_rate = ""; - } - return message; - }, -}; - -const baseOracleExchangeRate: object = { exchange_rate: "", last_update: "" }; - -export const OracleExchangeRate = { - encode( - message: OracleExchangeRate, - writer: Writer = Writer.create() - ): Writer { - if (message.exchange_rate !== "") { - writer.uint32(10).string(message.exchange_rate); - } - if (message.last_update !== "") { - writer.uint32(18).string(message.last_update); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OracleExchangeRate { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOracleExchangeRate } as OracleExchangeRate; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exchange_rate = reader.string(); - break; - case 2: - message.last_update = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OracleExchangeRate { - const message = { ...baseOracleExchangeRate } as OracleExchangeRate; - if (object.exchange_rate !== undefined && object.exchange_rate !== null) { - message.exchange_rate = String(object.exchange_rate); - } else { - message.exchange_rate = ""; - } - if (object.last_update !== undefined && object.last_update !== null) { - message.last_update = String(object.last_update); - } else { - message.last_update = ""; - } - return message; - }, - - toJSON(message: OracleExchangeRate): unknown { - const obj: any = {}; - message.exchange_rate !== undefined && - (obj.exchange_rate = message.exchange_rate); - message.last_update !== undefined && - (obj.last_update = message.last_update); - return obj; - }, - - fromPartial(object: DeepPartial): OracleExchangeRate { - const message = { ...baseOracleExchangeRate } as OracleExchangeRate; - if (object.exchange_rate !== undefined && object.exchange_rate !== null) { - message.exchange_rate = object.exchange_rate; - } else { - message.exchange_rate = ""; - } - if (object.last_update !== undefined && object.last_update !== null) { - message.last_update = object.last_update; - } else { - message.last_update = ""; - } - return message; - }, -}; - -const basePriceSnapshotItem: object = { denom: "" }; - -export const PriceSnapshotItem = { - encode(message: PriceSnapshotItem, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.oracle_exchange_rate !== undefined) { - OracleExchangeRate.encode( - message.oracle_exchange_rate, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PriceSnapshotItem { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePriceSnapshotItem } as PriceSnapshotItem; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.oracle_exchange_rate = OracleExchangeRate.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PriceSnapshotItem { - const message = { ...basePriceSnapshotItem } as PriceSnapshotItem; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if ( - object.oracle_exchange_rate !== undefined && - object.oracle_exchange_rate !== null - ) { - message.oracle_exchange_rate = OracleExchangeRate.fromJSON( - object.oracle_exchange_rate - ); - } else { - message.oracle_exchange_rate = undefined; - } - return message; - }, - - toJSON(message: PriceSnapshotItem): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.oracle_exchange_rate !== undefined && - (obj.oracle_exchange_rate = message.oracle_exchange_rate - ? OracleExchangeRate.toJSON(message.oracle_exchange_rate) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): PriceSnapshotItem { - const message = { ...basePriceSnapshotItem } as PriceSnapshotItem; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if ( - object.oracle_exchange_rate !== undefined && - object.oracle_exchange_rate !== null - ) { - message.oracle_exchange_rate = OracleExchangeRate.fromPartial( - object.oracle_exchange_rate - ); - } else { - message.oracle_exchange_rate = undefined; - } - return message; - }, -}; - -const basePriceSnapshot: object = { snapshotTimestamp: 0 }; - -export const PriceSnapshot = { - encode(message: PriceSnapshot, writer: Writer = Writer.create()): Writer { - if (message.snapshotTimestamp !== 0) { - writer.uint32(8).int64(message.snapshotTimestamp); - } - for (const v of message.price_snapshot_items) { - PriceSnapshotItem.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PriceSnapshot { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePriceSnapshot } as PriceSnapshot; - message.price_snapshot_items = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshotTimestamp = longToNumber(reader.int64() as Long); - break; - case 2: - message.price_snapshot_items.push( - PriceSnapshotItem.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PriceSnapshot { - const message = { ...basePriceSnapshot } as PriceSnapshot; - message.price_snapshot_items = []; - if ( - object.snapshotTimestamp !== undefined && - object.snapshotTimestamp !== null - ) { - message.snapshotTimestamp = Number(object.snapshotTimestamp); - } else { - message.snapshotTimestamp = 0; - } - if ( - object.price_snapshot_items !== undefined && - object.price_snapshot_items !== null - ) { - for (const e of object.price_snapshot_items) { - message.price_snapshot_items.push(PriceSnapshotItem.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: PriceSnapshot): unknown { - const obj: any = {}; - message.snapshotTimestamp !== undefined && - (obj.snapshotTimestamp = message.snapshotTimestamp); - if (message.price_snapshot_items) { - obj.price_snapshot_items = message.price_snapshot_items.map((e) => - e ? PriceSnapshotItem.toJSON(e) : undefined - ); - } else { - obj.price_snapshot_items = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): PriceSnapshot { - const message = { ...basePriceSnapshot } as PriceSnapshot; - message.price_snapshot_items = []; - if ( - object.snapshotTimestamp !== undefined && - object.snapshotTimestamp !== null - ) { - message.snapshotTimestamp = object.snapshotTimestamp; - } else { - message.snapshotTimestamp = 0; - } - if ( - object.price_snapshot_items !== undefined && - object.price_snapshot_items !== null - ) { - for (const e of object.price_snapshot_items) { - message.price_snapshot_items.push(PriceSnapshotItem.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOracleTwap: object = { denom: "", twap: "", lookback_seconds: 0 }; - -export const OracleTwap = { - encode(message: OracleTwap, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.twap !== "") { - writer.uint32(18).string(message.twap); - } - if (message.lookback_seconds !== 0) { - writer.uint32(24).int64(message.lookback_seconds); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OracleTwap { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOracleTwap } as OracleTwap; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.twap = reader.string(); - break; - case 3: - message.lookback_seconds = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OracleTwap { - const message = { ...baseOracleTwap } as OracleTwap; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.twap !== undefined && object.twap !== null) { - message.twap = String(object.twap); - } else { - message.twap = ""; - } - if ( - object.lookback_seconds !== undefined && - object.lookback_seconds !== null - ) { - message.lookback_seconds = Number(object.lookback_seconds); - } else { - message.lookback_seconds = 0; - } - return message; - }, - - toJSON(message: OracleTwap): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.twap !== undefined && (obj.twap = message.twap); - message.lookback_seconds !== undefined && - (obj.lookback_seconds = message.lookback_seconds); - return obj; - }, - - fromPartial(object: DeepPartial): OracleTwap { - const message = { ...baseOracleTwap } as OracleTwap; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.twap !== undefined && object.twap !== null) { - message.twap = object.twap; - } else { - message.twap = ""; - } - if ( - object.lookback_seconds !== undefined && - object.lookback_seconds !== null - ) { - message.lookback_seconds = object.lookback_seconds; - } else { - message.lookback_seconds = 0; - } - return message; - }, -}; - -const baseVotePenaltyCounter: object = { miss_count: 0, abstain_count: 0 }; - -export const VotePenaltyCounter = { - encode( - message: VotePenaltyCounter, - writer: Writer = Writer.create() - ): Writer { - if (message.miss_count !== 0) { - writer.uint32(8).uint64(message.miss_count); - } - if (message.abstain_count !== 0) { - writer.uint32(16).uint64(message.abstain_count); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): VotePenaltyCounter { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseVotePenaltyCounter } as VotePenaltyCounter; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.miss_count = longToNumber(reader.uint64() as Long); - break; - case 2: - message.abstain_count = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): VotePenaltyCounter { - const message = { ...baseVotePenaltyCounter } as VotePenaltyCounter; - if (object.miss_count !== undefined && object.miss_count !== null) { - message.miss_count = Number(object.miss_count); - } else { - message.miss_count = 0; - } - if (object.abstain_count !== undefined && object.abstain_count !== null) { - message.abstain_count = Number(object.abstain_count); - } else { - message.abstain_count = 0; - } - return message; - }, - - toJSON(message: VotePenaltyCounter): unknown { - const obj: any = {}; - message.miss_count !== undefined && (obj.miss_count = message.miss_count); - message.abstain_count !== undefined && - (obj.abstain_count = message.abstain_count); - return obj; - }, - - fromPartial(object: DeepPartial): VotePenaltyCounter { - const message = { ...baseVotePenaltyCounter } as VotePenaltyCounter; - if (object.miss_count !== undefined && object.miss_count !== null) { - message.miss_count = object.miss_count; - } else { - message.miss_count = 0; - } - if (object.abstain_count !== undefined && object.abstain_count !== null) { - message.abstain_count = object.abstain_count; - } else { - message.abstain_count = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/query.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/query.d.ts deleted file mode 100644 index 096638494c..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/query.d.ts +++ /dev/null @@ -1,392 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { OracleExchangeRate, PriceSnapshot, OracleTwap, VotePenaltyCounter, AggregateExchangeRatePrevote, AggregateExchangeRateVote, Params } from "../oracle/oracle"; -export declare const protobufPackage = "seiprotocol.seichain.oracle"; -/** QueryExchangeRateRequest is the request type for the Query/ExchangeRate RPC method. */ -export interface QueryExchangeRateRequest { - /** denom defines the denomination to query for. */ - denom: string; -} -/** - * QueryExchangeRateResponse is response type for the - * Query/ExchangeRate RPC method. - */ -export interface QueryExchangeRateResponse { - /** exchange_rate defines the exchange rate of Sei denominated in various Sei */ - oracleExchangeRate: OracleExchangeRate | undefined; -} -/** QueryExchangeRatesRequest is the request type for the Query/ExchangeRates RPC method. */ -export interface QueryExchangeRatesRequest { -} -export interface DenomOracleExchangeRatePair { - denom: string; - oracleExchangeRate: OracleExchangeRate | undefined; -} -/** - * QueryExchangeRatesResponse is response type for the - * Query/ExchangeRates RPC method. - */ -export interface QueryExchangeRatesResponse { - /** exchange_rates defines a list of the exchange rate for all whitelisted denoms. */ - denomOracleExchangeRatePairs: DenomOracleExchangeRatePair[]; -} -/** QueryActivesRequest is the request type for the Query/Actives RPC method. */ -export interface QueryActivesRequest { -} -/** - * QueryActivesResponse is response type for the - * Query/Actives RPC method. - */ -export interface QueryActivesResponse { - /** actives defines a list of the denomination which oracle prices aggreed upon. */ - actives: string[]; -} -/** QueryVoteTargetsRequest is the request type for the Query/VoteTargets RPC method. */ -export interface QueryVoteTargetsRequest { -} -/** - * QueryVoteTargetsResponse is response type for the - * Query/VoteTargets RPC method. - */ -export interface QueryVoteTargetsResponse { - /** - * vote_targets defines a list of the denomination in which everyone - * should vote in the current vote period. - */ - voteTargets: string[]; -} -/** request type for price snapshot history RPC method */ -export interface QueryPriceSnapshotHistoryRequest { -} -export interface QueryPriceSnapshotHistoryResponse { - priceSnapshots: PriceSnapshot[]; -} -/** request type for twap RPC method */ -export interface QueryTwapsRequest { - lookbackSeconds: number; -} -export interface QueryTwapsResponse { - oracleTwaps: OracleTwap[]; -} -/** QueryFeederDelegationRequest is the request type for the Query/FeederDelegation RPC method. */ -export interface QueryFeederDelegationRequest { - /** validator defines the validator address to query for. */ - validatorAddr: string; -} -/** - * QueryFeederDelegationResponse is response type for the - * Query/FeederDelegation RPC method. - */ -export interface QueryFeederDelegationResponse { - /** feeder_addr defines the feeder delegation of a validator */ - feederAddr: string; -} -/** QueryVotePenaltyCounterRequest is the request type for the Query/MissCounter RPC method. */ -export interface QueryVotePenaltyCounterRequest { - /** validator defines the validator address to query for. */ - validatorAddr: string; -} -/** - * QueryVotePenaltyCounterResponse is response type for the - * Query/VotePenaltyCounter RPC method. - */ -export interface QueryVotePenaltyCounterResponse { - votePenaltyCounter: VotePenaltyCounter | undefined; -} -/** QueryAggregatePrevoteRequest is the request type for the Query/AggregatePrevote RPC method. */ -export interface QueryAggregatePrevoteRequest { - /** validator defines the validator address to query for. */ - validatorAddr: string; -} -/** - * QueryAggregatePrevoteResponse is response type for the - * Query/AggregatePrevote RPC method. - */ -export interface QueryAggregatePrevoteResponse { - /** aggregate_prevote defines oracle aggregate prevote submitted by a validator in the current vote period */ - aggregatePrevote: AggregateExchangeRatePrevote | undefined; -} -/** QueryAggregatePrevotesRequest is the request type for the Query/AggregatePrevotes RPC method. */ -export interface QueryAggregatePrevotesRequest { -} -/** - * QueryAggregatePrevotesResponse is response type for the - * Query/AggregatePrevotes RPC method. - */ -export interface QueryAggregatePrevotesResponse { - /** aggregate_prevotes defines all oracle aggregate prevotes submitted in the current vote period */ - aggregatePrevotes: AggregateExchangeRatePrevote[]; -} -/** QueryAggregateVoteRequest is the request type for the Query/AggregateVote RPC method. */ -export interface QueryAggregateVoteRequest { - /** validator defines the validator address to query for. */ - validatorAddr: string; -} -/** - * QueryAggregateVoteResponse is response type for the - * Query/AggregateVote RPC method. - */ -export interface QueryAggregateVoteResponse { - /** aggregate_vote defines oracle aggregate vote submitted by a validator in the current vote period */ - aggregateVote: AggregateExchangeRateVote | undefined; -} -/** QueryAggregateVotesRequest is the request type for the Query/AggregateVotes RPC method. */ -export interface QueryAggregateVotesRequest { -} -/** - * QueryAggregateVotesResponse is response type for the - * Query/AggregateVotes RPC method. - */ -export interface QueryAggregateVotesResponse { - /** aggregate_votes defines all oracle aggregate votes submitted in the current vote period */ - aggregateVotes: AggregateExchangeRateVote[]; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -export declare const QueryExchangeRateRequest: { - encode(message: QueryExchangeRateRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryExchangeRateRequest; - fromJSON(object: any): QueryExchangeRateRequest; - toJSON(message: QueryExchangeRateRequest): unknown; - fromPartial(object: DeepPartial): QueryExchangeRateRequest; -}; -export declare const QueryExchangeRateResponse: { - encode(message: QueryExchangeRateResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryExchangeRateResponse; - fromJSON(object: any): QueryExchangeRateResponse; - toJSON(message: QueryExchangeRateResponse): unknown; - fromPartial(object: DeepPartial): QueryExchangeRateResponse; -}; -export declare const QueryExchangeRatesRequest: { - encode(_: QueryExchangeRatesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryExchangeRatesRequest; - fromJSON(_: any): QueryExchangeRatesRequest; - toJSON(_: QueryExchangeRatesRequest): unknown; - fromPartial(_: DeepPartial): QueryExchangeRatesRequest; -}; -export declare const DenomOracleExchangeRatePair: { - encode(message: DenomOracleExchangeRatePair, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DenomOracleExchangeRatePair; - fromJSON(object: any): DenomOracleExchangeRatePair; - toJSON(message: DenomOracleExchangeRatePair): unknown; - fromPartial(object: DeepPartial): DenomOracleExchangeRatePair; -}; -export declare const QueryExchangeRatesResponse: { - encode(message: QueryExchangeRatesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryExchangeRatesResponse; - fromJSON(object: any): QueryExchangeRatesResponse; - toJSON(message: QueryExchangeRatesResponse): unknown; - fromPartial(object: DeepPartial): QueryExchangeRatesResponse; -}; -export declare const QueryActivesRequest: { - encode(_: QueryActivesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryActivesRequest; - fromJSON(_: any): QueryActivesRequest; - toJSON(_: QueryActivesRequest): unknown; - fromPartial(_: DeepPartial): QueryActivesRequest; -}; -export declare const QueryActivesResponse: { - encode(message: QueryActivesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryActivesResponse; - fromJSON(object: any): QueryActivesResponse; - toJSON(message: QueryActivesResponse): unknown; - fromPartial(object: DeepPartial): QueryActivesResponse; -}; -export declare const QueryVoteTargetsRequest: { - encode(_: QueryVoteTargetsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryVoteTargetsRequest; - fromJSON(_: any): QueryVoteTargetsRequest; - toJSON(_: QueryVoteTargetsRequest): unknown; - fromPartial(_: DeepPartial): QueryVoteTargetsRequest; -}; -export declare const QueryVoteTargetsResponse: { - encode(message: QueryVoteTargetsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryVoteTargetsResponse; - fromJSON(object: any): QueryVoteTargetsResponse; - toJSON(message: QueryVoteTargetsResponse): unknown; - fromPartial(object: DeepPartial): QueryVoteTargetsResponse; -}; -export declare const QueryPriceSnapshotHistoryRequest: { - encode(_: QueryPriceSnapshotHistoryRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPriceSnapshotHistoryRequest; - fromJSON(_: any): QueryPriceSnapshotHistoryRequest; - toJSON(_: QueryPriceSnapshotHistoryRequest): unknown; - fromPartial(_: DeepPartial): QueryPriceSnapshotHistoryRequest; -}; -export declare const QueryPriceSnapshotHistoryResponse: { - encode(message: QueryPriceSnapshotHistoryResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryPriceSnapshotHistoryResponse; - fromJSON(object: any): QueryPriceSnapshotHistoryResponse; - toJSON(message: QueryPriceSnapshotHistoryResponse): unknown; - fromPartial(object: DeepPartial): QueryPriceSnapshotHistoryResponse; -}; -export declare const QueryTwapsRequest: { - encode(message: QueryTwapsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryTwapsRequest; - fromJSON(object: any): QueryTwapsRequest; - toJSON(message: QueryTwapsRequest): unknown; - fromPartial(object: DeepPartial): QueryTwapsRequest; -}; -export declare const QueryTwapsResponse: { - encode(message: QueryTwapsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryTwapsResponse; - fromJSON(object: any): QueryTwapsResponse; - toJSON(message: QueryTwapsResponse): unknown; - fromPartial(object: DeepPartial): QueryTwapsResponse; -}; -export declare const QueryFeederDelegationRequest: { - encode(message: QueryFeederDelegationRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryFeederDelegationRequest; - fromJSON(object: any): QueryFeederDelegationRequest; - toJSON(message: QueryFeederDelegationRequest): unknown; - fromPartial(object: DeepPartial): QueryFeederDelegationRequest; -}; -export declare const QueryFeederDelegationResponse: { - encode(message: QueryFeederDelegationResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryFeederDelegationResponse; - fromJSON(object: any): QueryFeederDelegationResponse; - toJSON(message: QueryFeederDelegationResponse): unknown; - fromPartial(object: DeepPartial): QueryFeederDelegationResponse; -}; -export declare const QueryVotePenaltyCounterRequest: { - encode(message: QueryVotePenaltyCounterRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryVotePenaltyCounterRequest; - fromJSON(object: any): QueryVotePenaltyCounterRequest; - toJSON(message: QueryVotePenaltyCounterRequest): unknown; - fromPartial(object: DeepPartial): QueryVotePenaltyCounterRequest; -}; -export declare const QueryVotePenaltyCounterResponse: { - encode(message: QueryVotePenaltyCounterResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryVotePenaltyCounterResponse; - fromJSON(object: any): QueryVotePenaltyCounterResponse; - toJSON(message: QueryVotePenaltyCounterResponse): unknown; - fromPartial(object: DeepPartial): QueryVotePenaltyCounterResponse; -}; -export declare const QueryAggregatePrevoteRequest: { - encode(message: QueryAggregatePrevoteRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAggregatePrevoteRequest; - fromJSON(object: any): QueryAggregatePrevoteRequest; - toJSON(message: QueryAggregatePrevoteRequest): unknown; - fromPartial(object: DeepPartial): QueryAggregatePrevoteRequest; -}; -export declare const QueryAggregatePrevoteResponse: { - encode(message: QueryAggregatePrevoteResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAggregatePrevoteResponse; - fromJSON(object: any): QueryAggregatePrevoteResponse; - toJSON(message: QueryAggregatePrevoteResponse): unknown; - fromPartial(object: DeepPartial): QueryAggregatePrevoteResponse; -}; -export declare const QueryAggregatePrevotesRequest: { - encode(_: QueryAggregatePrevotesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAggregatePrevotesRequest; - fromJSON(_: any): QueryAggregatePrevotesRequest; - toJSON(_: QueryAggregatePrevotesRequest): unknown; - fromPartial(_: DeepPartial): QueryAggregatePrevotesRequest; -}; -export declare const QueryAggregatePrevotesResponse: { - encode(message: QueryAggregatePrevotesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAggregatePrevotesResponse; - fromJSON(object: any): QueryAggregatePrevotesResponse; - toJSON(message: QueryAggregatePrevotesResponse): unknown; - fromPartial(object: DeepPartial): QueryAggregatePrevotesResponse; -}; -export declare const QueryAggregateVoteRequest: { - encode(message: QueryAggregateVoteRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAggregateVoteRequest; - fromJSON(object: any): QueryAggregateVoteRequest; - toJSON(message: QueryAggregateVoteRequest): unknown; - fromPartial(object: DeepPartial): QueryAggregateVoteRequest; -}; -export declare const QueryAggregateVoteResponse: { - encode(message: QueryAggregateVoteResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAggregateVoteResponse; - fromJSON(object: any): QueryAggregateVoteResponse; - toJSON(message: QueryAggregateVoteResponse): unknown; - fromPartial(object: DeepPartial): QueryAggregateVoteResponse; -}; -export declare const QueryAggregateVotesRequest: { - encode(_: QueryAggregateVotesRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAggregateVotesRequest; - fromJSON(_: any): QueryAggregateVotesRequest; - toJSON(_: QueryAggregateVotesRequest): unknown; - fromPartial(_: DeepPartial): QueryAggregateVotesRequest; -}; -export declare const QueryAggregateVotesResponse: { - encode(message: QueryAggregateVotesResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryAggregateVotesResponse; - fromJSON(object: any): QueryAggregateVotesResponse; - toJSON(message: QueryAggregateVotesResponse): unknown; - fromPartial(object: DeepPartial): QueryAggregateVotesResponse; -}; -export declare const QueryParamsRequest: { - encode(_: QueryParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest; - fromJSON(_: any): QueryParamsRequest; - toJSON(_: QueryParamsRequest): unknown; - fromPartial(_: DeepPartial): QueryParamsRequest; -}; -export declare const QueryParamsResponse: { - encode(message: QueryParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse; - fromJSON(object: any): QueryParamsResponse; - toJSON(message: QueryParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryParamsResponse; -}; -/** Query defines the gRPC querier service. */ -export interface Query { - /** ExchangeRate returns exchange rate of a denom */ - ExchangeRate(request: QueryExchangeRateRequest): Promise; - /** ExchangeRates returns exchange rates of all denoms */ - ExchangeRates(request: QueryExchangeRatesRequest): Promise; - /** Actives returns all active denoms */ - Actives(request: QueryActivesRequest): Promise; - /** VoteTargets returns all vote target denoms */ - VoteTargets(request: QueryVoteTargetsRequest): Promise; - /** PriceSnapshotHistory returns the history of price snapshots for all assets */ - PriceSnapshotHistory(request: QueryPriceSnapshotHistoryRequest): Promise; - Twaps(request: QueryTwapsRequest): Promise; - /** FeederDelegation returns feeder delegation of a validator */ - FeederDelegation(request: QueryFeederDelegationRequest): Promise; - /** MissCounter returns oracle miss counter of a validator */ - VotePenaltyCounter(request: QueryVotePenaltyCounterRequest): Promise; - /** AggregatePrevote returns an aggregate prevote of a validator */ - AggregatePrevote(request: QueryAggregatePrevoteRequest): Promise; - /** AggregatePrevotes returns aggregate prevotes of all validators */ - AggregatePrevotes(request: QueryAggregatePrevotesRequest): Promise; - /** AggregateVote returns an aggregate vote of a validator */ - AggregateVote(request: QueryAggregateVoteRequest): Promise; - /** AggregateVotes returns aggregate votes of all validators */ - AggregateVotes(request: QueryAggregateVotesRequest): Promise; - /** Params queries all parameters. */ - Params(request: QueryParamsRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - ExchangeRate(request: QueryExchangeRateRequest): Promise; - ExchangeRates(request: QueryExchangeRatesRequest): Promise; - Actives(request: QueryActivesRequest): Promise; - VoteTargets(request: QueryVoteTargetsRequest): Promise; - PriceSnapshotHistory(request: QueryPriceSnapshotHistoryRequest): Promise; - Twaps(request: QueryTwapsRequest): Promise; - FeederDelegation(request: QueryFeederDelegationRequest): Promise; - VotePenaltyCounter(request: QueryVotePenaltyCounterRequest): Promise; - AggregatePrevote(request: QueryAggregatePrevoteRequest): Promise; - AggregatePrevotes(request: QueryAggregatePrevotesRequest): Promise; - AggregateVote(request: QueryAggregateVoteRequest): Promise; - AggregateVotes(request: QueryAggregateVotesRequest): Promise; - Params(request: QueryParamsRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/query.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/query.js deleted file mode 100644 index 89f2c06f02..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/query.js +++ /dev/null @@ -1,1562 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { OracleExchangeRate, PriceSnapshot, OracleTwap, VotePenaltyCounter, AggregateExchangeRatePrevote, AggregateExchangeRateVote, Params, } from "../oracle/oracle"; -export const protobufPackage = "seiprotocol.seichain.oracle"; -const baseQueryExchangeRateRequest = { denom: "" }; -export const QueryExchangeRateRequest = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryExchangeRateRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryExchangeRateRequest, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryExchangeRateRequest, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - return message; - }, -}; -const baseQueryExchangeRateResponse = {}; -export const QueryExchangeRateResponse = { - encode(message, writer = Writer.create()) { - if (message.oracleExchangeRate !== undefined) { - OracleExchangeRate.encode(message.oracleExchangeRate, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryExchangeRateResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.oracleExchangeRate = OracleExchangeRate.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryExchangeRateResponse, - }; - if (object.oracleExchangeRate !== undefined && - object.oracleExchangeRate !== null) { - message.oracleExchangeRate = OracleExchangeRate.fromJSON(object.oracleExchangeRate); - } - else { - message.oracleExchangeRate = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.oracleExchangeRate !== undefined && - (obj.oracleExchangeRate = message.oracleExchangeRate - ? OracleExchangeRate.toJSON(message.oracleExchangeRate) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryExchangeRateResponse, - }; - if (object.oracleExchangeRate !== undefined && - object.oracleExchangeRate !== null) { - message.oracleExchangeRate = OracleExchangeRate.fromPartial(object.oracleExchangeRate); - } - else { - message.oracleExchangeRate = undefined; - } - return message; - }, -}; -const baseQueryExchangeRatesRequest = {}; -export const QueryExchangeRatesRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryExchangeRatesRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseQueryExchangeRatesRequest, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseQueryExchangeRatesRequest, - }; - return message; - }, -}; -const baseDenomOracleExchangeRatePair = { denom: "" }; -export const DenomOracleExchangeRatePair = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.oracleExchangeRate !== undefined) { - OracleExchangeRate.encode(message.oracleExchangeRate, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDenomOracleExchangeRatePair, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.oracleExchangeRate = OracleExchangeRate.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDenomOracleExchangeRatePair, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.oracleExchangeRate !== undefined && - object.oracleExchangeRate !== null) { - message.oracleExchangeRate = OracleExchangeRate.fromJSON(object.oracleExchangeRate); - } - else { - message.oracleExchangeRate = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.oracleExchangeRate !== undefined && - (obj.oracleExchangeRate = message.oracleExchangeRate - ? OracleExchangeRate.toJSON(message.oracleExchangeRate) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDenomOracleExchangeRatePair, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.oracleExchangeRate !== undefined && - object.oracleExchangeRate !== null) { - message.oracleExchangeRate = OracleExchangeRate.fromPartial(object.oracleExchangeRate); - } - else { - message.oracleExchangeRate = undefined; - } - return message; - }, -}; -const baseQueryExchangeRatesResponse = {}; -export const QueryExchangeRatesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.denomOracleExchangeRatePairs) { - DenomOracleExchangeRatePair.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryExchangeRatesResponse, - }; - message.denomOracleExchangeRatePairs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denomOracleExchangeRatePairs.push(DenomOracleExchangeRatePair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryExchangeRatesResponse, - }; - message.denomOracleExchangeRatePairs = []; - if (object.denomOracleExchangeRatePairs !== undefined && - object.denomOracleExchangeRatePairs !== null) { - for (const e of object.denomOracleExchangeRatePairs) { - message.denomOracleExchangeRatePairs.push(DenomOracleExchangeRatePair.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.denomOracleExchangeRatePairs) { - obj.denomOracleExchangeRatePairs = message.denomOracleExchangeRatePairs.map((e) => (e ? DenomOracleExchangeRatePair.toJSON(e) : undefined)); - } - else { - obj.denomOracleExchangeRatePairs = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryExchangeRatesResponse, - }; - message.denomOracleExchangeRatePairs = []; - if (object.denomOracleExchangeRatePairs !== undefined && - object.denomOracleExchangeRatePairs !== null) { - for (const e of object.denomOracleExchangeRatePairs) { - message.denomOracleExchangeRatePairs.push(DenomOracleExchangeRatePair.fromPartial(e)); - } - } - return message; - }, -}; -const baseQueryActivesRequest = {}; -export const QueryActivesRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryActivesRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryActivesRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryActivesRequest }; - return message; - }, -}; -const baseQueryActivesResponse = { actives: "" }; -export const QueryActivesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.actives) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryActivesResponse }; - message.actives = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.actives.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryActivesResponse }; - message.actives = []; - if (object.actives !== undefined && object.actives !== null) { - for (const e of object.actives) { - message.actives.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.actives) { - obj.actives = message.actives.map((e) => e); - } - else { - obj.actives = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryActivesResponse }; - message.actives = []; - if (object.actives !== undefined && object.actives !== null) { - for (const e of object.actives) { - message.actives.push(e); - } - } - return message; - }, -}; -const baseQueryVoteTargetsRequest = {}; -export const QueryVoteTargetsRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryVoteTargetsRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseQueryVoteTargetsRequest, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseQueryVoteTargetsRequest, - }; - return message; - }, -}; -const baseQueryVoteTargetsResponse = { voteTargets: "" }; -export const QueryVoteTargetsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.voteTargets) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryVoteTargetsResponse, - }; - message.voteTargets = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.voteTargets.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryVoteTargetsResponse, - }; - message.voteTargets = []; - if (object.voteTargets !== undefined && object.voteTargets !== null) { - for (const e of object.voteTargets) { - message.voteTargets.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.voteTargets) { - obj.voteTargets = message.voteTargets.map((e) => e); - } - else { - obj.voteTargets = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryVoteTargetsResponse, - }; - message.voteTargets = []; - if (object.voteTargets !== undefined && object.voteTargets !== null) { - for (const e of object.voteTargets) { - message.voteTargets.push(e); - } - } - return message; - }, -}; -const baseQueryPriceSnapshotHistoryRequest = {}; -export const QueryPriceSnapshotHistoryRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPriceSnapshotHistoryRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseQueryPriceSnapshotHistoryRequest, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseQueryPriceSnapshotHistoryRequest, - }; - return message; - }, -}; -const baseQueryPriceSnapshotHistoryResponse = {}; -export const QueryPriceSnapshotHistoryResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.priceSnapshots) { - PriceSnapshot.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPriceSnapshotHistoryResponse, - }; - message.priceSnapshots = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.priceSnapshots.push(PriceSnapshot.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryPriceSnapshotHistoryResponse, - }; - message.priceSnapshots = []; - if (object.priceSnapshots !== undefined && object.priceSnapshots !== null) { - for (const e of object.priceSnapshots) { - message.priceSnapshots.push(PriceSnapshot.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.priceSnapshots) { - obj.priceSnapshots = message.priceSnapshots.map((e) => e ? PriceSnapshot.toJSON(e) : undefined); - } - else { - obj.priceSnapshots = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryPriceSnapshotHistoryResponse, - }; - message.priceSnapshots = []; - if (object.priceSnapshots !== undefined && object.priceSnapshots !== null) { - for (const e of object.priceSnapshots) { - message.priceSnapshots.push(PriceSnapshot.fromPartial(e)); - } - } - return message; - }, -}; -const baseQueryTwapsRequest = { lookbackSeconds: 0 }; -export const QueryTwapsRequest = { - encode(message, writer = Writer.create()) { - if (message.lookbackSeconds !== 0) { - writer.uint32(8).int64(message.lookbackSeconds); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryTwapsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lookbackSeconds = longToNumber(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryTwapsRequest }; - if (object.lookbackSeconds !== undefined && - object.lookbackSeconds !== null) { - message.lookbackSeconds = Number(object.lookbackSeconds); - } - else { - message.lookbackSeconds = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.lookbackSeconds !== undefined && - (obj.lookbackSeconds = message.lookbackSeconds); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryTwapsRequest }; - if (object.lookbackSeconds !== undefined && - object.lookbackSeconds !== null) { - message.lookbackSeconds = object.lookbackSeconds; - } - else { - message.lookbackSeconds = 0; - } - return message; - }, -}; -const baseQueryTwapsResponse = {}; -export const QueryTwapsResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.oracleTwaps) { - OracleTwap.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryTwapsResponse }; - message.oracleTwaps = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.oracleTwaps.push(OracleTwap.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryTwapsResponse }; - message.oracleTwaps = []; - if (object.oracleTwaps !== undefined && object.oracleTwaps !== null) { - for (const e of object.oracleTwaps) { - message.oracleTwaps.push(OracleTwap.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.oracleTwaps) { - obj.oracleTwaps = message.oracleTwaps.map((e) => e ? OracleTwap.toJSON(e) : undefined); - } - else { - obj.oracleTwaps = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryTwapsResponse }; - message.oracleTwaps = []; - if (object.oracleTwaps !== undefined && object.oracleTwaps !== null) { - for (const e of object.oracleTwaps) { - message.oracleTwaps.push(OracleTwap.fromPartial(e)); - } - } - return message; - }, -}; -const baseQueryFeederDelegationRequest = { validatorAddr: "" }; -export const QueryFeederDelegationRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryFeederDelegationRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryFeederDelegationRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryFeederDelegationRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - return message; - }, -}; -const baseQueryFeederDelegationResponse = { feederAddr: "" }; -export const QueryFeederDelegationResponse = { - encode(message, writer = Writer.create()) { - if (message.feederAddr !== "") { - writer.uint32(10).string(message.feederAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryFeederDelegationResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.feederAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryFeederDelegationResponse, - }; - if (object.feederAddr !== undefined && object.feederAddr !== null) { - message.feederAddr = String(object.feederAddr); - } - else { - message.feederAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.feederAddr !== undefined && (obj.feederAddr = message.feederAddr); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryFeederDelegationResponse, - }; - if (object.feederAddr !== undefined && object.feederAddr !== null) { - message.feederAddr = object.feederAddr; - } - else { - message.feederAddr = ""; - } - return message; - }, -}; -const baseQueryVotePenaltyCounterRequest = { validatorAddr: "" }; -export const QueryVotePenaltyCounterRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryVotePenaltyCounterRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryVotePenaltyCounterRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryVotePenaltyCounterRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - return message; - }, -}; -const baseQueryVotePenaltyCounterResponse = {}; -export const QueryVotePenaltyCounterResponse = { - encode(message, writer = Writer.create()) { - if (message.votePenaltyCounter !== undefined) { - VotePenaltyCounter.encode(message.votePenaltyCounter, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryVotePenaltyCounterResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votePenaltyCounter = VotePenaltyCounter.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryVotePenaltyCounterResponse, - }; - if (object.votePenaltyCounter !== undefined && - object.votePenaltyCounter !== null) { - message.votePenaltyCounter = VotePenaltyCounter.fromJSON(object.votePenaltyCounter); - } - else { - message.votePenaltyCounter = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.votePenaltyCounter !== undefined && - (obj.votePenaltyCounter = message.votePenaltyCounter - ? VotePenaltyCounter.toJSON(message.votePenaltyCounter) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryVotePenaltyCounterResponse, - }; - if (object.votePenaltyCounter !== undefined && - object.votePenaltyCounter !== null) { - message.votePenaltyCounter = VotePenaltyCounter.fromPartial(object.votePenaltyCounter); - } - else { - message.votePenaltyCounter = undefined; - } - return message; - }, -}; -const baseQueryAggregatePrevoteRequest = { validatorAddr: "" }; -export const QueryAggregatePrevoteRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregatePrevoteRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAggregatePrevoteRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAggregatePrevoteRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - return message; - }, -}; -const baseQueryAggregatePrevoteResponse = {}; -export const QueryAggregatePrevoteResponse = { - encode(message, writer = Writer.create()) { - if (message.aggregatePrevote !== undefined) { - AggregateExchangeRatePrevote.encode(message.aggregatePrevote, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregatePrevoteResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.aggregatePrevote = AggregateExchangeRatePrevote.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAggregatePrevoteResponse, - }; - if (object.aggregatePrevote !== undefined && - object.aggregatePrevote !== null) { - message.aggregatePrevote = AggregateExchangeRatePrevote.fromJSON(object.aggregatePrevote); - } - else { - message.aggregatePrevote = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.aggregatePrevote !== undefined && - (obj.aggregatePrevote = message.aggregatePrevote - ? AggregateExchangeRatePrevote.toJSON(message.aggregatePrevote) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAggregatePrevoteResponse, - }; - if (object.aggregatePrevote !== undefined && - object.aggregatePrevote !== null) { - message.aggregatePrevote = AggregateExchangeRatePrevote.fromPartial(object.aggregatePrevote); - } - else { - message.aggregatePrevote = undefined; - } - return message; - }, -}; -const baseQueryAggregatePrevotesRequest = {}; -export const QueryAggregatePrevotesRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregatePrevotesRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseQueryAggregatePrevotesRequest, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseQueryAggregatePrevotesRequest, - }; - return message; - }, -}; -const baseQueryAggregatePrevotesResponse = {}; -export const QueryAggregatePrevotesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.aggregatePrevotes) { - AggregateExchangeRatePrevote.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregatePrevotesResponse, - }; - message.aggregatePrevotes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.aggregatePrevotes.push(AggregateExchangeRatePrevote.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAggregatePrevotesResponse, - }; - message.aggregatePrevotes = []; - if (object.aggregatePrevotes !== undefined && - object.aggregatePrevotes !== null) { - for (const e of object.aggregatePrevotes) { - message.aggregatePrevotes.push(AggregateExchangeRatePrevote.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.aggregatePrevotes) { - obj.aggregatePrevotes = message.aggregatePrevotes.map((e) => e ? AggregateExchangeRatePrevote.toJSON(e) : undefined); - } - else { - obj.aggregatePrevotes = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAggregatePrevotesResponse, - }; - message.aggregatePrevotes = []; - if (object.aggregatePrevotes !== undefined && - object.aggregatePrevotes !== null) { - for (const e of object.aggregatePrevotes) { - message.aggregatePrevotes.push(AggregateExchangeRatePrevote.fromPartial(e)); - } - } - return message; - }, -}; -const baseQueryAggregateVoteRequest = { validatorAddr: "" }; -export const QueryAggregateVoteRequest = { - encode(message, writer = Writer.create()) { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregateVoteRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAggregateVoteRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = String(object.validatorAddr); - } - else { - message.validatorAddr = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.validatorAddr !== undefined && - (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAggregateVoteRequest, - }; - if (object.validatorAddr !== undefined && object.validatorAddr !== null) { - message.validatorAddr = object.validatorAddr; - } - else { - message.validatorAddr = ""; - } - return message; - }, -}; -const baseQueryAggregateVoteResponse = {}; -export const QueryAggregateVoteResponse = { - encode(message, writer = Writer.create()) { - if (message.aggregateVote !== undefined) { - AggregateExchangeRateVote.encode(message.aggregateVote, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregateVoteResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.aggregateVote = AggregateExchangeRateVote.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAggregateVoteResponse, - }; - if (object.aggregateVote !== undefined && object.aggregateVote !== null) { - message.aggregateVote = AggregateExchangeRateVote.fromJSON(object.aggregateVote); - } - else { - message.aggregateVote = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.aggregateVote !== undefined && - (obj.aggregateVote = message.aggregateVote - ? AggregateExchangeRateVote.toJSON(message.aggregateVote) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAggregateVoteResponse, - }; - if (object.aggregateVote !== undefined && object.aggregateVote !== null) { - message.aggregateVote = AggregateExchangeRateVote.fromPartial(object.aggregateVote); - } - else { - message.aggregateVote = undefined; - } - return message; - }, -}; -const baseQueryAggregateVotesRequest = {}; -export const QueryAggregateVotesRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregateVotesRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseQueryAggregateVotesRequest, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseQueryAggregateVotesRequest, - }; - return message; - }, -}; -const baseQueryAggregateVotesResponse = {}; -export const QueryAggregateVotesResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.aggregateVotes) { - AggregateExchangeRateVote.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregateVotesResponse, - }; - message.aggregateVotes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.aggregateVotes.push(AggregateExchangeRateVote.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryAggregateVotesResponse, - }; - message.aggregateVotes = []; - if (object.aggregateVotes !== undefined && object.aggregateVotes !== null) { - for (const e of object.aggregateVotes) { - message.aggregateVotes.push(AggregateExchangeRateVote.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.aggregateVotes) { - obj.aggregateVotes = message.aggregateVotes.map((e) => e ? AggregateExchangeRateVote.toJSON(e) : undefined); - } - else { - obj.aggregateVotes = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryAggregateVotesResponse, - }; - message.aggregateVotes = []; - if (object.aggregateVotes !== undefined && object.aggregateVotes !== null) { - for (const e of object.aggregateVotes) { - message.aggregateVotes.push(AggregateExchangeRateVote.fromPartial(e)); - } - } - return message; - }, -}; -const baseQueryParamsRequest = {}; -export const QueryParamsRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, -}; -const baseQueryParamsResponse = {}; -export const QueryParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - ExchangeRate(request) { - const data = QueryExchangeRateRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Query", "ExchangeRate", data); - return promise.then((data) => QueryExchangeRateResponse.decode(new Reader(data))); - } - ExchangeRates(request) { - const data = QueryExchangeRatesRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Query", "ExchangeRates", data); - return promise.then((data) => QueryExchangeRatesResponse.decode(new Reader(data))); - } - Actives(request) { - const data = QueryActivesRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Query", "Actives", data); - return promise.then((data) => QueryActivesResponse.decode(new Reader(data))); - } - VoteTargets(request) { - const data = QueryVoteTargetsRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Query", "VoteTargets", data); - return promise.then((data) => QueryVoteTargetsResponse.decode(new Reader(data))); - } - PriceSnapshotHistory(request) { - const data = QueryPriceSnapshotHistoryRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Query", "PriceSnapshotHistory", data); - return promise.then((data) => QueryPriceSnapshotHistoryResponse.decode(new Reader(data))); - } - Twaps(request) { - const data = QueryTwapsRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Query", "Twaps", data); - return promise.then((data) => QueryTwapsResponse.decode(new Reader(data))); - } - FeederDelegation(request) { - const data = QueryFeederDelegationRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Query", "FeederDelegation", data); - return promise.then((data) => QueryFeederDelegationResponse.decode(new Reader(data))); - } - VotePenaltyCounter(request) { - const data = QueryVotePenaltyCounterRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Query", "VotePenaltyCounter", data); - return promise.then((data) => QueryVotePenaltyCounterResponse.decode(new Reader(data))); - } - AggregatePrevote(request) { - const data = QueryAggregatePrevoteRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Query", "AggregatePrevote", data); - return promise.then((data) => QueryAggregatePrevoteResponse.decode(new Reader(data))); - } - AggregatePrevotes(request) { - const data = QueryAggregatePrevotesRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Query", "AggregatePrevotes", data); - return promise.then((data) => QueryAggregatePrevotesResponse.decode(new Reader(data))); - } - AggregateVote(request) { - const data = QueryAggregateVoteRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Query", "AggregateVote", data); - return promise.then((data) => QueryAggregateVoteResponse.decode(new Reader(data))); - } - AggregateVotes(request) { - const data = QueryAggregateVotesRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Query", "AggregateVotes", data); - return promise.then((data) => QueryAggregateVotesResponse.decode(new Reader(data))); - } - Params(request) { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } -} -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/query.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/query.ts deleted file mode 100644 index 0a2fdc5e4c..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/query.ts +++ /dev/null @@ -1,2333 +0,0 @@ -/* eslint-disable */ -import { Reader, util, configure, Writer } from "protobufjs/minimal"; -import * as Long from "long"; -import { - OracleExchangeRate, - PriceSnapshot, - OracleTwap, - VotePenaltyCounter, - AggregateExchangeRatePrevote, - AggregateExchangeRateVote, - Params, -} from "../oracle/oracle"; - -export const protobufPackage = "seiprotocol.seichain.oracle"; - -/** QueryExchangeRateRequest is the request type for the Query/ExchangeRate RPC method. */ -export interface QueryExchangeRateRequest { - /** denom defines the denomination to query for. */ - denom: string; -} - -/** - * QueryExchangeRateResponse is response type for the - * Query/ExchangeRate RPC method. - */ -export interface QueryExchangeRateResponse { - /** exchange_rate defines the exchange rate of Sei denominated in various Sei */ - oracle_exchange_rate: OracleExchangeRate | undefined; -} - -/** QueryExchangeRatesRequest is the request type for the Query/ExchangeRates RPC method. */ -export interface QueryExchangeRatesRequest {} - -export interface DenomOracleExchangeRatePair { - denom: string; - oracle_exchange_rate: OracleExchangeRate | undefined; -} - -/** - * QueryExchangeRatesResponse is response type for the - * Query/ExchangeRates RPC method. - */ -export interface QueryExchangeRatesResponse { - /** exchange_rates defines a list of the exchange rate for all whitelisted denoms. */ - denom_oracle_exchange_rate_pairs: DenomOracleExchangeRatePair[]; -} - -/** QueryActivesRequest is the request type for the Query/Actives RPC method. */ -export interface QueryActivesRequest {} - -/** - * QueryActivesResponse is response type for the - * Query/Actives RPC method. - */ -export interface QueryActivesResponse { - /** actives defines a list of the denomination which oracle prices aggreed upon. */ - actives: string[]; -} - -/** QueryVoteTargetsRequest is the request type for the Query/VoteTargets RPC method. */ -export interface QueryVoteTargetsRequest {} - -/** - * QueryVoteTargetsResponse is response type for the - * Query/VoteTargets RPC method. - */ -export interface QueryVoteTargetsResponse { - /** - * vote_targets defines a list of the denomination in which everyone - * should vote in the current vote period. - */ - vote_targets: string[]; -} - -/** request type for price snapshot history RPC method */ -export interface QueryPriceSnapshotHistoryRequest {} - -export interface QueryPriceSnapshotHistoryResponse { - price_snapshots: PriceSnapshot[]; -} - -/** request type for twap RPC method */ -export interface QueryTwapsRequest { - lookback_seconds: number; -} - -export interface QueryTwapsResponse { - oracle_twaps: OracleTwap[]; -} - -/** QueryFeederDelegationRequest is the request type for the Query/FeederDelegation RPC method. */ -export interface QueryFeederDelegationRequest { - /** validator defines the validator address to query for. */ - validator_addr: string; -} - -/** - * QueryFeederDelegationResponse is response type for the - * Query/FeederDelegation RPC method. - */ -export interface QueryFeederDelegationResponse { - /** feeder_addr defines the feeder delegation of a validator */ - feeder_addr: string; -} - -/** QueryVotePenaltyCounterRequest is the request type for the Query/MissCounter RPC method. */ -export interface QueryVotePenaltyCounterRequest { - /** validator defines the validator address to query for. */ - validator_addr: string; -} - -/** - * QueryVotePenaltyCounterResponse is response type for the - * Query/VotePenaltyCounter RPC method. - */ -export interface QueryVotePenaltyCounterResponse { - vote_penalty_counter: VotePenaltyCounter | undefined; -} - -/** QueryAggregatePrevoteRequest is the request type for the Query/AggregatePrevote RPC method. */ -export interface QueryAggregatePrevoteRequest { - /** validator defines the validator address to query for. */ - validator_addr: string; -} - -/** - * QueryAggregatePrevoteResponse is response type for the - * Query/AggregatePrevote RPC method. - */ -export interface QueryAggregatePrevoteResponse { - /** aggregate_prevote defines oracle aggregate prevote submitted by a validator in the current vote period */ - aggregate_prevote: AggregateExchangeRatePrevote | undefined; -} - -/** QueryAggregatePrevotesRequest is the request type for the Query/AggregatePrevotes RPC method. */ -export interface QueryAggregatePrevotesRequest {} - -/** - * QueryAggregatePrevotesResponse is response type for the - * Query/AggregatePrevotes RPC method. - */ -export interface QueryAggregatePrevotesResponse { - /** aggregate_prevotes defines all oracle aggregate prevotes submitted in the current vote period */ - aggregate_prevotes: AggregateExchangeRatePrevote[]; -} - -/** QueryAggregateVoteRequest is the request type for the Query/AggregateVote RPC method. */ -export interface QueryAggregateVoteRequest { - /** validator defines the validator address to query for. */ - validator_addr: string; -} - -/** - * QueryAggregateVoteResponse is response type for the - * Query/AggregateVote RPC method. - */ -export interface QueryAggregateVoteResponse { - /** aggregate_vote defines oracle aggregate vote submitted by a validator in the current vote period */ - aggregate_vote: AggregateExchangeRateVote | undefined; -} - -/** QueryAggregateVotesRequest is the request type for the Query/AggregateVotes RPC method. */ -export interface QueryAggregateVotesRequest {} - -/** - * QueryAggregateVotesResponse is response type for the - * Query/AggregateVotes RPC method. - */ -export interface QueryAggregateVotesResponse { - /** aggregate_votes defines all oracle aggregate votes submitted in the current vote period */ - aggregate_votes: AggregateExchangeRateVote[]; -} - -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} - -const baseQueryExchangeRateRequest: object = { denom: "" }; - -export const QueryExchangeRateRequest = { - encode( - message: QueryExchangeRateRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryExchangeRateRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryExchangeRateRequest, - } as QueryExchangeRateRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryExchangeRateRequest { - const message = { - ...baseQueryExchangeRateRequest, - } as QueryExchangeRateRequest; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - return message; - }, - - toJSON(message: QueryExchangeRateRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryExchangeRateRequest { - const message = { - ...baseQueryExchangeRateRequest, - } as QueryExchangeRateRequest; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - return message; - }, -}; - -const baseQueryExchangeRateResponse: object = {}; - -export const QueryExchangeRateResponse = { - encode( - message: QueryExchangeRateResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.oracle_exchange_rate !== undefined) { - OracleExchangeRate.encode( - message.oracle_exchange_rate, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryExchangeRateResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryExchangeRateResponse, - } as QueryExchangeRateResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.oracle_exchange_rate = OracleExchangeRate.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryExchangeRateResponse { - const message = { - ...baseQueryExchangeRateResponse, - } as QueryExchangeRateResponse; - if ( - object.oracle_exchange_rate !== undefined && - object.oracle_exchange_rate !== null - ) { - message.oracle_exchange_rate = OracleExchangeRate.fromJSON( - object.oracle_exchange_rate - ); - } else { - message.oracle_exchange_rate = undefined; - } - return message; - }, - - toJSON(message: QueryExchangeRateResponse): unknown { - const obj: any = {}; - message.oracle_exchange_rate !== undefined && - (obj.oracle_exchange_rate = message.oracle_exchange_rate - ? OracleExchangeRate.toJSON(message.oracle_exchange_rate) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryExchangeRateResponse { - const message = { - ...baseQueryExchangeRateResponse, - } as QueryExchangeRateResponse; - if ( - object.oracle_exchange_rate !== undefined && - object.oracle_exchange_rate !== null - ) { - message.oracle_exchange_rate = OracleExchangeRate.fromPartial( - object.oracle_exchange_rate - ); - } else { - message.oracle_exchange_rate = undefined; - } - return message; - }, -}; - -const baseQueryExchangeRatesRequest: object = {}; - -export const QueryExchangeRatesRequest = { - encode( - _: QueryExchangeRatesRequest, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryExchangeRatesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryExchangeRatesRequest, - } as QueryExchangeRatesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryExchangeRatesRequest { - const message = { - ...baseQueryExchangeRatesRequest, - } as QueryExchangeRatesRequest; - return message; - }, - - toJSON(_: QueryExchangeRatesRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): QueryExchangeRatesRequest { - const message = { - ...baseQueryExchangeRatesRequest, - } as QueryExchangeRatesRequest; - return message; - }, -}; - -const baseDenomOracleExchangeRatePair: object = { denom: "" }; - -export const DenomOracleExchangeRatePair = { - encode( - message: DenomOracleExchangeRatePair, - writer: Writer = Writer.create() - ): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.oracle_exchange_rate !== undefined) { - OracleExchangeRate.encode( - message.oracle_exchange_rate, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DenomOracleExchangeRatePair { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDenomOracleExchangeRatePair, - } as DenomOracleExchangeRatePair; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.oracle_exchange_rate = OracleExchangeRate.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DenomOracleExchangeRatePair { - const message = { - ...baseDenomOracleExchangeRatePair, - } as DenomOracleExchangeRatePair; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if ( - object.oracle_exchange_rate !== undefined && - object.oracle_exchange_rate !== null - ) { - message.oracle_exchange_rate = OracleExchangeRate.fromJSON( - object.oracle_exchange_rate - ); - } else { - message.oracle_exchange_rate = undefined; - } - return message; - }, - - toJSON(message: DenomOracleExchangeRatePair): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.oracle_exchange_rate !== undefined && - (obj.oracle_exchange_rate = message.oracle_exchange_rate - ? OracleExchangeRate.toJSON(message.oracle_exchange_rate) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DenomOracleExchangeRatePair { - const message = { - ...baseDenomOracleExchangeRatePair, - } as DenomOracleExchangeRatePair; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if ( - object.oracle_exchange_rate !== undefined && - object.oracle_exchange_rate !== null - ) { - message.oracle_exchange_rate = OracleExchangeRate.fromPartial( - object.oracle_exchange_rate - ); - } else { - message.oracle_exchange_rate = undefined; - } - return message; - }, -}; - -const baseQueryExchangeRatesResponse: object = {}; - -export const QueryExchangeRatesResponse = { - encode( - message: QueryExchangeRatesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.denom_oracle_exchange_rate_pairs) { - DenomOracleExchangeRatePair.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryExchangeRatesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryExchangeRatesResponse, - } as QueryExchangeRatesResponse; - message.denom_oracle_exchange_rate_pairs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom_oracle_exchange_rate_pairs.push( - DenomOracleExchangeRatePair.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryExchangeRatesResponse { - const message = { - ...baseQueryExchangeRatesResponse, - } as QueryExchangeRatesResponse; - message.denom_oracle_exchange_rate_pairs = []; - if ( - object.denom_oracle_exchange_rate_pairs !== undefined && - object.denom_oracle_exchange_rate_pairs !== null - ) { - for (const e of object.denom_oracle_exchange_rate_pairs) { - message.denom_oracle_exchange_rate_pairs.push( - DenomOracleExchangeRatePair.fromJSON(e) - ); - } - } - return message; - }, - - toJSON(message: QueryExchangeRatesResponse): unknown { - const obj: any = {}; - if (message.denom_oracle_exchange_rate_pairs) { - obj.denom_oracle_exchange_rate_pairs = message.denom_oracle_exchange_rate_pairs.map( - (e) => (e ? DenomOracleExchangeRatePair.toJSON(e) : undefined) - ); - } else { - obj.denom_oracle_exchange_rate_pairs = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryExchangeRatesResponse { - const message = { - ...baseQueryExchangeRatesResponse, - } as QueryExchangeRatesResponse; - message.denom_oracle_exchange_rate_pairs = []; - if ( - object.denom_oracle_exchange_rate_pairs !== undefined && - object.denom_oracle_exchange_rate_pairs !== null - ) { - for (const e of object.denom_oracle_exchange_rate_pairs) { - message.denom_oracle_exchange_rate_pairs.push( - DenomOracleExchangeRatePair.fromPartial(e) - ); - } - } - return message; - }, -}; - -const baseQueryActivesRequest: object = {}; - -export const QueryActivesRequest = { - encode(_: QueryActivesRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryActivesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryActivesRequest } as QueryActivesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryActivesRequest { - const message = { ...baseQueryActivesRequest } as QueryActivesRequest; - return message; - }, - - toJSON(_: QueryActivesRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryActivesRequest { - const message = { ...baseQueryActivesRequest } as QueryActivesRequest; - return message; - }, -}; - -const baseQueryActivesResponse: object = { actives: "" }; - -export const QueryActivesResponse = { - encode( - message: QueryActivesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.actives) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryActivesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryActivesResponse } as QueryActivesResponse; - message.actives = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.actives.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryActivesResponse { - const message = { ...baseQueryActivesResponse } as QueryActivesResponse; - message.actives = []; - if (object.actives !== undefined && object.actives !== null) { - for (const e of object.actives) { - message.actives.push(String(e)); - } - } - return message; - }, - - toJSON(message: QueryActivesResponse): unknown { - const obj: any = {}; - if (message.actives) { - obj.actives = message.actives.map((e) => e); - } else { - obj.actives = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): QueryActivesResponse { - const message = { ...baseQueryActivesResponse } as QueryActivesResponse; - message.actives = []; - if (object.actives !== undefined && object.actives !== null) { - for (const e of object.actives) { - message.actives.push(e); - } - } - return message; - }, -}; - -const baseQueryVoteTargetsRequest: object = {}; - -export const QueryVoteTargetsRequest = { - encode(_: QueryVoteTargetsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryVoteTargetsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryVoteTargetsRequest, - } as QueryVoteTargetsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryVoteTargetsRequest { - const message = { - ...baseQueryVoteTargetsRequest, - } as QueryVoteTargetsRequest; - return message; - }, - - toJSON(_: QueryVoteTargetsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): QueryVoteTargetsRequest { - const message = { - ...baseQueryVoteTargetsRequest, - } as QueryVoteTargetsRequest; - return message; - }, -}; - -const baseQueryVoteTargetsResponse: object = { vote_targets: "" }; - -export const QueryVoteTargetsResponse = { - encode( - message: QueryVoteTargetsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.vote_targets) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryVoteTargetsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryVoteTargetsResponse, - } as QueryVoteTargetsResponse; - message.vote_targets = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.vote_targets.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryVoteTargetsResponse { - const message = { - ...baseQueryVoteTargetsResponse, - } as QueryVoteTargetsResponse; - message.vote_targets = []; - if (object.vote_targets !== undefined && object.vote_targets !== null) { - for (const e of object.vote_targets) { - message.vote_targets.push(String(e)); - } - } - return message; - }, - - toJSON(message: QueryVoteTargetsResponse): unknown { - const obj: any = {}; - if (message.vote_targets) { - obj.vote_targets = message.vote_targets.map((e) => e); - } else { - obj.vote_targets = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryVoteTargetsResponse { - const message = { - ...baseQueryVoteTargetsResponse, - } as QueryVoteTargetsResponse; - message.vote_targets = []; - if (object.vote_targets !== undefined && object.vote_targets !== null) { - for (const e of object.vote_targets) { - message.vote_targets.push(e); - } - } - return message; - }, -}; - -const baseQueryPriceSnapshotHistoryRequest: object = {}; - -export const QueryPriceSnapshotHistoryRequest = { - encode( - _: QueryPriceSnapshotHistoryRequest, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPriceSnapshotHistoryRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPriceSnapshotHistoryRequest, - } as QueryPriceSnapshotHistoryRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryPriceSnapshotHistoryRequest { - const message = { - ...baseQueryPriceSnapshotHistoryRequest, - } as QueryPriceSnapshotHistoryRequest; - return message; - }, - - toJSON(_: QueryPriceSnapshotHistoryRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): QueryPriceSnapshotHistoryRequest { - const message = { - ...baseQueryPriceSnapshotHistoryRequest, - } as QueryPriceSnapshotHistoryRequest; - return message; - }, -}; - -const baseQueryPriceSnapshotHistoryResponse: object = {}; - -export const QueryPriceSnapshotHistoryResponse = { - encode( - message: QueryPriceSnapshotHistoryResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.price_snapshots) { - PriceSnapshot.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryPriceSnapshotHistoryResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryPriceSnapshotHistoryResponse, - } as QueryPriceSnapshotHistoryResponse; - message.price_snapshots = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.price_snapshots.push( - PriceSnapshot.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryPriceSnapshotHistoryResponse { - const message = { - ...baseQueryPriceSnapshotHistoryResponse, - } as QueryPriceSnapshotHistoryResponse; - message.price_snapshots = []; - if ( - object.price_snapshots !== undefined && - object.price_snapshots !== null - ) { - for (const e of object.price_snapshots) { - message.price_snapshots.push(PriceSnapshot.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryPriceSnapshotHistoryResponse): unknown { - const obj: any = {}; - if (message.price_snapshots) { - obj.price_snapshots = message.price_snapshots.map((e) => - e ? PriceSnapshot.toJSON(e) : undefined - ); - } else { - obj.price_snapshots = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryPriceSnapshotHistoryResponse { - const message = { - ...baseQueryPriceSnapshotHistoryResponse, - } as QueryPriceSnapshotHistoryResponse; - message.price_snapshots = []; - if ( - object.price_snapshots !== undefined && - object.price_snapshots !== null - ) { - for (const e of object.price_snapshots) { - message.price_snapshots.push(PriceSnapshot.fromPartial(e)); - } - } - return message; - }, -}; - -const baseQueryTwapsRequest: object = { lookback_seconds: 0 }; - -export const QueryTwapsRequest = { - encode(message: QueryTwapsRequest, writer: Writer = Writer.create()): Writer { - if (message.lookback_seconds !== 0) { - writer.uint32(8).int64(message.lookback_seconds); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryTwapsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryTwapsRequest } as QueryTwapsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lookback_seconds = longToNumber(reader.int64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryTwapsRequest { - const message = { ...baseQueryTwapsRequest } as QueryTwapsRequest; - if ( - object.lookback_seconds !== undefined && - object.lookback_seconds !== null - ) { - message.lookback_seconds = Number(object.lookback_seconds); - } else { - message.lookback_seconds = 0; - } - return message; - }, - - toJSON(message: QueryTwapsRequest): unknown { - const obj: any = {}; - message.lookback_seconds !== undefined && - (obj.lookback_seconds = message.lookback_seconds); - return obj; - }, - - fromPartial(object: DeepPartial): QueryTwapsRequest { - const message = { ...baseQueryTwapsRequest } as QueryTwapsRequest; - if ( - object.lookback_seconds !== undefined && - object.lookback_seconds !== null - ) { - message.lookback_seconds = object.lookback_seconds; - } else { - message.lookback_seconds = 0; - } - return message; - }, -}; - -const baseQueryTwapsResponse: object = {}; - -export const QueryTwapsResponse = { - encode( - message: QueryTwapsResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.oracle_twaps) { - OracleTwap.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryTwapsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryTwapsResponse } as QueryTwapsResponse; - message.oracle_twaps = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.oracle_twaps.push(OracleTwap.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryTwapsResponse { - const message = { ...baseQueryTwapsResponse } as QueryTwapsResponse; - message.oracle_twaps = []; - if (object.oracle_twaps !== undefined && object.oracle_twaps !== null) { - for (const e of object.oracle_twaps) { - message.oracle_twaps.push(OracleTwap.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryTwapsResponse): unknown { - const obj: any = {}; - if (message.oracle_twaps) { - obj.oracle_twaps = message.oracle_twaps.map((e) => - e ? OracleTwap.toJSON(e) : undefined - ); - } else { - obj.oracle_twaps = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): QueryTwapsResponse { - const message = { ...baseQueryTwapsResponse } as QueryTwapsResponse; - message.oracle_twaps = []; - if (object.oracle_twaps !== undefined && object.oracle_twaps !== null) { - for (const e of object.oracle_twaps) { - message.oracle_twaps.push(OracleTwap.fromPartial(e)); - } - } - return message; - }, -}; - -const baseQueryFeederDelegationRequest: object = { validator_addr: "" }; - -export const QueryFeederDelegationRequest = { - encode( - message: QueryFeederDelegationRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_addr !== "") { - writer.uint32(10).string(message.validator_addr); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryFeederDelegationRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryFeederDelegationRequest, - } as QueryFeederDelegationRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_addr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryFeederDelegationRequest { - const message = { - ...baseQueryFeederDelegationRequest, - } as QueryFeederDelegationRequest; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = String(object.validator_addr); - } else { - message.validator_addr = ""; - } - return message; - }, - - toJSON(message: QueryFeederDelegationRequest): unknown { - const obj: any = {}; - message.validator_addr !== undefined && - (obj.validator_addr = message.validator_addr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryFeederDelegationRequest { - const message = { - ...baseQueryFeederDelegationRequest, - } as QueryFeederDelegationRequest; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = object.validator_addr; - } else { - message.validator_addr = ""; - } - return message; - }, -}; - -const baseQueryFeederDelegationResponse: object = { feeder_addr: "" }; - -export const QueryFeederDelegationResponse = { - encode( - message: QueryFeederDelegationResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.feeder_addr !== "") { - writer.uint32(10).string(message.feeder_addr); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryFeederDelegationResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryFeederDelegationResponse, - } as QueryFeederDelegationResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.feeder_addr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryFeederDelegationResponse { - const message = { - ...baseQueryFeederDelegationResponse, - } as QueryFeederDelegationResponse; - if (object.feeder_addr !== undefined && object.feeder_addr !== null) { - message.feeder_addr = String(object.feeder_addr); - } else { - message.feeder_addr = ""; - } - return message; - }, - - toJSON(message: QueryFeederDelegationResponse): unknown { - const obj: any = {}; - message.feeder_addr !== undefined && - (obj.feeder_addr = message.feeder_addr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryFeederDelegationResponse { - const message = { - ...baseQueryFeederDelegationResponse, - } as QueryFeederDelegationResponse; - if (object.feeder_addr !== undefined && object.feeder_addr !== null) { - message.feeder_addr = object.feeder_addr; - } else { - message.feeder_addr = ""; - } - return message; - }, -}; - -const baseQueryVotePenaltyCounterRequest: object = { validator_addr: "" }; - -export const QueryVotePenaltyCounterRequest = { - encode( - message: QueryVotePenaltyCounterRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_addr !== "") { - writer.uint32(10).string(message.validator_addr); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryVotePenaltyCounterRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryVotePenaltyCounterRequest, - } as QueryVotePenaltyCounterRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_addr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryVotePenaltyCounterRequest { - const message = { - ...baseQueryVotePenaltyCounterRequest, - } as QueryVotePenaltyCounterRequest; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = String(object.validator_addr); - } else { - message.validator_addr = ""; - } - return message; - }, - - toJSON(message: QueryVotePenaltyCounterRequest): unknown { - const obj: any = {}; - message.validator_addr !== undefined && - (obj.validator_addr = message.validator_addr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryVotePenaltyCounterRequest { - const message = { - ...baseQueryVotePenaltyCounterRequest, - } as QueryVotePenaltyCounterRequest; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = object.validator_addr; - } else { - message.validator_addr = ""; - } - return message; - }, -}; - -const baseQueryVotePenaltyCounterResponse: object = {}; - -export const QueryVotePenaltyCounterResponse = { - encode( - message: QueryVotePenaltyCounterResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.vote_penalty_counter !== undefined) { - VotePenaltyCounter.encode( - message.vote_penalty_counter, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryVotePenaltyCounterResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryVotePenaltyCounterResponse, - } as QueryVotePenaltyCounterResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.vote_penalty_counter = VotePenaltyCounter.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryVotePenaltyCounterResponse { - const message = { - ...baseQueryVotePenaltyCounterResponse, - } as QueryVotePenaltyCounterResponse; - if ( - object.vote_penalty_counter !== undefined && - object.vote_penalty_counter !== null - ) { - message.vote_penalty_counter = VotePenaltyCounter.fromJSON( - object.vote_penalty_counter - ); - } else { - message.vote_penalty_counter = undefined; - } - return message; - }, - - toJSON(message: QueryVotePenaltyCounterResponse): unknown { - const obj: any = {}; - message.vote_penalty_counter !== undefined && - (obj.vote_penalty_counter = message.vote_penalty_counter - ? VotePenaltyCounter.toJSON(message.vote_penalty_counter) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryVotePenaltyCounterResponse { - const message = { - ...baseQueryVotePenaltyCounterResponse, - } as QueryVotePenaltyCounterResponse; - if ( - object.vote_penalty_counter !== undefined && - object.vote_penalty_counter !== null - ) { - message.vote_penalty_counter = VotePenaltyCounter.fromPartial( - object.vote_penalty_counter - ); - } else { - message.vote_penalty_counter = undefined; - } - return message; - }, -}; - -const baseQueryAggregatePrevoteRequest: object = { validator_addr: "" }; - -export const QueryAggregatePrevoteRequest = { - encode( - message: QueryAggregatePrevoteRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_addr !== "") { - writer.uint32(10).string(message.validator_addr); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAggregatePrevoteRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregatePrevoteRequest, - } as QueryAggregatePrevoteRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_addr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAggregatePrevoteRequest { - const message = { - ...baseQueryAggregatePrevoteRequest, - } as QueryAggregatePrevoteRequest; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = String(object.validator_addr); - } else { - message.validator_addr = ""; - } - return message; - }, - - toJSON(message: QueryAggregatePrevoteRequest): unknown { - const obj: any = {}; - message.validator_addr !== undefined && - (obj.validator_addr = message.validator_addr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAggregatePrevoteRequest { - const message = { - ...baseQueryAggregatePrevoteRequest, - } as QueryAggregatePrevoteRequest; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = object.validator_addr; - } else { - message.validator_addr = ""; - } - return message; - }, -}; - -const baseQueryAggregatePrevoteResponse: object = {}; - -export const QueryAggregatePrevoteResponse = { - encode( - message: QueryAggregatePrevoteResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.aggregate_prevote !== undefined) { - AggregateExchangeRatePrevote.encode( - message.aggregate_prevote, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAggregatePrevoteResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregatePrevoteResponse, - } as QueryAggregatePrevoteResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.aggregate_prevote = AggregateExchangeRatePrevote.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAggregatePrevoteResponse { - const message = { - ...baseQueryAggregatePrevoteResponse, - } as QueryAggregatePrevoteResponse; - if ( - object.aggregate_prevote !== undefined && - object.aggregate_prevote !== null - ) { - message.aggregate_prevote = AggregateExchangeRatePrevote.fromJSON( - object.aggregate_prevote - ); - } else { - message.aggregate_prevote = undefined; - } - return message; - }, - - toJSON(message: QueryAggregatePrevoteResponse): unknown { - const obj: any = {}; - message.aggregate_prevote !== undefined && - (obj.aggregate_prevote = message.aggregate_prevote - ? AggregateExchangeRatePrevote.toJSON(message.aggregate_prevote) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAggregatePrevoteResponse { - const message = { - ...baseQueryAggregatePrevoteResponse, - } as QueryAggregatePrevoteResponse; - if ( - object.aggregate_prevote !== undefined && - object.aggregate_prevote !== null - ) { - message.aggregate_prevote = AggregateExchangeRatePrevote.fromPartial( - object.aggregate_prevote - ); - } else { - message.aggregate_prevote = undefined; - } - return message; - }, -}; - -const baseQueryAggregatePrevotesRequest: object = {}; - -export const QueryAggregatePrevotesRequest = { - encode( - _: QueryAggregatePrevotesRequest, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAggregatePrevotesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregatePrevotesRequest, - } as QueryAggregatePrevotesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryAggregatePrevotesRequest { - const message = { - ...baseQueryAggregatePrevotesRequest, - } as QueryAggregatePrevotesRequest; - return message; - }, - - toJSON(_: QueryAggregatePrevotesRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): QueryAggregatePrevotesRequest { - const message = { - ...baseQueryAggregatePrevotesRequest, - } as QueryAggregatePrevotesRequest; - return message; - }, -}; - -const baseQueryAggregatePrevotesResponse: object = {}; - -export const QueryAggregatePrevotesResponse = { - encode( - message: QueryAggregatePrevotesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.aggregate_prevotes) { - AggregateExchangeRatePrevote.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAggregatePrevotesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregatePrevotesResponse, - } as QueryAggregatePrevotesResponse; - message.aggregate_prevotes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.aggregate_prevotes.push( - AggregateExchangeRatePrevote.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAggregatePrevotesResponse { - const message = { - ...baseQueryAggregatePrevotesResponse, - } as QueryAggregatePrevotesResponse; - message.aggregate_prevotes = []; - if ( - object.aggregate_prevotes !== undefined && - object.aggregate_prevotes !== null - ) { - for (const e of object.aggregate_prevotes) { - message.aggregate_prevotes.push( - AggregateExchangeRatePrevote.fromJSON(e) - ); - } - } - return message; - }, - - toJSON(message: QueryAggregatePrevotesResponse): unknown { - const obj: any = {}; - if (message.aggregate_prevotes) { - obj.aggregate_prevotes = message.aggregate_prevotes.map((e) => - e ? AggregateExchangeRatePrevote.toJSON(e) : undefined - ); - } else { - obj.aggregate_prevotes = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAggregatePrevotesResponse { - const message = { - ...baseQueryAggregatePrevotesResponse, - } as QueryAggregatePrevotesResponse; - message.aggregate_prevotes = []; - if ( - object.aggregate_prevotes !== undefined && - object.aggregate_prevotes !== null - ) { - for (const e of object.aggregate_prevotes) { - message.aggregate_prevotes.push( - AggregateExchangeRatePrevote.fromPartial(e) - ); - } - } - return message; - }, -}; - -const baseQueryAggregateVoteRequest: object = { validator_addr: "" }; - -export const QueryAggregateVoteRequest = { - encode( - message: QueryAggregateVoteRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.validator_addr !== "") { - writer.uint32(10).string(message.validator_addr); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAggregateVoteRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregateVoteRequest, - } as QueryAggregateVoteRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator_addr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAggregateVoteRequest { - const message = { - ...baseQueryAggregateVoteRequest, - } as QueryAggregateVoteRequest; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = String(object.validator_addr); - } else { - message.validator_addr = ""; - } - return message; - }, - - toJSON(message: QueryAggregateVoteRequest): unknown { - const obj: any = {}; - message.validator_addr !== undefined && - (obj.validator_addr = message.validator_addr); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAggregateVoteRequest { - const message = { - ...baseQueryAggregateVoteRequest, - } as QueryAggregateVoteRequest; - if (object.validator_addr !== undefined && object.validator_addr !== null) { - message.validator_addr = object.validator_addr; - } else { - message.validator_addr = ""; - } - return message; - }, -}; - -const baseQueryAggregateVoteResponse: object = {}; - -export const QueryAggregateVoteResponse = { - encode( - message: QueryAggregateVoteResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.aggregate_vote !== undefined) { - AggregateExchangeRateVote.encode( - message.aggregate_vote, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAggregateVoteResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregateVoteResponse, - } as QueryAggregateVoteResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.aggregate_vote = AggregateExchangeRateVote.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAggregateVoteResponse { - const message = { - ...baseQueryAggregateVoteResponse, - } as QueryAggregateVoteResponse; - if (object.aggregate_vote !== undefined && object.aggregate_vote !== null) { - message.aggregate_vote = AggregateExchangeRateVote.fromJSON( - object.aggregate_vote - ); - } else { - message.aggregate_vote = undefined; - } - return message; - }, - - toJSON(message: QueryAggregateVoteResponse): unknown { - const obj: any = {}; - message.aggregate_vote !== undefined && - (obj.aggregate_vote = message.aggregate_vote - ? AggregateExchangeRateVote.toJSON(message.aggregate_vote) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAggregateVoteResponse { - const message = { - ...baseQueryAggregateVoteResponse, - } as QueryAggregateVoteResponse; - if (object.aggregate_vote !== undefined && object.aggregate_vote !== null) { - message.aggregate_vote = AggregateExchangeRateVote.fromPartial( - object.aggregate_vote - ); - } else { - message.aggregate_vote = undefined; - } - return message; - }, -}; - -const baseQueryAggregateVotesRequest: object = {}; - -export const QueryAggregateVotesRequest = { - encode( - _: QueryAggregateVotesRequest, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAggregateVotesRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregateVotesRequest, - } as QueryAggregateVotesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryAggregateVotesRequest { - const message = { - ...baseQueryAggregateVotesRequest, - } as QueryAggregateVotesRequest; - return message; - }, - - toJSON(_: QueryAggregateVotesRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): QueryAggregateVotesRequest { - const message = { - ...baseQueryAggregateVotesRequest, - } as QueryAggregateVotesRequest; - return message; - }, -}; - -const baseQueryAggregateVotesResponse: object = {}; - -export const QueryAggregateVotesResponse = { - encode( - message: QueryAggregateVotesResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.aggregate_votes) { - AggregateExchangeRateVote.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryAggregateVotesResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryAggregateVotesResponse, - } as QueryAggregateVotesResponse; - message.aggregate_votes = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.aggregate_votes.push( - AggregateExchangeRateVote.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAggregateVotesResponse { - const message = { - ...baseQueryAggregateVotesResponse, - } as QueryAggregateVotesResponse; - message.aggregate_votes = []; - if ( - object.aggregate_votes !== undefined && - object.aggregate_votes !== null - ) { - for (const e of object.aggregate_votes) { - message.aggregate_votes.push(AggregateExchangeRateVote.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: QueryAggregateVotesResponse): unknown { - const obj: any = {}; - if (message.aggregate_votes) { - obj.aggregate_votes = message.aggregate_votes.map((e) => - e ? AggregateExchangeRateVote.toJSON(e) : undefined - ); - } else { - obj.aggregate_votes = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryAggregateVotesResponse { - const message = { - ...baseQueryAggregateVotesResponse, - } as QueryAggregateVotesResponse; - message.aggregate_votes = []; - if ( - object.aggregate_votes !== undefined && - object.aggregate_votes !== null - ) { - for (const e of object.aggregate_votes) { - message.aggregate_votes.push(AggregateExchangeRateVote.fromPartial(e)); - } - } - return message; - }, -}; - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -/** Query defines the gRPC querier service. */ -export interface Query { - /** ExchangeRate returns exchange rate of a denom */ - ExchangeRate( - request: QueryExchangeRateRequest - ): Promise; - /** ExchangeRates returns exchange rates of all denoms */ - ExchangeRates( - request: QueryExchangeRatesRequest - ): Promise; - /** Actives returns all active denoms */ - Actives(request: QueryActivesRequest): Promise; - /** VoteTargets returns all vote target denoms */ - VoteTargets( - request: QueryVoteTargetsRequest - ): Promise; - /** PriceSnapshotHistory returns the history of price snapshots for all assets */ - PriceSnapshotHistory( - request: QueryPriceSnapshotHistoryRequest - ): Promise; - Twaps(request: QueryTwapsRequest): Promise; - /** FeederDelegation returns feeder delegation of a validator */ - FeederDelegation( - request: QueryFeederDelegationRequest - ): Promise; - /** MissCounter returns oracle miss counter of a validator */ - VotePenaltyCounter( - request: QueryVotePenaltyCounterRequest - ): Promise; - /** AggregatePrevote returns an aggregate prevote of a validator */ - AggregatePrevote( - request: QueryAggregatePrevoteRequest - ): Promise; - /** AggregatePrevotes returns aggregate prevotes of all validators */ - AggregatePrevotes( - request: QueryAggregatePrevotesRequest - ): Promise; - /** AggregateVote returns an aggregate vote of a validator */ - AggregateVote( - request: QueryAggregateVoteRequest - ): Promise; - /** AggregateVotes returns aggregate votes of all validators */ - AggregateVotes( - request: QueryAggregateVotesRequest - ): Promise; - /** Params queries all parameters. */ - Params(request: QueryParamsRequest): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - ExchangeRate( - request: QueryExchangeRateRequest - ): Promise { - const data = QueryExchangeRateRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Query", - "ExchangeRate", - data - ); - return promise.then((data) => - QueryExchangeRateResponse.decode(new Reader(data)) - ); - } - - ExchangeRates( - request: QueryExchangeRatesRequest - ): Promise { - const data = QueryExchangeRatesRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Query", - "ExchangeRates", - data - ); - return promise.then((data) => - QueryExchangeRatesResponse.decode(new Reader(data)) - ); - } - - Actives(request: QueryActivesRequest): Promise { - const data = QueryActivesRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Query", - "Actives", - data - ); - return promise.then((data) => - QueryActivesResponse.decode(new Reader(data)) - ); - } - - VoteTargets( - request: QueryVoteTargetsRequest - ): Promise { - const data = QueryVoteTargetsRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Query", - "VoteTargets", - data - ); - return promise.then((data) => - QueryVoteTargetsResponse.decode(new Reader(data)) - ); - } - - PriceSnapshotHistory( - request: QueryPriceSnapshotHistoryRequest - ): Promise { - const data = QueryPriceSnapshotHistoryRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Query", - "PriceSnapshotHistory", - data - ); - return promise.then((data) => - QueryPriceSnapshotHistoryResponse.decode(new Reader(data)) - ); - } - - Twaps(request: QueryTwapsRequest): Promise { - const data = QueryTwapsRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Query", - "Twaps", - data - ); - return promise.then((data) => QueryTwapsResponse.decode(new Reader(data))); - } - - FeederDelegation( - request: QueryFeederDelegationRequest - ): Promise { - const data = QueryFeederDelegationRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Query", - "FeederDelegation", - data - ); - return promise.then((data) => - QueryFeederDelegationResponse.decode(new Reader(data)) - ); - } - - VotePenaltyCounter( - request: QueryVotePenaltyCounterRequest - ): Promise { - const data = QueryVotePenaltyCounterRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Query", - "VotePenaltyCounter", - data - ); - return promise.then((data) => - QueryVotePenaltyCounterResponse.decode(new Reader(data)) - ); - } - - AggregatePrevote( - request: QueryAggregatePrevoteRequest - ): Promise { - const data = QueryAggregatePrevoteRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Query", - "AggregatePrevote", - data - ); - return promise.then((data) => - QueryAggregatePrevoteResponse.decode(new Reader(data)) - ); - } - - AggregatePrevotes( - request: QueryAggregatePrevotesRequest - ): Promise { - const data = QueryAggregatePrevotesRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Query", - "AggregatePrevotes", - data - ); - return promise.then((data) => - QueryAggregatePrevotesResponse.decode(new Reader(data)) - ); - } - - AggregateVote( - request: QueryAggregateVoteRequest - ): Promise { - const data = QueryAggregateVoteRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Query", - "AggregateVote", - data - ); - return promise.then((data) => - QueryAggregateVoteResponse.decode(new Reader(data)) - ); - } - - AggregateVotes( - request: QueryAggregateVotesRequest - ): Promise { - const data = QueryAggregateVotesRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Query", - "AggregateVotes", - data - ); - return promise.then((data) => - QueryAggregateVotesResponse.decode(new Reader(data)) - ); - } - - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/tx.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/tx.d.ts deleted file mode 100644 index c51d580f5e..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/tx.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.oracle"; -/** - * MsgAggregateExchangeRatePrevote represents a message to submit - * aggregate exchange rate prevote. - */ -export interface MsgAggregateExchangeRatePrevote { - hash: string; - feeder: string; - validator: string; -} -/** MsgAggregateExchangeRatePrevoteResponse defines the Msg/AggregateExchangeRatePrevote response type. */ -export interface MsgAggregateExchangeRatePrevoteResponse { -} -/** - * MsgAggregateExchangeRateVote represents a message to submit - * aggregate exchange rate vote. - */ -export interface MsgAggregateExchangeRateVote { - salt: string; - exchangeRates: string; - feeder: string; - validator: string; -} -/** MsgAggregateExchangeRateVoteResponse defines the Msg/AggregateExchangeRateVote response type. */ -export interface MsgAggregateExchangeRateVoteResponse { -} -/** - * MsgAggregateExchangeRateVote represents a message to submit - * aggregate exchange rate vote. - */ -export interface MsgAggregateExchangeRateCombinedVote { - voteSalt: string; - voteExchangeRates: string; - prevoteHash: string; - feeder: string; - validator: string; -} -/** MsgAggregateExchangeRateVoteResponse defines the Msg/AggregateExchangeRateVote response type. */ -export interface MsgAggregateExchangeRateCombinedVoteResponse { -} -/** - * MsgDelegateFeedConsent represents a message to - * delegate oracle voting rights to another address. - */ -export interface MsgDelegateFeedConsent { - operator: string; - delegate: string; -} -/** MsgDelegateFeedConsentResponse defines the Msg/DelegateFeedConsent response type. */ -export interface MsgDelegateFeedConsentResponse { -} -export declare const MsgAggregateExchangeRatePrevote: { - encode(message: MsgAggregateExchangeRatePrevote, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgAggregateExchangeRatePrevote; - fromJSON(object: any): MsgAggregateExchangeRatePrevote; - toJSON(message: MsgAggregateExchangeRatePrevote): unknown; - fromPartial(object: DeepPartial): MsgAggregateExchangeRatePrevote; -}; -export declare const MsgAggregateExchangeRatePrevoteResponse: { - encode(_: MsgAggregateExchangeRatePrevoteResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgAggregateExchangeRatePrevoteResponse; - fromJSON(_: any): MsgAggregateExchangeRatePrevoteResponse; - toJSON(_: MsgAggregateExchangeRatePrevoteResponse): unknown; - fromPartial(_: DeepPartial): MsgAggregateExchangeRatePrevoteResponse; -}; -export declare const MsgAggregateExchangeRateVote: { - encode(message: MsgAggregateExchangeRateVote, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgAggregateExchangeRateVote; - fromJSON(object: any): MsgAggregateExchangeRateVote; - toJSON(message: MsgAggregateExchangeRateVote): unknown; - fromPartial(object: DeepPartial): MsgAggregateExchangeRateVote; -}; -export declare const MsgAggregateExchangeRateVoteResponse: { - encode(_: MsgAggregateExchangeRateVoteResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgAggregateExchangeRateVoteResponse; - fromJSON(_: any): MsgAggregateExchangeRateVoteResponse; - toJSON(_: MsgAggregateExchangeRateVoteResponse): unknown; - fromPartial(_: DeepPartial): MsgAggregateExchangeRateVoteResponse; -}; -export declare const MsgAggregateExchangeRateCombinedVote: { - encode(message: MsgAggregateExchangeRateCombinedVote, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgAggregateExchangeRateCombinedVote; - fromJSON(object: any): MsgAggregateExchangeRateCombinedVote; - toJSON(message: MsgAggregateExchangeRateCombinedVote): unknown; - fromPartial(object: DeepPartial): MsgAggregateExchangeRateCombinedVote; -}; -export declare const MsgAggregateExchangeRateCombinedVoteResponse: { - encode(_: MsgAggregateExchangeRateCombinedVoteResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgAggregateExchangeRateCombinedVoteResponse; - fromJSON(_: any): MsgAggregateExchangeRateCombinedVoteResponse; - toJSON(_: MsgAggregateExchangeRateCombinedVoteResponse): unknown; - fromPartial(_: DeepPartial): MsgAggregateExchangeRateCombinedVoteResponse; -}; -export declare const MsgDelegateFeedConsent: { - encode(message: MsgDelegateFeedConsent, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgDelegateFeedConsent; - fromJSON(object: any): MsgDelegateFeedConsent; - toJSON(message: MsgDelegateFeedConsent): unknown; - fromPartial(object: DeepPartial): MsgDelegateFeedConsent; -}; -export declare const MsgDelegateFeedConsentResponse: { - encode(_: MsgDelegateFeedConsentResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgDelegateFeedConsentResponse; - fromJSON(_: any): MsgDelegateFeedConsentResponse; - toJSON(_: MsgDelegateFeedConsentResponse): unknown; - fromPartial(_: DeepPartial): MsgDelegateFeedConsentResponse; -}; -/** Msg defines the oracle Msg service. */ -export interface Msg { - /** - * AggregateExchangeRatePrevote defines a method for submitting - * aggregate exchange rate prevote - */ - AggregateExchangeRatePrevote(request: MsgAggregateExchangeRatePrevote): Promise; - /** - * AggregateExchangeRateVote defines a method for submitting - * aggregate exchange rate vote - */ - AggregateExchangeRateVote(request: MsgAggregateExchangeRateVote): Promise; - /** Aggregate vote and prevote combines the functionality of prevote and vote into one RPC */ - AggregateExchangeRateCombinedVote(request: MsgAggregateExchangeRateCombinedVote): Promise; - /** DelegateFeedConsent defines a method for setting the feeder delegation */ - DelegateFeedConsent(request: MsgDelegateFeedConsent): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - AggregateExchangeRatePrevote(request: MsgAggregateExchangeRatePrevote): Promise; - AggregateExchangeRateVote(request: MsgAggregateExchangeRateVote): Promise; - AggregateExchangeRateCombinedVote(request: MsgAggregateExchangeRateCombinedVote): Promise; - DelegateFeedConsent(request: MsgDelegateFeedConsent): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/tx.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/tx.js deleted file mode 100644 index f028552952..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/tx.js +++ /dev/null @@ -1,612 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.oracle"; -const baseMsgAggregateExchangeRatePrevote = { - hash: "", - feeder: "", - validator: "", -}; -export const MsgAggregateExchangeRatePrevote = { - encode(message, writer = Writer.create()) { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - if (message.feeder !== "") { - writer.uint32(18).string(message.feeder); - } - if (message.validator !== "") { - writer.uint32(26).string(message.validator); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgAggregateExchangeRatePrevote, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - case 2: - message.feeder = reader.string(); - break; - case 3: - message.validator = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgAggregateExchangeRatePrevote, - }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = String(object.hash); - } - else { - message.hash = ""; - } - if (object.feeder !== undefined && object.feeder !== null) { - message.feeder = String(object.feeder); - } - else { - message.feeder = ""; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = String(object.validator); - } - else { - message.validator = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.hash !== undefined && (obj.hash = message.hash); - message.feeder !== undefined && (obj.feeder = message.feeder); - message.validator !== undefined && (obj.validator = message.validator); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgAggregateExchangeRatePrevote, - }; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } - else { - message.hash = ""; - } - if (object.feeder !== undefined && object.feeder !== null) { - message.feeder = object.feeder; - } - else { - message.feeder = ""; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = object.validator; - } - else { - message.validator = ""; - } - return message; - }, -}; -const baseMsgAggregateExchangeRatePrevoteResponse = {}; -export const MsgAggregateExchangeRatePrevoteResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgAggregateExchangeRatePrevoteResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgAggregateExchangeRatePrevoteResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgAggregateExchangeRatePrevoteResponse, - }; - return message; - }, -}; -const baseMsgAggregateExchangeRateVote = { - salt: "", - exchangeRates: "", - feeder: "", - validator: "", -}; -export const MsgAggregateExchangeRateVote = { - encode(message, writer = Writer.create()) { - if (message.salt !== "") { - writer.uint32(10).string(message.salt); - } - if (message.exchangeRates !== "") { - writer.uint32(18).string(message.exchangeRates); - } - if (message.feeder !== "") { - writer.uint32(26).string(message.feeder); - } - if (message.validator !== "") { - writer.uint32(34).string(message.validator); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgAggregateExchangeRateVote, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.salt = reader.string(); - break; - case 2: - message.exchangeRates = reader.string(); - break; - case 3: - message.feeder = reader.string(); - break; - case 4: - message.validator = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgAggregateExchangeRateVote, - }; - if (object.salt !== undefined && object.salt !== null) { - message.salt = String(object.salt); - } - else { - message.salt = ""; - } - if (object.exchangeRates !== undefined && object.exchangeRates !== null) { - message.exchangeRates = String(object.exchangeRates); - } - else { - message.exchangeRates = ""; - } - if (object.feeder !== undefined && object.feeder !== null) { - message.feeder = String(object.feeder); - } - else { - message.feeder = ""; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = String(object.validator); - } - else { - message.validator = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.salt !== undefined && (obj.salt = message.salt); - message.exchangeRates !== undefined && - (obj.exchangeRates = message.exchangeRates); - message.feeder !== undefined && (obj.feeder = message.feeder); - message.validator !== undefined && (obj.validator = message.validator); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgAggregateExchangeRateVote, - }; - if (object.salt !== undefined && object.salt !== null) { - message.salt = object.salt; - } - else { - message.salt = ""; - } - if (object.exchangeRates !== undefined && object.exchangeRates !== null) { - message.exchangeRates = object.exchangeRates; - } - else { - message.exchangeRates = ""; - } - if (object.feeder !== undefined && object.feeder !== null) { - message.feeder = object.feeder; - } - else { - message.feeder = ""; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = object.validator; - } - else { - message.validator = ""; - } - return message; - }, -}; -const baseMsgAggregateExchangeRateVoteResponse = {}; -export const MsgAggregateExchangeRateVoteResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgAggregateExchangeRateVoteResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgAggregateExchangeRateVoteResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgAggregateExchangeRateVoteResponse, - }; - return message; - }, -}; -const baseMsgAggregateExchangeRateCombinedVote = { - voteSalt: "", - voteExchangeRates: "", - prevoteHash: "", - feeder: "", - validator: "", -}; -export const MsgAggregateExchangeRateCombinedVote = { - encode(message, writer = Writer.create()) { - if (message.voteSalt !== "") { - writer.uint32(10).string(message.voteSalt); - } - if (message.voteExchangeRates !== "") { - writer.uint32(18).string(message.voteExchangeRates); - } - if (message.prevoteHash !== "") { - writer.uint32(26).string(message.prevoteHash); - } - if (message.feeder !== "") { - writer.uint32(34).string(message.feeder); - } - if (message.validator !== "") { - writer.uint32(42).string(message.validator); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgAggregateExchangeRateCombinedVote, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.voteSalt = reader.string(); - break; - case 2: - message.voteExchangeRates = reader.string(); - break; - case 3: - message.prevoteHash = reader.string(); - break; - case 4: - message.feeder = reader.string(); - break; - case 5: - message.validator = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseMsgAggregateExchangeRateCombinedVote, - }; - if (object.voteSalt !== undefined && object.voteSalt !== null) { - message.voteSalt = String(object.voteSalt); - } - else { - message.voteSalt = ""; - } - if (object.voteExchangeRates !== undefined && - object.voteExchangeRates !== null) { - message.voteExchangeRates = String(object.voteExchangeRates); - } - else { - message.voteExchangeRates = ""; - } - if (object.prevoteHash !== undefined && object.prevoteHash !== null) { - message.prevoteHash = String(object.prevoteHash); - } - else { - message.prevoteHash = ""; - } - if (object.feeder !== undefined && object.feeder !== null) { - message.feeder = String(object.feeder); - } - else { - message.feeder = ""; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = String(object.validator); - } - else { - message.validator = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.voteSalt !== undefined && (obj.voteSalt = message.voteSalt); - message.voteExchangeRates !== undefined && - (obj.voteExchangeRates = message.voteExchangeRates); - message.prevoteHash !== undefined && - (obj.prevoteHash = message.prevoteHash); - message.feeder !== undefined && (obj.feeder = message.feeder); - message.validator !== undefined && (obj.validator = message.validator); - return obj; - }, - fromPartial(object) { - const message = { - ...baseMsgAggregateExchangeRateCombinedVote, - }; - if (object.voteSalt !== undefined && object.voteSalt !== null) { - message.voteSalt = object.voteSalt; - } - else { - message.voteSalt = ""; - } - if (object.voteExchangeRates !== undefined && - object.voteExchangeRates !== null) { - message.voteExchangeRates = object.voteExchangeRates; - } - else { - message.voteExchangeRates = ""; - } - if (object.prevoteHash !== undefined && object.prevoteHash !== null) { - message.prevoteHash = object.prevoteHash; - } - else { - message.prevoteHash = ""; - } - if (object.feeder !== undefined && object.feeder !== null) { - message.feeder = object.feeder; - } - else { - message.feeder = ""; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = object.validator; - } - else { - message.validator = ""; - } - return message; - }, -}; -const baseMsgAggregateExchangeRateCombinedVoteResponse = {}; -export const MsgAggregateExchangeRateCombinedVoteResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgAggregateExchangeRateCombinedVoteResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgAggregateExchangeRateCombinedVoteResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgAggregateExchangeRateCombinedVoteResponse, - }; - return message; - }, -}; -const baseMsgDelegateFeedConsent = { operator: "", delegate: "" }; -export const MsgDelegateFeedConsent = { - encode(message, writer = Writer.create()) { - if (message.operator !== "") { - writer.uint32(10).string(message.operator); - } - if (message.delegate !== "") { - writer.uint32(18).string(message.delegate); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDelegateFeedConsent }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.operator = reader.string(); - break; - case 2: - message.delegate = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgDelegateFeedConsent }; - if (object.operator !== undefined && object.operator !== null) { - message.operator = String(object.operator); - } - else { - message.operator = ""; - } - if (object.delegate !== undefined && object.delegate !== null) { - message.delegate = String(object.delegate); - } - else { - message.delegate = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.operator !== undefined && (obj.operator = message.operator); - message.delegate !== undefined && (obj.delegate = message.delegate); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgDelegateFeedConsent }; - if (object.operator !== undefined && object.operator !== null) { - message.operator = object.operator; - } - else { - message.operator = ""; - } - if (object.delegate !== undefined && object.delegate !== null) { - message.delegate = object.delegate; - } - else { - message.delegate = ""; - } - return message; - }, -}; -const baseMsgDelegateFeedConsentResponse = {}; -export const MsgDelegateFeedConsentResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgDelegateFeedConsentResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseMsgDelegateFeedConsentResponse, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseMsgDelegateFeedConsentResponse, - }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - AggregateExchangeRatePrevote(request) { - const data = MsgAggregateExchangeRatePrevote.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Msg", "AggregateExchangeRatePrevote", data); - return promise.then((data) => MsgAggregateExchangeRatePrevoteResponse.decode(new Reader(data))); - } - AggregateExchangeRateVote(request) { - const data = MsgAggregateExchangeRateVote.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Msg", "AggregateExchangeRateVote", data); - return promise.then((data) => MsgAggregateExchangeRateVoteResponse.decode(new Reader(data))); - } - AggregateExchangeRateCombinedVote(request) { - const data = MsgAggregateExchangeRateCombinedVote.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Msg", "AggregateExchangeRateCombinedVote", data); - return promise.then((data) => MsgAggregateExchangeRateCombinedVoteResponse.decode(new Reader(data))); - } - DelegateFeedConsent(request) { - const data = MsgDelegateFeedConsent.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.oracle.Msg", "DelegateFeedConsent", data); - return promise.then((data) => MsgDelegateFeedConsentResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/tx.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/tx.ts deleted file mode 100644 index 12c14791e6..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/module/types/oracle/tx.ts +++ /dev/null @@ -1,834 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.oracle"; - -/** - * MsgAggregateExchangeRatePrevote represents a message to submit - * aggregate exchange rate prevote. - */ -export interface MsgAggregateExchangeRatePrevote { - hash: string; - feeder: string; - validator: string; -} - -/** MsgAggregateExchangeRatePrevoteResponse defines the Msg/AggregateExchangeRatePrevote response type. */ -export interface MsgAggregateExchangeRatePrevoteResponse {} - -/** - * MsgAggregateExchangeRateVote represents a message to submit - * aggregate exchange rate vote. - */ -export interface MsgAggregateExchangeRateVote { - salt: string; - exchange_rates: string; - feeder: string; - validator: string; -} - -/** MsgAggregateExchangeRateVoteResponse defines the Msg/AggregateExchangeRateVote response type. */ -export interface MsgAggregateExchangeRateVoteResponse {} - -/** - * MsgAggregateExchangeRateVote represents a message to submit - * aggregate exchange rate vote. - */ -export interface MsgAggregateExchangeRateCombinedVote { - vote_salt: string; - vote_exchange_rates: string; - prevote_hash: string; - feeder: string; - validator: string; -} - -/** MsgAggregateExchangeRateVoteResponse defines the Msg/AggregateExchangeRateVote response type. */ -export interface MsgAggregateExchangeRateCombinedVoteResponse {} - -/** - * MsgDelegateFeedConsent represents a message to - * delegate oracle voting rights to another address. - */ -export interface MsgDelegateFeedConsent { - operator: string; - delegate: string; -} - -/** MsgDelegateFeedConsentResponse defines the Msg/DelegateFeedConsent response type. */ -export interface MsgDelegateFeedConsentResponse {} - -const baseMsgAggregateExchangeRatePrevote: object = { - hash: "", - feeder: "", - validator: "", -}; - -export const MsgAggregateExchangeRatePrevote = { - encode( - message: MsgAggregateExchangeRatePrevote, - writer: Writer = Writer.create() - ): Writer { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - if (message.feeder !== "") { - writer.uint32(18).string(message.feeder); - } - if (message.validator !== "") { - writer.uint32(26).string(message.validator); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgAggregateExchangeRatePrevote { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgAggregateExchangeRatePrevote, - } as MsgAggregateExchangeRatePrevote; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - case 2: - message.feeder = reader.string(); - break; - case 3: - message.validator = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgAggregateExchangeRatePrevote { - const message = { - ...baseMsgAggregateExchangeRatePrevote, - } as MsgAggregateExchangeRatePrevote; - if (object.hash !== undefined && object.hash !== null) { - message.hash = String(object.hash); - } else { - message.hash = ""; - } - if (object.feeder !== undefined && object.feeder !== null) { - message.feeder = String(object.feeder); - } else { - message.feeder = ""; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = String(object.validator); - } else { - message.validator = ""; - } - return message; - }, - - toJSON(message: MsgAggregateExchangeRatePrevote): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = message.hash); - message.feeder !== undefined && (obj.feeder = message.feeder); - message.validator !== undefined && (obj.validator = message.validator); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgAggregateExchangeRatePrevote { - const message = { - ...baseMsgAggregateExchangeRatePrevote, - } as MsgAggregateExchangeRatePrevote; - if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; - } else { - message.hash = ""; - } - if (object.feeder !== undefined && object.feeder !== null) { - message.feeder = object.feeder; - } else { - message.feeder = ""; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = object.validator; - } else { - message.validator = ""; - } - return message; - }, -}; - -const baseMsgAggregateExchangeRatePrevoteResponse: object = {}; - -export const MsgAggregateExchangeRatePrevoteResponse = { - encode( - _: MsgAggregateExchangeRatePrevoteResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgAggregateExchangeRatePrevoteResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgAggregateExchangeRatePrevoteResponse, - } as MsgAggregateExchangeRatePrevoteResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgAggregateExchangeRatePrevoteResponse { - const message = { - ...baseMsgAggregateExchangeRatePrevoteResponse, - } as MsgAggregateExchangeRatePrevoteResponse; - return message; - }, - - toJSON(_: MsgAggregateExchangeRatePrevoteResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgAggregateExchangeRatePrevoteResponse { - const message = { - ...baseMsgAggregateExchangeRatePrevoteResponse, - } as MsgAggregateExchangeRatePrevoteResponse; - return message; - }, -}; - -const baseMsgAggregateExchangeRateVote: object = { - salt: "", - exchange_rates: "", - feeder: "", - validator: "", -}; - -export const MsgAggregateExchangeRateVote = { - encode( - message: MsgAggregateExchangeRateVote, - writer: Writer = Writer.create() - ): Writer { - if (message.salt !== "") { - writer.uint32(10).string(message.salt); - } - if (message.exchange_rates !== "") { - writer.uint32(18).string(message.exchange_rates); - } - if (message.feeder !== "") { - writer.uint32(26).string(message.feeder); - } - if (message.validator !== "") { - writer.uint32(34).string(message.validator); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgAggregateExchangeRateVote { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgAggregateExchangeRateVote, - } as MsgAggregateExchangeRateVote; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.salt = reader.string(); - break; - case 2: - message.exchange_rates = reader.string(); - break; - case 3: - message.feeder = reader.string(); - break; - case 4: - message.validator = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgAggregateExchangeRateVote { - const message = { - ...baseMsgAggregateExchangeRateVote, - } as MsgAggregateExchangeRateVote; - if (object.salt !== undefined && object.salt !== null) { - message.salt = String(object.salt); - } else { - message.salt = ""; - } - if (object.exchange_rates !== undefined && object.exchange_rates !== null) { - message.exchange_rates = String(object.exchange_rates); - } else { - message.exchange_rates = ""; - } - if (object.feeder !== undefined && object.feeder !== null) { - message.feeder = String(object.feeder); - } else { - message.feeder = ""; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = String(object.validator); - } else { - message.validator = ""; - } - return message; - }, - - toJSON(message: MsgAggregateExchangeRateVote): unknown { - const obj: any = {}; - message.salt !== undefined && (obj.salt = message.salt); - message.exchange_rates !== undefined && - (obj.exchange_rates = message.exchange_rates); - message.feeder !== undefined && (obj.feeder = message.feeder); - message.validator !== undefined && (obj.validator = message.validator); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgAggregateExchangeRateVote { - const message = { - ...baseMsgAggregateExchangeRateVote, - } as MsgAggregateExchangeRateVote; - if (object.salt !== undefined && object.salt !== null) { - message.salt = object.salt; - } else { - message.salt = ""; - } - if (object.exchange_rates !== undefined && object.exchange_rates !== null) { - message.exchange_rates = object.exchange_rates; - } else { - message.exchange_rates = ""; - } - if (object.feeder !== undefined && object.feeder !== null) { - message.feeder = object.feeder; - } else { - message.feeder = ""; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = object.validator; - } else { - message.validator = ""; - } - return message; - }, -}; - -const baseMsgAggregateExchangeRateVoteResponse: object = {}; - -export const MsgAggregateExchangeRateVoteResponse = { - encode( - _: MsgAggregateExchangeRateVoteResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgAggregateExchangeRateVoteResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgAggregateExchangeRateVoteResponse, - } as MsgAggregateExchangeRateVoteResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgAggregateExchangeRateVoteResponse { - const message = { - ...baseMsgAggregateExchangeRateVoteResponse, - } as MsgAggregateExchangeRateVoteResponse; - return message; - }, - - toJSON(_: MsgAggregateExchangeRateVoteResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgAggregateExchangeRateVoteResponse { - const message = { - ...baseMsgAggregateExchangeRateVoteResponse, - } as MsgAggregateExchangeRateVoteResponse; - return message; - }, -}; - -const baseMsgAggregateExchangeRateCombinedVote: object = { - vote_salt: "", - vote_exchange_rates: "", - prevote_hash: "", - feeder: "", - validator: "", -}; - -export const MsgAggregateExchangeRateCombinedVote = { - encode( - message: MsgAggregateExchangeRateCombinedVote, - writer: Writer = Writer.create() - ): Writer { - if (message.vote_salt !== "") { - writer.uint32(10).string(message.vote_salt); - } - if (message.vote_exchange_rates !== "") { - writer.uint32(18).string(message.vote_exchange_rates); - } - if (message.prevote_hash !== "") { - writer.uint32(26).string(message.prevote_hash); - } - if (message.feeder !== "") { - writer.uint32(34).string(message.feeder); - } - if (message.validator !== "") { - writer.uint32(42).string(message.validator); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgAggregateExchangeRateCombinedVote { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgAggregateExchangeRateCombinedVote, - } as MsgAggregateExchangeRateCombinedVote; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.vote_salt = reader.string(); - break; - case 2: - message.vote_exchange_rates = reader.string(); - break; - case 3: - message.prevote_hash = reader.string(); - break; - case 4: - message.feeder = reader.string(); - break; - case 5: - message.validator = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgAggregateExchangeRateCombinedVote { - const message = { - ...baseMsgAggregateExchangeRateCombinedVote, - } as MsgAggregateExchangeRateCombinedVote; - if (object.vote_salt !== undefined && object.vote_salt !== null) { - message.vote_salt = String(object.vote_salt); - } else { - message.vote_salt = ""; - } - if ( - object.vote_exchange_rates !== undefined && - object.vote_exchange_rates !== null - ) { - message.vote_exchange_rates = String(object.vote_exchange_rates); - } else { - message.vote_exchange_rates = ""; - } - if (object.prevote_hash !== undefined && object.prevote_hash !== null) { - message.prevote_hash = String(object.prevote_hash); - } else { - message.prevote_hash = ""; - } - if (object.feeder !== undefined && object.feeder !== null) { - message.feeder = String(object.feeder); - } else { - message.feeder = ""; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = String(object.validator); - } else { - message.validator = ""; - } - return message; - }, - - toJSON(message: MsgAggregateExchangeRateCombinedVote): unknown { - const obj: any = {}; - message.vote_salt !== undefined && (obj.vote_salt = message.vote_salt); - message.vote_exchange_rates !== undefined && - (obj.vote_exchange_rates = message.vote_exchange_rates); - message.prevote_hash !== undefined && - (obj.prevote_hash = message.prevote_hash); - message.feeder !== undefined && (obj.feeder = message.feeder); - message.validator !== undefined && (obj.validator = message.validator); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgAggregateExchangeRateCombinedVote { - const message = { - ...baseMsgAggregateExchangeRateCombinedVote, - } as MsgAggregateExchangeRateCombinedVote; - if (object.vote_salt !== undefined && object.vote_salt !== null) { - message.vote_salt = object.vote_salt; - } else { - message.vote_salt = ""; - } - if ( - object.vote_exchange_rates !== undefined && - object.vote_exchange_rates !== null - ) { - message.vote_exchange_rates = object.vote_exchange_rates; - } else { - message.vote_exchange_rates = ""; - } - if (object.prevote_hash !== undefined && object.prevote_hash !== null) { - message.prevote_hash = object.prevote_hash; - } else { - message.prevote_hash = ""; - } - if (object.feeder !== undefined && object.feeder !== null) { - message.feeder = object.feeder; - } else { - message.feeder = ""; - } - if (object.validator !== undefined && object.validator !== null) { - message.validator = object.validator; - } else { - message.validator = ""; - } - return message; - }, -}; - -const baseMsgAggregateExchangeRateCombinedVoteResponse: object = {}; - -export const MsgAggregateExchangeRateCombinedVoteResponse = { - encode( - _: MsgAggregateExchangeRateCombinedVoteResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgAggregateExchangeRateCombinedVoteResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgAggregateExchangeRateCombinedVoteResponse, - } as MsgAggregateExchangeRateCombinedVoteResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgAggregateExchangeRateCombinedVoteResponse { - const message = { - ...baseMsgAggregateExchangeRateCombinedVoteResponse, - } as MsgAggregateExchangeRateCombinedVoteResponse; - return message; - }, - - toJSON(_: MsgAggregateExchangeRateCombinedVoteResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgAggregateExchangeRateCombinedVoteResponse { - const message = { - ...baseMsgAggregateExchangeRateCombinedVoteResponse, - } as MsgAggregateExchangeRateCombinedVoteResponse; - return message; - }, -}; - -const baseMsgDelegateFeedConsent: object = { operator: "", delegate: "" }; - -export const MsgDelegateFeedConsent = { - encode( - message: MsgDelegateFeedConsent, - writer: Writer = Writer.create() - ): Writer { - if (message.operator !== "") { - writer.uint32(10).string(message.operator); - } - if (message.delegate !== "") { - writer.uint32(18).string(message.delegate); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgDelegateFeedConsent { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDelegateFeedConsent } as MsgDelegateFeedConsent; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.operator = reader.string(); - break; - case 2: - message.delegate = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgDelegateFeedConsent { - const message = { ...baseMsgDelegateFeedConsent } as MsgDelegateFeedConsent; - if (object.operator !== undefined && object.operator !== null) { - message.operator = String(object.operator); - } else { - message.operator = ""; - } - if (object.delegate !== undefined && object.delegate !== null) { - message.delegate = String(object.delegate); - } else { - message.delegate = ""; - } - return message; - }, - - toJSON(message: MsgDelegateFeedConsent): unknown { - const obj: any = {}; - message.operator !== undefined && (obj.operator = message.operator); - message.delegate !== undefined && (obj.delegate = message.delegate); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgDelegateFeedConsent { - const message = { ...baseMsgDelegateFeedConsent } as MsgDelegateFeedConsent; - if (object.operator !== undefined && object.operator !== null) { - message.operator = object.operator; - } else { - message.operator = ""; - } - if (object.delegate !== undefined && object.delegate !== null) { - message.delegate = object.delegate; - } else { - message.delegate = ""; - } - return message; - }, -}; - -const baseMsgDelegateFeedConsentResponse: object = {}; - -export const MsgDelegateFeedConsentResponse = { - encode( - _: MsgDelegateFeedConsentResponse, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): MsgDelegateFeedConsentResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgDelegateFeedConsentResponse, - } as MsgDelegateFeedConsentResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgDelegateFeedConsentResponse { - const message = { - ...baseMsgDelegateFeedConsentResponse, - } as MsgDelegateFeedConsentResponse; - return message; - }, - - toJSON(_: MsgDelegateFeedConsentResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): MsgDelegateFeedConsentResponse { - const message = { - ...baseMsgDelegateFeedConsentResponse, - } as MsgDelegateFeedConsentResponse; - return message; - }, -}; - -/** Msg defines the oracle Msg service. */ -export interface Msg { - /** - * AggregateExchangeRatePrevote defines a method for submitting - * aggregate exchange rate prevote - */ - AggregateExchangeRatePrevote( - request: MsgAggregateExchangeRatePrevote - ): Promise; - /** - * AggregateExchangeRateVote defines a method for submitting - * aggregate exchange rate vote - */ - AggregateExchangeRateVote( - request: MsgAggregateExchangeRateVote - ): Promise; - /** Aggregate vote and prevote combines the functionality of prevote and vote into one RPC */ - AggregateExchangeRateCombinedVote( - request: MsgAggregateExchangeRateCombinedVote - ): Promise; - /** DelegateFeedConsent defines a method for setting the feeder delegation */ - DelegateFeedConsent( - request: MsgDelegateFeedConsent - ): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - AggregateExchangeRatePrevote( - request: MsgAggregateExchangeRatePrevote - ): Promise { - const data = MsgAggregateExchangeRatePrevote.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Msg", - "AggregateExchangeRatePrevote", - data - ); - return promise.then((data) => - MsgAggregateExchangeRatePrevoteResponse.decode(new Reader(data)) - ); - } - - AggregateExchangeRateVote( - request: MsgAggregateExchangeRateVote - ): Promise { - const data = MsgAggregateExchangeRateVote.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Msg", - "AggregateExchangeRateVote", - data - ); - return promise.then((data) => - MsgAggregateExchangeRateVoteResponse.decode(new Reader(data)) - ); - } - - AggregateExchangeRateCombinedVote( - request: MsgAggregateExchangeRateCombinedVote - ): Promise { - const data = MsgAggregateExchangeRateCombinedVote.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Msg", - "AggregateExchangeRateCombinedVote", - data - ); - return promise.then((data) => - MsgAggregateExchangeRateCombinedVoteResponse.decode(new Reader(data)) - ); - } - - DelegateFeedConsent( - request: MsgDelegateFeedConsent - ): Promise { - const data = MsgDelegateFeedConsent.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.oracle.Msg", - "DelegateFeedConsent", - data - ); - return promise.then((data) => - MsgDelegateFeedConsentResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/package.json b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/package.json deleted file mode 100755 index 4246acf244..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "seiprotocol-seichain-oracle-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module seiprotocol.seichain.oracle", - "author": "Starport Codegen ", - "homepage": "http://github.com/sei-protocol/sei-chain/x/oracle/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/vuex-root b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.oracle/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/index.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/index.d.ts deleted file mode 100644 index b5e20bac0c..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { DenomAuthorityMetadata } from "./module/types/tokenfactory/authorityMetadata"; -import { GenesisDenom } from "./module/types/tokenfactory/genesis"; -import { AddCreatorsToDenomFeeWhitelistProposal } from "./module/types/tokenfactory/gov"; -import { Params } from "./module/types/tokenfactory/params"; -export { DenomAuthorityMetadata, GenesisDenom, AddCreatorsToDenomFeeWhitelistProposal, Params }; -declare const _default; -export default _default; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/index.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/index.js deleted file mode 100644 index 6fcd116620..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/index.js +++ /dev/null @@ -1,339 +0,0 @@ -import { txClient, queryClient, MissingWalletError, registry } from './module'; -// @ts-ignore -import { SpVuexError } from '@starport/vuex'; -import { DenomAuthorityMetadata } from "./module/types/tokenfactory/authorityMetadata"; -import { GenesisDenom } from "./module/types/tokenfactory/genesis"; -import { AddCreatorsToDenomFeeWhitelistProposal } from "./module/types/tokenfactory/gov"; -import { Params } from "./module/types/tokenfactory/params"; -export { DenomAuthorityMetadata, GenesisDenom, AddCreatorsToDenomFeeWhitelistProposal, Params }; -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }); -} -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }); -} -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop] = [...value[prop], ...next_values[prop]]; - } - else { - value[prop] = next_values[prop]; - } - } - return value; -} -function getStructure(template) { - let structure = { fields: [] }; - for (const [key, value] of Object.entries(template)) { - let field = {}; - field.name = key; - field.type = typeof value; - structure.fields.push(field); - } - return structure; -} -const getDefaultState = () => { - return { - Params: {}, - DenomAuthorityMetadata: {}, - DenomsFromCreator: {}, - DenomCreationFeeWhitelist: {}, - CreatorInDenomFeeWhitelist: {}, - _Structure: { - DenomAuthorityMetadata: getStructure(DenomAuthorityMetadata.fromPartial({})), - GenesisDenom: getStructure(GenesisDenom.fromPartial({})), - AddCreatorsToDenomFeeWhitelistProposal: getStructure(AddCreatorsToDenomFeeWhitelistProposal.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - }, - _Registry: registry, - _Subscriptions: new Set(), - }; -}; -// initial state -const state = getDefaultState(); -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()); - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value; - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)); - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)); - } - }, - getters: { - getParams: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.Params[JSON.stringify(params)] ?? {}; - }, - getDenomAuthorityMetadata: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DenomAuthorityMetadata[JSON.stringify(params)] ?? {}; - }, - getDenomsFromCreator: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DenomsFromCreator[JSON.stringify(params)] ?? {}; - }, - getDenomCreationFeeWhitelist: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.DenomCreationFeeWhitelist[JSON.stringify(params)] ?? {}; - }, - getCreatorInDenomFeeWhitelist: (state) => (params = { params: {} }) => { - if (!params.query) { - params.query = null; - } - return state.CreatorInDenomFeeWhitelist[JSON.stringify(params)] ?? {}; - }, - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields; - }, - getRegistry: (state) => { - return state._Registry; - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: seiprotocol.seichain.tokenfactory initialized!'); - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate'); - }); - } - }, - resetState({ commit }) { - commit('RESET_STATE'); - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription); - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub = JSON.parse(subscription); - await dispatch(sub.action, sub.payload); - } - catch (e) { - throw new SpVuexError('Subscriptions: ' + e.message); - } - }); - }, - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryParams()).data; - commit('QUERY', { query: 'Params', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: { ...key }, query } }); - return getters['getParams']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryParams', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDenomAuthorityMetadata({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDenomAuthorityMetadata(key.denom)).data; - commit('QUERY', { query: 'DenomAuthorityMetadata', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDenomAuthorityMetadata', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDenomAuthorityMetadata']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDenomAuthorityMetadata', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDenomsFromCreator({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDenomsFromCreator(key.creator)).data; - commit('QUERY', { query: 'DenomsFromCreator', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDenomsFromCreator', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDenomsFromCreator']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDenomsFromCreator', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryDenomCreationFeeWhitelist({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryDenomCreationFeeWhitelist()).data; - commit('QUERY', { query: 'DenomCreationFeeWhitelist', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryDenomCreationFeeWhitelist', payload: { options: { all }, params: { ...key }, query } }); - return getters['getDenomCreationFeeWhitelist']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryDenomCreationFeeWhitelist', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async QueryCreatorInDenomFeeWhitelist({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params, query = null }) { - try { - const key = params ?? {}; - const queryClient = await initQueryClient(rootGetters); - let value = (await queryClient.queryCreatorInDenomFeeWhitelist(key.creator)).data; - commit('QUERY', { query: 'CreatorInDenomFeeWhitelist', key: { params: { ...key }, query }, value }); - if (subscribe) - commit('SUBSCRIBE', { action: 'QueryCreatorInDenomFeeWhitelist', payload: { options: { all }, params: { ...key }, query } }); - return getters['getCreatorInDenomFeeWhitelist']({ params: { ...key }, query }) ?? {}; - } - catch (e) { - throw new SpVuexError('QueryClient:QueryCreatorInDenomFeeWhitelist', 'API Node Unavailable. Could not perform query: ' + e.message); - } - }, - async sendMsgChangeAdmin({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgChangeAdmin(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgChangeAdmin:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgChangeAdmin:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgBurn({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgBurn(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgBurn:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgBurn:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgMint({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgMint(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgMint:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgMint:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async sendMsgCreateDenom({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgCreateDenom(value); - const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee, - gas: "200000" }, memo }); - return result; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgCreateDenom:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgCreateDenom:Send', 'Could not broadcast Tx: ' + e.message); - } - } - }, - async MsgChangeAdmin({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgChangeAdmin(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgChangeAdmin:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgChangeAdmin:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgBurn({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgBurn(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgBurn:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgBurn:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgMint({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgMint(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgMint:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgMint:Create', 'Could not create message: ' + e.message); - } - } - }, - async MsgCreateDenom({ rootGetters }, { value }) { - try { - const txClient = await initTxClient(rootGetters); - const msg = await txClient.msgCreateDenom(value); - return msg; - } - catch (e) { - if (e == MissingWalletError) { - throw new SpVuexError('TxClient:MsgCreateDenom:Init', 'Could not initialize signing client. Wallet is required.'); - } - else { - throw new SpVuexError('TxClient:MsgCreateDenom:Create', 'Could not create message: ' + e.message); - } - } - }, - } -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/index.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/index.ts deleted file mode 100755 index 66717a03d3..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/index.ts +++ /dev/null @@ -1,375 +0,0 @@ -import { txClient, queryClient, MissingWalletError , registry} from './module' - -import { DenomAuthorityMetadata } from "./module/types/tokenfactory/authorityMetadata" -import { GenesisDenom } from "./module/types/tokenfactory/genesis" -import { AddCreatorsToDenomFeeWhitelistProposal } from "./module/types/tokenfactory/gov" -import { Params } from "./module/types/tokenfactory/params" - - -export { DenomAuthorityMetadata, GenesisDenom, AddCreatorsToDenomFeeWhitelistProposal, Params }; - -async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { - addr: vuexGetters['common/env/apiTendermint'] - }) -} - -async function initQueryClient(vuexGetters) { - return await queryClient({ - addr: vuexGetters['common/env/apiCosmos'] - }) -} - -function mergeResults(value, next_values) { - for (let prop of Object.keys(next_values)) { - if (Array.isArray(next_values[prop])) { - value[prop]=[...value[prop], ...next_values[prop]] - }else{ - value[prop]=next_values[prop] - } - } - return value -} - -function getStructure(template) { - let structure = { fields: [] } - for (const [key, value] of Object.entries(template)) { - let field: any = {} - field.name = key - field.type = typeof value - structure.fields.push(field) - } - return structure -} - -const getDefaultState = () => { - return { - Params: {}, - DenomAuthorityMetadata: {}, - DenomsFromCreator: {}, - DenomCreationFeeWhitelist: {}, - CreatorInDenomFeeWhitelist: {}, - - _Structure: { - DenomAuthorityMetadata: getStructure(DenomAuthorityMetadata.fromPartial({})), - GenesisDenom: getStructure(GenesisDenom.fromPartial({})), - AddCreatorsToDenomFeeWhitelistProposal: getStructure(AddCreatorsToDenomFeeWhitelistProposal.fromPartial({})), - Params: getStructure(Params.fromPartial({})), - - }, - _Registry: registry, - _Subscriptions: new Set(), - } -} - -// initial state -const state = getDefaultState() - -export default { - namespaced: true, - state, - mutations: { - RESET_STATE(state) { - Object.assign(state, getDefaultState()) - }, - QUERY(state, { query, key, value }) { - state[query][JSON.stringify(key)] = value - }, - SUBSCRIBE(state, subscription) { - state._Subscriptions.add(JSON.stringify(subscription)) - }, - UNSUBSCRIBE(state, subscription) { - state._Subscriptions.delete(JSON.stringify(subscription)) - } - }, - getters: { - getParams: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.Params[JSON.stringify(params)] ?? {} - }, - getDenomAuthorityMetadata: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DenomAuthorityMetadata[JSON.stringify(params)] ?? {} - }, - getDenomsFromCreator: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DenomsFromCreator[JSON.stringify(params)] ?? {} - }, - getDenomCreationFeeWhitelist: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.DenomCreationFeeWhitelist[JSON.stringify(params)] ?? {} - }, - getCreatorInDenomFeeWhitelist: (state) => (params = { params: {}}) => { - if (!( params).query) { - ( params).query=null - } - return state.CreatorInDenomFeeWhitelist[JSON.stringify(params)] ?? {} - }, - - getTypeStructure: (state) => (type) => { - return state._Structure[type].fields - }, - getRegistry: (state) => { - return state._Registry - } - }, - actions: { - init({ dispatch, rootGetters }) { - console.log('Vuex module: seiprotocol.seichain.tokenfactory initialized!') - if (rootGetters['common/env/client']) { - rootGetters['common/env/client'].on('newblock', () => { - dispatch('StoreUpdate') - }) - } - }, - resetState({ commit }) { - commit('RESET_STATE') - }, - unsubscribe({ commit }, subscription) { - commit('UNSUBSCRIBE', subscription) - }, - async StoreUpdate({ state, dispatch }) { - state._Subscriptions.forEach(async (subscription) => { - try { - const sub=JSON.parse(subscription) - await dispatch(sub.action, sub.payload) - }catch(e) { - throw new Error('Subscriptions: ' + e.message) - } - }) - }, - - - - - - - async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryParams()).data - - - commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) - return getters['getParams']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDenomAuthorityMetadata({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDenomAuthorityMetadata( key.denom)).data - - - commit('QUERY', { query: 'DenomAuthorityMetadata', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDenomAuthorityMetadata', payload: { options: { all }, params: {...key},query }}) - return getters['getDenomAuthorityMetadata']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDenomAuthorityMetadata API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDenomsFromCreator({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDenomsFromCreator( key.creator)).data - - - commit('QUERY', { query: 'DenomsFromCreator', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDenomsFromCreator', payload: { options: { all }, params: {...key},query }}) - return getters['getDenomsFromCreator']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDenomsFromCreator API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryDenomCreationFeeWhitelist({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryDenomCreationFeeWhitelist()).data - - - commit('QUERY', { query: 'DenomCreationFeeWhitelist', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryDenomCreationFeeWhitelist', payload: { options: { all }, params: {...key},query }}) - return getters['getDenomCreationFeeWhitelist']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryDenomCreationFeeWhitelist API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - - - - - - async QueryCreatorInDenomFeeWhitelist({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { - try { - const key = params ?? {}; - const queryClient=await initQueryClient(rootGetters) - let value= (await queryClient.queryCreatorInDenomFeeWhitelist( key.creator)).data - - - commit('QUERY', { query: 'CreatorInDenomFeeWhitelist', key: { params: {...key}, query}, value }) - if (subscribe) commit('SUBSCRIBE', { action: 'QueryCreatorInDenomFeeWhitelist', payload: { options: { all }, params: {...key},query }}) - return getters['getCreatorInDenomFeeWhitelist']( { params: {...key}, query}) ?? {} - } catch (e) { - throw new Error('QueryClient:QueryCreatorInDenomFeeWhitelist API Node Unavailable. Could not perform query: ' + e.message) - - } - }, - - - async sendMsgCreateDenom({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateDenom(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateDenom:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgCreateDenom:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgMint({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgMint(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgMint:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgMint:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgBurn({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgBurn(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgBurn:Send Could not broadcast Tx: '+ e.message) - } - } - }, - async sendMsgChangeAdmin({ rootGetters }, { value, fee = [], memo = '' }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgChangeAdmin(value) - const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, - gas: "200000" }, memo}) - return result - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgChangeAdmin:Init Could not initialize signing client. Wallet is required.') - }else{ - throw new Error('TxClient:MsgChangeAdmin:Send Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgCreateDenom({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateDenom(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateDenom:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgCreateDenom:Create Could not create message: ' + e.message) - } - } - }, - async MsgMint({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgMint(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgMint:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgMint:Create Could not create message: ' + e.message) - } - } - }, - async MsgBurn({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgBurn(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgBurn:Create Could not create message: ' + e.message) - } - } - }, - async MsgChangeAdmin({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgChangeAdmin(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgChangeAdmin:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgChangeAdmin:Create Could not create message: ' + e.message) - } - } - }, - - } -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/index.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/index.d.ts deleted file mode 100644 index 47efbd05c7..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { StdFee } from "@cosmjs/launchpad"; -import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgChangeAdmin } from "./types/tokenfactory/tx"; -import { MsgBurn } from "./types/tokenfactory/tx"; -import { MsgMint } from "./types/tokenfactory/tx"; -import { MsgCreateDenom } from "./types/tokenfactory/tx"; -export declare const MissingWalletError: Error; -export declare const registry: Registry; -interface TxClientOptions { - addr: string; -} -interface SignAndBroadcastOptions { - fee: StdFee; - memo?: string; -} -declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; - msgChangeAdmin: (data: MsgChangeAdmin) => EncodeObject; - msgBurn: (data: MsgBurn) => EncodeObject; - msgMint: (data: MsgMint) => EncodeObject; - msgCreateDenom: (data: MsgCreateDenom) => EncodeObject; -}>; -interface QueryClientOptions { - addr: string; -} -declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/index.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/index.js deleted file mode 100644 index 44898fc7f0..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/index.js +++ /dev/null @@ -1,43 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgChangeAdmin } from "./types/tokenfactory/tx"; -import { MsgBurn } from "./types/tokenfactory/tx"; -import { MsgMint } from "./types/tokenfactory/tx"; -import { MsgCreateDenom } from "./types/tokenfactory/tx"; -const types = [ - ["/seiprotocol.seichain.tokenfactory.MsgChangeAdmin", MsgChangeAdmin], - ["/seiprotocol.seichain.tokenfactory.MsgBurn", MsgBurn], - ["/seiprotocol.seichain.tokenfactory.MsgMint", MsgMint], - ["/seiprotocol.seichain.tokenfactory.MsgCreateDenom", MsgCreateDenom], -]; -export const MissingWalletError = new Error("wallet is required"); -export const registry = new Registry(types); -const defaultFee = { - amount: [], - gas: "200000", -}; -const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657" }) => { - if (!wallet) - throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - } - else { - client = await SigningStargateClient.offline(wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - return { - signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo), - msgChangeAdmin: (data) => ({ typeUrl: "/seiprotocol.seichain.tokenfactory.MsgChangeAdmin", value: MsgChangeAdmin.fromPartial(data) }), - msgBurn: (data) => ({ typeUrl: "/seiprotocol.seichain.tokenfactory.MsgBurn", value: MsgBurn.fromPartial(data) }), - msgMint: (data) => ({ typeUrl: "/seiprotocol.seichain.tokenfactory.MsgMint", value: MsgMint.fromPartial(data) }), - msgCreateDenom: (data) => ({ typeUrl: "/seiprotocol.seichain.tokenfactory.MsgCreateDenom", value: MsgCreateDenom.fromPartial(data) }), - }; -}; -const queryClient = async ({ addr: addr } = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; -export { txClient, queryClient, }; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/index.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/index.ts deleted file mode 100755 index 0b19159113..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/index.ts +++ /dev/null @@ -1,69 +0,0 @@ -// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; -import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Api } from "./rest"; -import { MsgCreateDenom } from "./types/tokenfactory/tx"; -import { MsgMint } from "./types/tokenfactory/tx"; -import { MsgBurn } from "./types/tokenfactory/tx"; -import { MsgChangeAdmin } from "./types/tokenfactory/tx"; - - -const types = [ - ["/seiprotocol.seichain.tokenfactory.MsgCreateDenom", MsgCreateDenom], - ["/seiprotocol.seichain.tokenfactory.MsgMint", MsgMint], - ["/seiprotocol.seichain.tokenfactory.MsgBurn", MsgBurn], - ["/seiprotocol.seichain.tokenfactory.MsgChangeAdmin", MsgChangeAdmin], - -]; -export const MissingWalletError = new Error("wallet is required"); - -export const registry = new Registry(types); - -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string -} - -interface SignAndBroadcastOptions { - fee: StdFee, - memo?: string -} - -const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { - if (!wallet) throw MissingWalletError; - let client; - if (addr) { - client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); - }else{ - client = await SigningStargateClient.offline( wallet, { registry }); - } - const { address } = (await wallet.getAccounts())[0]; - - return { - signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgCreateDenom: (data: MsgCreateDenom): EncodeObject => ({ typeUrl: "/seiprotocol.seichain.tokenfactory.MsgCreateDenom", value: MsgCreateDenom.fromPartial( data ) }), - msgMint: (data: MsgMint): EncodeObject => ({ typeUrl: "/seiprotocol.seichain.tokenfactory.MsgMint", value: MsgMint.fromPartial( data ) }), - msgBurn: (data: MsgBurn): EncodeObject => ({ typeUrl: "/seiprotocol.seichain.tokenfactory.MsgBurn", value: MsgBurn.fromPartial( data ) }), - msgChangeAdmin: (data: MsgChangeAdmin): EncodeObject => ({ typeUrl: "/seiprotocol.seichain.tokenfactory.MsgChangeAdmin", value: MsgChangeAdmin.fromPartial( data ) }), - - }; -}; - -interface QueryClientOptions { - addr: string -} - -const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseUrl: addr }); -}; - -export { - txClient, - queryClient, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/rest.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/rest.d.ts deleted file mode 100644 index 0ddae63e3a..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/rest.d.ts +++ /dev/null @@ -1,193 +0,0 @@ -export interface ProtobufAny { - "@type"?: string; -} -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} -/** -* DenomAuthorityMetadata specifies metadata for addresses that have specific -capabilities over a token factory denom. Right now there is only one Admin -permission, but is planned to be extended to the future. -*/ -export interface TokenfactoryDenomAuthorityMetadata { - admin?: string; -} -export declare type TokenfactoryMsgBurnResponse = object; -/** -* MsgChangeAdminResponse defines the response structure for an executed -MsgChangeAdmin message. -*/ -export declare type TokenfactoryMsgChangeAdminResponse = object; -export interface TokenfactoryMsgCreateDenomResponse { - newTokenDenom?: string; -} -export declare type TokenfactoryMsgMintResponse = object; -/** - * Params defines the parameters for the tokenfactory module. - */ -export interface TokenfactoryParams { - denomCreationFee?: V1Beta1Coin[]; -} -/** -* QueryCreatorInDenomFeeWhitelistResponse defines the response structure for the -CreatorInDenomFeeWhitelist gRPC query. -*/ -export interface TokenfactoryQueryCreatorInDenomFeeWhitelistResponse { - whitelisted?: boolean; -} -/** -* QueryDenomAuthorityMetadataResponse defines the response structure for the -DenomAuthorityMetadata gRPC query. -*/ -export interface TokenfactoryQueryDenomAuthorityMetadataResponse { - /** - * DenomAuthorityMetadata specifies metadata for addresses that have specific - * capabilities over a token factory denom. Right now there is only one Admin - * permission, but is planned to be extended to the future. - */ - authorityMetadata?: TokenfactoryDenomAuthorityMetadata; -} -/** -* QueryDenomCreationFeeWhitelistResponse defines the response structure for the -DenomsFromCreator gRPC query. -*/ -export interface TokenfactoryQueryDenomCreationFeeWhitelistResponse { - creators?: string[]; -} -/** -* QueryDenomsFromCreatorRequest defines the response structure for the -DenomsFromCreator gRPC query. -*/ -export interface TokenfactoryQueryDenomsFromCreatorResponse { - denoms?: string[]; -} -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface TokenfactoryQueryParamsResponse { - /** params defines the parameters of the module. */ - params?: TokenfactoryParams; -} -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} -export declare type QueryParamsType = Record; -export declare type ResponseFormat = keyof Omit; -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} -export declare type RequestParams = Omit; -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} -export interface HttpResponse extends Response { - data: D; - error: E; -} -declare type CancelToken = Symbol | string | number; -export declare enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded" -} -export declare class HttpClient { - baseUrl: string; - private securityData; - private securityWorker; - private abortControllers; - private baseApiParams; - constructor(apiConfig?: ApiConfig); - setSecurityData: (data: SecurityDataType) => void; - private addQueryParam; - protected toQueryString(rawQuery?: QueryParamsType): string; - protected addQueryParams(rawQuery?: QueryParamsType): string; - private contentFormatters; - private mergeRequestParams; - private createAbortSignal; - abortRequest: (cancelToken: CancelToken) => void; - request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise>; -} -/** - * @title tokenfactory/authorityMetadata.proto - * @version version not set - */ -export declare class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryDenomCreationFeeWhitelist - * @summary DenomCreationFeeWhitelist defines a gRPC query method for fetching all - creators who are whitelisted from paying the denom creation fee. - * @request GET:/sei-protocol/seichain/tokenfactory/denom_creation_fee_whitelist - */ - queryDenomCreationFeeWhitelist: (params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryCreatorInDenomFeeWhitelist - * @summary CreatorInDenomFeeWhitelist defines a gRPC query method for fetching - whether a creator is whitelisted from denom creation fees. - * @request GET:/sei-protocol/seichain/tokenfactory/denom_creation_fee_whitelist/{creator} - */ - queryCreatorInDenomFeeWhitelist: (creator: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDenomAuthorityMetadata - * @summary DenomAuthorityMetadata defines a gRPC query method for fetching - DenomAuthorityMetadata for a particular denom. - * @request GET:/sei-protocol/seichain/tokenfactory/denoms/{denom}/authority_metadata - */ - queryDenomAuthorityMetadata: (denom: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryDenomsFromCreator - * @summary DenomsFromCreator defines a gRPC query method for fetching all - denominations created by a specific admin/creator. - * @request GET:/sei-protocol/seichain/tokenfactory/denoms_from_creator/{creator} - */ - queryDenomsFromCreator: (creator: string, params?: RequestParams) => Promise>; - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params defines a gRPC query method that returns the tokenfactory module's - parameters. - * @request GET:/sei-protocol/seichain/tokenfactory/params - */ - queryParams: (params?: RequestParams) => Promise>; -} -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/rest.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/rest.js deleted file mode 100644 index 447e8ddbfb..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/rest.js +++ /dev/null @@ -1,215 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ -export var ContentType; -(function (ContentType) { - ContentType["Json"] = "application/json"; - ContentType["FormData"] = "multipart/form-data"; - ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; -})(ContentType || (ContentType = {})); -export class HttpClient { - constructor(apiConfig = {}) { - this.baseUrl = ""; - this.securityData = null; - this.securityWorker = null; - this.abortControllers = new Map(); - this.baseApiParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - this.setSecurityData = (data) => { - this.securityData = data; - }; - this.contentFormatters = { - [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input) => this.toQueryString(input), - }; - this.createAbortSignal = (cancelToken) => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - this.abortRequest = (cancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - this.request = ({ body, secure, path, type, query, format = "json", baseUrl, cancelToken, ...params }) => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response; - r.data = null; - r.error = null; - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } - else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - if (!response.ok) - throw data; - return data; - }); - }; - Object.assign(this, apiConfig); - } - addQueryParam(query, key) { - const value = query[key]; - return (encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`)); - } - toQueryString(rawQuery) { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key]) - : this.addQueryParam(query, key)) - .join("&"); - } - addQueryParams(rawQuery) { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - mergeRequestParams(params1, params2) { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } -} -/** - * @title tokenfactory/authorityMetadata.proto - * @version version not set - */ -export class Api extends HttpClient { - constructor() { - super(...arguments); - /** - * No description - * - * @tags Query - * @name QueryDenomCreationFeeWhitelist - * @summary DenomCreationFeeWhitelist defines a gRPC query method for fetching all - creators who are whitelisted from paying the denom creation fee. - * @request GET:/sei-protocol/seichain/tokenfactory/denom_creation_fee_whitelist - */ - this.queryDenomCreationFeeWhitelist = (params = {}) => this.request({ - path: `/sei-protocol/seichain/tokenfactory/denom_creation_fee_whitelist`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryCreatorInDenomFeeWhitelist - * @summary CreatorInDenomFeeWhitelist defines a gRPC query method for fetching - whether a creator is whitelisted from denom creation fees. - * @request GET:/sei-protocol/seichain/tokenfactory/denom_creation_fee_whitelist/{creator} - */ - this.queryCreatorInDenomFeeWhitelist = (creator, params = {}) => this.request({ - path: `/sei-protocol/seichain/tokenfactory/denom_creation_fee_whitelist/${creator}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDenomAuthorityMetadata - * @summary DenomAuthorityMetadata defines a gRPC query method for fetching - DenomAuthorityMetadata for a particular denom. - * @request GET:/sei-protocol/seichain/tokenfactory/denoms/{denom}/authority_metadata - */ - this.queryDenomAuthorityMetadata = (denom, params = {}) => this.request({ - path: `/sei-protocol/seichain/tokenfactory/denoms/${denom}/authority_metadata`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryDenomsFromCreator - * @summary DenomsFromCreator defines a gRPC query method for fetching all - denominations created by a specific admin/creator. - * @request GET:/sei-protocol/seichain/tokenfactory/denoms_from_creator/{creator} - */ - this.queryDenomsFromCreator = (creator, params = {}) => this.request({ - path: `/sei-protocol/seichain/tokenfactory/denoms_from_creator/${creator}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params defines a gRPC query method that returns the tokenfactory module's - parameters. - * @request GET:/sei-protocol/seichain/tokenfactory/params - */ - this.queryParams = (params = {}) => this.request({ - path: `/sei-protocol/seichain/tokenfactory/params`, - method: "GET", - format: "json", - ...params, - }); - } -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/rest.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/rest.ts deleted file mode 100644 index 5dada9f028..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/rest.ts +++ /dev/null @@ -1,389 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface ProtobufAny { - "@type"?: string; -} - -export interface RpcStatus { - /** @format int32 */ - code?: number; - message?: string; - details?: ProtobufAny[]; -} - -/** -* DenomAuthorityMetadata specifies metadata for addresses that have specific -capabilities over a token factory denom. Right now there is only one Admin -permission, but is planned to be extended to the future. -*/ -export interface TokenfactoryDenomAuthorityMetadata { - admin?: string; -} - -export type TokenfactoryMsgBurnResponse = object; - -/** -* MsgChangeAdminResponse defines the response structure for an executed -MsgChangeAdmin message. -*/ -export type TokenfactoryMsgChangeAdminResponse = object; - -export interface TokenfactoryMsgCreateDenomResponse { - new_token_denom?: string; -} - -export type TokenfactoryMsgMintResponse = object; - -/** - * Params defines the parameters for the tokenfactory module. - */ -export interface TokenfactoryParams { - denom_creation_fee?: V1Beta1Coin[]; -} - -/** -* QueryCreatorInDenomFeeWhitelistResponse defines the response structure for the -CreatorInDenomFeeWhitelist gRPC query. -*/ -export interface TokenfactoryQueryCreatorInDenomFeeWhitelistResponse { - whitelisted?: boolean; -} - -/** -* QueryDenomAuthorityMetadataResponse defines the response structure for the -DenomAuthorityMetadata gRPC query. -*/ -export interface TokenfactoryQueryDenomAuthorityMetadataResponse { - /** - * DenomAuthorityMetadata specifies metadata for addresses that have specific - * capabilities over a token factory denom. Right now there is only one Admin - * permission, but is planned to be extended to the future. - */ - authority_metadata?: TokenfactoryDenomAuthorityMetadata; -} - -/** -* QueryDenomCreationFeeWhitelistResponse defines the response structure for the -DenomsFromCreator gRPC query. -*/ -export interface TokenfactoryQueryDenomCreationFeeWhitelistResponse { - creators?: string[]; -} - -/** -* QueryDenomsFromCreatorRequest defines the response structure for the -DenomsFromCreator gRPC query. -*/ -export interface TokenfactoryQueryDenomsFromCreatorResponse { - denoms?: string[]; -} - -/** - * QueryParamsResponse is the response type for the Query/Params RPC method. - */ -export interface TokenfactoryQueryParamsResponse { - /** params defines the parameters of the module. */ - params?: TokenfactoryParams; -} - -/** -* 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. -*/ -export interface V1Beta1Coin { - denom?: string; - amount?: string; -} - -export type QueryParamsType = Record; -export type ResponseFormat = keyof Omit; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: keyof Omit; - /** request body */ - body?: unknown; - /** base url */ - baseUrl?: string; - /** request cancellation token */ - cancelToken?: CancelToken; -} - -export type RequestParams = Omit; - -export interface ApiConfig { - baseUrl?: string; - baseApiParams?: Omit; - securityWorker?: (securityData: SecurityDataType) => RequestParams | void; -} - -export interface HttpResponse extends Response { - data: D; - error: E; -} - -type CancelToken = Symbol | string | number; - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public baseUrl: string = ""; - private securityData: SecurityDataType = null as any; - private securityWorker: null | ApiConfig["securityWorker"] = null; - private abortControllers = new Map(); - - private baseApiParams: RequestParams = { - credentials: "same-origin", - headers: {}, - redirect: "follow", - referrerPolicy: "no-referrer", - }; - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig); - } - - public setSecurityData = (data: SecurityDataType) => { - this.securityData = data; - }; - - private addQueryParam(query: QueryParamsType, key: string) { - const value = query[key]; - - return ( - encodeURIComponent(key) + - "=" + - encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) - ); - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {}; - const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); - return keys - .map((key) => - typeof query[key] === "object" && !Array.isArray(query[key]) - ? this.toQueryString(query[key] as QueryParamsType) - : this.addQueryParam(query, key), - ) - .join("&"); - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery); - return queryString ? `?${queryString}` : ""; - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((data, key) => { - data.append(key, input[key]); - return data; - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - }; - - private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken); - if (abortController) { - return abortController.signal; - } - return void 0; - } - - const abortController = new AbortController(); - this.abortControllers.set(cancelToken, abortController); - return abortController.signal; - }; - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken); - - if (abortController) { - abortController.abort(); - this.abortControllers.delete(cancelToken); - } - }; - - public request = ({ - body, - secure, - path, - type, - query, - format = "json", - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const queryString = query && this.toQueryString(query); - const payloadFormatter = this.contentFormatters[type || ContentType.Json]; - - return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), - }).then(async (response) => { - const r = response as HttpResponse; - r.data = (null as unknown) as T; - r.error = (null as unknown) as E; - - const data = await response[format]() - .then((data) => { - if (r.ok) { - r.data = data; - } else { - r.error = data; - } - return r; - }) - .catch((e) => { - r.error = e; - return r; - }); - - if (cancelToken) { - this.abortControllers.delete(cancelToken); - } - - if (!response.ok) throw data; - return data; - }); - }; -} - -/** - * @title tokenfactory/authorityMetadata.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryDenomCreationFeeWhitelist - * @summary DenomCreationFeeWhitelist defines a gRPC query method for fetching all -creators who are whitelisted from paying the denom creation fee. - * @request GET:/sei-protocol/seichain/tokenfactory/denom_creation_fee_whitelist - */ - queryDenomCreationFeeWhitelist = (params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/seichain/tokenfactory/denom_creation_fee_whitelist`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryCreatorInDenomFeeWhitelist - * @summary CreatorInDenomFeeWhitelist defines a gRPC query method for fetching -whether a creator is whitelisted from denom creation fees. - * @request GET:/sei-protocol/seichain/tokenfactory/denom_creation_fee_whitelist/{creator} - */ - queryCreatorInDenomFeeWhitelist = (creator: string, params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/seichain/tokenfactory/denom_creation_fee_whitelist/${creator}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDenomAuthorityMetadata - * @summary DenomAuthorityMetadata defines a gRPC query method for fetching -DenomAuthorityMetadata for a particular denom. - * @request GET:/sei-protocol/seichain/tokenfactory/denoms/{denom}/authority_metadata - */ - queryDenomAuthorityMetadata = (denom: string, params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/seichain/tokenfactory/denoms/${denom}/authority_metadata`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryDenomsFromCreator - * @summary DenomsFromCreator defines a gRPC query method for fetching all -denominations created by a specific admin/creator. - * @request GET:/sei-protocol/seichain/tokenfactory/denoms_from_creator/{creator} - */ - queryDenomsFromCreator = (creator: string, params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/seichain/tokenfactory/denoms_from_creator/${creator}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Params defines a gRPC query method that returns the tokenfactory module's -parameters. - * @request GET:/sei-protocol/seichain/tokenfactory/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/sei-protocol/seichain/tokenfactory/params`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/query/v1beta1/pagination.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/query/v1beta1/pagination.d.ts deleted file mode 100644 index 767d2c358f..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/query/v1beta1/pagination.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.query.v1beta1"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - countTotal: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; -} -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} -export declare const PageRequest: { - encode(message: PageRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageRequest; - fromJSON(object: any): PageRequest; - toJSON(message: PageRequest): unknown; - fromPartial(object: DeepPartial): PageRequest; -}; -export declare const PageResponse: { - encode(message: PageResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): PageResponse; - fromJSON(object: any): PageResponse; - toJSON(message: PageResponse): unknown; - fromPartial(object: DeepPartial): PageResponse; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/query/v1beta1/pagination.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/query/v1beta1/pagination.js deleted file mode 100644 index b5f5ced3d6..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/query/v1beta1/pagination.js +++ /dev/null @@ -1,242 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.query.v1beta1"; -const basePageRequest = { - offset: 0, - limit: 0, - countTotal: false, - reverse: false, -}; -export const PageRequest = { - encode(message, writer = Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64()); - break; - case 3: - message.limit = longToNumber(reader.uint64()); - break; - case 4: - message.countTotal = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = Boolean(object.countTotal); - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } - else { - message.reverse = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - message.reverse !== undefined && (obj.reverse = message.reverse); - return obj; - }, - fromPartial(object) { - const message = { ...basePageRequest }; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } - else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } - else { - message.limit = 0; - } - if (object.countTotal !== undefined && object.countTotal !== null) { - message.countTotal = object.countTotal; - } - else { - message.countTotal = false; - } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } - else { - message.reverse = false; - } - return message; - }, -}; -const basePageResponse = { total: 0 }; -export const PageResponse = { - encode(message, writer = Writer.create()) { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = bytesFromBase64(object.nextKey); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } - else { - message.total = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - fromPartial(object) { - const message = { ...basePageResponse }; - if (object.nextKey !== undefined && object.nextKey !== null) { - message.nextKey = object.nextKey; - } - else { - message.nextKey = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } - else { - message.total = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 0bc568f477..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,300 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.query.v1beta1"; - -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: number; - /** - * 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. - */ - limit: number; - /** - * 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. - */ - count_total: boolean; -} - -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -const basePageRequest: object = { offset: 0, limit: 0, count_total: false }; - -export const PageRequest = { - encode(message: PageRequest, writer: Writer = Writer.create()): Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== 0) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== 0) { - writer.uint32(24).uint64(message.limit); - } - if (message.count_total === true) { - writer.uint32(32).bool(message.count_total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageRequest } as PageRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = longToNumber(reader.uint64() as Long); - break; - case 3: - message.limit = longToNumber(reader.uint64() as Long); - break; - case 4: - message.count_total = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = Number(object.offset); - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = Number(object.limit); - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = Boolean(object.count_total); - } else { - message.count_total = false; - } - return message; - }, - - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && (obj.offset = message.offset); - message.limit !== undefined && (obj.limit = message.limit); - message.count_total !== undefined && - (obj.count_total = message.count_total); - return obj; - }, - - fromPartial(object: DeepPartial): PageRequest { - const message = { ...basePageRequest } as PageRequest; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.offset !== undefined && object.offset !== null) { - message.offset = object.offset; - } else { - message.offset = 0; - } - if (object.limit !== undefined && object.limit !== null) { - message.limit = object.limit; - } else { - message.limit = 0; - } - if (object.count_total !== undefined && object.count_total !== null) { - message.count_total = object.count_total; - } else { - message.count_total = false; - } - return message; - }, -}; - -const basePageResponse: object = { total: 0 }; - -export const PageResponse = { - encode(message: PageResponse, writer: Writer = Writer.create()): Writer { - if (message.next_key.length !== 0) { - writer.uint32(10).bytes(message.next_key); - } - if (message.total !== 0) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...basePageResponse } as PageResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = bytesFromBase64(object.next_key); - } - if (object.total !== undefined && object.total !== null) { - message.total = Number(object.total); - } else { - message.total = 0; - } - return message; - }, - - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.next_key !== undefined && - (obj.next_key = base64FromBytes( - message.next_key !== undefined ? message.next_key : new Uint8Array() - )); - message.total !== undefined && (obj.total = message.total); - return obj; - }, - - fromPartial(object: DeepPartial): PageResponse { - const message = { ...basePageResponse } as PageResponse; - if (object.next_key !== undefined && object.next_key !== null) { - message.next_key = object.next_key; - } else { - message.next_key = new Uint8Array(); - } - if (object.total !== undefined && object.total !== null) { - message.total = object.total; - } else { - message.total = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/v1beta1/coin.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/v1beta1/coin.d.ts deleted file mode 100644 index 607bfac6a3..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/v1beta1/coin.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "cosmos.base.v1beta1"; -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export declare const Coin: { - encode(message: Coin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Coin; - fromJSON(object: any): Coin; - toJSON(message: Coin): unknown; - fromPartial(object: DeepPartial): Coin; -}; -export declare const DecCoin: { - encode(message: DecCoin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecCoin; - fromJSON(object: any): DecCoin; - toJSON(message: DecCoin): unknown; - fromPartial(object: DeepPartial): DecCoin; -}; -export declare const IntProto: { - encode(message: IntProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): IntProto; - fromJSON(object: any): IntProto; - toJSON(message: IntProto): unknown; - fromPartial(object: DeepPartial): IntProto; -}; -export declare const DecProto: { - encode(message: DecProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DecProto; - fromJSON(object: any): DecProto; - toJSON(message: DecProto): unknown; - fromPartial(object: DeepPartial): DecProto; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/v1beta1/coin.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/v1beta1/coin.js deleted file mode 100644 index e5f8bb30cd..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/v1beta1/coin.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "cosmos.base.v1beta1"; -const baseCoin = { denom: "", amount: "" }; -export const Coin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseDecCoin = { denom: "", amount: "" }; -export const DecCoin = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } - else { - message.amount = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecCoin }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } - else { - message.amount = ""; - } - return message; - }, -}; -const baseIntProto = { int: "" }; -export const IntProto = { - encode(message, writer = Writer.create()) { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } - else { - message.int = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object) { - const message = { ...baseIntProto }; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } - else { - message.int = ""; - } - return message; - }, -}; -const baseDecProto = { dec: "" }; -export const DecProto = { - encode(message, writer = Writer.create()) { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } - else { - message.dec = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object) { - const message = { ...baseDecProto }; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } - else { - message.dec = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/v1beta1/coin.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index ce2ac98406..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,301 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.base.v1beta1"; - -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} - -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} - -const baseCoin: object = { denom: "", amount: "" }; - -export const Coin = { - encode(message: Coin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCoin } as Coin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): Coin { - const message = { ...baseCoin } as Coin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseDecCoin: object = { denom: "", amount: "" }; - -export const DecCoin = { - encode(message: DecCoin, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecCoin } as DecCoin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = String(object.amount); - } else { - message.amount = ""; - } - return message; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial(object: DeepPartial): DecCoin { - const message = { ...baseDecCoin } as DecCoin; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = object.amount; - } else { - message.amount = ""; - } - return message; - }, -}; - -const baseIntProto: object = { int: "" }; - -export const IntProto = { - encode(message: IntProto, writer: Writer = Writer.create()): Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIntProto } as IntProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = String(object.int); - } else { - message.int = ""; - } - return message; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial(object: DeepPartial): IntProto { - const message = { ...baseIntProto } as IntProto; - if (object.int !== undefined && object.int !== null) { - message.int = object.int; - } else { - message.int = ""; - } - return message; - }, -}; - -const baseDecProto: object = { dec: "" }; - -export const DecProto = { - encode(message: DecProto, writer: Writer = Writer.create()): Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDecProto } as DecProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = String(object.dec); - } else { - message.dec = ""; - } - return message; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial(object: DeepPartial): DecProto { - const message = { ...baseDecProto } as DecProto; - if (object.dec !== undefined && object.dec !== null) { - message.dec = object.dec; - } else { - message.dec = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos_proto/cosmos.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos_proto/cosmos.d.ts deleted file mode 100644 index ac37814871..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos_proto/cosmos.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos_proto/cosmos.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos_proto/cosmos.js deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos_proto/cosmos.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos_proto/cosmos.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 9ec67a12be..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "cosmos_proto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/gogoproto/gogo.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/gogoproto/gogo.d.ts deleted file mode 100644 index 885d30bdc6..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/gogoproto/gogo.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/gogoproto/gogo.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/gogoproto/gogo.js deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/gogoproto/gogo.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/gogoproto/gogo.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a047af..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/annotations.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/annotations.d.ts deleted file mode 100644 index a64daf0776..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/annotations.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/annotations.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/annotations.js deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/annotations.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/annotations.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/annotations.ts deleted file mode 100644 index aace4787f5..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/http.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/http.d.ts deleted file mode 100644 index 1404b7fb6d..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/http.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.api"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export declare const Http: { - encode(message: Http, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Http; - fromJSON(object: any): Http; - toJSON(message: Http): unknown; - fromPartial(object: DeepPartial): Http; -}; -export declare const HttpRule: { - encode(message: HttpRule, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): HttpRule; - fromJSON(object: any): HttpRule; - toJSON(message: HttpRule): unknown; - fromPartial(object: DeepPartial): HttpRule; -}; -export declare const CustomHttpPattern: { - encode(message: CustomHttpPattern, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern; - fromJSON(object: any): CustomHttpPattern; - toJSON(message: CustomHttpPattern): unknown; - fromPartial(object: DeepPartial): CustomHttpPattern; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/http.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/http.js deleted file mode 100644 index eb14b5b699..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/http.js +++ /dev/null @@ -1,387 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.api"; -const baseHttp = { fullyDecodeReservedExpansion: false }; -export const Http = { - encode(message, writer = Writer.create()) { - for (const v of message.rules) { - HttpRule.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp }; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object) { - const message = { ...baseHttp }; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if (object.fullyDecodeReservedExpansion !== undefined && - object.fullyDecodeReservedExpansion !== null) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; - } - else { - message.fullyDecodeReservedExpansion = false; - } - return message; - }, -}; -const baseHttpRule = { selector: "", body: "", responseBody: "" }; -export const HttpRule = { - encode(message, writer = Writer.create()) { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule }; - message.additionalBindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = String(object.responseBody); - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined); - } - else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseHttpRule }; - message.additionalBindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } - else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } - else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } - else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } - else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } - else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } - else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } - else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } - else { - message.body = ""; - } - if (object.responseBody !== undefined && object.responseBody !== null) { - message.responseBody = object.responseBody; - } - else { - message.responseBody = ""; - } - if (object.additionalBindings !== undefined && - object.additionalBindings !== null) { - for (const e of object.additionalBindings) { - message.additionalBindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; -const baseCustomHttpPattern = { kind: "", path: "" }; -export const CustomHttpPattern = { - encode(message, writer = Writer.create()) { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } - else { - message.path = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object) { - const message = { ...baseCustomHttpPattern }; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } - else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - else { - message.path = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/http.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/http.ts deleted file mode 100644 index ccadff688e..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/api/http.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.api"; - -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} - -/** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * see "google/api/annotations.proto" for details. - * - * The mapping consists of a field specifying the path template and - * method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET - * operation on a resource collection of messages: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: .Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * In general, not only fields but also field paths can be referenced - * from a path pattern. Fields mapped to the path pattern cannot be - * repeated and must have a primitive (non-message) type. - * - * Any fields in the request message which are not bound by the path - * pattern automatically become (optional) HTTP query - * parameters. Assume the following definition of the request message: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * Note that fields which are mapped to HTTP parameters must have a - * primitive type or a repeated primitive type. Message types are not - * allowed. In the case of a repeated type, the parameter can be - * repeated in the URL, as in `...?param=A¶m=B`. - * - * For HTTP method kinds which allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | RPC - * -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice of - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * - * This enables the following two alternative HTTP JSON to RPC - * mappings: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` - * - * # Rules for HTTP mapping - * - * The rules for mapping HTTP path, query parameters, and body fields - * to the request message are as follows: - * - * 1. The `body` field specifies either `*` or a field path, or is - * omitted. If omitted, it indicates there is no HTTP request body. - * 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: - * (a) Matched in the URL template. - * (b) Covered by body (if body is `*`, everything except (a) fields; - * else everything under the body field) - * (c) All other fields. - * 3. URL query parameters found in the HTTP request are mapped to (c) fields. - * 4. Any body sent with an HTTP request can contain only (b) fields. - * - * The syntax of the path template is as follows: - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single path segment. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - */ -export interface HttpRule { - /** - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** Used for listing and getting information about resources. */ - get: string | undefined; - /** Used for updating a resource. */ - put: string | undefined; - /** Used for creating a resource. */ - post: string | undefined; - /** Used for deleting a resource. */ - delete: string | undefined; - /** Used for updating a resource. */ - patch: string | undefined; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRule[]; -} - -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} - -const baseHttp: object = { fully_decode_reserved_expansion: false }; - -export const Http = { - encode(message: Http, writer: Writer = Writer.create()): Writer { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fully_decode_reserved_expansion === true) { - writer.uint32(16).bool(message.fully_decode_reserved_expansion); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Http { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttp } as Http; - message.rules = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromJSON(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = Boolean( - object.fully_decode_reserved_expansion - ); - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, - - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.rules = []; - } - message.fully_decode_reserved_expansion !== undefined && - (obj.fully_decode_reserved_expansion = - message.fully_decode_reserved_expansion); - return obj; - }, - - fromPartial(object: DeepPartial): Http { - const message = { ...baseHttp } as Http; - message.rules = []; - if (object.rules !== undefined && object.rules !== null) { - for (const e of object.rules) { - message.rules.push(HttpRule.fromPartial(e)); - } - } - if ( - object.fully_decode_reserved_expansion !== undefined && - object.fully_decode_reserved_expansion !== null - ) { - message.fully_decode_reserved_expansion = - object.fully_decode_reserved_expansion; - } else { - message.fully_decode_reserved_expansion = false; - } - return message; - }, -}; - -const baseHttpRule: object = { selector: "", body: "", response_body: "" }; - -export const HttpRule = { - encode(message: HttpRule, writer: Writer = Writer.create()): Writer { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.response_body !== "") { - writer.uint32(98).string(message.response_body); - } - for (const v of message.additional_bindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - message.additional_bindings.push( - HttpRule.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = String(object.selector); - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = String(object.get); - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = String(object.put); - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = String(object.post); - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = String(object.delete); - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = String(object.patch); - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromJSON(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = String(object.body); - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = String(object.response_body); - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); - message.body !== undefined && (obj.body = message.body); - message.response_body !== undefined && - (obj.response_body = message.response_body); - if (message.additional_bindings) { - obj.additional_bindings = message.additional_bindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); - } else { - obj.additional_bindings = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): HttpRule { - const message = { ...baseHttpRule } as HttpRule; - message.additional_bindings = []; - if (object.selector !== undefined && object.selector !== null) { - message.selector = object.selector; - } else { - message.selector = ""; - } - if (object.get !== undefined && object.get !== null) { - message.get = object.get; - } else { - message.get = undefined; - } - if (object.put !== undefined && object.put !== null) { - message.put = object.put; - } else { - message.put = undefined; - } - if (object.post !== undefined && object.post !== null) { - message.post = object.post; - } else { - message.post = undefined; - } - if (object.delete !== undefined && object.delete !== null) { - message.delete = object.delete; - } else { - message.delete = undefined; - } - if (object.patch !== undefined && object.patch !== null) { - message.patch = object.patch; - } else { - message.patch = undefined; - } - if (object.custom !== undefined && object.custom !== null) { - message.custom = CustomHttpPattern.fromPartial(object.custom); - } else { - message.custom = undefined; - } - if (object.body !== undefined && object.body !== null) { - message.body = object.body; - } else { - message.body = ""; - } - if (object.response_body !== undefined && object.response_body !== null) { - message.response_body = object.response_body; - } else { - message.response_body = ""; - } - if ( - object.additional_bindings !== undefined && - object.additional_bindings !== null - ) { - for (const e of object.additional_bindings) { - message.additional_bindings.push(HttpRule.fromPartial(e)); - } - } - return message; - }, -}; - -const baseCustomHttpPattern: object = { kind: "", path: "" }; - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = String(object.kind); - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = String(object.path); - } else { - message.path = ""; - } - return message; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = { ...baseCustomHttpPattern } as CustomHttpPattern; - if (object.kind !== undefined && object.kind !== null) { - message.kind = object.kind; - } else { - message.kind = ""; - } - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } else { - message.path = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/protobuf/descriptor.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/protobuf/descriptor.d.ts deleted file mode 100644 index a3076569af..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/protobuf/descriptor.d.ts +++ /dev/null @@ -1,1022 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "google.protobuf"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} -export declare enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type; -export declare function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string; -export declare enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1 -} -export declare function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label; -export declare function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string; -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -/** Generated classes can be optimized for speed or code size. */ -export declare enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1 -} -export declare function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode; -export declare function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string; -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export declare enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType; -export declare function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string; -export declare enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1 -} -export declare function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType; -export declare function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string; -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export declare enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1 -} -export declare function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel; -export declare function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string; -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: number; - negativeIntValue: number; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export declare const FileDescriptorSet: { - encode(message: FileDescriptorSet, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet; - fromJSON(object: any): FileDescriptorSet; - toJSON(message: FileDescriptorSet): unknown; - fromPartial(object: DeepPartial): FileDescriptorSet; -}; -export declare const FileDescriptorProto: { - encode(message: FileDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto; - fromJSON(object: any): FileDescriptorProto; - toJSON(message: FileDescriptorProto): unknown; - fromPartial(object: DeepPartial): FileDescriptorProto; -}; -export declare const DescriptorProto: { - encode(message: DescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto; - fromJSON(object: any): DescriptorProto; - toJSON(message: DescriptorProto): unknown; - fromPartial(object: DeepPartial): DescriptorProto; -}; -export declare const DescriptorProto_ExtensionRange: { - encode(message: DescriptorProto_ExtensionRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange; - fromJSON(object: any): DescriptorProto_ExtensionRange; - toJSON(message: DescriptorProto_ExtensionRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange; -}; -export declare const DescriptorProto_ReservedRange: { - encode(message: DescriptorProto_ReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange; - fromJSON(object: any): DescriptorProto_ReservedRange; - toJSON(message: DescriptorProto_ReservedRange): unknown; - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange; -}; -export declare const ExtensionRangeOptions: { - encode(message: ExtensionRangeOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions; - fromJSON(object: any): ExtensionRangeOptions; - toJSON(message: ExtensionRangeOptions): unknown; - fromPartial(object: DeepPartial): ExtensionRangeOptions; -}; -export declare const FieldDescriptorProto: { - encode(message: FieldDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto; - fromJSON(object: any): FieldDescriptorProto; - toJSON(message: FieldDescriptorProto): unknown; - fromPartial(object: DeepPartial): FieldDescriptorProto; -}; -export declare const OneofDescriptorProto: { - encode(message: OneofDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto; - fromJSON(object: any): OneofDescriptorProto; - toJSON(message: OneofDescriptorProto): unknown; - fromPartial(object: DeepPartial): OneofDescriptorProto; -}; -export declare const EnumDescriptorProto: { - encode(message: EnumDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto; - fromJSON(object: any): EnumDescriptorProto; - toJSON(message: EnumDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto; -}; -export declare const EnumDescriptorProto_EnumReservedRange: { - encode(message: EnumDescriptorProto_EnumReservedRange, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange; - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange; - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown; - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange; -}; -export declare const EnumValueDescriptorProto: { - encode(message: EnumValueDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueDescriptorProto; - fromJSON(object: any): EnumValueDescriptorProto; - toJSON(message: EnumValueDescriptorProto): unknown; - fromPartial(object: DeepPartial): EnumValueDescriptorProto; -}; -export declare const ServiceDescriptorProto: { - encode(message: ServiceDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto; - fromJSON(object: any): ServiceDescriptorProto; - toJSON(message: ServiceDescriptorProto): unknown; - fromPartial(object: DeepPartial): ServiceDescriptorProto; -}; -export declare const MethodDescriptorProto: { - encode(message: MethodDescriptorProto, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto; - fromJSON(object: any): MethodDescriptorProto; - toJSON(message: MethodDescriptorProto): unknown; - fromPartial(object: DeepPartial): MethodDescriptorProto; -}; -export declare const FileOptions: { - encode(message: FileOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FileOptions; - fromJSON(object: any): FileOptions; - toJSON(message: FileOptions): unknown; - fromPartial(object: DeepPartial): FileOptions; -}; -export declare const MessageOptions: { - encode(message: MessageOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MessageOptions; - fromJSON(object: any): MessageOptions; - toJSON(message: MessageOptions): unknown; - fromPartial(object: DeepPartial): MessageOptions; -}; -export declare const FieldOptions: { - encode(message: FieldOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): FieldOptions; - fromJSON(object: any): FieldOptions; - toJSON(message: FieldOptions): unknown; - fromPartial(object: DeepPartial): FieldOptions; -}; -export declare const OneofOptions: { - encode(message: OneofOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): OneofOptions; - fromJSON(object: any): OneofOptions; - toJSON(message: OneofOptions): unknown; - fromPartial(object: DeepPartial): OneofOptions; -}; -export declare const EnumOptions: { - encode(message: EnumOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumOptions; - fromJSON(object: any): EnumOptions; - toJSON(message: EnumOptions): unknown; - fromPartial(object: DeepPartial): EnumOptions; -}; -export declare const EnumValueOptions: { - encode(message: EnumValueOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions; - fromJSON(object: any): EnumValueOptions; - toJSON(message: EnumValueOptions): unknown; - fromPartial(object: DeepPartial): EnumValueOptions; -}; -export declare const ServiceOptions: { - encode(message: ServiceOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): ServiceOptions; - fromJSON(object: any): ServiceOptions; - toJSON(message: ServiceOptions): unknown; - fromPartial(object: DeepPartial): ServiceOptions; -}; -export declare const MethodOptions: { - encode(message: MethodOptions, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MethodOptions; - fromJSON(object: any): MethodOptions; - toJSON(message: MethodOptions): unknown; - fromPartial(object: DeepPartial): MethodOptions; -}; -export declare const UninterpretedOption: { - encode(message: UninterpretedOption, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption; - fromJSON(object: any): UninterpretedOption; - toJSON(message: UninterpretedOption): unknown; - fromPartial(object: DeepPartial): UninterpretedOption; -}; -export declare const UninterpretedOption_NamePart: { - encode(message: UninterpretedOption_NamePart, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption_NamePart; - fromJSON(object: any): UninterpretedOption_NamePart; - toJSON(message: UninterpretedOption_NamePart): unknown; - fromPartial(object: DeepPartial): UninterpretedOption_NamePart; -}; -export declare const SourceCodeInfo: { - encode(message: SourceCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo; - fromJSON(object: any): SourceCodeInfo; - toJSON(message: SourceCodeInfo): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo; -}; -export declare const SourceCodeInfo_Location: { - encode(message: SourceCodeInfo_Location, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location; - fromJSON(object: any): SourceCodeInfo_Location; - toJSON(message: SourceCodeInfo_Location): unknown; - fromPartial(object: DeepPartial): SourceCodeInfo_Location; -}; -export declare const GeneratedCodeInfo: { - encode(message: GeneratedCodeInfo, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo; - fromJSON(object: any): GeneratedCodeInfo; - toJSON(message: GeneratedCodeInfo): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo; -}; -export declare const GeneratedCodeInfo_Annotation: { - encode(message: GeneratedCodeInfo_Annotation, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation; - fromJSON(object: any): GeneratedCodeInfo_Annotation; - toJSON(message: GeneratedCodeInfo_Annotation): unknown; - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/protobuf/descriptor.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/protobuf/descriptor.js deleted file mode 100644 index 252725808b..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/protobuf/descriptor.js +++ /dev/null @@ -1,4144 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "google.protobuf"; -export var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {})); -export function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} -export var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {})); -export function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; - FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {})); -export function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; - FieldOptions_CType[FieldOptions_CType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_CType || (FieldOptions_CType = {})); -export function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} -export var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; - FieldOptions_JSType[FieldOptions_JSType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(FieldOptions_JSType || (FieldOptions_JSType = {})); -export function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {})); -export function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} -const baseFileDescriptorSet = {}; -export const FileDescriptorSet = { - encode(message, writer = Writer.create()) { - for (const v of message.file) { - FileDescriptorProto.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet }; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorSet }; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; -const baseFileDescriptorProto = { - name: "", - package: "", - dependency: "", - publicDependency: 0, - weakDependency: 0, - syntax: "", -}; -export const FileDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } - else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } - else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(Number(e)); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(Number(e)); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } - else { - message.syntax = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object) { - const message = { ...baseFileDescriptorProto }; - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } - else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if (object.publicDependency !== undefined && - object.publicDependency !== null) { - for (const e of object.publicDependency) { - message.publicDependency.push(e); - } - } - if (object.weakDependency !== undefined && object.weakDependency !== null) { - for (const e of object.weakDependency) { - message.weakDependency.push(e); - } - } - if (object.messageType !== undefined && object.messageType !== null) { - for (const e of object.messageType) { - message.messageType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); - } - else { - message.sourceCodeInfo = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } - else { - message.syntax = ""; - } - return message; - }, -}; -const baseDescriptorProto = { name: "", reservedName: "" }; -export const DescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseDescriptorProto }; - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nestedType !== undefined && object.nestedType !== null) { - for (const e of object.nestedType) { - message.nestedType.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enumType !== undefined && object.enumType !== null) { - for (const e of object.enumType) { - message.enumType.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.extensionRange !== undefined && object.extensionRange !== null) { - for (const e of object.extensionRange) { - message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); - } - } - if (object.oneofDecl !== undefined && object.oneofDecl !== null) { - for (const e of object.oneofDecl) { - message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseDescriptorProto_ExtensionRange = { start: 0, end: 0 }; -export const DescriptorProto_ExtensionRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ExtensionRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseDescriptorProto_ReservedRange = { start: 0, end: 0 }; -export const DescriptorProto_ReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseDescriptorProto_ReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseExtensionRangeOptions = {}; -export const ExtensionRangeOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseExtensionRangeOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldDescriptorProto = { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - proto3Optional: false, -}; -export const FieldDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = String(object.typeName); - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = String(object.defaultValue); - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = Number(object.oneofIndex); - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = String(object.jsonName); - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = Boolean(object.proto3Optional); - } - else { - message.proto3Optional = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } - else { - message.type = 1; - } - if (object.typeName !== undefined && object.typeName !== null) { - message.typeName = object.typeName; - } - else { - message.typeName = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } - else { - message.extendee = ""; - } - if (object.defaultValue !== undefined && object.defaultValue !== null) { - message.defaultValue = object.defaultValue; - } - else { - message.defaultValue = ""; - } - if (object.oneofIndex !== undefined && object.oneofIndex !== null) { - message.oneofIndex = object.oneofIndex; - } - else { - message.oneofIndex = 0; - } - if (object.jsonName !== undefined && object.jsonName !== null) { - message.jsonName = object.jsonName; - } - else { - message.jsonName = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.proto3Optional !== undefined && object.proto3Optional !== null) { - message.proto3Optional = object.proto3Optional; - } - else { - message.proto3Optional = false; - } - return message; - }, -}; -const baseOneofDescriptorProto = { name: "" }; -export const OneofDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseEnumDescriptorProto = { name: "", reservedName: "" }; -export const EnumDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumDescriptorProto }; - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.reservedRange !== undefined && object.reservedRange !== null) { - for (const e of object.reservedRange) { - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); - } - } - if (object.reservedName !== undefined && object.reservedName !== null) { - for (const e of object.reservedName) { - message.reservedName.push(e); - } - } - return message; - }, -}; -const baseEnumDescriptorProto_EnumReservedRange = { start: 0, end: 0 }; -export const EnumDescriptorProto_EnumReservedRange = { - encode(message, writer = Writer.create()) { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - }; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } - else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -const baseEnumValueDescriptorProto = { name: "", number: 0 }; -export const EnumValueDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseEnumValueDescriptorProto, - }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } - else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseServiceDescriptorProto = { name: "" }; -export const ServiceDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto }; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceDescriptorProto }; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - return message; - }, -}; -const baseMethodDescriptorProto = { - name: "", - inputType: "", - outputType: "", - clientStreaming: false, - serverStreaming: false, -}; -export const MethodDescriptorProto = { - encode(message, writer = Writer.create()) { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = String(object.inputType); - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = String(object.outputType); - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = Boolean(object.clientStreaming); - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = Boolean(object.serverStreaming); - } - else { - message.serverStreaming = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodDescriptorProto }; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } - else { - message.name = ""; - } - if (object.inputType !== undefined && object.inputType !== null) { - message.inputType = object.inputType; - } - else { - message.inputType = ""; - } - if (object.outputType !== undefined && object.outputType !== null) { - message.outputType = object.outputType; - } - else { - message.outputType = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } - else { - message.options = undefined; - } - if (object.clientStreaming !== undefined && - object.clientStreaming !== null) { - message.clientStreaming = object.clientStreaming; - } - else { - message.clientStreaming = false; - } - if (object.serverStreaming !== undefined && - object.serverStreaming !== null) { - message.serverStreaming = object.serverStreaming; - } - else { - message.serverStreaming = false; - } - return message; - }, -}; -const baseFileOptions = { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", -}; -export const FileOptions = { - encode(message, writer = Writer.create()) { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = String(object.javaPackage); - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = String(object.javaOuterClassname); - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = String(object.goPackage); - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = Boolean(object.ccGenericServices); - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = Boolean(object.javaGenericServices); - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = Boolean(object.pyGenericServices); - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = Boolean(object.phpGenericServices); - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = Boolean(object.ccEnableArenas); - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = String(object.objcClassPrefix); - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = String(object.csharpNamespace); - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = String(object.swiftPrefix); - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = String(object.phpClassPrefix); - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = String(object.phpNamespace); - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = String(object.rubyPackage); - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFileOptions }; - message.uninterpretedOption = []; - if (object.javaPackage !== undefined && object.javaPackage !== null) { - message.javaPackage = object.javaPackage; - } - else { - message.javaPackage = ""; - } - if (object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null) { - message.javaOuterClassname = object.javaOuterClassname; - } - else { - message.javaOuterClassname = ""; - } - if (object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null) { - message.javaMultipleFiles = object.javaMultipleFiles; - } - else { - message.javaMultipleFiles = false; - } - if (object.javaGenerateEqualsAndHash !== undefined && - object.javaGenerateEqualsAndHash !== null) { - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; - } - else { - message.javaGenerateEqualsAndHash = false; - } - if (object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null) { - message.javaStringCheckUtf8 = object.javaStringCheckUtf8; - } - else { - message.javaStringCheckUtf8 = false; - } - if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = object.optimizeFor; - } - else { - message.optimizeFor = 1; - } - if (object.goPackage !== undefined && object.goPackage !== null) { - message.goPackage = object.goPackage; - } - else { - message.goPackage = ""; - } - if (object.ccGenericServices !== undefined && - object.ccGenericServices !== null) { - message.ccGenericServices = object.ccGenericServices; - } - else { - message.ccGenericServices = false; - } - if (object.javaGenericServices !== undefined && - object.javaGenericServices !== null) { - message.javaGenericServices = object.javaGenericServices; - } - else { - message.javaGenericServices = false; - } - if (object.pyGenericServices !== undefined && - object.pyGenericServices !== null) { - message.pyGenericServices = object.pyGenericServices; - } - else { - message.pyGenericServices = false; - } - if (object.phpGenericServices !== undefined && - object.phpGenericServices !== null) { - message.phpGenericServices = object.phpGenericServices; - } - else { - message.phpGenericServices = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { - message.ccEnableArenas = object.ccEnableArenas; - } - else { - message.ccEnableArenas = false; - } - if (object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null) { - message.objcClassPrefix = object.objcClassPrefix; - } - else { - message.objcClassPrefix = ""; - } - if (object.csharpNamespace !== undefined && - object.csharpNamespace !== null) { - message.csharpNamespace = object.csharpNamespace; - } - else { - message.csharpNamespace = ""; - } - if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { - message.swiftPrefix = object.swiftPrefix; - } - else { - message.swiftPrefix = ""; - } - if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { - message.phpClassPrefix = object.phpClassPrefix; - } - else { - message.phpClassPrefix = ""; - } - if (object.phpNamespace !== undefined && object.phpNamespace !== null) { - message.phpNamespace = object.phpNamespace; - } - else { - message.phpNamespace = ""; - } - if (object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null) { - message.phpMetadataNamespace = object.phpMetadataNamespace; - } - else { - message.phpMetadataNamespace = ""; - } - if (object.rubyPackage !== undefined && object.rubyPackage !== null) { - message.rubyPackage = object.rubyPackage; - } - else { - message.rubyPackage = ""; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMessageOptions = { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, -}; -export const MessageOptions = { - encode(message, writer = Writer.create()) { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = Boolean(object.mapEntry); - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMessageOptions }; - message.uninterpretedOption = []; - if (object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null) { - message.messageSetWireFormat = object.messageSetWireFormat; - } - else { - message.messageSetWireFormat = false; - } - if (object.noStandardDescriptorAccessor !== undefined && - object.noStandardDescriptorAccessor !== null) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; - } - else { - message.noStandardDescriptorAccessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.mapEntry !== undefined && object.mapEntry !== null) { - message.mapEntry = object.mapEntry; - } - else { - message.mapEntry = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseFieldOptions = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; -export const FieldOptions = { - encode(message, writer = Writer.create()) { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseFieldOptions }; - message.uninterpretedOption = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } - else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } - else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } - else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } - else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } - else { - message.weak = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseOneofOptions = {}; -export const OneofOptions = { - encode(message, writer = Writer.create()) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseOneofOptions }; - message.uninterpretedOption = []; - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumOptions = { allowAlias: false, deprecated: false }; -export const EnumOptions = { - encode(message, writer = Writer.create()) { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = Boolean(object.allowAlias); - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumOptions }; - message.uninterpretedOption = []; - if (object.allowAlias !== undefined && object.allowAlias !== null) { - message.allowAlias = object.allowAlias; - } - else { - message.allowAlias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseEnumValueOptions = { deprecated: false }; -export const EnumValueOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseEnumValueOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseServiceOptions = { deprecated: false }; -export const ServiceOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseServiceOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseMethodOptions = { deprecated: false, idempotencyLevel: 0 }; -export const MethodOptions = { - encode(message, writer = Writer.create()) { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 0) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseMethodOptions }; - message.uninterpretedOption = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } - else { - message.deprecated = false; - } - if (object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null) { - message.idempotencyLevel = object.idempotencyLevel; - } - else { - message.idempotencyLevel = 0; - } - if (object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null) { - for (const e of object.uninterpretedOption) { - message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; -const baseUninterpretedOption = { - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - aggregateValue: "", -}; -export const UninterpretedOption = { - encode(message, writer = Writer.create()) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== 0) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== 0) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption }; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = longToNumber(reader.uint64()); - break; - case 5: - message.negativeIntValue = longToNumber(reader.int64()); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = String(object.identifierValue); - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = Number(object.positiveIntValue); - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = Number(object.negativeIntValue); - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = Number(object.doubleValue); - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = bytesFromBase64(object.stringValue); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = String(object.aggregateValue); - } - else { - message.aggregateValue = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined - ? message.stringValue - : new Uint8Array())); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object) { - const message = { ...baseUninterpretedOption }; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if (object.identifierValue !== undefined && - object.identifierValue !== null) { - message.identifierValue = object.identifierValue; - } - else { - message.identifierValue = ""; - } - if (object.positiveIntValue !== undefined && - object.positiveIntValue !== null) { - message.positiveIntValue = object.positiveIntValue; - } - else { - message.positiveIntValue = 0; - } - if (object.negativeIntValue !== undefined && - object.negativeIntValue !== null) { - message.negativeIntValue = object.negativeIntValue; - } - else { - message.negativeIntValue = 0; - } - if (object.doubleValue !== undefined && object.doubleValue !== null) { - message.doubleValue = object.doubleValue; - } - else { - message.doubleValue = 0; - } - if (object.stringValue !== undefined && object.stringValue !== null) { - message.stringValue = object.stringValue; - } - else { - message.stringValue = new Uint8Array(); - } - if (object.aggregateValue !== undefined && object.aggregateValue !== null) { - message.aggregateValue = object.aggregateValue; - } - else { - message.aggregateValue = ""; - } - return message; - }, -}; -const baseUninterpretedOption_NamePart = { - namePart: "", - isExtension: false, -}; -export const UninterpretedOption_NamePart = { - encode(message, writer = Writer.create()) { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = String(object.namePart); - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = Boolean(object.isExtension); - } - else { - message.isExtension = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object) { - const message = { - ...baseUninterpretedOption_NamePart, - }; - if (object.namePart !== undefined && object.namePart !== null) { - message.namePart = object.namePart; - } - else { - message.namePart = ""; - } - if (object.isExtension !== undefined && object.isExtension !== null) { - message.isExtension = object.isExtension; - } - else { - message.isExtension = false; - } - return message; - }, -}; -const baseSourceCodeInfo = {}; -export const SourceCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo }; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseSourceCodeInfo }; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; -const baseSourceCodeInfo_Location = { - path: 0, - span: 0, - leadingComments: "", - trailingComments: "", - leadingDetachedComments: "", -}; -export const SourceCodeInfo_Location = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } - else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = String(object.leadingComments); - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = String(object.trailingComments); - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseSourceCodeInfo_Location, - }; - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if (object.leadingComments !== undefined && - object.leadingComments !== null) { - message.leadingComments = object.leadingComments; - } - else { - message.leadingComments = ""; - } - if (object.trailingComments !== undefined && - object.trailingComments !== null) { - message.trailingComments = object.trailingComments; - } - else { - message.trailingComments = ""; - } - if (object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null) { - for (const e of object.leadingDetachedComments) { - message.leadingDetachedComments.push(e); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo = {}; -export const GeneratedCodeInfo = { - encode(message, writer = Writer.create()) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGeneratedCodeInfo }; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; -const baseGeneratedCodeInfo_Annotation = { - path: 0, - sourceFile: "", - begin: 0, - end: 0, -}; -export const GeneratedCodeInfo_Annotation = { - encode(message, writer = Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } - else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = String(object.sourceFile); - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } - else { - message.end = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - fromPartial(object) { - const message = { - ...baseGeneratedCodeInfo_Annotation, - }; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.sourceFile !== undefined && object.sourceFile !== null) { - message.sourceFile = object.sourceFile; - } - else { - message.sourceFile = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } - else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } - else { - message.end = 0; - } - return message; - }, -}; -var globalThis = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - if (typeof self !== "undefined") - return self; - if (typeof window !== "undefined") - return window; - if (typeof global !== "undefined") - return global; - throw "Unable to locate global object"; -})(); -const atob = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} -const btoa = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} -function longToNumber(long) { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} -if (util.Long !== Long) { - util.Long = Long; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/protobuf/descriptor.ts deleted file mode 100644 index a0167cb2ff..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,5314 +0,0 @@ -/* eslint-disable */ -import * as Long from "long"; -import { util, configure, Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "google.protobuf"; - -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} - -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - /** e.g. "foo", "foo.bar", etc. */ - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} - -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto_ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} - -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} - -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} - -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3_optional: boolean; -} - -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - return "UNKNOWN"; - } -} - -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} - -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} - -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - return "UNKNOWN"; - } -} - -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} - -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} - -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} - -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} - -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} - -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} - -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - java_outer_classname: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** - * This option does nothing. - * - * @deprecated - */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOption[]; -} - -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} - -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} - -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - return "UNKNOWN"; - } -} - -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} - -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - return "UNKNOWN"; - } -} - -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} - -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - return "UNKNOWN"; - } -} - -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOption[]; -} - -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} - -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} - -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - return "UNKNOWN"; - } -} - -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: number; - negative_int_value: number; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} - -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - name_part: string; - is_extension: boolean; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} - -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} - -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} - -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} - -const baseFileDescriptorSet: object = {}; - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.file = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = { ...baseFileDescriptorSet } as FileDescriptorSet; - message.file = []; - if (object.file !== undefined && object.file !== null) { - for (const e of object.file) { - message.file.push(FileDescriptorProto.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFileDescriptorProto: object = { - name: "", - package: "", - dependency: "", - public_dependency: 0, - weak_dependency: 0, - syntax: "", -}; - -export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.public_dependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weak_dependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.message_type) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.source_code_info !== undefined) { - SourceCodeInfo.encode( - message.source_code_info, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.public_dependency.push(reader.int32()); - } - } else { - message.public_dependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weak_dependency.push(reader.int32()); - } - } else { - message.weak_dependency.push(reader.int32()); - } - break; - case 4: - message.message_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = SourceCodeInfo.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = String(object.package); - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(String(e)); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(Number(e)); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(Number(e)); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromJSON( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = String(object.syntax); - } else { - message.syntax = ""; - } - return message; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } else { - obj.dependency = []; - } - if (message.public_dependency) { - obj.public_dependency = message.public_dependency.map((e) => e); - } else { - obj.public_dependency = []; - } - if (message.weak_dependency) { - obj.weak_dependency = message.weak_dependency.map((e) => e); - } else { - obj.weak_dependency = []; - } - if (message.message_type) { - obj.message_type = message.message_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.message_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.source_code_info !== undefined && - (obj.source_code_info = message.source_code_info - ? SourceCodeInfo.toJSON(message.source_code_info) - : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = { ...baseFileDescriptorProto } as FileDescriptorProto; - message.dependency = []; - message.public_dependency = []; - message.weak_dependency = []; - message.message_type = []; - message.enum_type = []; - message.service = []; - message.extension = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.package !== undefined && object.package !== null) { - message.package = object.package; - } else { - message.package = ""; - } - if (object.dependency !== undefined && object.dependency !== null) { - for (const e of object.dependency) { - message.dependency.push(e); - } - } - if ( - object.public_dependency !== undefined && - object.public_dependency !== null - ) { - for (const e of object.public_dependency) { - message.public_dependency.push(e); - } - } - if ( - object.weak_dependency !== undefined && - object.weak_dependency !== null - ) { - for (const e of object.weak_dependency) { - message.weak_dependency.push(e); - } - } - if (object.message_type !== undefined && object.message_type !== null) { - for (const e of object.message_type) { - message.message_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if (object.service !== undefined && object.service !== null) { - for (const e of object.service) { - message.service.push(ServiceDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = FileOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.source_code_info !== undefined && - object.source_code_info !== null - ) { - message.source_code_info = SourceCodeInfo.fromPartial( - object.source_code_info - ); - } else { - message.source_code_info = undefined; - } - if (object.syntax !== undefined && object.syntax !== null) { - message.syntax = object.syntax; - } else { - message.syntax = ""; - } - return message; - }, -}; - -const baseDescriptorProto: object = { name: "", reserved_name: "" }; - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nested_type) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enum_type) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extension_range) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.oneof_decl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reserved_range) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(82).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.nested_type.push( - DescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 4: - message.enum_type.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 5: - message.extension_range.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); - break; - case 8: - message.oneof_decl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reserved_range.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); - break; - case 10: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromJSON(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromJSON(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromJSON(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromJSON(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.extension = []; - } - if (message.nested_type) { - obj.nested_type = message.nested_type.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); - } else { - obj.nested_type = []; - } - if (message.enum_type) { - obj.enum_type = message.enum_type.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.enum_type = []; - } - if (message.extension_range) { - obj.extension_range = message.extension_range.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); - } else { - obj.extension_range = []; - } - if (message.oneof_decl) { - obj.oneof_decl = message.oneof_decl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): DescriptorProto { - const message = { ...baseDescriptorProto } as DescriptorProto; - message.field = []; - message.extension = []; - message.nested_type = []; - message.enum_type = []; - message.extension_range = []; - message.oneof_decl = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.field !== undefined && object.field !== null) { - for (const e of object.field) { - message.field.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.extension !== undefined && object.extension !== null) { - for (const e of object.extension) { - message.extension.push(FieldDescriptorProto.fromPartial(e)); - } - } - if (object.nested_type !== undefined && object.nested_type !== null) { - for (const e of object.nested_type) { - message.nested_type.push(DescriptorProto.fromPartial(e)); - } - } - if (object.enum_type !== undefined && object.enum_type !== null) { - for (const e of object.enum_type) { - message.enum_type.push(EnumDescriptorProto.fromPartial(e)); - } - } - if ( - object.extension_range !== undefined && - object.extension_range !== null - ) { - for (const e of object.extension_range) { - message.extension_range.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); - } - } - if (object.oneof_decl !== undefined && object.oneof_decl !== null) { - for (const e of object.oneof_decl) { - message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = MessageOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { - const message = { - ...baseDescriptorProto_ExtensionRange, - } as DescriptorProto_ExtensionRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = ExtensionRangeOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; - -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { - const message = { - ...baseDescriptorProto_ReservedRange, - } as DescriptorProto_ReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseExtensionRangeOptions: object = {}; - -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { - const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldDescriptorProto: object = { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - proto3_optional: false, -}; - -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.default_value !== "") { - writer.uint32(58).string(message.default_value); - } - if (message.oneof_index !== 0) { - writer.uint32(72).int32(message.oneof_index); - } - if (message.json_name !== "") { - writer.uint32(82).string(message.json_name); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.proto3_optional === true) { - writer.uint32(136).bool(message.proto3_optional); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32() as any; - break; - case 5: - message.type = reader.int32() as any; - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3_optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = String(object.type_name); - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = String(object.extendee); - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = String(object.default_value); - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = Number(object.oneof_index); - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = String(object.json_name); - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = Boolean(object.proto3_optional); - } else { - message.proto3_optional = false; - } - return message; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.type_name !== undefined && (obj.type_name = message.type_name); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.default_value !== undefined && - (obj.default_value = message.default_value); - message.oneof_index !== undefined && - (obj.oneof_index = message.oneof_index); - message.json_name !== undefined && (obj.json_name = message.json_name); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3_optional !== undefined && - (obj.proto3_optional = message.proto3_optional); - return obj; - }, - - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } else { - message.label = 1; - } - if (object.type !== undefined && object.type !== null) { - message.type = object.type; - } else { - message.type = 1; - } - if (object.type_name !== undefined && object.type_name !== null) { - message.type_name = object.type_name; - } else { - message.type_name = ""; - } - if (object.extendee !== undefined && object.extendee !== null) { - message.extendee = object.extendee; - } else { - message.extendee = ""; - } - if (object.default_value !== undefined && object.default_value !== null) { - message.default_value = object.default_value; - } else { - message.default_value = ""; - } - if (object.oneof_index !== undefined && object.oneof_index !== null) { - message.oneof_index = object.oneof_index; - } else { - message.oneof_index = 0; - } - if (object.json_name !== undefined && object.json_name !== null) { - message.json_name = object.json_name; - } else { - message.json_name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = FieldOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.proto3_optional !== undefined && - object.proto3_optional !== null - ) { - message.proto3_optional = object.proto3_optional; - } else { - message.proto3_optional = false; - } - return message; - }, -}; - -const baseOneofDescriptorProto: object = { name: "" }; - -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = OneofOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; - -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reserved_range) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - for (const v of message.reserved_name) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.reserved_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(String(e)); - } - } - return message; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.value = []; - } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); - if (message.reserved_range) { - obj.reserved_range = message.reserved_range.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); - } else { - obj.reserved_range = []; - } - if (message.reserved_name) { - obj.reserved_name = message.reserved_name.map((e) => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; - message.value = []; - message.reserved_range = []; - message.reserved_name = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.value !== undefined && object.value !== null) { - for (const e of object.value) { - message.value.push(EnumValueDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if (object.reserved_range !== undefined && object.reserved_range !== null) { - for (const e of object.reserved_range) { - message.reserved_range.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); - } - } - if (object.reserved_name !== undefined && object.reserved_name !== null) { - for (const e of object.reserved_name) { - message.reserved_name.push(e); - } - } - return message; - }, -}; - -const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; - -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: Writer = Writer.create() - ): Writer { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = Number(object.start); - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = message.start); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumDescriptorProto_EnumReservedRange { - const message = { - ...baseEnumDescriptorProto_EnumReservedRange, - } as EnumDescriptorProto_EnumReservedRange; - if (object.start !== undefined && object.start !== null) { - message.start = object.start; - } else { - message.start = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; - -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = Number(object.number); - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = message.number); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { - const message = { - ...baseEnumValueDescriptorProto, - } as EnumValueDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.number !== undefined && object.number !== null) { - message.number = object.number; - } else { - message.number = 0; - } - if (object.options !== undefined && object.options !== null) { - message.options = EnumValueOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseServiceDescriptorProto: object = { name: "" }; - -export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromJSON(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - return message; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); - } else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { - const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; - message.method = []; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.method !== undefined && object.method !== null) { - for (const e of object.method) { - message.method.push(MethodDescriptorProto.fromPartial(e)); - } - } - if (object.options !== undefined && object.options !== null) { - message.options = ServiceOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - return message; - }, -}; - -const baseMethodDescriptorProto: object = { - name: "", - input_type: "", - output_type: "", - client_streaming: false, - server_streaming: false, -}; - -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: Writer = Writer.create() - ): Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.input_type !== "") { - writer.uint32(18).string(message.input_type); - } - if (message.output_type !== "") { - writer.uint32(26).string(message.output_type); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.client_streaming === true) { - writer.uint32(40).bool(message.client_streaming); - } - if (message.server_streaming === true) { - writer.uint32(48).bool(message.server_streaming); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = String(object.input_type); - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = String(object.output_type); - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromJSON(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = Boolean(object.client_streaming); - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = Boolean(object.server_streaming); - } else { - message.server_streaming = false; - } - return message; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.input_type !== undefined && (obj.input_type = message.input_type); - message.output_type !== undefined && - (obj.output_type = message.output_type); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.client_streaming !== undefined && - (obj.client_streaming = message.client_streaming); - message.server_streaming !== undefined && - (obj.server_streaming = message.server_streaming); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { - const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.input_type !== undefined && object.input_type !== null) { - message.input_type = object.input_type; - } else { - message.input_type = ""; - } - if (object.output_type !== undefined && object.output_type !== null) { - message.output_type = object.output_type; - } else { - message.output_type = ""; - } - if (object.options !== undefined && object.options !== null) { - message.options = MethodOptions.fromPartial(object.options); - } else { - message.options = undefined; - } - if ( - object.client_streaming !== undefined && - object.client_streaming !== null - ) { - message.client_streaming = object.client_streaming; - } else { - message.client_streaming = false; - } - if ( - object.server_streaming !== undefined && - object.server_streaming !== null - ) { - message.server_streaming = object.server_streaming; - } else { - message.server_streaming = false; - } - return message; - }, -}; - -const baseFileOptions: object = { - java_package: "", - java_outer_classname: "", - java_multiple_files: false, - java_generate_equals_and_hash: false, - java_string_check_utf8: false, - optimize_for: 1, - go_package: "", - cc_generic_services: false, - java_generic_services: false, - py_generic_services: false, - php_generic_services: false, - deprecated: false, - cc_enable_arenas: false, - objc_class_prefix: "", - csharp_namespace: "", - swift_prefix: "", - php_class_prefix: "", - php_namespace: "", - php_metadata_namespace: "", - ruby_package: "", -}; - -export const FileOptions = { - encode(message: FileOptions, writer: Writer = Writer.create()): Writer { - if (message.java_package !== "") { - writer.uint32(10).string(message.java_package); - } - if (message.java_outer_classname !== "") { - writer.uint32(66).string(message.java_outer_classname); - } - if (message.java_multiple_files === true) { - writer.uint32(80).bool(message.java_multiple_files); - } - if (message.java_generate_equals_and_hash === true) { - writer.uint32(160).bool(message.java_generate_equals_and_hash); - } - if (message.java_string_check_utf8 === true) { - writer.uint32(216).bool(message.java_string_check_utf8); - } - if (message.optimize_for !== 1) { - writer.uint32(72).int32(message.optimize_for); - } - if (message.go_package !== "") { - writer.uint32(90).string(message.go_package); - } - if (message.cc_generic_services === true) { - writer.uint32(128).bool(message.cc_generic_services); - } - if (message.java_generic_services === true) { - writer.uint32(136).bool(message.java_generic_services); - } - if (message.py_generic_services === true) { - writer.uint32(144).bool(message.py_generic_services); - } - if (message.php_generic_services === true) { - writer.uint32(336).bool(message.php_generic_services); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.cc_enable_arenas === true) { - writer.uint32(248).bool(message.cc_enable_arenas); - } - if (message.objc_class_prefix !== "") { - writer.uint32(290).string(message.objc_class_prefix); - } - if (message.csharp_namespace !== "") { - writer.uint32(298).string(message.csharp_namespace); - } - if (message.swift_prefix !== "") { - writer.uint32(314).string(message.swift_prefix); - } - if (message.php_class_prefix !== "") { - writer.uint32(322).string(message.php_class_prefix); - } - if (message.php_namespace !== "") { - writer.uint32(330).string(message.php_namespace); - } - if (message.php_metadata_namespace !== "") { - writer.uint32(354).string(message.php_metadata_namespace); - } - if (message.ruby_package !== "") { - writer.uint32(362).string(message.ruby_package); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32() as any; - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 42: - message.php_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 39: - message.swift_prefix = reader.string(); - break; - case 40: - message.php_class_prefix = reader.string(); - break; - case 41: - message.php_namespace = reader.string(); - break; - case 44: - message.php_metadata_namespace = reader.string(); - break; - case 45: - message.ruby_package = reader.string(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = String(object.java_package); - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = String(object.java_outer_classname); - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = Boolean(object.java_multiple_files); - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = Boolean( - object.java_generate_equals_and_hash - ); - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = fileOptions_OptimizeModeFromJSON( - object.optimize_for - ); - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = String(object.go_package); - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = Boolean(object.cc_generic_services); - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = Boolean(object.java_generic_services); - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = Boolean(object.py_generic_services); - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = Boolean(object.php_generic_services); - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = String(object.objc_class_prefix); - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = String(object.csharp_namespace); - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = String(object.swift_prefix); - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = String(object.php_class_prefix); - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = String(object.php_namespace); - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = String(object.php_metadata_namespace); - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = String(object.ruby_package); - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.java_package !== undefined && - (obj.java_package = message.java_package); - message.java_outer_classname !== undefined && - (obj.java_outer_classname = message.java_outer_classname); - message.java_multiple_files !== undefined && - (obj.java_multiple_files = message.java_multiple_files); - message.java_generate_equals_and_hash !== undefined && - (obj.java_generate_equals_and_hash = - message.java_generate_equals_and_hash); - message.java_string_check_utf8 !== undefined && - (obj.java_string_check_utf8 = message.java_string_check_utf8); - message.optimize_for !== undefined && - (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); - message.go_package !== undefined && (obj.go_package = message.go_package); - message.cc_generic_services !== undefined && - (obj.cc_generic_services = message.cc_generic_services); - message.java_generic_services !== undefined && - (obj.java_generic_services = message.java_generic_services); - message.py_generic_services !== undefined && - (obj.py_generic_services = message.py_generic_services); - message.php_generic_services !== undefined && - (obj.php_generic_services = message.php_generic_services); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.cc_enable_arenas !== undefined && - (obj.cc_enable_arenas = message.cc_enable_arenas); - message.objc_class_prefix !== undefined && - (obj.objc_class_prefix = message.objc_class_prefix); - message.csharp_namespace !== undefined && - (obj.csharp_namespace = message.csharp_namespace); - message.swift_prefix !== undefined && - (obj.swift_prefix = message.swift_prefix); - message.php_class_prefix !== undefined && - (obj.php_class_prefix = message.php_class_prefix); - message.php_namespace !== undefined && - (obj.php_namespace = message.php_namespace); - message.php_metadata_namespace !== undefined && - (obj.php_metadata_namespace = message.php_metadata_namespace); - message.ruby_package !== undefined && - (obj.ruby_package = message.ruby_package); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FileOptions { - const message = { ...baseFileOptions } as FileOptions; - message.uninterpreted_option = []; - if (object.java_package !== undefined && object.java_package !== null) { - message.java_package = object.java_package; - } else { - message.java_package = ""; - } - if ( - object.java_outer_classname !== undefined && - object.java_outer_classname !== null - ) { - message.java_outer_classname = object.java_outer_classname; - } else { - message.java_outer_classname = ""; - } - if ( - object.java_multiple_files !== undefined && - object.java_multiple_files !== null - ) { - message.java_multiple_files = object.java_multiple_files; - } else { - message.java_multiple_files = false; - } - if ( - object.java_generate_equals_and_hash !== undefined && - object.java_generate_equals_and_hash !== null - ) { - message.java_generate_equals_and_hash = - object.java_generate_equals_and_hash; - } else { - message.java_generate_equals_and_hash = false; - } - if ( - object.java_string_check_utf8 !== undefined && - object.java_string_check_utf8 !== null - ) { - message.java_string_check_utf8 = object.java_string_check_utf8; - } else { - message.java_string_check_utf8 = false; - } - if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimize_for = object.optimize_for; - } else { - message.optimize_for = 1; - } - if (object.go_package !== undefined && object.go_package !== null) { - message.go_package = object.go_package; - } else { - message.go_package = ""; - } - if ( - object.cc_generic_services !== undefined && - object.cc_generic_services !== null - ) { - message.cc_generic_services = object.cc_generic_services; - } else { - message.cc_generic_services = false; - } - if ( - object.java_generic_services !== undefined && - object.java_generic_services !== null - ) { - message.java_generic_services = object.java_generic_services; - } else { - message.java_generic_services = false; - } - if ( - object.py_generic_services !== undefined && - object.py_generic_services !== null - ) { - message.py_generic_services = object.py_generic_services; - } else { - message.py_generic_services = false; - } - if ( - object.php_generic_services !== undefined && - object.php_generic_services !== null - ) { - message.php_generic_services = object.php_generic_services; - } else { - message.php_generic_services = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.cc_enable_arenas !== undefined && - object.cc_enable_arenas !== null - ) { - message.cc_enable_arenas = object.cc_enable_arenas; - } else { - message.cc_enable_arenas = false; - } - if ( - object.objc_class_prefix !== undefined && - object.objc_class_prefix !== null - ) { - message.objc_class_prefix = object.objc_class_prefix; - } else { - message.objc_class_prefix = ""; - } - if ( - object.csharp_namespace !== undefined && - object.csharp_namespace !== null - ) { - message.csharp_namespace = object.csharp_namespace; - } else { - message.csharp_namespace = ""; - } - if (object.swift_prefix !== undefined && object.swift_prefix !== null) { - message.swift_prefix = object.swift_prefix; - } else { - message.swift_prefix = ""; - } - if ( - object.php_class_prefix !== undefined && - object.php_class_prefix !== null - ) { - message.php_class_prefix = object.php_class_prefix; - } else { - message.php_class_prefix = ""; - } - if (object.php_namespace !== undefined && object.php_namespace !== null) { - message.php_namespace = object.php_namespace; - } else { - message.php_namespace = ""; - } - if ( - object.php_metadata_namespace !== undefined && - object.php_metadata_namespace !== null - ) { - message.php_metadata_namespace = object.php_metadata_namespace; - } else { - message.php_metadata_namespace = ""; - } - if (object.ruby_package !== undefined && object.ruby_package !== null) { - message.ruby_package = object.ruby_package; - } else { - message.ruby_package = ""; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMessageOptions: object = { - message_set_wire_format: false, - no_standard_descriptor_accessor: false, - deprecated: false, - map_entry: false, -}; - -export const MessageOptions = { - encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { - if (message.message_set_wire_format === true) { - writer.uint32(8).bool(message.message_set_wire_format); - } - if (message.no_standard_descriptor_accessor === true) { - writer.uint32(16).bool(message.no_standard_descriptor_accessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.map_entry === true) { - writer.uint32(56).bool(message.map_entry); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = Boolean(object.message_set_wire_format); - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = Boolean( - object.no_standard_descriptor_accessor - ); - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = Boolean(object.map_entry); - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.message_set_wire_format !== undefined && - (obj.message_set_wire_format = message.message_set_wire_format); - message.no_standard_descriptor_accessor !== undefined && - (obj.no_standard_descriptor_accessor = - message.no_standard_descriptor_accessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.map_entry !== undefined && (obj.map_entry = message.map_entry); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MessageOptions { - const message = { ...baseMessageOptions } as MessageOptions; - message.uninterpreted_option = []; - if ( - object.message_set_wire_format !== undefined && - object.message_set_wire_format !== null - ) { - message.message_set_wire_format = object.message_set_wire_format; - } else { - message.message_set_wire_format = false; - } - if ( - object.no_standard_descriptor_accessor !== undefined && - object.no_standard_descriptor_accessor !== null - ) { - message.no_standard_descriptor_accessor = - object.no_standard_descriptor_accessor; - } else { - message.no_standard_descriptor_accessor = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.map_entry !== undefined && object.map_entry !== null) { - message.map_entry = object.map_entry; - } else { - message.map_entry = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseFieldOptions: object = { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, -}; - -export const FieldOptions = { - encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { - if (message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32() as any; - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32() as any; - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = Boolean(object.packed); - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = Boolean(object.lazy); - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = Boolean(object.weak); - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): FieldOptions { - const message = { ...baseFieldOptions } as FieldOptions; - message.uninterpreted_option = []; - if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = object.ctype; - } else { - message.ctype = 0; - } - if (object.packed !== undefined && object.packed !== null) { - message.packed = object.packed; - } else { - message.packed = false; - } - if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = object.jstype; - } else { - message.jstype = 0; - } - if (object.lazy !== undefined && object.lazy !== null) { - message.lazy = object.lazy; - } else { - message.lazy = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if (object.weak !== undefined && object.weak !== null) { - message.weak = object.weak; - } else { - message.weak = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseOneofOptions: object = {}; - -export const OneofOptions = { - encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): OneofOptions { - const message = { ...baseOneofOptions } as OneofOptions; - message.uninterpreted_option = []; - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumOptions: object = { allow_alias: false, deprecated: false }; - -export const EnumOptions = { - encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { - if (message.allow_alias === true) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = Boolean(object.allow_alias); - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allow_alias !== undefined && - (obj.allow_alias = message.allow_alias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumOptions { - const message = { ...baseEnumOptions } as EnumOptions; - message.uninterpreted_option = []; - if (object.allow_alias !== undefined && object.allow_alias !== null) { - message.allow_alias = object.allow_alias; - } else { - message.allow_alias = false; - } - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseEnumValueOptions: object = { deprecated: false }; - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): EnumValueOptions { - const message = { ...baseEnumValueOptions } as EnumValueOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseServiceOptions: object = { deprecated: false }; - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): ServiceOptions { - const message = { ...baseServiceOptions } as ServiceOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; - -export const MethodOptions = { - encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotency_level !== 0) { - writer.uint32(272).int32(message.idempotency_level); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotency_level = reader.int32() as any; - break; - case 999: - message.uninterpreted_option.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = Boolean(object.deprecated); - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( - object.idempotency_level - ); - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotency_level !== undefined && - (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( - message.idempotency_level - )); - if (message.uninterpreted_option) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MethodOptions { - const message = { ...baseMethodOptions } as MethodOptions; - message.uninterpreted_option = []; - if (object.deprecated !== undefined && object.deprecated !== null) { - message.deprecated = object.deprecated; - } else { - message.deprecated = false; - } - if ( - object.idempotency_level !== undefined && - object.idempotency_level !== null - ) { - message.idempotency_level = object.idempotency_level; - } else { - message.idempotency_level = 0; - } - if ( - object.uninterpreted_option !== undefined && - object.uninterpreted_option !== null - ) { - for (const e of object.uninterpreted_option) { - message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); - } - } - return message; - }, -}; - -const baseUninterpretedOption: object = { - identifier_value: "", - positive_int_value: 0, - negative_int_value: 0, - double_value: 0, - aggregate_value: "", -}; - -export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.identifier_value !== "") { - writer.uint32(26).string(message.identifier_value); - } - if (message.positive_int_value !== 0) { - writer.uint32(32).uint64(message.positive_int_value); - } - if (message.negative_int_value !== 0) { - writer.uint32(40).int64(message.negative_int_value); - } - if (message.double_value !== 0) { - writer.uint32(49).double(message.double_value); - } - if (message.string_value.length !== 0) { - writer.uint32(58).bytes(message.string_value); - } - if (message.aggregate_value !== "") { - writer.uint32(66).string(message.aggregate_value); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = longToNumber(reader.uint64() as Long); - break; - case 5: - message.negative_int_value = longToNumber(reader.int64() as Long); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromJSON(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = String(object.identifier_value); - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = Number(object.positive_int_value); - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = Number(object.negative_int_value); - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = Number(object.double_value); - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = bytesFromBase64(object.string_value); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = String(object.aggregate_value); - } else { - message.aggregate_value = ""; - } - return message; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); - } else { - obj.name = []; - } - message.identifier_value !== undefined && - (obj.identifier_value = message.identifier_value); - message.positive_int_value !== undefined && - (obj.positive_int_value = message.positive_int_value); - message.negative_int_value !== undefined && - (obj.negative_int_value = message.negative_int_value); - message.double_value !== undefined && - (obj.double_value = message.double_value); - message.string_value !== undefined && - (obj.string_value = base64FromBytes( - message.string_value !== undefined - ? message.string_value - : new Uint8Array() - )); - message.aggregate_value !== undefined && - (obj.aggregate_value = message.aggregate_value); - return obj; - }, - - fromPartial(object: DeepPartial): UninterpretedOption { - const message = { ...baseUninterpretedOption } as UninterpretedOption; - message.name = []; - if (object.name !== undefined && object.name !== null) { - for (const e of object.name) { - message.name.push(UninterpretedOption_NamePart.fromPartial(e)); - } - } - if ( - object.identifier_value !== undefined && - object.identifier_value !== null - ) { - message.identifier_value = object.identifier_value; - } else { - message.identifier_value = ""; - } - if ( - object.positive_int_value !== undefined && - object.positive_int_value !== null - ) { - message.positive_int_value = object.positive_int_value; - } else { - message.positive_int_value = 0; - } - if ( - object.negative_int_value !== undefined && - object.negative_int_value !== null - ) { - message.negative_int_value = object.negative_int_value; - } else { - message.negative_int_value = 0; - } - if (object.double_value !== undefined && object.double_value !== null) { - message.double_value = object.double_value; - } else { - message.double_value = 0; - } - if (object.string_value !== undefined && object.string_value !== null) { - message.string_value = object.string_value; - } else { - message.string_value = new Uint8Array(); - } - if ( - object.aggregate_value !== undefined && - object.aggregate_value !== null - ) { - message.aggregate_value = object.aggregate_value; - } else { - message.aggregate_value = ""; - } - return message; - }, -}; - -const baseUninterpretedOption_NamePart: object = { - name_part: "", - is_extension: false, -}; - -export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: Writer = Writer.create() - ): Writer { - if (message.name_part !== "") { - writer.uint32(10).string(message.name_part); - } - if (message.is_extension === true) { - writer.uint32(16).bool(message.is_extension); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = String(object.name_part); - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = Boolean(object.is_extension); - } else { - message.is_extension = false; - } - return message; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.name_part !== undefined && (obj.name_part = message.name_part); - message.is_extension !== undefined && - (obj.is_extension = message.is_extension); - return obj; - }, - - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { - const message = { - ...baseUninterpretedOption_NamePart, - } as UninterpretedOption_NamePart; - if (object.name_part !== undefined && object.name_part !== null) { - message.name_part = object.name_part; - } else { - message.name_part = ""; - } - if (object.is_extension !== undefined && object.is_extension !== null) { - message.is_extension = object.is_extension; - } else { - message.is_extension = false; - } - return message; - }, -}; - -const baseSourceCodeInfo: object = {}; - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); - } else { - obj.location = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = { ...baseSourceCodeInfo } as SourceCodeInfo; - message.location = []; - if (object.location !== undefined && object.location !== null) { - for (const e of object.location) { - message.location.push(SourceCodeInfo_Location.fromPartial(e)); - } - } - return message; - }, -}; - -const baseSourceCodeInfo_Location: object = { - path: 0, - span: 0, - leading_comments: "", - trailing_comments: "", - leading_detached_comments: "", -}; - -export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leading_comments !== "") { - writer.uint32(26).string(message.leading_comments); - } - if (message.trailing_comments !== "") { - writer.uint32(34).string(message.trailing_comments); - } - for (const v of message.leading_detached_comments) { - writer.uint32(50).string(v!); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - message.leading_detached_comments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(Number(e)); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = String(object.leading_comments); - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = String(object.trailing_comments); - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(String(e)); - } - } - return message; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => e); - } else { - obj.span = []; - } - message.leading_comments !== undefined && - (obj.leading_comments = message.leading_comments); - message.trailing_comments !== undefined && - (obj.trailing_comments = message.trailing_comments); - if (message.leading_detached_comments) { - obj.leading_detached_comments = message.leading_detached_comments.map( - (e) => e - ); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { - const message = { - ...baseSourceCodeInfo_Location, - } as SourceCodeInfo_Location; - message.path = []; - message.span = []; - message.leading_detached_comments = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.span !== undefined && object.span !== null) { - for (const e of object.span) { - message.span.push(e); - } - } - if ( - object.leading_comments !== undefined && - object.leading_comments !== null - ) { - message.leading_comments = object.leading_comments; - } else { - message.leading_comments = ""; - } - if ( - object.trailing_comments !== undefined && - object.trailing_comments !== null - ) { - message.trailing_comments = object.trailing_comments; - } else { - message.trailing_comments = ""; - } - if ( - object.leading_detached_comments !== undefined && - object.leading_detached_comments !== null - ) { - for (const e of object.leading_detached_comments) { - message.leading_detached_comments.push(e); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo: object = {}; - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); - } else { - obj.annotation = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; - message.annotation = []; - if (object.annotation !== undefined && object.annotation !== null) { - for (const e of object.annotation) { - message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGeneratedCodeInfo_Annotation: object = { - path: 0, - source_file: "", - begin: 0, - end: 0, -}; - -export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: Writer = Writer.create() - ): Writer { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.source_file !== "") { - writer.uint32(18).string(message.source_file); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.source_file = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(Number(e)); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = String(object.source_file); - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = Number(object.begin); - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = Number(object.end); - } else { - message.end = 0; - } - return message; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => e); - } else { - obj.path = []; - } - message.source_file !== undefined && - (obj.source_file = message.source_file); - message.begin !== undefined && (obj.begin = message.begin); - message.end !== undefined && (obj.end = message.end); - return obj; - }, - - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { - const message = { - ...baseGeneratedCodeInfo_Annotation, - } as GeneratedCodeInfo_Annotation; - message.path = []; - if (object.path !== undefined && object.path !== null) { - for (const e of object.path) { - message.path.push(e); - } - } - if (object.source_file !== undefined && object.source_file !== null) { - message.source_file = object.source_file; - } else { - message.source_file = ""; - } - if (object.begin !== undefined && object.begin !== null) { - message.begin = object.begin; - } else { - message.begin = 0; - } - if (object.end !== undefined && object.end !== null) { - message.end = object.end; - } else { - message.end = 0; - } - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); - } - return btoa(bin.join("")); -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (util.Long !== Long) { - util.Long = Long as any; - configure(); -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/authorityMetadata.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/authorityMetadata.d.ts deleted file mode 100644 index 7c4ee328bb..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/authorityMetadata.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.tokenfactory"; -/** - * DenomAuthorityMetadata specifies metadata for addresses that have specific - * capabilities over a token factory denom. Right now there is only one Admin - * permission, but is planned to be extended to the future. - */ -export interface DenomAuthorityMetadata { - /** Can be empty for no admin, or a valid sei address */ - admin: string; -} -export declare const DenomAuthorityMetadata: { - encode(message: DenomAuthorityMetadata, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): DenomAuthorityMetadata; - fromJSON(object: any): DenomAuthorityMetadata; - toJSON(message: DenomAuthorityMetadata): unknown; - fromPartial(object: DeepPartial): DenomAuthorityMetadata; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/authorityMetadata.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/authorityMetadata.js deleted file mode 100644 index db244f8a5c..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/authorityMetadata.js +++ /dev/null @@ -1,54 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.tokenfactory"; -const baseDenomAuthorityMetadata = { admin: "" }; -export const DenomAuthorityMetadata = { - encode(message, writer = Writer.create()) { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDenomAuthorityMetadata }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseDenomAuthorityMetadata }; - if (object.admin !== undefined && object.admin !== null) { - message.admin = String(object.admin); - } - else { - message.admin = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.admin !== undefined && (obj.admin = message.admin); - return obj; - }, - fromPartial(object) { - const message = { ...baseDenomAuthorityMetadata }; - if (object.admin !== undefined && object.admin !== null) { - message.admin = object.admin; - } - else { - message.admin = ""; - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/authorityMetadata.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/authorityMetadata.ts deleted file mode 100644 index 1d02b89e53..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/authorityMetadata.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.tokenfactory"; - -/** - * DenomAuthorityMetadata specifies metadata for addresses that have specific - * capabilities over a token factory denom. Right now there is only one Admin - * permission, but is planned to be extended to the future. - */ -export interface DenomAuthorityMetadata { - /** Can be empty for no admin, or a valid sei address */ - admin: string; -} - -const baseDenomAuthorityMetadata: object = { admin: "" }; - -export const DenomAuthorityMetadata = { - encode( - message: DenomAuthorityMetadata, - writer: Writer = Writer.create() - ): Writer { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): DenomAuthorityMetadata { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDenomAuthorityMetadata } as DenomAuthorityMetadata; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DenomAuthorityMetadata { - const message = { ...baseDenomAuthorityMetadata } as DenomAuthorityMetadata; - if (object.admin !== undefined && object.admin !== null) { - message.admin = String(object.admin); - } else { - message.admin = ""; - } - return message; - }, - - toJSON(message: DenomAuthorityMetadata): unknown { - const obj: any = {}; - message.admin !== undefined && (obj.admin = message.admin); - return obj; - }, - - fromPartial( - object: DeepPartial - ): DenomAuthorityMetadata { - const message = { ...baseDenomAuthorityMetadata } as DenomAuthorityMetadata; - if (object.admin !== undefined && object.admin !== null) { - message.admin = object.admin; - } else { - message.admin = ""; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/genesis.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/genesis.d.ts deleted file mode 100644 index 2e52a7b8a1..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/genesis.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Params } from "../tokenfactory/params"; -import { DenomAuthorityMetadata } from "../tokenfactory/authorityMetadata"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.tokenfactory"; -/** GenesisState defines the tokenfactory module's genesis state. */ -export interface GenesisState { - /** params defines the paramaters of the module. */ - params: Params | undefined; - factoryDenoms: GenesisDenom[]; -} -/** - * GenesisDenom defines a tokenfactory denom that is defined within genesis - * state. The structure contains DenomAuthorityMetadata which defines the - * denom's admin. - */ -export interface GenesisDenom { - denom: string; - authorityMetadata: DenomAuthorityMetadata | undefined; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -export declare const GenesisDenom: { - encode(message: GenesisDenom, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): GenesisDenom; - fromJSON(object: any): GenesisDenom; - toJSON(message: GenesisDenom): unknown; - fromPartial(object: DeepPartial): GenesisDenom; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/genesis.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/genesis.js deleted file mode 100644 index 2a41cdd7a3..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/genesis.js +++ /dev/null @@ -1,157 +0,0 @@ -/* eslint-disable */ -import { Params } from "../tokenfactory/params"; -import { DenomAuthorityMetadata } from "../tokenfactory/authorityMetadata"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.tokenfactory"; -const baseGenesisState = {}; -export const GenesisState = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.factoryDenoms) { - GenesisDenom.encode(v, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState }; - message.factoryDenoms = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.factoryDenoms.push(GenesisDenom.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisState }; - message.factoryDenoms = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - if (object.factoryDenoms !== undefined && object.factoryDenoms !== null) { - for (const e of object.factoryDenoms) { - message.factoryDenoms.push(GenesisDenom.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.factoryDenoms) { - obj.factoryDenoms = message.factoryDenoms.map((e) => e ? GenesisDenom.toJSON(e) : undefined); - } - else { - obj.factoryDenoms = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisState }; - message.factoryDenoms = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - if (object.factoryDenoms !== undefined && object.factoryDenoms !== null) { - for (const e of object.factoryDenoms) { - message.factoryDenoms.push(GenesisDenom.fromPartial(e)); - } - } - return message; - }, -}; -const baseGenesisDenom = { denom: "" }; -export const GenesisDenom = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.authorityMetadata !== undefined) { - DenomAuthorityMetadata.encode(message.authorityMetadata, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisDenom }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.authorityMetadata = DenomAuthorityMetadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseGenesisDenom }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.authorityMetadata !== undefined && - object.authorityMetadata !== null) { - message.authorityMetadata = DenomAuthorityMetadata.fromJSON(object.authorityMetadata); - } - else { - message.authorityMetadata = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.authorityMetadata !== undefined && - (obj.authorityMetadata = message.authorityMetadata - ? DenomAuthorityMetadata.toJSON(message.authorityMetadata) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseGenesisDenom }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.authorityMetadata !== undefined && - object.authorityMetadata !== null) { - message.authorityMetadata = DenomAuthorityMetadata.fromPartial(object.authorityMetadata); - } - else { - message.authorityMetadata = undefined; - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/genesis.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/genesis.ts deleted file mode 100644 index 94f554079b..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/genesis.ts +++ /dev/null @@ -1,209 +0,0 @@ -/* eslint-disable */ -import { Params } from "../tokenfactory/params"; -import { DenomAuthorityMetadata } from "../tokenfactory/authorityMetadata"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.tokenfactory"; - -/** GenesisState defines the tokenfactory module's genesis state. */ -export interface GenesisState { - /** params defines the paramaters of the module. */ - params: Params | undefined; - factory_denoms: GenesisDenom[]; -} - -/** - * GenesisDenom defines a tokenfactory denom that is defined within genesis - * state. The structure contains DenomAuthorityMetadata which defines the - * denom's admin. - */ -export interface GenesisDenom { - denom: string; - authority_metadata: DenomAuthorityMetadata | undefined; -} - -const baseGenesisState: object = {}; - -export const GenesisState = { - encode(message: GenesisState, writer: Writer = Writer.create()): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.factory_denoms) { - GenesisDenom.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisState } as GenesisState; - message.factory_denoms = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.factory_denoms.push( - GenesisDenom.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.factory_denoms = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - if (object.factory_denoms !== undefined && object.factory_denoms !== null) { - for (const e of object.factory_denoms) { - message.factory_denoms.push(GenesisDenom.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.factory_denoms) { - obj.factory_denoms = message.factory_denoms.map((e) => - e ? GenesisDenom.toJSON(e) : undefined - ); - } else { - obj.factory_denoms = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): GenesisState { - const message = { ...baseGenesisState } as GenesisState; - message.factory_denoms = []; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - if (object.factory_denoms !== undefined && object.factory_denoms !== null) { - for (const e of object.factory_denoms) { - message.factory_denoms.push(GenesisDenom.fromPartial(e)); - } - } - return message; - }, -}; - -const baseGenesisDenom: object = { denom: "" }; - -export const GenesisDenom = { - encode(message: GenesisDenom, writer: Writer = Writer.create()): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.authority_metadata !== undefined) { - DenomAuthorityMetadata.encode( - message.authority_metadata, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): GenesisDenom { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGenesisDenom } as GenesisDenom; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.authority_metadata = DenomAuthorityMetadata.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisDenom { - const message = { ...baseGenesisDenom } as GenesisDenom; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if ( - object.authority_metadata !== undefined && - object.authority_metadata !== null - ) { - message.authority_metadata = DenomAuthorityMetadata.fromJSON( - object.authority_metadata - ); - } else { - message.authority_metadata = undefined; - } - return message; - }, - - toJSON(message: GenesisDenom): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.authority_metadata !== undefined && - (obj.authority_metadata = message.authority_metadata - ? DenomAuthorityMetadata.toJSON(message.authority_metadata) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GenesisDenom { - const message = { ...baseGenesisDenom } as GenesisDenom; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if ( - object.authority_metadata !== undefined && - object.authority_metadata !== null - ) { - message.authority_metadata = DenomAuthorityMetadata.fromPartial( - object.authority_metadata - ); - } else { - message.authority_metadata = undefined; - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/gov.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/gov.d.ts deleted file mode 100644 index d153047eb4..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/gov.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.tokenfactory"; -export interface AddCreatorsToDenomFeeWhitelistProposal { - title: string; - description: string; - creatorList: string[]; -} -export declare const AddCreatorsToDenomFeeWhitelistProposal: { - encode(message: AddCreatorsToDenomFeeWhitelistProposal, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): AddCreatorsToDenomFeeWhitelistProposal; - fromJSON(object: any): AddCreatorsToDenomFeeWhitelistProposal; - toJSON(message: AddCreatorsToDenomFeeWhitelistProposal): unknown; - fromPartial(object: DeepPartial): AddCreatorsToDenomFeeWhitelistProposal; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/gov.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/gov.js deleted file mode 100644 index 9ea534fc42..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/gov.js +++ /dev/null @@ -1,109 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.tokenfactory"; -const baseAddCreatorsToDenomFeeWhitelistProposal = { - title: "", - description: "", - creatorList: "", -}; -export const AddCreatorsToDenomFeeWhitelistProposal = { - encode(message, writer = Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.creatorList) { - writer.uint32(26).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseAddCreatorsToDenomFeeWhitelistProposal, - }; - message.creatorList = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.creatorList.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseAddCreatorsToDenomFeeWhitelistProposal, - }; - message.creatorList = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.creatorList !== undefined && object.creatorList !== null) { - for (const e of object.creatorList) { - message.creatorList.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - if (message.creatorList) { - obj.creatorList = message.creatorList.map((e) => e); - } - else { - obj.creatorList = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseAddCreatorsToDenomFeeWhitelistProposal, - }; - message.creatorList = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.creatorList !== undefined && object.creatorList !== null) { - for (const e of object.creatorList) { - message.creatorList.push(e); - } - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/gov.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/gov.ts deleted file mode 100644 index e8450e142e..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/gov.ts +++ /dev/null @@ -1,136 +0,0 @@ -/* eslint-disable */ -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.tokenfactory"; - -export interface AddCreatorsToDenomFeeWhitelistProposal { - title: string; - description: string; - creatorList: string[]; -} - -const baseAddCreatorsToDenomFeeWhitelistProposal: object = { - title: "", - description: "", - creatorList: "", -}; - -export const AddCreatorsToDenomFeeWhitelistProposal = { - encode( - message: AddCreatorsToDenomFeeWhitelistProposal, - writer: Writer = Writer.create() - ): Writer { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.creatorList) { - writer.uint32(26).string(v!); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): AddCreatorsToDenomFeeWhitelistProposal { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseAddCreatorsToDenomFeeWhitelistProposal, - } as AddCreatorsToDenomFeeWhitelistProposal; - message.creatorList = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.creatorList.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): AddCreatorsToDenomFeeWhitelistProposal { - const message = { - ...baseAddCreatorsToDenomFeeWhitelistProposal, - } as AddCreatorsToDenomFeeWhitelistProposal; - message.creatorList = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } else { - message.description = ""; - } - if (object.creatorList !== undefined && object.creatorList !== null) { - for (const e of object.creatorList) { - message.creatorList.push(String(e)); - } - } - return message; - }, - - toJSON(message: AddCreatorsToDenomFeeWhitelistProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - if (message.creatorList) { - obj.creatorList = message.creatorList.map((e) => e); - } else { - obj.creatorList = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): AddCreatorsToDenomFeeWhitelistProposal { - const message = { - ...baseAddCreatorsToDenomFeeWhitelistProposal, - } as AddCreatorsToDenomFeeWhitelistProposal; - message.creatorList = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } else { - message.description = ""; - } - if (object.creatorList !== undefined && object.creatorList !== null) { - for (const e of object.creatorList) { - message.creatorList.push(e); - } - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/params.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/params.d.ts deleted file mode 100644 index e3ec311fa1..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/params.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Coin } from "../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export declare const protobufPackage = "seiprotocol.seichain.tokenfactory"; -/** Params defines the parameters for the tokenfactory module. */ -export interface Params { - denomCreationFee: Coin[]; -} -export declare const Params: { - encode(message: Params, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/params.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/params.js deleted file mode 100644 index 6b3d39a055..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/params.js +++ /dev/null @@ -1,63 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; -export const protobufPackage = "seiprotocol.seichain.tokenfactory"; -const baseParams = {}; -export const Params = { - encode(message, writer = Writer.create()) { - for (const v of message.denomCreationFee) { - Coin.encode(v, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams }; - message.denomCreationFee = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denomCreationFee.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseParams }; - message.denomCreationFee = []; - if (object.denomCreationFee !== undefined && - object.denomCreationFee !== null) { - for (const e of object.denomCreationFee) { - message.denomCreationFee.push(Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.denomCreationFee) { - obj.denomCreationFee = message.denomCreationFee.map((e) => e ? Coin.toJSON(e) : undefined); - } - else { - obj.denomCreationFee = []; - } - return obj; - }, - fromPartial(object) { - const message = { ...baseParams }; - message.denomCreationFee = []; - if (object.denomCreationFee !== undefined && - object.denomCreationFee !== null) { - for (const e of object.denomCreationFee) { - message.denomCreationFee.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/params.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/params.ts deleted file mode 100644 index 014f0e3149..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/params.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* eslint-disable */ -import { Coin } from "../cosmos/base/v1beta1/coin"; -import { Writer, Reader } from "protobufjs/minimal"; - -export const protobufPackage = "seiprotocol.seichain.tokenfactory"; - -/** Params defines the parameters for the tokenfactory module. */ -export interface Params { - denom_creation_fee: Coin[]; -} - -const baseParams: object = {}; - -export const Params = { - encode(message: Params, writer: Writer = Writer.create()): Writer { - for (const v of message.denom_creation_fee) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): Params { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseParams } as Params; - message.denom_creation_fee = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom_creation_fee.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Params { - const message = { ...baseParams } as Params; - message.denom_creation_fee = []; - if ( - object.denom_creation_fee !== undefined && - object.denom_creation_fee !== null - ) { - for (const e of object.denom_creation_fee) { - message.denom_creation_fee.push(Coin.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.denom_creation_fee) { - obj.denom_creation_fee = message.denom_creation_fee.map((e) => - e ? Coin.toJSON(e) : undefined - ); - } else { - obj.denom_creation_fee = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): Params { - const message = { ...baseParams } as Params; - message.denom_creation_fee = []; - if ( - object.denom_creation_fee !== undefined && - object.denom_creation_fee !== null - ) { - for (const e of object.denom_creation_fee) { - message.denom_creation_fee.push(Coin.fromPartial(e)); - } - } - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/query.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/query.d.ts deleted file mode 100644 index 87bd421d8e..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/query.d.ts +++ /dev/null @@ -1,182 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Params } from "../tokenfactory/params"; -import { DenomAuthorityMetadata } from "../tokenfactory/authorityMetadata"; -export declare const protobufPackage = "seiprotocol.seichain.tokenfactory"; -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -/** - * QueryDenomAuthorityMetadataRequest defines the request structure for the - * DenomAuthorityMetadata gRPC query. - */ -export interface QueryDenomAuthorityMetadataRequest { - denom: string; -} -/** - * QueryDenomAuthorityMetadataResponse defines the response structure for the - * DenomAuthorityMetadata gRPC query. - */ -export interface QueryDenomAuthorityMetadataResponse { - authorityMetadata: DenomAuthorityMetadata | undefined; -} -/** - * QueryDenomsFromCreatorRequest defines the request structure for the - * DenomsFromCreator gRPC query. - */ -export interface QueryDenomsFromCreatorRequest { - creator: string; -} -/** - * QueryDenomsFromCreatorRequest defines the response structure for the - * DenomsFromCreator gRPC query. - */ -export interface QueryDenomsFromCreatorResponse { - denoms: string[]; -} -/** - * QueryDenomCreationFeeWhitelistRequest defines the request structure for the - * DenomCreationFeeWhitelist gRPC query. - */ -export interface QueryDenomCreationFeeWhitelistRequest { -} -/** - * QueryDenomCreationFeeWhitelistResponse defines the response structure for the - * DenomsFromCreator gRPC query. - */ -export interface QueryDenomCreationFeeWhitelistResponse { - creators: string[]; -} -/** - * QueryCreatorInDenomFeeWhitelistRequest defines the request structure for the - * CreatorInDenomFeeWhitelist gRPC query. - */ -export interface QueryCreatorInDenomFeeWhitelistRequest { - creator: string; -} -/** - * QueryCreatorInDenomFeeWhitelistResponse defines the response structure for the - * CreatorInDenomFeeWhitelist gRPC query. - */ -export interface QueryCreatorInDenomFeeWhitelistResponse { - whitelisted: boolean; -} -export declare const QueryParamsRequest: { - encode(_: QueryParamsRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest; - fromJSON(_: any): QueryParamsRequest; - toJSON(_: QueryParamsRequest): unknown; - fromPartial(_: DeepPartial): QueryParamsRequest; -}; -export declare const QueryParamsResponse: { - encode(message: QueryParamsResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse; - fromJSON(object: any): QueryParamsResponse; - toJSON(message: QueryParamsResponse): unknown; - fromPartial(object: DeepPartial): QueryParamsResponse; -}; -export declare const QueryDenomAuthorityMetadataRequest: { - encode(message: QueryDenomAuthorityMetadataRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomAuthorityMetadataRequest; - fromJSON(object: any): QueryDenomAuthorityMetadataRequest; - toJSON(message: QueryDenomAuthorityMetadataRequest): unknown; - fromPartial(object: DeepPartial): QueryDenomAuthorityMetadataRequest; -}; -export declare const QueryDenomAuthorityMetadataResponse: { - encode(message: QueryDenomAuthorityMetadataResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomAuthorityMetadataResponse; - fromJSON(object: any): QueryDenomAuthorityMetadataResponse; - toJSON(message: QueryDenomAuthorityMetadataResponse): unknown; - fromPartial(object: DeepPartial): QueryDenomAuthorityMetadataResponse; -}; -export declare const QueryDenomsFromCreatorRequest: { - encode(message: QueryDenomsFromCreatorRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomsFromCreatorRequest; - fromJSON(object: any): QueryDenomsFromCreatorRequest; - toJSON(message: QueryDenomsFromCreatorRequest): unknown; - fromPartial(object: DeepPartial): QueryDenomsFromCreatorRequest; -}; -export declare const QueryDenomsFromCreatorResponse: { - encode(message: QueryDenomsFromCreatorResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomsFromCreatorResponse; - fromJSON(object: any): QueryDenomsFromCreatorResponse; - toJSON(message: QueryDenomsFromCreatorResponse): unknown; - fromPartial(object: DeepPartial): QueryDenomsFromCreatorResponse; -}; -export declare const QueryDenomCreationFeeWhitelistRequest: { - encode(_: QueryDenomCreationFeeWhitelistRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomCreationFeeWhitelistRequest; - fromJSON(_: any): QueryDenomCreationFeeWhitelistRequest; - toJSON(_: QueryDenomCreationFeeWhitelistRequest): unknown; - fromPartial(_: DeepPartial): QueryDenomCreationFeeWhitelistRequest; -}; -export declare const QueryDenomCreationFeeWhitelistResponse: { - encode(message: QueryDenomCreationFeeWhitelistResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryDenomCreationFeeWhitelistResponse; - fromJSON(object: any): QueryDenomCreationFeeWhitelistResponse; - toJSON(message: QueryDenomCreationFeeWhitelistResponse): unknown; - fromPartial(object: DeepPartial): QueryDenomCreationFeeWhitelistResponse; -}; -export declare const QueryCreatorInDenomFeeWhitelistRequest: { - encode(message: QueryCreatorInDenomFeeWhitelistRequest, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryCreatorInDenomFeeWhitelistRequest; - fromJSON(object: any): QueryCreatorInDenomFeeWhitelistRequest; - toJSON(message: QueryCreatorInDenomFeeWhitelistRequest): unknown; - fromPartial(object: DeepPartial): QueryCreatorInDenomFeeWhitelistRequest; -}; -export declare const QueryCreatorInDenomFeeWhitelistResponse: { - encode(message: QueryCreatorInDenomFeeWhitelistResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): QueryCreatorInDenomFeeWhitelistResponse; - fromJSON(object: any): QueryCreatorInDenomFeeWhitelistResponse; - toJSON(message: QueryCreatorInDenomFeeWhitelistResponse): unknown; - fromPartial(object: DeepPartial): QueryCreatorInDenomFeeWhitelistResponse; -}; -/** Query defines the gRPC querier service. */ -export interface Query { - /** - * Params defines a gRPC query method that returns the tokenfactory module's - * parameters. - */ - Params(request: QueryParamsRequest): Promise; - /** - * DenomAuthorityMetadata defines a gRPC query method for fetching - * DenomAuthorityMetadata for a particular denom. - */ - DenomAuthorityMetadata(request: QueryDenomAuthorityMetadataRequest): Promise; - /** - * DenomsFromCreator defines a gRPC query method for fetching all - * denominations created by a specific admin/creator. - */ - DenomsFromCreator(request: QueryDenomsFromCreatorRequest): Promise; - /** - * DenomCreationFeeWhitelist defines a gRPC query method for fetching all - * creators who are whitelisted from paying the denom creation fee. - */ - DenomCreationFeeWhitelist(request: QueryDenomCreationFeeWhitelistRequest): Promise; - /** - * CreatorInDenomFeeWhitelist defines a gRPC query method for fetching - * whether a creator is whitelisted from denom creation fees. - */ - CreatorInDenomFeeWhitelist(request: QueryCreatorInDenomFeeWhitelistRequest): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - Params(request: QueryParamsRequest): Promise; - DenomAuthorityMetadata(request: QueryDenomAuthorityMetadataRequest): Promise; - DenomsFromCreator(request: QueryDenomsFromCreatorRequest): Promise; - DenomCreationFeeWhitelist(request: QueryDenomCreationFeeWhitelistRequest): Promise; - CreatorInDenomFeeWhitelist(request: QueryCreatorInDenomFeeWhitelistRequest): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/query.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/query.js deleted file mode 100644 index 1d3e616bd0..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/query.js +++ /dev/null @@ -1,576 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Params } from "../tokenfactory/params"; -import { DenomAuthorityMetadata } from "../tokenfactory/authorityMetadata"; -export const protobufPackage = "seiprotocol.seichain.tokenfactory"; -const baseQueryParamsRequest = {}; -export const QueryParamsRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseQueryParamsRequest }; - return message; - }, -}; -const baseQueryParamsResponse = {}; -export const QueryParamsResponse = { - encode(message, writer = Writer.create()) { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseQueryParamsResponse }; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - return message; - }, -}; -const baseQueryDenomAuthorityMetadataRequest = { denom: "" }; -export const QueryDenomAuthorityMetadataRequest = { - encode(message, writer = Writer.create()) { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomAuthorityMetadataRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomAuthorityMetadataRequest, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomAuthorityMetadataRequest, - }; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - return message; - }, -}; -const baseQueryDenomAuthorityMetadataResponse = {}; -export const QueryDenomAuthorityMetadataResponse = { - encode(message, writer = Writer.create()) { - if (message.authorityMetadata !== undefined) { - DenomAuthorityMetadata.encode(message.authorityMetadata, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomAuthorityMetadataResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authorityMetadata = DenomAuthorityMetadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomAuthorityMetadataResponse, - }; - if (object.authorityMetadata !== undefined && - object.authorityMetadata !== null) { - message.authorityMetadata = DenomAuthorityMetadata.fromJSON(object.authorityMetadata); - } - else { - message.authorityMetadata = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.authorityMetadata !== undefined && - (obj.authorityMetadata = message.authorityMetadata - ? DenomAuthorityMetadata.toJSON(message.authorityMetadata) - : undefined); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomAuthorityMetadataResponse, - }; - if (object.authorityMetadata !== undefined && - object.authorityMetadata !== null) { - message.authorityMetadata = DenomAuthorityMetadata.fromPartial(object.authorityMetadata); - } - else { - message.authorityMetadata = undefined; - } - return message; - }, -}; -const baseQueryDenomsFromCreatorRequest = { creator: "" }; -export const QueryDenomsFromCreatorRequest = { - encode(message, writer = Writer.create()) { - if (message.creator !== "") { - writer.uint32(10).string(message.creator); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomsFromCreatorRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomsFromCreatorRequest, - }; - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } - else { - message.creator = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.creator !== undefined && (obj.creator = message.creator); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomsFromCreatorRequest, - }; - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } - else { - message.creator = ""; - } - return message; - }, -}; -const baseQueryDenomsFromCreatorResponse = { denoms: "" }; -export const QueryDenomsFromCreatorResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.denoms) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomsFromCreatorResponse, - }; - message.denoms = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denoms.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomsFromCreatorResponse, - }; - message.denoms = []; - if (object.denoms !== undefined && object.denoms !== null) { - for (const e of object.denoms) { - message.denoms.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.denoms) { - obj.denoms = message.denoms.map((e) => e); - } - else { - obj.denoms = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomsFromCreatorResponse, - }; - message.denoms = []; - if (object.denoms !== undefined && object.denoms !== null) { - for (const e of object.denoms) { - message.denoms.push(e); - } - } - return message; - }, -}; -const baseQueryDenomCreationFeeWhitelistRequest = {}; -export const QueryDenomCreationFeeWhitelistRequest = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomCreationFeeWhitelistRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { - ...baseQueryDenomCreationFeeWhitelistRequest, - }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { - ...baseQueryDenomCreationFeeWhitelistRequest, - }; - return message; - }, -}; -const baseQueryDenomCreationFeeWhitelistResponse = { creators: "" }; -export const QueryDenomCreationFeeWhitelistResponse = { - encode(message, writer = Writer.create()) { - for (const v of message.creators) { - writer.uint32(10).string(v); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomCreationFeeWhitelistResponse, - }; - message.creators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creators.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryDenomCreationFeeWhitelistResponse, - }; - message.creators = []; - if (object.creators !== undefined && object.creators !== null) { - for (const e of object.creators) { - message.creators.push(String(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.creators) { - obj.creators = message.creators.map((e) => e); - } - else { - obj.creators = []; - } - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryDenomCreationFeeWhitelistResponse, - }; - message.creators = []; - if (object.creators !== undefined && object.creators !== null) { - for (const e of object.creators) { - message.creators.push(e); - } - } - return message; - }, -}; -const baseQueryCreatorInDenomFeeWhitelistRequest = { creator: "" }; -export const QueryCreatorInDenomFeeWhitelistRequest = { - encode(message, writer = Writer.create()) { - if (message.creator !== "") { - writer.uint32(10).string(message.creator); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryCreatorInDenomFeeWhitelistRequest, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryCreatorInDenomFeeWhitelistRequest, - }; - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } - else { - message.creator = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.creator !== undefined && (obj.creator = message.creator); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryCreatorInDenomFeeWhitelistRequest, - }; - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } - else { - message.creator = ""; - } - return message; - }, -}; -const baseQueryCreatorInDenomFeeWhitelistResponse = { - whitelisted: false, -}; -export const QueryCreatorInDenomFeeWhitelistResponse = { - encode(message, writer = Writer.create()) { - if (message.whitelisted === true) { - writer.uint32(8).bool(message.whitelisted); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryCreatorInDenomFeeWhitelistResponse, - }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.whitelisted = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { - ...baseQueryCreatorInDenomFeeWhitelistResponse, - }; - if (object.whitelisted !== undefined && object.whitelisted !== null) { - message.whitelisted = Boolean(object.whitelisted); - } - else { - message.whitelisted = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.whitelisted !== undefined && - (obj.whitelisted = message.whitelisted); - return obj; - }, - fromPartial(object) { - const message = { - ...baseQueryCreatorInDenomFeeWhitelistResponse, - }; - if (object.whitelisted !== undefined && object.whitelisted !== null) { - message.whitelisted = object.whitelisted; - } - else { - message.whitelisted = false; - } - return message; - }, -}; -export class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - Params(request) { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.tokenfactory.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - DenomAuthorityMetadata(request) { - const data = QueryDenomAuthorityMetadataRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.tokenfactory.Query", "DenomAuthorityMetadata", data); - return promise.then((data) => QueryDenomAuthorityMetadataResponse.decode(new Reader(data))); - } - DenomsFromCreator(request) { - const data = QueryDenomsFromCreatorRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.tokenfactory.Query", "DenomsFromCreator", data); - return promise.then((data) => QueryDenomsFromCreatorResponse.decode(new Reader(data))); - } - DenomCreationFeeWhitelist(request) { - const data = QueryDenomCreationFeeWhitelistRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.tokenfactory.Query", "DenomCreationFeeWhitelist", data); - return promise.then((data) => QueryDenomCreationFeeWhitelistResponse.decode(new Reader(data))); - } - CreatorInDenomFeeWhitelist(request) { - const data = QueryCreatorInDenomFeeWhitelistRequest.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.tokenfactory.Query", "CreatorInDenomFeeWhitelist", data); - return promise.then((data) => QueryCreatorInDenomFeeWhitelistResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/query.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/query.ts deleted file mode 100644 index d2c8aefddb..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/query.ts +++ /dev/null @@ -1,875 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Params } from "../tokenfactory/params"; -import { DenomAuthorityMetadata } from "../tokenfactory/authorityMetadata"; - -export const protobufPackage = "seiprotocol.seichain.tokenfactory"; - -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} - -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} - -/** - * QueryDenomAuthorityMetadataRequest defines the request structure for the - * DenomAuthorityMetadata gRPC query. - */ -export interface QueryDenomAuthorityMetadataRequest { - denom: string; -} - -/** - * QueryDenomAuthorityMetadataResponse defines the response structure for the - * DenomAuthorityMetadata gRPC query. - */ -export interface QueryDenomAuthorityMetadataResponse { - authority_metadata: DenomAuthorityMetadata | undefined; -} - -/** - * QueryDenomsFromCreatorRequest defines the request structure for the - * DenomsFromCreator gRPC query. - */ -export interface QueryDenomsFromCreatorRequest { - creator: string; -} - -/** - * QueryDenomsFromCreatorRequest defines the response structure for the - * DenomsFromCreator gRPC query. - */ -export interface QueryDenomsFromCreatorResponse { - denoms: string[]; -} - -/** - * QueryDenomCreationFeeWhitelistRequest defines the request structure for the - * DenomCreationFeeWhitelist gRPC query. - */ -export interface QueryDenomCreationFeeWhitelistRequest {} - -/** - * QueryDenomCreationFeeWhitelistResponse defines the response structure for the - * DenomsFromCreator gRPC query. - */ -export interface QueryDenomCreationFeeWhitelistResponse { - creators: string[]; -} - -/** - * QueryCreatorInDenomFeeWhitelistRequest defines the request structure for the - * CreatorInDenomFeeWhitelist gRPC query. - */ -export interface QueryCreatorInDenomFeeWhitelistRequest { - creator: string; -} - -/** - * QueryCreatorInDenomFeeWhitelistResponse defines the response structure for the - * CreatorInDenomFeeWhitelist gRPC query. - */ -export interface QueryCreatorInDenomFeeWhitelistResponse { - whitelisted: boolean; -} - -const baseQueryParamsRequest: object = {}; - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = { ...baseQueryParamsRequest } as QueryParamsRequest; - return message; - }, -}; - -const baseQueryParamsResponse: object = {}; - -export const QueryParamsResponse = { - encode( - message: QueryParamsResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromJSON(object.params); - } else { - message.params = undefined; - } - return message; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = { ...baseQueryParamsResponse } as QueryParamsResponse; - if (object.params !== undefined && object.params !== null) { - message.params = Params.fromPartial(object.params); - } else { - message.params = undefined; - } - return message; - }, -}; - -const baseQueryDenomAuthorityMetadataRequest: object = { denom: "" }; - -export const QueryDenomAuthorityMetadataRequest = { - encode( - message: QueryDenomAuthorityMetadataRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomAuthorityMetadataRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomAuthorityMetadataRequest, - } as QueryDenomAuthorityMetadataRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomAuthorityMetadataRequest { - const message = { - ...baseQueryDenomAuthorityMetadataRequest, - } as QueryDenomAuthorityMetadataRequest; - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - return message; - }, - - toJSON(message: QueryDenomAuthorityMetadataRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomAuthorityMetadataRequest { - const message = { - ...baseQueryDenomAuthorityMetadataRequest, - } as QueryDenomAuthorityMetadataRequest; - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - return message; - }, -}; - -const baseQueryDenomAuthorityMetadataResponse: object = {}; - -export const QueryDenomAuthorityMetadataResponse = { - encode( - message: QueryDenomAuthorityMetadataResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.authority_metadata !== undefined) { - DenomAuthorityMetadata.encode( - message.authority_metadata, - writer.uint32(10).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomAuthorityMetadataResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomAuthorityMetadataResponse, - } as QueryDenomAuthorityMetadataResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authority_metadata = DenomAuthorityMetadata.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomAuthorityMetadataResponse { - const message = { - ...baseQueryDenomAuthorityMetadataResponse, - } as QueryDenomAuthorityMetadataResponse; - if ( - object.authority_metadata !== undefined && - object.authority_metadata !== null - ) { - message.authority_metadata = DenomAuthorityMetadata.fromJSON( - object.authority_metadata - ); - } else { - message.authority_metadata = undefined; - } - return message; - }, - - toJSON(message: QueryDenomAuthorityMetadataResponse): unknown { - const obj: any = {}; - message.authority_metadata !== undefined && - (obj.authority_metadata = message.authority_metadata - ? DenomAuthorityMetadata.toJSON(message.authority_metadata) - : undefined); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomAuthorityMetadataResponse { - const message = { - ...baseQueryDenomAuthorityMetadataResponse, - } as QueryDenomAuthorityMetadataResponse; - if ( - object.authority_metadata !== undefined && - object.authority_metadata !== null - ) { - message.authority_metadata = DenomAuthorityMetadata.fromPartial( - object.authority_metadata - ); - } else { - message.authority_metadata = undefined; - } - return message; - }, -}; - -const baseQueryDenomsFromCreatorRequest: object = { creator: "" }; - -export const QueryDenomsFromCreatorRequest = { - encode( - message: QueryDenomsFromCreatorRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.creator !== "") { - writer.uint32(10).string(message.creator); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomsFromCreatorRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomsFromCreatorRequest, - } as QueryDenomsFromCreatorRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomsFromCreatorRequest { - const message = { - ...baseQueryDenomsFromCreatorRequest, - } as QueryDenomsFromCreatorRequest; - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } else { - message.creator = ""; - } - return message; - }, - - toJSON(message: QueryDenomsFromCreatorRequest): unknown { - const obj: any = {}; - message.creator !== undefined && (obj.creator = message.creator); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomsFromCreatorRequest { - const message = { - ...baseQueryDenomsFromCreatorRequest, - } as QueryDenomsFromCreatorRequest; - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } else { - message.creator = ""; - } - return message; - }, -}; - -const baseQueryDenomsFromCreatorResponse: object = { denoms: "" }; - -export const QueryDenomsFromCreatorResponse = { - encode( - message: QueryDenomsFromCreatorResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.denoms) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomsFromCreatorResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomsFromCreatorResponse, - } as QueryDenomsFromCreatorResponse; - message.denoms = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denoms.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomsFromCreatorResponse { - const message = { - ...baseQueryDenomsFromCreatorResponse, - } as QueryDenomsFromCreatorResponse; - message.denoms = []; - if (object.denoms !== undefined && object.denoms !== null) { - for (const e of object.denoms) { - message.denoms.push(String(e)); - } - } - return message; - }, - - toJSON(message: QueryDenomsFromCreatorResponse): unknown { - const obj: any = {}; - if (message.denoms) { - obj.denoms = message.denoms.map((e) => e); - } else { - obj.denoms = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomsFromCreatorResponse { - const message = { - ...baseQueryDenomsFromCreatorResponse, - } as QueryDenomsFromCreatorResponse; - message.denoms = []; - if (object.denoms !== undefined && object.denoms !== null) { - for (const e of object.denoms) { - message.denoms.push(e); - } - } - return message; - }, -}; - -const baseQueryDenomCreationFeeWhitelistRequest: object = {}; - -export const QueryDenomCreationFeeWhitelistRequest = { - encode( - _: QueryDenomCreationFeeWhitelistRequest, - writer: Writer = Writer.create() - ): Writer { - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomCreationFeeWhitelistRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomCreationFeeWhitelistRequest, - } as QueryDenomCreationFeeWhitelistRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryDenomCreationFeeWhitelistRequest { - const message = { - ...baseQueryDenomCreationFeeWhitelistRequest, - } as QueryDenomCreationFeeWhitelistRequest; - return message; - }, - - toJSON(_: QueryDenomCreationFeeWhitelistRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial - ): QueryDenomCreationFeeWhitelistRequest { - const message = { - ...baseQueryDenomCreationFeeWhitelistRequest, - } as QueryDenomCreationFeeWhitelistRequest; - return message; - }, -}; - -const baseQueryDenomCreationFeeWhitelistResponse: object = { creators: "" }; - -export const QueryDenomCreationFeeWhitelistResponse = { - encode( - message: QueryDenomCreationFeeWhitelistResponse, - writer: Writer = Writer.create() - ): Writer { - for (const v of message.creators) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryDenomCreationFeeWhitelistResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryDenomCreationFeeWhitelistResponse, - } as QueryDenomCreationFeeWhitelistResponse; - message.creators = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creators.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryDenomCreationFeeWhitelistResponse { - const message = { - ...baseQueryDenomCreationFeeWhitelistResponse, - } as QueryDenomCreationFeeWhitelistResponse; - message.creators = []; - if (object.creators !== undefined && object.creators !== null) { - for (const e of object.creators) { - message.creators.push(String(e)); - } - } - return message; - }, - - toJSON(message: QueryDenomCreationFeeWhitelistResponse): unknown { - const obj: any = {}; - if (message.creators) { - obj.creators = message.creators.map((e) => e); - } else { - obj.creators = []; - } - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryDenomCreationFeeWhitelistResponse { - const message = { - ...baseQueryDenomCreationFeeWhitelistResponse, - } as QueryDenomCreationFeeWhitelistResponse; - message.creators = []; - if (object.creators !== undefined && object.creators !== null) { - for (const e of object.creators) { - message.creators.push(e); - } - } - return message; - }, -}; - -const baseQueryCreatorInDenomFeeWhitelistRequest: object = { creator: "" }; - -export const QueryCreatorInDenomFeeWhitelistRequest = { - encode( - message: QueryCreatorInDenomFeeWhitelistRequest, - writer: Writer = Writer.create() - ): Writer { - if (message.creator !== "") { - writer.uint32(10).string(message.creator); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryCreatorInDenomFeeWhitelistRequest { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryCreatorInDenomFeeWhitelistRequest, - } as QueryCreatorInDenomFeeWhitelistRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryCreatorInDenomFeeWhitelistRequest { - const message = { - ...baseQueryCreatorInDenomFeeWhitelistRequest, - } as QueryCreatorInDenomFeeWhitelistRequest; - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } else { - message.creator = ""; - } - return message; - }, - - toJSON(message: QueryCreatorInDenomFeeWhitelistRequest): unknown { - const obj: any = {}; - message.creator !== undefined && (obj.creator = message.creator); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryCreatorInDenomFeeWhitelistRequest { - const message = { - ...baseQueryCreatorInDenomFeeWhitelistRequest, - } as QueryCreatorInDenomFeeWhitelistRequest; - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } else { - message.creator = ""; - } - return message; - }, -}; - -const baseQueryCreatorInDenomFeeWhitelistResponse: object = { - whitelisted: false, -}; - -export const QueryCreatorInDenomFeeWhitelistResponse = { - encode( - message: QueryCreatorInDenomFeeWhitelistResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.whitelisted === true) { - writer.uint32(8).bool(message.whitelisted); - } - return writer; - }, - - decode( - input: Reader | Uint8Array, - length?: number - ): QueryCreatorInDenomFeeWhitelistResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryCreatorInDenomFeeWhitelistResponse, - } as QueryCreatorInDenomFeeWhitelistResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.whitelisted = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryCreatorInDenomFeeWhitelistResponse { - const message = { - ...baseQueryCreatorInDenomFeeWhitelistResponse, - } as QueryCreatorInDenomFeeWhitelistResponse; - if (object.whitelisted !== undefined && object.whitelisted !== null) { - message.whitelisted = Boolean(object.whitelisted); - } else { - message.whitelisted = false; - } - return message; - }, - - toJSON(message: QueryCreatorInDenomFeeWhitelistResponse): unknown { - const obj: any = {}; - message.whitelisted !== undefined && - (obj.whitelisted = message.whitelisted); - return obj; - }, - - fromPartial( - object: DeepPartial - ): QueryCreatorInDenomFeeWhitelistResponse { - const message = { - ...baseQueryCreatorInDenomFeeWhitelistResponse, - } as QueryCreatorInDenomFeeWhitelistResponse; - if (object.whitelisted !== undefined && object.whitelisted !== null) { - message.whitelisted = object.whitelisted; - } else { - message.whitelisted = false; - } - return message; - }, -}; - -/** Query defines the gRPC querier service. */ -export interface Query { - /** - * Params defines a gRPC query method that returns the tokenfactory module's - * parameters. - */ - Params(request: QueryParamsRequest): Promise; - /** - * DenomAuthorityMetadata defines a gRPC query method for fetching - * DenomAuthorityMetadata for a particular denom. - */ - DenomAuthorityMetadata( - request: QueryDenomAuthorityMetadataRequest - ): Promise; - /** - * DenomsFromCreator defines a gRPC query method for fetching all - * denominations created by a specific admin/creator. - */ - DenomsFromCreator( - request: QueryDenomsFromCreatorRequest - ): Promise; - /** - * DenomCreationFeeWhitelist defines a gRPC query method for fetching all - * creators who are whitelisted from paying the denom creation fee. - */ - DenomCreationFeeWhitelist( - request: QueryDenomCreationFeeWhitelistRequest - ): Promise; - /** - * CreatorInDenomFeeWhitelist defines a gRPC query method for fetching - * whether a creator is whitelisted from denom creation fees. - */ - CreatorInDenomFeeWhitelist( - request: QueryCreatorInDenomFeeWhitelistRequest - ): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.tokenfactory.Query", - "Params", - data - ); - return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); - } - - DenomAuthorityMetadata( - request: QueryDenomAuthorityMetadataRequest - ): Promise { - const data = QueryDenomAuthorityMetadataRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.tokenfactory.Query", - "DenomAuthorityMetadata", - data - ); - return promise.then((data) => - QueryDenomAuthorityMetadataResponse.decode(new Reader(data)) - ); - } - - DenomsFromCreator( - request: QueryDenomsFromCreatorRequest - ): Promise { - const data = QueryDenomsFromCreatorRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.tokenfactory.Query", - "DenomsFromCreator", - data - ); - return promise.then((data) => - QueryDenomsFromCreatorResponse.decode(new Reader(data)) - ); - } - - DenomCreationFeeWhitelist( - request: QueryDenomCreationFeeWhitelistRequest - ): Promise { - const data = QueryDenomCreationFeeWhitelistRequest.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.tokenfactory.Query", - "DenomCreationFeeWhitelist", - data - ); - return promise.then((data) => - QueryDenomCreationFeeWhitelistResponse.decode(new Reader(data)) - ); - } - - CreatorInDenomFeeWhitelist( - request: QueryCreatorInDenomFeeWhitelistRequest - ): Promise { - const data = QueryCreatorInDenomFeeWhitelistRequest.encode( - request - ).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.tokenfactory.Query", - "CreatorInDenomFeeWhitelist", - data - ); - return promise.then((data) => - QueryCreatorInDenomFeeWhitelistResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/tx.d.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/tx.d.ts deleted file mode 100644 index befa3a4ca3..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/tx.d.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "seiprotocol.seichain.tokenfactory"; -/** - * MsgCreateDenom defines the message structure for the CreateDenom gRPC service - * method. It allows an account to create a new denom. It requires a sender - * address and a sub denomination. The (sender_address, sub_denomination) tuple - * must be unique and cannot be re-used. - * - * The resulting denom created is defined as - * . The resulting denom's admin is - * originally set to be the creator, but this can be changed later. The token - * denom does not indicate the current admin. - */ -export interface MsgCreateDenom { - sender: string; - /** subdenom can be up to 44 "alphanumeric" characters long. */ - subdenom: string; -} -/** - * MsgCreateDenomResponse is the return value of MsgCreateDenom - * It returns the full string of the newly created denom - */ -export interface MsgCreateDenomResponse { - newTokenDenom: string; -} -/** - * MsgMint is the sdk.Msg type for allowing an admin account to mint - * more of a token. For now, we only support minting to the sender account - */ -export interface MsgMint { - sender: string; - amount: Coin | undefined; -} -export interface MsgMintResponse { -} -/** - * MsgBurn is the sdk.Msg type for allowing an admin account to burn - * a token. For now, we only support burning from the sender account. - */ -export interface MsgBurn { - sender: string; - amount: Coin | undefined; -} -export interface MsgBurnResponse { -} -/** - * MsgChangeAdmin is the sdk.Msg type for allowing an admin account to reassign - * adminship of a denom to a new account - */ -export interface MsgChangeAdmin { - sender: string; - denom: string; - newAdmin: string; -} -/** - * MsgChangeAdminResponse defines the response structure for an executed - * MsgChangeAdmin message. - */ -export interface MsgChangeAdminResponse { -} -export declare const MsgCreateDenom: { - encode(message: MsgCreateDenom, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgCreateDenom; - fromJSON(object: any): MsgCreateDenom; - toJSON(message: MsgCreateDenom): unknown; - fromPartial(object: DeepPartial): MsgCreateDenom; -}; -export declare const MsgCreateDenomResponse: { - encode(message: MsgCreateDenomResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgCreateDenomResponse; - fromJSON(object: any): MsgCreateDenomResponse; - toJSON(message: MsgCreateDenomResponse): unknown; - fromPartial(object: DeepPartial): MsgCreateDenomResponse; -}; -export declare const MsgMint: { - encode(message: MsgMint, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgMint; - fromJSON(object: any): MsgMint; - toJSON(message: MsgMint): unknown; - fromPartial(object: DeepPartial): MsgMint; -}; -export declare const MsgMintResponse: { - encode(_: MsgMintResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgMintResponse; - fromJSON(_: any): MsgMintResponse; - toJSON(_: MsgMintResponse): unknown; - fromPartial(_: DeepPartial): MsgMintResponse; -}; -export declare const MsgBurn: { - encode(message: MsgBurn, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgBurn; - fromJSON(object: any): MsgBurn; - toJSON(message: MsgBurn): unknown; - fromPartial(object: DeepPartial): MsgBurn; -}; -export declare const MsgBurnResponse: { - encode(_: MsgBurnResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgBurnResponse; - fromJSON(_: any): MsgBurnResponse; - toJSON(_: MsgBurnResponse): unknown; - fromPartial(_: DeepPartial): MsgBurnResponse; -}; -export declare const MsgChangeAdmin: { - encode(message: MsgChangeAdmin, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgChangeAdmin; - fromJSON(object: any): MsgChangeAdmin; - toJSON(message: MsgChangeAdmin): unknown; - fromPartial(object: DeepPartial): MsgChangeAdmin; -}; -export declare const MsgChangeAdminResponse: { - encode(_: MsgChangeAdminResponse, writer?: Writer): Writer; - decode(input: Reader | Uint8Array, length?: number): MsgChangeAdminResponse; - fromJSON(_: any): MsgChangeAdminResponse; - toJSON(_: MsgChangeAdminResponse): unknown; - fromPartial(_: DeepPartial): MsgChangeAdminResponse; -}; -/** Msg defines the tokefactory module's gRPC message service. */ -export interface Msg { - CreateDenom(request: MsgCreateDenom): Promise; - Mint(request: MsgMint): Promise; - Burn(request: MsgBurn): Promise; - ChangeAdmin(request: MsgChangeAdmin): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - CreateDenom(request: MsgCreateDenom): Promise; - Mint(request: MsgMint): Promise; - Burn(request: MsgBurn): Promise; - ChangeAdmin(request: MsgChangeAdmin): Promise; -} -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | undefined; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/tx.js b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/tx.js deleted file mode 100644 index 38838260a2..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/tx.js +++ /dev/null @@ -1,478 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../cosmos/base/v1beta1/coin"; -export const protobufPackage = "seiprotocol.seichain.tokenfactory"; -const baseMsgCreateDenom = { sender: "", subdenom: "" }; -export const MsgCreateDenom = { - encode(message, writer = Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.subdenom !== "") { - writer.uint32(18).string(message.subdenom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgCreateDenom }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.subdenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgCreateDenom }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.subdenom !== undefined && object.subdenom !== null) { - message.subdenom = String(object.subdenom); - } - else { - message.subdenom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.subdenom !== undefined && (obj.subdenom = message.subdenom); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgCreateDenom }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.subdenom !== undefined && object.subdenom !== null) { - message.subdenom = object.subdenom; - } - else { - message.subdenom = ""; - } - return message; - }, -}; -const baseMsgCreateDenomResponse = { newTokenDenom: "" }; -export const MsgCreateDenomResponse = { - encode(message, writer = Writer.create()) { - if (message.newTokenDenom !== "") { - writer.uint32(10).string(message.newTokenDenom); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgCreateDenomResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.newTokenDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgCreateDenomResponse }; - if (object.newTokenDenom !== undefined && object.newTokenDenom !== null) { - message.newTokenDenom = String(object.newTokenDenom); - } - else { - message.newTokenDenom = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.newTokenDenom !== undefined && - (obj.newTokenDenom = message.newTokenDenom); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgCreateDenomResponse }; - if (object.newTokenDenom !== undefined && object.newTokenDenom !== null) { - message.newTokenDenom = object.newTokenDenom; - } - else { - message.newTokenDenom = ""; - } - return message; - }, -}; -const baseMsgMint = { sender: "" }; -export const MsgMint = { - encode(message, writer = Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgMint }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgMint }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgMint }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, -}; -const baseMsgMintResponse = {}; -export const MsgMintResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgMintResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgMintResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgMintResponse }; - return message; - }, -}; -const baseMsgBurn = { sender: "" }; -export const MsgBurn = { - encode(message, writer = Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgBurn }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgBurn }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgBurn }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } - else { - message.amount = undefined; - } - return message; - }, -}; -const baseMsgBurnResponse = {}; -export const MsgBurnResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgBurnResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgBurnResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgBurnResponse }; - return message; - }, -}; -const baseMsgChangeAdmin = { sender: "", denom: "", newAdmin: "" }; -export const MsgChangeAdmin = { - encode(message, writer = Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.denom !== "") { - writer.uint32(18).string(message.denom); - } - if (message.newAdmin !== "") { - writer.uint32(26).string(message.newAdmin); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChangeAdmin }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - case 3: - message.newAdmin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = { ...baseMsgChangeAdmin }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } - else { - message.denom = ""; - } - if (object.newAdmin !== undefined && object.newAdmin !== null) { - message.newAdmin = String(object.newAdmin); - } - else { - message.newAdmin = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.denom !== undefined && (obj.denom = message.denom); - message.newAdmin !== undefined && (obj.newAdmin = message.newAdmin); - return obj; - }, - fromPartial(object) { - const message = { ...baseMsgChangeAdmin }; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } - else { - message.denom = ""; - } - if (object.newAdmin !== undefined && object.newAdmin !== null) { - message.newAdmin = object.newAdmin; - } - else { - message.newAdmin = ""; - } - return message; - }, -}; -const baseMsgChangeAdminResponse = {}; -export const MsgChangeAdminResponse = { - encode(_, writer = Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChangeAdminResponse }; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = { ...baseMsgChangeAdminResponse }; - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = { ...baseMsgChangeAdminResponse }; - return message; - }, -}; -export class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - } - CreateDenom(request) { - const data = MsgCreateDenom.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.tokenfactory.Msg", "CreateDenom", data); - return promise.then((data) => MsgCreateDenomResponse.decode(new Reader(data))); - } - Mint(request) { - const data = MsgMint.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.tokenfactory.Msg", "Mint", data); - return promise.then((data) => MsgMintResponse.decode(new Reader(data))); - } - Burn(request) { - const data = MsgBurn.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.tokenfactory.Msg", "Burn", data); - return promise.then((data) => MsgBurnResponse.decode(new Reader(data))); - } - ChangeAdmin(request) { - const data = MsgChangeAdmin.encode(request).finish(); - const promise = this.rpc.request("seiprotocol.seichain.tokenfactory.Msg", "ChangeAdmin", data); - return promise.then((data) => MsgChangeAdminResponse.decode(new Reader(data))); - } -} diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/tx.ts b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/tx.ts deleted file mode 100644 index 004114cc51..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/module/types/tokenfactory/tx.ts +++ /dev/null @@ -1,633 +0,0 @@ -/* eslint-disable */ -import { Reader, Writer } from "protobufjs/minimal"; -import { Coin } from "../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "seiprotocol.seichain.tokenfactory"; - -/** - * MsgCreateDenom defines the message structure for the CreateDenom gRPC service - * method. It allows an account to create a new denom. It requires a sender - * address and a sub denomination. The (sender_address, sub_denomination) tuple - * must be unique and cannot be re-used. - * - * The resulting denom created is defined as - * . The resulting denom's admin is - * originally set to be the creator, but this can be changed later. The token - * denom does not indicate the current admin. - */ -export interface MsgCreateDenom { - sender: string; - /** subdenom can be up to 44 "alphanumeric" characters long. */ - subdenom: string; -} - -/** - * MsgCreateDenomResponse is the return value of MsgCreateDenom - * It returns the full string of the newly created denom - */ -export interface MsgCreateDenomResponse { - new_token_denom: string; -} - -/** - * MsgMint is the sdk.Msg type for allowing an admin account to mint - * more of a token. For now, we only support minting to the sender account - */ -export interface MsgMint { - sender: string; - amount: Coin | undefined; -} - -export interface MsgMintResponse {} - -/** - * MsgBurn is the sdk.Msg type for allowing an admin account to burn - * a token. For now, we only support burning from the sender account. - */ -export interface MsgBurn { - sender: string; - amount: Coin | undefined; -} - -export interface MsgBurnResponse {} - -/** - * MsgChangeAdmin is the sdk.Msg type for allowing an admin account to reassign - * adminship of a denom to a new account - */ -export interface MsgChangeAdmin { - sender: string; - denom: string; - new_admin: string; -} - -/** - * MsgChangeAdminResponse defines the response structure for an executed - * MsgChangeAdmin message. - */ -export interface MsgChangeAdminResponse {} - -const baseMsgCreateDenom: object = { sender: "", subdenom: "" }; - -export const MsgCreateDenom = { - encode(message: MsgCreateDenom, writer: Writer = Writer.create()): Writer { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.subdenom !== "") { - writer.uint32(18).string(message.subdenom); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgCreateDenom { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgCreateDenom } as MsgCreateDenom; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.subdenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgCreateDenom { - const message = { ...baseMsgCreateDenom } as MsgCreateDenom; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if (object.subdenom !== undefined && object.subdenom !== null) { - message.subdenom = String(object.subdenom); - } else { - message.subdenom = ""; - } - return message; - }, - - toJSON(message: MsgCreateDenom): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.subdenom !== undefined && (obj.subdenom = message.subdenom); - return obj; - }, - - fromPartial(object: DeepPartial): MsgCreateDenom { - const message = { ...baseMsgCreateDenom } as MsgCreateDenom; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if (object.subdenom !== undefined && object.subdenom !== null) { - message.subdenom = object.subdenom; - } else { - message.subdenom = ""; - } - return message; - }, -}; - -const baseMsgCreateDenomResponse: object = { new_token_denom: "" }; - -export const MsgCreateDenomResponse = { - encode( - message: MsgCreateDenomResponse, - writer: Writer = Writer.create() - ): Writer { - if (message.new_token_denom !== "") { - writer.uint32(10).string(message.new_token_denom); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgCreateDenomResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgCreateDenomResponse } as MsgCreateDenomResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.new_token_denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgCreateDenomResponse { - const message = { ...baseMsgCreateDenomResponse } as MsgCreateDenomResponse; - if ( - object.new_token_denom !== undefined && - object.new_token_denom !== null - ) { - message.new_token_denom = String(object.new_token_denom); - } else { - message.new_token_denom = ""; - } - return message; - }, - - toJSON(message: MsgCreateDenomResponse): unknown { - const obj: any = {}; - message.new_token_denom !== undefined && - (obj.new_token_denom = message.new_token_denom); - return obj; - }, - - fromPartial( - object: DeepPartial - ): MsgCreateDenomResponse { - const message = { ...baseMsgCreateDenomResponse } as MsgCreateDenomResponse; - if ( - object.new_token_denom !== undefined && - object.new_token_denom !== null - ) { - message.new_token_denom = object.new_token_denom; - } else { - message.new_token_denom = ""; - } - return message; - }, -}; - -const baseMsgMint: object = { sender: "" }; - -export const MsgMint = { - encode(message: MsgMint, writer: Writer = Writer.create()): Writer { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgMint { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgMint } as MsgMint; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgMint { - const message = { ...baseMsgMint } as MsgMint; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } else { - message.amount = undefined; - } - return message; - }, - - toJSON(message: MsgMint): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgMint { - const message = { ...baseMsgMint } as MsgMint; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } else { - message.amount = undefined; - } - return message; - }, -}; - -const baseMsgMintResponse: object = {}; - -export const MsgMintResponse = { - encode(_: MsgMintResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgMintResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgMintResponse } as MsgMintResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgMintResponse { - const message = { ...baseMsgMintResponse } as MsgMintResponse; - return message; - }, - - toJSON(_: MsgMintResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgMintResponse { - const message = { ...baseMsgMintResponse } as MsgMintResponse; - return message; - }, -}; - -const baseMsgBurn: object = { sender: "" }; - -export const MsgBurn = { - encode(message: MsgBurn, writer: Writer = Writer.create()): Writer { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgBurn { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgBurn } as MsgBurn; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgBurn { - const message = { ...baseMsgBurn } as MsgBurn; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromJSON(object.amount); - } else { - message.amount = undefined; - } - return message; - }, - - toJSON(message: MsgBurn): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): MsgBurn { - const message = { ...baseMsgBurn } as MsgBurn; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if (object.amount !== undefined && object.amount !== null) { - message.amount = Coin.fromPartial(object.amount); - } else { - message.amount = undefined; - } - return message; - }, -}; - -const baseMsgBurnResponse: object = {}; - -export const MsgBurnResponse = { - encode(_: MsgBurnResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgBurnResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgBurnResponse } as MsgBurnResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgBurnResponse { - const message = { ...baseMsgBurnResponse } as MsgBurnResponse; - return message; - }, - - toJSON(_: MsgBurnResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgBurnResponse { - const message = { ...baseMsgBurnResponse } as MsgBurnResponse; - return message; - }, -}; - -const baseMsgChangeAdmin: object = { sender: "", denom: "", new_admin: "" }; - -export const MsgChangeAdmin = { - encode(message: MsgChangeAdmin, writer: Writer = Writer.create()): Writer { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.denom !== "") { - writer.uint32(18).string(message.denom); - } - if (message.new_admin !== "") { - writer.uint32(26).string(message.new_admin); - } - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgChangeAdmin { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChangeAdmin } as MsgChangeAdmin; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - case 3: - message.new_admin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgChangeAdmin { - const message = { ...baseMsgChangeAdmin } as MsgChangeAdmin; - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } else { - message.sender = ""; - } - if (object.denom !== undefined && object.denom !== null) { - message.denom = String(object.denom); - } else { - message.denom = ""; - } - if (object.new_admin !== undefined && object.new_admin !== null) { - message.new_admin = String(object.new_admin); - } else { - message.new_admin = ""; - } - return message; - }, - - toJSON(message: MsgChangeAdmin): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.denom !== undefined && (obj.denom = message.denom); - message.new_admin !== undefined && (obj.new_admin = message.new_admin); - return obj; - }, - - fromPartial(object: DeepPartial): MsgChangeAdmin { - const message = { ...baseMsgChangeAdmin } as MsgChangeAdmin; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } else { - message.sender = ""; - } - if (object.denom !== undefined && object.denom !== null) { - message.denom = object.denom; - } else { - message.denom = ""; - } - if (object.new_admin !== undefined && object.new_admin !== null) { - message.new_admin = object.new_admin; - } else { - message.new_admin = ""; - } - return message; - }, -}; - -const baseMsgChangeAdminResponse: object = {}; - -export const MsgChangeAdminResponse = { - encode(_: MsgChangeAdminResponse, writer: Writer = Writer.create()): Writer { - return writer; - }, - - decode(input: Reader | Uint8Array, length?: number): MsgChangeAdminResponse { - const reader = input instanceof Uint8Array ? new Reader(input) : input; - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgChangeAdminResponse } as MsgChangeAdminResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgChangeAdminResponse { - const message = { ...baseMsgChangeAdminResponse } as MsgChangeAdminResponse; - return message; - }, - - toJSON(_: MsgChangeAdminResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgChangeAdminResponse { - const message = { ...baseMsgChangeAdminResponse } as MsgChangeAdminResponse; - return message; - }, -}; - -/** Msg defines the tokefactory module's gRPC message service. */ -export interface Msg { - CreateDenom(request: MsgCreateDenom): Promise; - Mint(request: MsgMint): Promise; - Burn(request: MsgBurn): Promise; - ChangeAdmin(request: MsgChangeAdmin): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - } - CreateDenom(request: MsgCreateDenom): Promise { - const data = MsgCreateDenom.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.tokenfactory.Msg", - "CreateDenom", - data - ); - return promise.then((data) => - MsgCreateDenomResponse.decode(new Reader(data)) - ); - } - - Mint(request: MsgMint): Promise { - const data = MsgMint.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.tokenfactory.Msg", - "Mint", - data - ); - return promise.then((data) => MsgMintResponse.decode(new Reader(data))); - } - - Burn(request: MsgBurn): Promise { - const data = MsgBurn.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.tokenfactory.Msg", - "Burn", - data - ); - return promise.then((data) => MsgBurnResponse.decode(new Reader(data))); - } - - ChangeAdmin(request: MsgChangeAdmin): Promise { - const data = MsgChangeAdmin.encode(request).finish(); - const promise = this.rpc.request( - "seiprotocol.seichain.tokenfactory.Msg", - "ChangeAdmin", - data - ); - return promise.then((data) => - MsgChangeAdminResponse.decode(new Reader(data)) - ); - } -} - -interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/package.json b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/package.json deleted file mode 100755 index 97a5dccc61..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "seiprotocol-seichain-tokenfactory-js", - "version": "0.1.0", - "description": "Autogenerated vuex store for Cosmos module seiprotocol.seichain.tokenfactory", - "author": "Starport Codegen ", - "homepage": "http://github.com/sei-protocol/sei-chain/x/tokenfactory/types", - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "index.js", - "publishConfig": { - "access": "public" - } -} \ No newline at end of file diff --git a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/vuex-root b/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/vuex-root deleted file mode 100755 index 0fcc121a15..0000000000 --- a/vue/src/store/generated/sei-protocol/sei-chain/seiprotocol.seichain.tokenfactory/vuex-root +++ /dev/null @@ -1 +0,0 @@ -THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. From 47a578b557afde6f15f2019e9dba5a0c39ff6939 Mon Sep 17 00:00:00 2001 From: Jeremy Wei Date: Wed, 13 Nov 2024 15:36:47 -0500 Subject: [PATCH 15/33] EIP-1559 - exclude cosmos txs from base fee calculation (#1930) * exclude cosmos txs from base fee calculation * cleanup --- app/app.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/app.go b/app/app.go index 04aeddce06..5332841316 100644 --- a/app/app.go +++ b/app/app.go @@ -1605,15 +1605,17 @@ func (app *App) ProcessBlock(ctx sdk.Context, txs [][]byte, req BlockProcessRequ lazyWriteEvents := app.BankKeeper.WriteDeferredBalances(ctx) events = append(events, lazyWriteEvents...) - // Sum up total used per block - blockTotalGasUsed := int64(0) + // Sum up total used per block only for evm transactions + evmTotalGasUsed := int64(0) for _, txResult := range txResults { - blockTotalGasUsed += txResult.GasUsed + if txResult.EvmTxInfo != nil { + evmTotalGasUsed += txResult.GasUsed + } } endBlockResp := app.EndBlock(ctx, abci.RequestEndBlock{ Height: req.GetHeight(), - BlockGasUsed: blockTotalGasUsed, + BlockGasUsed: evmTotalGasUsed, }) events = append(events, endBlockResp.Events...) From de63e754a6c518b5256fa44302b0d9cc4175de10 Mon Sep 17 00:00:00 2001 From: Jeremy Wei Date: Sun, 17 Nov 2024 08:55:52 -0500 Subject: [PATCH 16/33] bug fix: eth_getLogs missing events from early return (#1941) * change return for EffectiveGas=0 to continue * simplify * add a unit test * cleanup * cleanup --- evmrpc/block_test.go | 8 ++++-- evmrpc/filter.go | 6 +---- evmrpc/filter_test.go | 33 +++++++++++++++++++----- evmrpc/setup_test.go | 59 ++++++++++++++++++++++++++++++++----------- 4 files changed, 77 insertions(+), 29 deletions(-) diff --git a/evmrpc/block_test.go b/evmrpc/block_test.go index 5a96781267..2082f8b47b 100644 --- a/evmrpc/block_test.go +++ b/evmrpc/block_test.go @@ -80,7 +80,7 @@ func TestGetBlockReceipts(t *testing.T) { // Query by block height resObj := sendRequestGood(t, "getBlockReceipts", "0x2") result := resObj["result"].([]interface{}) - require.Equal(t, 6, len(result)) + require.Equal(t, 5, len(result)) receipt1 := result[0].(map[string]interface{}) require.Equal(t, "0x2", receipt1["blockNumber"]) require.Equal(t, "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", receipt1["transactionHash"]) @@ -91,10 +91,14 @@ func TestGetBlockReceipts(t *testing.T) { require.Equal(t, "0x2", receipt3["blockNumber"]) require.Equal(t, "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", receipt3["transactionHash"]) + resObjSei := sendSeiRequestGood(t, "getBlockReceipts", "0x2") + result = resObjSei["result"].([]interface{}) + require.Equal(t, 6, len(result)) + // Query by block hash resObj2 := sendRequestGood(t, "getBlockReceipts", "0x0000000000000000000000000000000000000000000000000000000000000002") result = resObj2["result"].([]interface{}) - require.Equal(t, 6, len(result)) + require.Equal(t, 5, len(result)) receipt1 = result[0].(map[string]interface{}) require.Equal(t, "0x2", receipt1["blockNumber"]) require.Equal(t, "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", receipt1["transactionHash"]) diff --git a/evmrpc/filter.go b/evmrpc/filter.go index bf5cdab9ab..9bda11057e 100644 --- a/evmrpc/filter.go +++ b/evmrpc/filter.go @@ -372,13 +372,9 @@ func (f *LogFetcher) FindLogsByBloom(height int64, filters [][]bloomIndexes) (re ctx.Logger().Error(fmt.Sprintf("FindLogsByBloom: unable to find receipt for hash %s", hash.Hex())) continue } - // if includeShellReceipts is false, include receipts with synthetic logs but exclude shell tx receipts - if !f.includeSyntheticReceipts && receipt.TxType == ShellEVMTxType { + if !f.includeSyntheticReceipts && (receipt.TxType == ShellEVMTxType || receipt.EffectiveGasPrice == 0) { continue } - if !f.includeSyntheticReceipts && receipt.EffectiveGasPrice == 0 { - return - } if len(receipt.LogsBloom) > 0 && MatchFilters(ethtypes.Bloom(receipt.LogsBloom), filters) { res = append(res, keeper.GetLogsForTx(receipt)...) } diff --git a/evmrpc/filter_test.go b/evmrpc/filter_test.go index 8fa73c77b3..49570d3ff5 100644 --- a/evmrpc/filter_test.go +++ b/evmrpc/filter_test.go @@ -130,9 +130,11 @@ func getCommonFilterLogTests() []GetFilterLogTests { wantLen: 4, }, { - name: "filter by single topic with default range", - topics: [][]common.Hash{{common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111111")}}, - wantErr: false, + name: "filter by single topic with block range", + fromBlock: "0x8", + toBlock: "0x8", + topics: [][]common.Hash{{common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111111")}}, + wantErr: false, check: func(t *testing.T, log map[string]interface{}) { require.Equal(t, "0x1111111111111111111111111111111111111111111111111111111111111111", log["topics"].([]interface{})[0].(string)) }, @@ -192,7 +194,7 @@ func TestFilterGetLogs(t *testing.T) { testFilterGetLogs(t, "eth", getCommonFilterLogTests()) } -func TestSeiFilterGetLogs(t *testing.T) { +func TestFilterSeiGetLogs(t *testing.T) { // make sure we pass all the eth_ namespace tests testFilterGetLogs(t, "sei", getCommonFilterLogTests()) @@ -221,10 +223,10 @@ func TestSeiFilterGetLogs(t *testing.T) { }) } -func TestEthEndpointCanReturnSyntheticLogs(t *testing.T) { +func TestFilterEthEndpointCanReturnSyntheticLogs(t *testing.T) { testFilterGetLogs(t, "eth", []GetFilterLogTests{ { - name: "filter by single topic with default range, exclude synethetic logs", + name: "filter by single topic with default range, still include synthetic logs", topics: [][]common.Hash{{common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000234")}}, wantErr: false, check: func(t *testing.T, log map[string]interface{}) { @@ -235,6 +237,23 @@ func TestEthEndpointCanReturnSyntheticLogs(t *testing.T) { }) } +func TestFilterEthEndpointReturnsNormalEvmLogEvenIfSyntheticLogIsInSameBlock(t *testing.T) { + testFilterGetLogs(t, "eth", []GetFilterLogTests{ + { + name: "normal evm log is returned even if synthetic log is in the same block", + fromBlock: "0x64", // 100 + toBlock: "0x64", + wantErr: false, + check: func(t *testing.T, log map[string]interface{}) { + // check that none of the events have the synthetic hash + syntheticHash := multiTxBlockSynthTx.Hash() + require.NotEqual(t, syntheticHash.Hex(), log["transactionHash"].(string)) + }, + wantLen: 2, + }, + }) +} + func testFilterGetLogs(t *testing.T, namespace string, tests []GetFilterLogTests) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -283,7 +302,7 @@ func TestFilterGetFilterLogs(t *testing.T) { resObj = sendRequest(t, TestPort, "getFilterLogs", filterId) logs := resObj["result"].([]interface{}) - require.Equal(t, 7, len(logs)) + require.Equal(t, 6, len(logs)) for _, log := range logs { logObj := log.(map[string]interface{}) require.Equal(t, "0x2", logObj["blockNumber"].(string)) diff --git a/evmrpc/setup_test.go b/evmrpc/setup_test.go index 635b2f91dc..0c8d74e2af 100644 --- a/evmrpc/setup_test.go +++ b/evmrpc/setup_test.go @@ -50,6 +50,7 @@ const TestBadPort = 7779 const MockHeight = 8 const MultiTxBlockHeight = 2 const DebugTraceMockHeight = 101 +const SyntheticBlockHeight = 100 var DebugTraceHashHex = "0x1234567890123456789023456789012345678901234567890123456789000004" var DebugTraceBlockHash = "BE17E0261E539CB7E9A91E123A6D794E0163D656FCF9B8EAC07823F7ED28512B" @@ -167,6 +168,26 @@ func (c *MockClient) mockBlock(height int64) *coretypes.ResultBlock { }, } } + if height == SyntheticBlockHeight { + return &coretypes.ResultBlock{ + BlockID: MockBlockID, + Block: &tmtypes.Block{ + Header: mockBlockHeader(height), + Data: tmtypes.Data{ + Txs: []tmtypes.Tx{ + func() []byte { + bz, _ := Encoder(MultiTxBlockSynthTx) + return bz + }(), + func() []byte { + bz, _ := Encoder(MultiTxBlockTx1) + return bz + }(), + }, + }, + }, + } + } res := &coretypes.ResultBlock{ BlockID: MockBlockID, Block: &tmtypes.Block{ @@ -576,7 +597,7 @@ func generateTxData() { From: "0x1234567890123456789012345678901234567890", To: "0x1234567890123456789012345678901234567890", TransactionIndex: 0, - BlockNumber: 8, + BlockNumber: MockHeight, TxType: 1, ContractAddress: "0x1234567890123456789012345678901234567890", CumulativeGasUsed: 123, @@ -679,7 +700,8 @@ func setupLogs() { common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000123"), }, }}}}) - EVMKeeper.MockReceipt(Ctx, multiTxBlockTx1.Hash(), &types.Receipt{ + CtxMultiTx := Ctx.WithBlockHeight(MultiTxBlockHeight) + EVMKeeper.MockReceipt(CtxMultiTx, multiTxBlockTx1.Hash(), &types.Receipt{ BlockNumber: MultiTxBlockHeight, TransactionIndex: 1, // start at 1 bc 0 is the non-evm tx TxHashHex: multiTxBlockTx1.Hash().Hex(), @@ -700,7 +722,7 @@ func setupLogs() { common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000456"), }, }}}}) - EVMKeeper.MockReceipt(Ctx, multiTxBlockTx2.Hash(), &types.Receipt{ + EVMKeeper.MockReceipt(CtxMultiTx, multiTxBlockTx2.Hash(), &types.Receipt{ BlockNumber: MultiTxBlockHeight, TransactionIndex: 3, TxHashHex: multiTxBlockTx2.Hash().Hex(), @@ -718,7 +740,7 @@ func setupLogs() { common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000456"), }, }}}}) - EVMKeeper.MockReceipt(Ctx, multiTxBlockTx3.Hash(), &types.Receipt{ + EVMKeeper.MockReceipt(CtxMultiTx, multiTxBlockTx3.Hash(), &types.Receipt{ BlockNumber: MultiTxBlockHeight, TransactionIndex: 4, TxHashHex: multiTxBlockTx3.Hash().Hex(), @@ -736,9 +758,10 @@ func setupLogs() { common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000456"), }, }}}}) - EVMKeeper.MockReceipt(Ctx, multiTxBlockTx4.Hash(), &types.Receipt{ + CtxMock := Ctx.WithBlockHeight(MockHeight) + EVMKeeper.MockReceipt(CtxMock, multiTxBlockTx4.Hash(), &types.Receipt{ BlockNumber: MockHeight, - TransactionIndex: 0, + TransactionIndex: 1, TxHashHex: multiTxBlockTx4.Hash().Hex(), LogsBloom: bloom4[:], Logs: []*types.Log{{ @@ -755,9 +778,10 @@ func setupLogs() { common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000456"), }, }}}}) - EVMKeeper.MockReceipt(Ctx, multiTxBlockSynthTx.Hash(), &types.Receipt{ - BlockNumber: MultiTxBlockHeight, - TransactionIndex: 5, + EVMKeeper.MockReceipt(CtxMock, multiTxBlockSynthTx.Hash(), &types.Receipt{ + TxType: evmrpc.ShellEVMTxType, + BlockNumber: MockHeight, + TransactionIndex: 0, TxHashHex: multiTxBlockSynthTx.Hash().Hex(), LogsBloom: bloomSynth[:], Logs: []*types.Log{{ @@ -765,16 +789,17 @@ func setupLogs() { Topics: []string{"0x0000000000000000000000000000000000000000000000000000000000000234", "0x0000000000000000000000000000000000000000000000000000000000000789"}, Synthetic: true, }}, - EffectiveGasPrice: 100, + EffectiveGasPrice: 0, }) - EVMKeeper.MockReceipt(Ctx, common.HexToHash(DebugTraceHashHex), &types.Receipt{ + CtxDebugTrace := Ctx.WithBlockHeight(DebugTraceMockHeight) + EVMKeeper.MockReceipt(CtxDebugTrace, common.HexToHash(DebugTraceHashHex), &types.Receipt{ BlockNumber: DebugTraceMockHeight, TransactionIndex: 0, TxHashHex: DebugTraceHashHex, }) txNonEvmBz, _ := Encoder(TxNonEvmWithSyntheticLog) txNonEvmHash := sha256.Sum256(txNonEvmBz) - EVMKeeper.MockReceipt(Ctx, txNonEvmHash, &types.Receipt{ + EVMKeeper.MockReceipt(CtxMultiTx, txNonEvmHash, &types.Receipt{ BlockNumber: MultiTxBlockHeight, TransactionIndex: 1, TxHashHex: common.Hash(txNonEvmHash).Hex(), @@ -786,22 +811,26 @@ func setupLogs() { }}, EffectiveGasPrice: 100, }) + + // block 8 EVMKeeper.SetTxHashesOnHeight(Ctx, MultiTxBlockHeight, []common.Hash{ multiTxBlockTx1.Hash(), multiTxBlockTx2.Hash(), multiTxBlockTx3.Hash(), }) + EVMKeeper.SetBlockBloom(MultiTxCtx, []ethtypes.Bloom{bloom1, bloom2, bloom3}) + + // block 2 EVMKeeper.SetTxHashesOnHeight(Ctx, MockHeight, []common.Hash{ - multiTxBlockTx4.Hash(), multiTxBlockSynthTx.Hash(), + multiTxBlockTx4.Hash(), }) bloomTx1 := ethtypes.CreateBloom(ethtypes.Receipts{ðtypes.Receipt{Logs: []*ethtypes.Log{{ Address: common.HexToAddress("0x1111111111111111111111111111111111111111"), Topics: []common.Hash{common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111111"), common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111112")}, }}}}) - EVMKeeper.SetBlockBloom(MultiTxCtx, []ethtypes.Bloom{bloom1, bloom2, bloom3}) - EVMKeeper.SetBlockBloom(Ctx, []ethtypes.Bloom{bloom4, bloomSynth, bloomTx1}) + EVMKeeper.SetBlockBloom(Ctx, []ethtypes.Bloom{bloomSynth, bloom4, bloomTx1}) } //nolint:deadcode From d5a2f2dc8e3c705b2742249c790d6a1b51773734 Mon Sep 17 00:00:00 2001 From: codchen Date: Wed, 20 Nov 2024 13:05:34 +0800 Subject: [PATCH 17/33] refactor bank/oracle precompile to use dynamic gas (#1926) * refactor bank/oracle precompile to use dynamic gas * test * rebase * bump wasmd * bump version --- app/app.go | 2 +- go.mod | 4 +- go.sum | 8 +- precompiles/bank/bank.go | 127 ++++++++++++++++------------ precompiles/bank/bank_test.go | 72 ++++++++-------- precompiles/common/precompiles.go | 8 +- precompiles/oracle/oracle.go | 30 ++++--- precompiles/oracle/oracle_test.go | 4 +- precompiles/pointer/pointer_test.go | 2 +- x/evm/keeper/evm.go | 2 +- 10 files changed, 144 insertions(+), 115 deletions(-) diff --git a/app/app.go b/app/app.go index 5332841316..b81f37b549 100644 --- a/app/app.go +++ b/app/app.go @@ -680,7 +680,7 @@ func New( app.GovKeeper = govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - &stakingKeeper, govRouter, + &stakingKeeper, app.ParamsKeeper, govRouter, ) // this line is used by starport scaffolding # stargate/app/keeperDefinition diff --git a/go.mod b/go.mod index 9e3d910dca..f717ac1960 100644 --- a/go.mod +++ b/go.mod @@ -344,9 +344,9 @@ require ( ) replace ( - github.com/CosmWasm/wasmd => github.com/sei-protocol/sei-wasmd v0.2.5-0.20241107175838-0d53ba130a0e + github.com/CosmWasm/wasmd => github.com/sei-protocol/sei-wasmd v0.2.8 github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 - github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.44 + github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.45 github.com/cosmos/iavl => github.com/sei-protocol/sei-iavl v0.2.0 github.com/cosmos/ibc-go/v3 => github.com/sei-protocol/sei-ibc-go/v3 v3.3.2 github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.13.5-sei-23 diff --git a/go.sum b/go.sum index c502d19c6e..5b1f3ca992 100644 --- a/go.sum +++ b/go.sum @@ -1347,8 +1347,8 @@ github.com/sei-protocol/go-ethereum v1.13.5-sei-23 h1:rkgeOHC56QTco4mIyGd6cZHtlo github.com/sei-protocol/go-ethereum v1.13.5-sei-23/go.mod h1:kcRZmuzRn1lVejiFNTz4l4W7imnpq1bDAnuKS/RyhbQ= github.com/sei-protocol/goutils v0.0.2 h1:Bfa7Sv+4CVLNM20QcpvGb81B8C5HkQC/kW1CQpIbXDA= github.com/sei-protocol/goutils v0.0.2/go.mod h1:iYE2DuJfEnM+APPehr2gOUXfuLuPsVxorcDO+Tzq9q8= -github.com/sei-protocol/sei-cosmos v0.3.44 h1:7wLuJguQBhQ1ljU92lEDrZDLcNt+JbUcX7r1Y7V1qws= -github.com/sei-protocol/sei-cosmos v0.3.44/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk= +github.com/sei-protocol/sei-cosmos v0.3.45 h1:l6ss5Y4OC+vvu+74lWz8EUBJN68x0CRuaEYtqA+TvOs= +github.com/sei-protocol/sei-cosmos v0.3.45/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk= github.com/sei-protocol/sei-db v0.0.45 h1:95ygzGFMyvaGwEUmzlKi8MxwXfbluoNzbaIjy9zOG6o= github.com/sei-protocol/sei-db v0.0.45/go.mod h1:m5g7p0QeAS3dNJHIl28zQpzOgxQmvYqPb7t4hwgIOCA= github.com/sei-protocol/sei-iavl v0.2.0 h1:OisPjXiDT+oe+aeckzDEFgkZCYuUjHgs/PP8DPicN+I= @@ -1359,8 +1359,8 @@ github.com/sei-protocol/sei-tendermint v0.4.3 h1:/Nx3Q309B4N61P3e6ScYiVuHgBRdapc github.com/sei-protocol/sei-tendermint v0.4.3/go.mod h1:4LSlJdhl3nf3OmohliwRNUFLOB1XWlrmSodrIP7fLh4= github.com/sei-protocol/sei-tm-db v0.0.5 h1:3WONKdSXEqdZZeLuWYfK5hP37TJpfaUa13vAyAlvaQY= github.com/sei-protocol/sei-tm-db v0.0.5/go.mod h1:Cpa6rGyczgthq7/0pI31jys2Fw0Nfrc+/jKdP1prVqY= -github.com/sei-protocol/sei-wasmd v0.2.5-0.20241107175838-0d53ba130a0e h1:/w3VQZBOzCUQNDLFdAPm3nguyD7l2K6453E+U++2p40= -github.com/sei-protocol/sei-wasmd v0.2.5-0.20241107175838-0d53ba130a0e/go.mod h1:fKHnK3Nms+BZeGvXeIC3SEzUDfkB7/tYOf95kVOhiO4= +github.com/sei-protocol/sei-wasmd v0.2.8 h1:b7tnn3quY1msT0smbXIFdz83NXn8eYn5ARE0ShC6+1o= +github.com/sei-protocol/sei-wasmd v0.2.8/go.mod h1:gcBpeDTCqCscmYq5/rYuRZW0r3pGSO3rs5MUlPucSDY= github.com/sei-protocol/tm-db v0.0.4 h1:7Y4EU62Xzzg6wKAHEotm7SXQR0aPLcGhKHkh3qd0tnk= github.com/sei-protocol/tm-db v0.0.4/go.mod h1:PWsIWOTwdwC7Ow/GUvx8HgUJTO691pBuorIQD8JvwAs= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= diff --git a/precompiles/bank/bank.go b/precompiles/bank/bank.go index cfdd0aae62..35462e89cd 100644 --- a/precompiles/bank/bank.go +++ b/precompiles/bank/bank.go @@ -59,8 +59,12 @@ type CoinBalance struct { Denom string } -func NewPrecompile(bankKeeper pcommon.BankKeeper, bankMsgServer pcommon.BankMsgServer, evmKeeper pcommon.EVMKeeper, accountKeeper pcommon.AccountKeeper) (*pcommon.Precompile, error) { - newAbi := pcommon.MustGetABI(f, "abi.json") +func GetABI() abi.ABI { + return pcommon.MustGetABI(f, "abi.json") +} + +func NewPrecompile(bankKeeper pcommon.BankKeeper, bankMsgServer pcommon.BankMsgServer, evmKeeper pcommon.EVMKeeper, accountKeeper pcommon.AccountKeeper) (*pcommon.DynamicGasPrecompile, error) { + newAbi := GetABI() p := &PrecompileExecutor{ bankKeeper: bankKeeper, bankMsgServer: bankMsgServer, @@ -90,7 +94,7 @@ func NewPrecompile(bankKeeper pcommon.BankKeeper, bankMsgServer pcommon.BankMsgS } } - return pcommon.NewPrecompile(newAbi, p, p.address, "bank"), nil + return pcommon.NewDynamicGasPrecompile(newAbi, p, p.address, "bank"), nil } // RequiredGas returns the required bare minimum gas to execute the precompile. @@ -98,7 +102,7 @@ func (p PrecompileExecutor) RequiredGas(input []byte, method *abi.Method) uint64 return pcommon.DefaultGasCost(input, p.IsTransaction(method.Name)) } -func (p PrecompileExecutor) Execute(ctx sdk.Context, method *abi.Method, caller common.Address, callingContract common.Address, args []interface{}, value *big.Int, readOnly bool, evm *vm.EVM) (bz []byte, err error) { +func (p PrecompileExecutor) Execute(ctx sdk.Context, method *abi.Method, caller common.Address, callingContract common.Address, args []interface{}, value *big.Int, readOnly bool, evm *vm.EVM, suppliedGas uint64) (ret []byte, remainingGas uint64, err error) { switch method.Name { case SendMethod: return p.send(ctx, caller, method, args, value, readOnly) @@ -120,37 +124,38 @@ func (p PrecompileExecutor) Execute(ctx sdk.Context, method *abi.Method, caller return } -func (p PrecompileExecutor) send(ctx sdk.Context, caller common.Address, method *abi.Method, args []interface{}, value *big.Int, readOnly bool) ([]byte, error) { +func (p PrecompileExecutor) send(ctx sdk.Context, caller common.Address, method *abi.Method, args []interface{}, value *big.Int, readOnly bool) ([]byte, uint64, error) { if readOnly { - return nil, errors.New("cannot call send from staticcall") + return nil, 0, errors.New("cannot call send from staticcall") } if err := pcommon.ValidateNonPayable(value); err != nil { - return nil, err + return nil, 0, err } if err := pcommon.ValidateArgsLength(args, 4); err != nil { - return nil, err + return nil, 0, err } denom := args[2].(string) if denom == "" { - return nil, errors.New("invalid denom") + return nil, 0, errors.New("invalid denom") } pointer, _, exists := p.evmKeeper.GetERC20NativePointer(ctx, denom) if !exists || pointer.Cmp(caller) != 0 { - return nil, fmt.Errorf("only pointer %s can send %s but got %s", pointer.Hex(), denom, caller.Hex()) + return nil, 0, fmt.Errorf("only pointer %s can send %s but got %s", pointer.Hex(), denom, caller.Hex()) } amount := args[3].(*big.Int) if amount.Cmp(utils.Big0) == 0 { // short circuit - return method.Outputs.Pack(true) + bz, err := method.Outputs.Pack(true) + return bz, pcommon.GetRemainingGas(ctx, p.evmKeeper), err } senderSeiAddr, err := p.accAddressFromArg(ctx, args[0]) if err != nil { - return nil, err + return nil, 0, err } receiverSeiAddr, err := p.accAddressFromArg(ctx, args[1]) if err != nil { - return nil, err + return nil, 0, err } msg := &banktypes.MsgSend{ @@ -161,52 +166,53 @@ func (p PrecompileExecutor) send(ctx sdk.Context, caller common.Address, method err = msg.ValidateBasic() if err != nil { - return nil, err + return nil, 0, err } if _, err = p.bankMsgServer.Send(sdk.WrapSDKContext(ctx), msg); err != nil { - return nil, err + return nil, 0, err } - return method.Outputs.Pack(true) + bz, err := method.Outputs.Pack(true) + return bz, pcommon.GetRemainingGas(ctx, p.evmKeeper), err } -func (p PrecompileExecutor) sendNative(ctx sdk.Context, method *abi.Method, args []interface{}, caller common.Address, callingContract common.Address, value *big.Int, readOnly bool) ([]byte, error) { +func (p PrecompileExecutor) sendNative(ctx sdk.Context, method *abi.Method, args []interface{}, caller common.Address, callingContract common.Address, value *big.Int, readOnly bool) ([]byte, uint64, error) { if readOnly { - return nil, errors.New("cannot call sendNative from staticcall") + return nil, 0, errors.New("cannot call sendNative from staticcall") } if ctx.EVMPrecompileCalledFromDelegateCall() { - return nil, errors.New("cannot delegatecall sendNative") + return nil, 0, errors.New("cannot delegatecall sendNative") } if err := pcommon.ValidateArgsLength(args, 1); err != nil { - return nil, err + return nil, 0, err } if value == nil || value.Sign() == 0 { - return nil, errors.New("set `value` field to non-zero to send") + return nil, 0, errors.New("set `value` field to non-zero to send") } senderSeiAddr, ok := p.evmKeeper.GetSeiAddress(ctx, caller) if !ok { - return nil, errors.New("invalid addr") + return nil, 0, errors.New("invalid addr") } receiverAddr, ok := (args[0]).(string) if !ok || receiverAddr == "" { - return nil, errors.New("invalid addr") + return nil, 0, errors.New("invalid addr") } receiverSeiAddr, err := sdk.AccAddressFromBech32(receiverAddr) if err != nil { - return nil, err + return nil, 0, err } usei, wei, err := pcommon.HandlePaymentUseiWei(ctx, p.evmKeeper.GetSeiAddressOrDefault(ctx, p.address), senderSeiAddr, value, p.bankKeeper) if err != nil { - return nil, err + return nil, 0, err } if err := p.bankKeeper.SendCoinsAndWei(ctx, senderSeiAddr, receiverSeiAddr, usei, wei); err != nil { - return nil, err + return nil, 0, err } accExists := p.accountKeeper.HasAccount(ctx, receiverSeiAddr) if !accExists { @@ -214,42 +220,44 @@ func (p PrecompileExecutor) sendNative(ctx sdk.Context, method *abi.Method, args p.accountKeeper.SetAccount(ctx, p.accountKeeper.NewAccountWithAddress(ctx, receiverSeiAddr)) } - return method.Outputs.Pack(true) + bz, err := method.Outputs.Pack(true) + return bz, pcommon.GetRemainingGas(ctx, p.evmKeeper), err } -func (p PrecompileExecutor) balance(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, error) { +func (p PrecompileExecutor) balance(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, uint64, error) { if err := pcommon.ValidateNonPayable(value); err != nil { - return nil, err + return nil, 0, err } if err := pcommon.ValidateArgsLength(args, 2); err != nil { - return nil, err + return nil, 0, err } addr, err := p.accAddressFromArg(ctx, args[0]) if err != nil { - return nil, err + return nil, 0, err } denom := args[1].(string) if denom == "" { - return nil, errors.New("invalid denom") + return nil, 0, errors.New("invalid denom") } - return method.Outputs.Pack(p.bankKeeper.GetBalance(ctx, addr, denom).Amount.BigInt()) + bz, err := method.Outputs.Pack(p.bankKeeper.GetBalance(ctx, addr, denom).Amount.BigInt()) + return bz, pcommon.GetRemainingGas(ctx, p.evmKeeper), err } -func (p PrecompileExecutor) all_balances(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, error) { +func (p PrecompileExecutor) all_balances(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, uint64, error) { if err := pcommon.ValidateNonPayable(value); err != nil { - return nil, err + return nil, 0, err } if err := pcommon.ValidateArgsLength(args, 1); err != nil { - return nil, err + return nil, 0, err } addr, err := p.accAddressFromArg(ctx, args[0]) if err != nil { - return nil, err + return nil, 0, err } coins := p.bankKeeper.GetAllBalances(ctx, addr) @@ -264,64 +272,69 @@ func (p PrecompileExecutor) all_balances(ctx sdk.Context, method *abi.Method, ar }) } - return method.Outputs.Pack(coinBalances) + bz, err := method.Outputs.Pack(coinBalances) + return bz, pcommon.GetRemainingGas(ctx, p.evmKeeper), err } -func (p PrecompileExecutor) name(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, error) { +func (p PrecompileExecutor) name(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, uint64, error) { if err := pcommon.ValidateNonPayable(value); err != nil { - return nil, err + return nil, 0, err } if err := pcommon.ValidateArgsLength(args, 1); err != nil { - return nil, err + return nil, 0, err } denom := args[0].(string) metadata, found := p.bankKeeper.GetDenomMetaData(ctx, denom) if !found { - return nil, fmt.Errorf("denom %s not found", denom) + return nil, 0, fmt.Errorf("denom %s not found", denom) } - return method.Outputs.Pack(metadata.Name) + bz, err := method.Outputs.Pack(metadata.Name) + return bz, pcommon.GetRemainingGas(ctx, p.evmKeeper), err } -func (p PrecompileExecutor) symbol(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, error) { +func (p PrecompileExecutor) symbol(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, uint64, error) { if err := pcommon.ValidateNonPayable(value); err != nil { - return nil, err + return nil, 0, err } if err := pcommon.ValidateArgsLength(args, 1); err != nil { - return nil, err + return nil, 0, err } denom := args[0].(string) metadata, found := p.bankKeeper.GetDenomMetaData(ctx, denom) if !found { - return nil, fmt.Errorf("denom %s not found", denom) + return nil, 0, fmt.Errorf("denom %s not found", denom) } - return method.Outputs.Pack(metadata.Symbol) + bz, err := method.Outputs.Pack(metadata.Symbol) + return bz, pcommon.GetRemainingGas(ctx, p.evmKeeper), err } -func (p PrecompileExecutor) decimals(_ sdk.Context, method *abi.Method, _ []interface{}, value *big.Int) ([]byte, error) { +func (p PrecompileExecutor) decimals(ctx sdk.Context, method *abi.Method, _ []interface{}, value *big.Int) ([]byte, uint64, error) { if err := pcommon.ValidateNonPayable(value); err != nil { - return nil, err + return nil, 0, err } // all native tokens are integer-based, returns decimals for microdenom (usei) - return method.Outputs.Pack(uint8(0)) + bz, err := method.Outputs.Pack(uint8(0)) + return bz, pcommon.GetRemainingGas(ctx, p.evmKeeper), err } -func (p PrecompileExecutor) totalSupply(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, error) { +func (p PrecompileExecutor) totalSupply(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, uint64, error) { if err := pcommon.ValidateNonPayable(value); err != nil { - return nil, err + return nil, 0, err } if err := pcommon.ValidateArgsLength(args, 1); err != nil { - return nil, err + return nil, 0, err } denom := args[0].(string) coin := p.bankKeeper.GetSupply(ctx, denom) - return method.Outputs.Pack(coin.Amount.BigInt()) + bz, err := method.Outputs.Pack(coin.Amount.BigInt()) + return bz, pcommon.GetRemainingGas(ctx, p.evmKeeper), err } func (p PrecompileExecutor) accAddressFromArg(ctx sdk.Context, arg interface{}) (sdk.AccAddress, error) { @@ -351,3 +364,7 @@ func (PrecompileExecutor) IsTransaction(method string) bool { func (p PrecompileExecutor) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("precompile", "bank") } + +func (p PrecompileExecutor) EVMKeeper() pcommon.EVMKeeper { + return p.evmKeeper +} diff --git a/precompiles/bank/bank_test.go b/precompiles/bank/bank_test.go index 6c2ab19b03..4a88ac6cef 100644 --- a/precompiles/bank/bank_test.go +++ b/precompiles/bank/bank_test.go @@ -4,12 +4,13 @@ import ( "embed" "encoding/hex" "fmt" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "math/big" "strings" "testing" "time" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" @@ -79,7 +80,15 @@ func TestRun(t *testing.T) { require.Nil(t, err) args, err := send.Inputs.Pack(senderEVMAddr, evmAddr, "usei", big.NewInt(25)) require.Nil(t, err) - _, err = p.Run(&evm, senderEVMAddr, senderEVMAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendID, args...), nil, false, false) // should error because address is not whitelisted + _, _, err = p.RunAndCalculateGas(&evm, senderEVMAddr, senderEVMAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendID, args...), 100000, nil, nil, true, false) // should error because of read only call + require.NotNil(t, err) + _, _, err = p.RunAndCalculateGas(&evm, senderEVMAddr, senderEVMAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendID, args...), 100000, big.NewInt(1), nil, false, false) // should error because it's not payable + require.NotNil(t, err) + _, _, err = p.RunAndCalculateGas(&evm, senderEVMAddr, senderEVMAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendID, args...), 100000, nil, nil, false, false) // should error because address is not whitelisted + require.NotNil(t, err) + invalidDenomArgs, err := send.Inputs.Pack(senderEVMAddr, evmAddr, "", big.NewInt(25)) + require.Nil(t, err) + _, _, err = p.RunAndCalculateGas(&evm, senderEVMAddr, senderEVMAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendID, invalidDenomArgs...), 100000, nil, nil, false, false) // should error because denom is empty require.NotNil(t, err) // Precompile sendNative test error @@ -89,19 +98,23 @@ func TestRun(t *testing.T) { argsNativeError, err := sendNative.Inputs.Pack(seiAddrString) require.Nil(t, err) // 0 amount disallowed - _, err = p.Run(&evm, senderEVMAddr, senderEVMAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendNativeID, argsNativeError...), big.NewInt(0), false, false) + _, _, err = p.RunAndCalculateGas(&evm, senderEVMAddr, senderEVMAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendNativeID, argsNativeError...), 100000, big.NewInt(0), nil, false, false) require.NotNil(t, err) argsNativeError, err = sendNative.Inputs.Pack("") require.Nil(t, err) - _, err = p.Run(&evm, senderEVMAddr, senderEVMAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendNativeID, argsNativeError...), big.NewInt(100), false, false) + _, _, err = p.RunAndCalculateGas(&evm, senderEVMAddr, senderEVMAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendNativeID, argsNativeError...), 100000, big.NewInt(100), nil, false, false) require.NotNil(t, err) argsNativeError, err = sendNative.Inputs.Pack("invalidaddr") require.Nil(t, err) - _, err = p.Run(&evm, senderEVMAddr, senderEVMAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendNativeID, argsNativeError...), big.NewInt(100), false, false) + _, _, err = p.RunAndCalculateGas(&evm, senderEVMAddr, senderEVMAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendNativeID, argsNativeError...), 100000, big.NewInt(100), nil, false, false) require.NotNil(t, err) argsNativeError, err = sendNative.Inputs.Pack(senderAddr.String()) require.Nil(t, err) - _, err = p.Run(&evm, evmAddr, evmAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendNativeID, argsNativeError...), big.NewInt(100), false, false) + _, _, err = p.RunAndCalculateGas(&evm, evmAddr, evmAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendNativeID, argsNativeError...), 100000, big.NewInt(100), nil, false, false) + require.NotNil(t, err) + _, _, err = p.RunAndCalculateGas(&evm, evmAddr, evmAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendNativeID, argsNativeError...), 100000, big.NewInt(100), nil, true, false) + require.NotNil(t, err) + _, _, err = p.RunAndCalculateGas(&evm, evmAddr, evmAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendNativeID, argsNativeError...), 100000, big.NewInt(100), nil, false, true) require.NotNil(t, err) // Send native 10_000_000_000_100, split into 10 usei 100wei @@ -180,11 +193,10 @@ func TestRun(t *testing.T) { sdk.NewAttribute(banktypes.AttributeKeySender, senderAddr.String()), ), // gas refund to the sender - banktypes.NewCoinReceivedEvent(senderAddr, sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(41916)))), + banktypes.NewCoinReceivedEvent(senderAddr, sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(101398)))), // tip is paid to the validator - banktypes.NewCoinReceivedEvent(sdk.MustAccAddressFromBech32("sei1v4mx6hmrda5kucnpwdjsqqqqqqqqqqqqlve8dv"), sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(27944)))), + banktypes.NewCoinReceivedEvent(sdk.MustAccAddressFromBech32("sei1v4mx6hmrda5kucnpwdjsqqqqqqqqqqqqlve8dv"), sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(67599)))), } - require.EqualValues(t, expectedEvts.ToABCIEvents(), evts) // Use precompile balance to verify sendNative usei amount succeeded @@ -192,7 +204,7 @@ func TestRun(t *testing.T) { require.Nil(t, err) args, err = balance.Inputs.Pack(evmAddr, "usei") require.Nil(t, err) - precompileRes, err := p.Run(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).BalanceID, args...), nil, false, false) + precompileRes, _, err := p.RunAndCalculateGas(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).BalanceID, args...), 100000, nil, nil, false, false) require.Nil(t, err) is, err := balance.Outputs.Unpack(precompileRes) require.Nil(t, err) @@ -206,7 +218,7 @@ func TestRun(t *testing.T) { argsNewAccount, err := sendNative.Inputs.Pack(newAddr.String()) require.Nil(t, err) require.Nil(t, k.BankKeeper().SendCoins(ctx, seiAddr, k.GetSeiAddressOrDefault(ctx, p.Address()), sdk.NewCoins(sdk.NewCoin("usei", sdk.OneInt())))) - _, err = p.Run(&evm, evmAddr, evmAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendNativeID, argsNewAccount...), big.NewInt(1), false, false) + _, _, err = p.RunAndCalculateGas(&evm, evmAddr, evmAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendNativeID, argsNewAccount...), 100000, big.NewInt(1), nil, false, false) require.Nil(t, err) // should create account if not exists require.NotNil(t, k.AccountKeeper().GetAccount(statedb.Ctx(), newAddr)) @@ -216,7 +228,7 @@ func TestRun(t *testing.T) { require.Nil(t, err) args, err = allBalances.Inputs.Pack(senderEVMAddr) require.Nil(t, err) - precompileRes, err = p.Run(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).AllBalancesID, args...), nil, false, false) + precompileRes, _, err = p.RunAndCalculateGas(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).AllBalancesID, args...), 100000, nil, nil, false, false) require.Nil(t, err) balances, err := allBalances.Outputs.Unpack(precompileRes) require.Nil(t, err) @@ -232,20 +244,20 @@ func TestRun(t *testing.T) { Denom: "ufoo", }, bank.CoinBalance(parsedBalances[0])) require.Equal(t, bank.CoinBalance{ - Amount: big.NewInt(9841905), + Amount: big.NewInt(9901387), Denom: "usei", }, bank.CoinBalance(parsedBalances[1])) // Verify errors properly raised on bank balance calls with incorrect inputs - _, err = p.Run(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).BalanceID, args[:1]...), nil, false, false) + _, _, err = p.RunAndCalculateGas(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).BalanceID, args[:1]...), 100000, nil, nil, false, false) require.NotNil(t, err) args, err = balance.Inputs.Pack(evmAddr, "") require.Nil(t, err) - _, err = p.Run(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).BalanceID, args...), nil, false, false) + _, _, err = p.RunAndCalculateGas(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).BalanceID, args...), 100000, nil, nil, false, false) require.NotNil(t, err) // invalid input - _, err = p.Run(&evm, common.Address{}, common.Address{}, []byte{1, 2, 3, 4}, nil, false, false) + _, _, err = p.RunAndCalculateGas(&evm, common.Address{}, common.Address{}, []byte{1, 2, 3, 4}, 100000, nil, nil, false, false) require.NotNil(t, err) } @@ -286,7 +298,7 @@ func TestSendForUnlinkedReceiver(t *testing.T) { require.Nil(t, err) args, err := send.Inputs.Pack(senderEVMAddr, evmAddr, "ufoo", big.NewInt(100)) require.Nil(t, err) - _, err = p.Run(&evm, pointerAddr, pointerAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendID, args...), nil, false, false) // should not error + _, _, err = p.RunAndCalculateGas(&evm, pointerAddr, pointerAddr, append(p.GetExecutor().(*bank.PrecompileExecutor).SendID, args...), 100000, nil, nil, false, false) // should not error require.Nil(t, err) // Use precompile balance to verify sendNative usei amount succeeded @@ -294,7 +306,7 @@ func TestSendForUnlinkedReceiver(t *testing.T) { require.Nil(t, err) args, err = balance.Inputs.Pack(evmAddr, "ufoo") require.Nil(t, err) - precompileRes, err := p.Run(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).BalanceID, args...), nil, false, false) + precompileRes, _, err := p.RunAndCalculateGas(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).BalanceID, args...), 100000, nil, nil, false, false) require.Nil(t, err) is, err := balance.Outputs.Unpack(precompileRes) require.Nil(t, err) @@ -306,7 +318,7 @@ func TestSendForUnlinkedReceiver(t *testing.T) { require.Nil(t, err) args, err = allBalances.Inputs.Pack(senderEVMAddr) require.Nil(t, err) - precompileRes, err = p.Run(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).AllBalancesID, args...), nil, false, false) + precompileRes, _, err = p.RunAndCalculateGas(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).AllBalancesID, args...), 100000, nil, nil, false, false) require.Nil(t, err) balances, err := allBalances.Outputs.Unpack(precompileRes) require.Nil(t, err) @@ -327,15 +339,15 @@ func TestSendForUnlinkedReceiver(t *testing.T) { }, bank.CoinBalance(parsedBalances[1])) // Verify errors properly raised on bank balance calls with incorrect inputs - _, err = p.Run(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).BalanceID, args[:1]...), nil, false, false) + _, _, err = p.RunAndCalculateGas(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).BalanceID, args[:1]...), 100000, nil, nil, false, false) require.NotNil(t, err) args, err = balance.Inputs.Pack(evmAddr, "") require.Nil(t, err) - _, err = p.Run(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).BalanceID, args...), nil, false, false) + _, _, err = p.RunAndCalculateGas(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).BalanceID, args...), 100000, nil, nil, false, false) require.NotNil(t, err) // invalid input - _, err = p.Run(&evm, common.Address{}, common.Address{}, []byte{1, 2, 3, 4}, nil, false, false) + _, _, err = p.RunAndCalculateGas(&evm, common.Address{}, common.Address{}, []byte{1, 2, 3, 4}, 100000, nil, nil, false, false) require.NotNil(t, err) } @@ -353,7 +365,7 @@ func TestMetadata(t *testing.T) { require.Nil(t, err) args, err := name.Inputs.Pack("usei") require.Nil(t, err) - res, err := p.Run(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).NameID, args...), nil, false, false) + res, _, err := p.RunAndCalculateGas(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).NameID, args...), 100000, nil, nil, false, false) require.Nil(t, err) outputs, err := name.Outputs.Unpack(res) require.Nil(t, err) @@ -363,7 +375,7 @@ func TestMetadata(t *testing.T) { require.Nil(t, err) args, err = symbol.Inputs.Pack("usei") require.Nil(t, err) - res, err = p.Run(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).SymbolID, args...), nil, false, false) + res, _, err = p.RunAndCalculateGas(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).SymbolID, args...), 100000, nil, nil, false, false) require.Nil(t, err) outputs, err = symbol.Outputs.Unpack(res) require.Nil(t, err) @@ -373,23 +385,13 @@ func TestMetadata(t *testing.T) { require.Nil(t, err) args, err = decimal.Inputs.Pack("usei") require.Nil(t, err) - res, err = p.Run(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).DecimalsID, args...), nil, false, false) + res, _, err = p.RunAndCalculateGas(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*bank.PrecompileExecutor).DecimalsID, args...), 100000, nil, nil, false, false) require.Nil(t, err) outputs, err = decimal.Outputs.Unpack(res) require.Nil(t, err) require.Equal(t, uint8(0), outputs[0]) } -func TestRequiredGas(t *testing.T) { - k := &testkeeper.EVMTestApp.EvmKeeper - p, err := bank.NewPrecompile(k.BankKeeper(), bankkeeper.NewMsgServerImpl(k.BankKeeper()), k, k.AccountKeeper()) - require.Nil(t, err) - balanceRequiredGas := p.RequiredGas(p.GetExecutor().(*bank.PrecompileExecutor).BalanceID) - require.Equal(t, uint64(1000), balanceRequiredGas) - // invalid method - require.Equal(t, uint64(3000), p.RequiredGas([]byte{1, 1, 1, 1})) -} - func TestAddress(t *testing.T) { k := &testkeeper.EVMTestApp.EvmKeeper p, err := bank.NewPrecompile(k.BankKeeper(), bankkeeper.NewMsgServerImpl(k.BankKeeper()), k, k.AccountKeeper()) diff --git a/precompiles/common/precompiles.go b/precompiles/common/precompiles.go index fc98587618..9976d7e24d 100644 --- a/precompiles/common/precompiles.go +++ b/precompiles/common/precompiles.go @@ -24,6 +24,10 @@ type Contexter interface { Ctx() sdk.Context } +type StateEVMKeeperGetter interface { + EVMKeeper() state.EVMKeeper +} + type PrecompileExecutor interface { RequiredGas([]byte, *abi.Method) uint64 Execute(ctx sdk.Context, method *abi.Method, caller common.Address, callingContract common.Address, args []interface{}, value *big.Int, readOnly bool, evm *vm.EVM) ([]byte, error) @@ -160,8 +164,8 @@ func (d DynamicGasPrecompile) RunAndCalculateGas(evm *vm.EVM, caller common.Addr if err != nil { return nil, 0, err } - ctx = ctx.WithGasMeter(sdk.NewGasMeterWithMultiplier(ctx, d.executor.EVMKeeper().GetCosmosGasLimitFromEVMGas(ctx, suppliedGas))) - + gasLimit := d.executor.EVMKeeper().GetCosmosGasLimitFromEVMGas(ctx.WithGasMeter(sdk.NewInfiniteGasMeterWithMultiplier(ctx)), suppliedGas) + ctx = ctx.WithGasMeter(sdk.NewGasMeterWithMultiplier(ctx, gasLimit)) operation = method.Name em := ctx.EventManager() ctx = ctx.WithEventManager(sdk.NewEventManager()) diff --git a/precompiles/oracle/oracle.go b/precompiles/oracle/oracle.go index 548fc063ed..8505f5589d 100644 --- a/precompiles/oracle/oracle.go +++ b/precompiles/oracle/oracle.go @@ -53,7 +53,7 @@ type OracleTwap struct { LookbackSeconds int64 `json:"lookbackSeconds"` } -func NewPrecompile(oracleKeeper pcommon.OracleKeeper, evmKeeper pcommon.EVMKeeper) (*pcommon.Precompile, error) { +func NewPrecompile(oracleKeeper pcommon.OracleKeeper, evmKeeper pcommon.EVMKeeper) (*pcommon.DynamicGasPrecompile, error) { newAbi := pcommon.MustGetABI(f, "abi.json") p := &PrecompileExecutor{ @@ -70,7 +70,7 @@ func NewPrecompile(oracleKeeper pcommon.OracleKeeper, evmKeeper pcommon.EVMKeepe } } - return pcommon.NewPrecompile(newAbi, p, common.HexToAddress(OracleAddress), "oracle"), nil + return pcommon.NewDynamicGasPrecompile(newAbi, p, common.HexToAddress(OracleAddress), "oracle"), nil } // RequiredGas returns the required bare minimum gas to execute the precompile. @@ -78,7 +78,7 @@ func (p PrecompileExecutor) RequiredGas(input []byte, method *abi.Method) uint64 return pcommon.DefaultGasCost(input, p.IsTransaction(method.Name)) } -func (p PrecompileExecutor) Execute(ctx sdk.Context, method *abi.Method, caller common.Address, callingContract common.Address, args []interface{}, value *big.Int, readOnly bool, evm *vm.EVM) (bz []byte, err error) { +func (p PrecompileExecutor) Execute(ctx sdk.Context, method *abi.Method, caller common.Address, callingContract common.Address, args []interface{}, value *big.Int, readOnly bool, evm *vm.EVM, suppliedGas uint64) (bz []byte, remainingGas uint64, err error) { switch method.Name { case GetExchangeRatesMethod: return p.getExchangeRates(ctx, method, args, value) @@ -88,13 +88,13 @@ func (p PrecompileExecutor) Execute(ctx sdk.Context, method *abi.Method, caller return } -func (p PrecompileExecutor) getExchangeRates(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, error) { +func (p PrecompileExecutor) getExchangeRates(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, uint64, error) { if err := pcommon.ValidateNonPayable(value); err != nil { - return nil, err + return nil, 0, err } if err := pcommon.ValidateArgsLength(args, 0); err != nil { - return nil, err + return nil, 0, err } exchangeRates := []DenomOracleExchangeRatePair{} p.oracleKeeper.IterateBaseExchangeRates(ctx, func(denom string, rate types.OracleExchangeRate) (stop bool) { @@ -102,28 +102,34 @@ func (p PrecompileExecutor) getExchangeRates(ctx sdk.Context, method *abi.Method return false }) - return method.Outputs.Pack(exchangeRates) + bz, err := method.Outputs.Pack(exchangeRates) + return bz, pcommon.GetRemainingGas(ctx, p.evmKeeper), err } -func (p PrecompileExecutor) getOracleTwaps(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, error) { +func (p PrecompileExecutor) getOracleTwaps(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, uint64, error) { if err := pcommon.ValidateNonPayable(value); err != nil { - return nil, err + return nil, 0, err } if err := pcommon.ValidateArgsLength(args, 1); err != nil { - return nil, err + return nil, 0, err } lookbackSeconds := args[0].(uint64) twaps, err := p.oracleKeeper.CalculateTwaps(ctx, lookbackSeconds) if err != nil { - return nil, err + return nil, 0, err } // Convert twap to string oracleTwaps := make([]OracleTwap, 0, len(twaps)) for _, twap := range twaps { oracleTwaps = append(oracleTwaps, OracleTwap{Denom: twap.Denom, Twap: twap.Twap.String(), LookbackSeconds: twap.LookbackSeconds}) } - return method.Outputs.Pack(oracleTwaps) + bz, err := method.Outputs.Pack(oracleTwaps) + return bz, pcommon.GetRemainingGas(ctx, p.evmKeeper), err +} + +func (p PrecompileExecutor) EVMKeeper() pcommon.EVMKeeper { + return p.evmKeeper } func (PrecompileExecutor) IsTransaction(string) bool { diff --git a/precompiles/oracle/oracle_test.go b/precompiles/oracle/oracle_test.go index c537dde0e1..9c172422d6 100644 --- a/precompiles/oracle/oracle_test.go +++ b/precompiles/oracle/oracle_test.go @@ -38,7 +38,7 @@ func TestGetExchangeRate(t *testing.T) { query, err := p.ABI.MethodById(p.GetExecutor().(*oracle.PrecompileExecutor).GetExchangeRatesId) require.Nil(t, err) - precompileRes, err := p.Run(&evm, common.Address{}, common.Address{}, p.GetExecutor().(*oracle.PrecompileExecutor).GetExchangeRatesId, nil, true, false) + precompileRes, _, err := p.RunAndCalculateGas(&evm, common.Address{}, common.Address{}, p.GetExecutor().(*oracle.PrecompileExecutor).GetExchangeRatesId, 100000, nil, nil, true, false) require.Nil(t, err) exchangeRates, err := query.Outputs.Unpack(precompileRes) require.Nil(t, err) @@ -114,7 +114,7 @@ func TestGetOracleTwaps(t *testing.T) { require.Nil(t, err) args, err := query.Inputs.Pack(uint64(3600)) require.Nil(t, err) - precompileRes, err := p.Run(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*oracle.PrecompileExecutor).GetOracleTwapsId, args...), nil, true, false) + precompileRes, _, err := p.RunAndCalculateGas(&evm, common.Address{}, common.Address{}, append(p.GetExecutor().(*oracle.PrecompileExecutor).GetOracleTwapsId, args...), 100000, nil, nil, true, false) require.Nil(t, err) twap, err := query.Outputs.Unpack(precompileRes) require.Nil(t, err) diff --git a/precompiles/pointer/pointer_test.go b/precompiles/pointer/pointer_test.go index d49fa27310..2954930a02 100644 --- a/precompiles/pointer/pointer_test.go +++ b/precompiles/pointer/pointer_test.go @@ -57,7 +57,7 @@ func TestAddNative(t *testing.T) { evm = vm.NewEVM(*blockCtx, vm.TxContext{}, statedb, cfg, vm.Config{}) ret, g, err := p.RunAndCalculateGas(evm, caller, caller, append(p.GetExecutor().(*pointer.PrecompileExecutor).AddNativePointerID, args...), suppliedGas, nil, nil, false, false) require.Nil(t, err) - require.Equal(t, uint64(8881534), g) + require.Equal(t, uint64(8890698), g) outputs, err := m.Outputs.Unpack(ret) require.Nil(t, err) addr := outputs[0].(common.Address) diff --git a/x/evm/keeper/evm.go b/x/evm/keeper/evm.go index 1ec7f039d7..7f2f04037d 100644 --- a/x/evm/keeper/evm.go +++ b/x/evm/keeper/evm.go @@ -189,7 +189,7 @@ func (k *Keeper) getEvmGasLimitFromCtx(ctx sdk.Context) uint64 { if ctx.GasMeter().Limit() <= 0 { return math.MaxUint64 } - evmGasBig := sdk.NewDecFromInt(sdk.NewIntFromUint64(seiGasRemaining)).Quo(k.GetPriorityNormalizer(ctx)).TruncateInt().BigInt() + evmGasBig := sdk.NewDecFromInt(sdk.NewIntFromUint64(seiGasRemaining)).Quo(k.GetPriorityNormalizer(ctx.WithGasMeter(sdk.NewInfiniteGasMeterWithMultiplier(ctx)))).TruncateInt().BigInt() if evmGasBig.Cmp(MaxUint64BigInt) > 0 { evmGasBig = MaxUint64BigInt } From dddd24ba5830808b9fc7af810ebe3caa5ee5beb6 Mon Sep 17 00:00:00 2001 From: codchen Date: Wed, 20 Nov 2024 16:30:46 +0800 Subject: [PATCH 18/33] Use owner event to populate ERC721 transfer topic (#1932) * Use owner event to populate ERC721 transfer topic * more test * rebase and revert owner replacement --- app/receipt.go | 32 +++++++++++++++++-- app/receipt_test.go | 75 +++++++++++++++++++++++++++++++++++++++------ 2 files changed, 94 insertions(+), 13 deletions(-) diff --git a/app/receipt.go b/app/receipt.go index 02a987c8ec..f41ead37c1 100644 --- a/app/receipt.go +++ b/app/receipt.go @@ -60,7 +60,7 @@ func (app *App) AddCosmosEventsToEVMReceiptIfApplicable(ctx sdk.Context, tx sdk. // check if there is a ERC721 pointer to contract Addr pointerAddr, _, exists = app.EvmKeeper.GetERC721CW721Pointer(wasmToEvmEventCtx, contractAddr) if exists { - log, eligible := app.translateCW721Event(wasmToEvmEventCtx, wasmEvent, pointerAddr, contractAddr) + log, eligible := app.translateCW721Event(wasmToEvmEventCtx, wasmEvent, pointerAddr, contractAddr, response) if eligible { log.Index = uint(len(logs)) logs = append(logs, log) @@ -173,7 +173,7 @@ func (app *App) translateCW20Event(ctx sdk.Context, wasmEvent abci.Event, pointe return nil, false } -func (app *App) translateCW721Event(ctx sdk.Context, wasmEvent abci.Event, pointerAddr common.Address, contractAddr string) (*ethtypes.Log, bool) { +func (app *App) translateCW721Event(ctx sdk.Context, wasmEvent abci.Event, pointerAddr common.Address, contractAddr string, response sdk.DeliverTxHookInput) (*ethtypes.Log, bool) { action, found := GetAttributeValue(wasmEvent, "action") if !found { return nil, false @@ -185,9 +185,35 @@ func (app *App) translateCW721Event(ctx sdk.Context, wasmEvent abci.Event, point if tokenID == nil { return nil, false } + sender := common.Hash{} + // unfortunately CW721 transfer events differ from ERC721 transfer events + // in that CW721 include sender (which can be different than owner) whereas + // ERC721 always include owner. The following logic refer to the owner + // event emitted before the transfer and use that instead to populate the + // synthetic ERC721 event. + ownerEvents := GetEventsOfType(response, wasmtypes.EventTypeCW721PreTransferOwner) + for _, ownerEvent := range ownerEvents { + if len(ownerEvent.Attributes) != 3 || + string(ownerEvent.Attributes[0].Key) != wasmtypes.AttributeKeyContractAddr || + string(ownerEvent.Attributes[0].Value) != contractAddr { + continue + } + tokenIDStr, _ := GetAttributeValue(wasmEvent, "token_id") + if string(ownerEvent.Attributes[1].Key) != wasmtypes.AttributeKeyTokenId || + string(ownerEvent.Attributes[1].Value) != tokenIDStr || + string(ownerEvent.Attributes[2].Key) != wasmtypes.AttributeKeyOwner { + continue + } + ownerAcc, err := sdk.AccAddressFromBech32(string(ownerEvent.Attributes[2].Value)) + if err != nil { + continue + } + owner := app.EvmKeeper.GetEVMAddressOrDefault(ctx, ownerAcc) + sender = common.BytesToHash(owner[:]) + } topics = []common.Hash{ ERC721TransferTopic, - app.GetEvmAddressAttribute(ctx, wasmEvent, "sender"), + sender, app.GetEvmAddressAttribute(ctx, wasmEvent, "recipient"), common.BigToHash(tokenID), } diff --git a/app/receipt_test.go b/app/receipt_test.go index bfdff291b8..326dd64265 100644 --- a/app/receipt_test.go +++ b/app/receipt_test.go @@ -168,7 +168,8 @@ func TestEvmEventsForCw721(t *testing.T) { amt := sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000000000))) k.BankKeeper().MintCoins(ctx, "evm", amt) k.BankKeeper().SendCoinsFromModuleToAccount(ctx, "evm", creator, amt) - recipient, _ := testkeeper.MockAddressPair() + privKeyRecipient := testkeeper.MockPrivateKey() + recipient, _ := testkeeper.PrivateKeyToAddresses(privKeyRecipient) payload := []byte(fmt.Sprintf("{\"mint\":{\"token_id\":\"1\",\"owner\":\"%s\"}}", recipient.String())) msg := &wasmtypes.MsgExecuteContract{ Sender: creator.String(), @@ -320,10 +321,12 @@ func TestEvmEventsForCw721(t *testing.T) { require.True(t, found) require.Equal(t, common.HexToHash("0x1").Bytes(), receipt.Logs[0].Data) - // revoke all - payload = []byte(fmt.Sprintf("{\"revoke_all\":{\"operator\":\"%s\"}}", recipient.String())) + // transfer on behalf + k.BankKeeper().MintCoins(ctx, "evm", amt) + k.BankKeeper().SendCoinsFromModuleToAccount(ctx, "evm", recipient, amt) + payload = []byte(fmt.Sprintf("{\"transfer_nft\":{\"token_id\":\"2\",\"recipient\":\"%s\"}}", recipient.String())) msg = &wasmtypes.MsgExecuteContract{ - Sender: creator.String(), + Sender: recipient.String(), Contract: contractAddr.String(), Msg: payload, } @@ -331,7 +334,7 @@ func TestEvmEventsForCw721(t *testing.T) { txBuilder.SetMsgs(msg) txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) txBuilder.SetGasLimit(300000) - tx = signTx(txBuilder, privKey, k.AccountKeeper().GetAccount(ctx, creator)) + tx = signTx(txBuilder, privKeyRecipient, k.AccountKeeper().GetAccount(ctx, recipient)) txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) require.Nil(t, err) sum = sha256.Sum256(txbz) @@ -342,12 +345,66 @@ func TestEvmEventsForCw721(t *testing.T) { require.Equal(t, 1, len(receipt.Logs)) require.NotEmpty(t, receipt.LogsBloom) require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) - _, found = testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) - require.True(t, found) + require.Equal(t, uint32(0), receipt.Logs[0].Index) + ownerHash := receipt.Logs[0].Topics[1] + // make sure that the owner is set correctly to the creator, not the spender. + creatorEvmAddr := testkeeper.EVMTestApp.EvmKeeper.GetEVMAddressOrDefault(ctx, creator) + require.Equal(t, common.BytesToHash(creatorEvmAddr[:]).Hex(), ownerHash) + tokenIdHash = receipt.Logs[0].Topics[3] + require.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000002", tokenIdHash) require.Equal(t, common.HexToHash("0x0").Bytes(), receipt.Logs[0].Data) - // burn + // transfer back + payload = []byte(fmt.Sprintf("{\"transfer_nft\":{\"token_id\":\"2\",\"recipient\":\"%s\"}}", creator.String())) + msg = &wasmtypes.MsgExecuteContract{ + Sender: recipient.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKeyRecipient, k.AccountKeeper().GetAccount(ctx, recipient)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + + // burn on behalf payload = []byte("{\"burn\":{\"token_id\":\"2\"}}") + msg = &wasmtypes.MsgExecuteContract{ + Sender: recipient.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKeyRecipient, k.AccountKeeper().GetAccount(ctx, recipient)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + require.Equal(t, uint32(0), receipt.Logs[0].Index) + ownerHash = receipt.Logs[0].Topics[1] + // make sure that the owner is set correctly to the creator, not the spender. + creatorEvmAddr = testkeeper.EVMTestApp.EvmKeeper.GetEVMAddressOrDefault(ctx, creator) + require.Equal(t, common.BytesToHash(creatorEvmAddr[:]).Hex(), ownerHash) + tokenIdHash = receipt.Logs[0].Topics[3] + require.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000002", tokenIdHash) + require.Equal(t, common.HexToHash("0x0").Bytes(), receipt.Logs[0].Data) + + // revoke all + payload = []byte(fmt.Sprintf("{\"revoke_all\":{\"operator\":\"%s\"}}", recipient.String())) msg = &wasmtypes.MsgExecuteContract{ Sender: creator.String(), Contract: contractAddr.String(), @@ -370,8 +427,6 @@ func TestEvmEventsForCw721(t *testing.T) { require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) _, found = testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) require.True(t, found) - tokenIdHash = receipt.Logs[0].Topics[3] - require.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000002", tokenIdHash) require.Equal(t, common.HexToHash("0x0").Bytes(), receipt.Logs[0].Data) } From 6730097d0cd282e57a97de057a3ab1e767b3605b Mon Sep 17 00:00:00 2001 From: Jeremy Wei Date: Wed, 20 Nov 2024 10:22:16 -0500 Subject: [PATCH 19/33] bug fix: Be resilient to failing txs in debug trace block [main] (#1949) * trace block resilient to tx errs * fix geth deps --- evmrpc/simulate.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/evmrpc/simulate.go b/evmrpc/simulate.go index 7805dca657..a552771ac3 100644 --- a/evmrpc/simulate.go +++ b/evmrpc/simulate.go @@ -380,7 +380,7 @@ func (b *Backend) StateAtBlock(ctx context.Context, block *ethtypes.Block, reexe if !associatedNow { err := types.NewAssociationMissingErr(msg.From.Hex()) metrics.IncrementAssociationError("state_at_block", err) - return nil, emptyRelease, err + continue // don't return error, just continue bc we want to process the rest of the txs and return the statedb } if err := helpers.NewAssociationHelper(b.keeper, b.keeper.BankKeeper(), b.keeper.AccountKeeper()).AssociateAddresses(statedb.Ctx(), seiAddr, msg.From, nil); err != nil { return nil, emptyRelease, err diff --git a/go.mod b/go.mod index f717ac1960..b56cc0e5d3 100644 --- a/go.mod +++ b/go.mod @@ -349,7 +349,7 @@ replace ( github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.45 github.com/cosmos/iavl => github.com/sei-protocol/sei-iavl v0.2.0 github.com/cosmos/ibc-go/v3 => github.com/sei-protocol/sei-ibc-go/v3 v3.3.2 - github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.13.5-sei-23 + github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241120141252-bf6b5923d7d7 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/sei-protocol/sei-db => github.com/sei-protocol/sei-db v0.0.45 // Latest goleveldb is broken, we have to stick to this version diff --git a/go.sum b/go.sum index 5b1f3ca992..b7d33e008d 100644 --- a/go.sum +++ b/go.sum @@ -1343,8 +1343,8 @@ github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod github.com/securego/gosec/v2 v2.11.0 h1:+PDkpzR41OI2jrw1q6AdXZCbsNGNGT7pQjal0H0cArI= github.com/securego/gosec/v2 v2.11.0/go.mod h1:SX8bptShuG8reGC0XS09+a4H2BoWSJi+fscA+Pulbpo= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/sei-protocol/go-ethereum v1.13.5-sei-23 h1:rkgeOHC56QTco4mIyGd6cZHtlonulLsaPLZCaMY6TAw= -github.com/sei-protocol/go-ethereum v1.13.5-sei-23/go.mod h1:kcRZmuzRn1lVejiFNTz4l4W7imnpq1bDAnuKS/RyhbQ= +github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241120141252-bf6b5923d7d7 h1:5G1wqz9+1lDKQIpnoaP/oXneLfuhJozPd1/BDNCtaxw= +github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241120141252-bf6b5923d7d7/go.mod h1:kcRZmuzRn1lVejiFNTz4l4W7imnpq1bDAnuKS/RyhbQ= github.com/sei-protocol/goutils v0.0.2 h1:Bfa7Sv+4CVLNM20QcpvGb81B8C5HkQC/kW1CQpIbXDA= github.com/sei-protocol/goutils v0.0.2/go.mod h1:iYE2DuJfEnM+APPehr2gOUXfuLuPsVxorcDO+Tzq9q8= github.com/sei-protocol/sei-cosmos v0.3.45 h1:l6ss5Y4OC+vvu+74lWz8EUBJN68x0CRuaEYtqA+TvOs= From 1d657dadae014197d7dabb4160dc7244d5896a1c Mon Sep 17 00:00:00 2001 From: Kartik Bhat Date: Wed, 20 Nov 2024 16:29:55 -0500 Subject: [PATCH 20/33] Enable Queries to Iavl for Non-Migrating Nodes (#1954) Enable Queries to Iavl --- app/seidb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/seidb.go b/app/seidb.go index 175d5c1a43..00d465d551 100644 --- a/app/seidb.go +++ b/app/seidb.go @@ -64,7 +64,7 @@ func SetupSeiDB( migrationHeight := cast.ToInt64(appOpts.Get(FlagMigrateHeight)) baseAppOptions = append([]func(*baseapp.BaseApp){ func(baseApp *baseapp.BaseApp) { - if migrationEnabled { + if migrationEnabled || migrationHeight > 0 { originalCMS := baseApp.CommitMultiStore() baseApp.SetQueryMultiStore(originalCMS) baseApp.SetMigrationHeight(migrationHeight) From cea68db72996238a23f466a0cf2b26ac74381ed9 Mon Sep 17 00:00:00 2001 From: Yiming Zang <50607998+yzang2019@users.noreply.github.com> Date: Wed, 20 Nov 2024 21:14:35 -0800 Subject: [PATCH 21/33] Fix missing module for migration and add command to export IAVL (#1955) * Archive Generate Stats * leaf nodes * Fix logs * Fix logs * Add tool command * Add tool command * Rename * Refactor the new command * Fix missing module * Fix lint --------- Co-authored-by: kbhat1 --- cmd/seid/cmd/root.go | 2 +- tools/cmd.go | 4 +- tools/migration/cmd/cmd.go | 76 ++++++++++++++++++++++++++++++++- tools/migration/sc/migrator.go | 34 ++------------- tools/migration/ss/migrator.go | 25 +++-------- tools/migration/utils/helper.go | 67 +++++++++++++++++++++++++++++ tools/migration/wasm/keeper.go | 1 - 7 files changed, 157 insertions(+), 52 deletions(-) create mode 100644 tools/migration/utils/helper.go delete mode 100644 tools/migration/wasm/keeper.go diff --git a/cmd/seid/cmd/root.go b/cmd/seid/cmd/root.go index 81c7f8203f..07f9643b1e 100644 --- a/cmd/seid/cmd/root.go +++ b/cmd/seid/cmd/root.go @@ -312,7 +312,7 @@ func newApp( homeDir := cast.ToString(appOpts.Get(flags.FlagHome)) stateStore := app.GetStateStore() migrationHeight := cast.ToInt64(appOpts.Get("migrate-height")) - migrator := ss.NewMigrator(homeDir, db, stateStore) + migrator := ss.NewMigrator(db, stateStore) if err := migrator.Migrate(migrationHeight, homeDir); err != nil { panic(err) } diff --git a/tools/cmd.go b/tools/cmd.go index 35fc9f1776..dc9b79bd46 100644 --- a/tools/cmd.go +++ b/tools/cmd.go @@ -1,9 +1,10 @@ package tools import ( + "github.com/spf13/cobra" + migration "github.com/sei-protocol/sei-chain/tools/migration/cmd" scanner "github.com/sei-protocol/sei-chain/tools/tx-scanner/cmd" - "github.com/spf13/cobra" ) func ToolCmd() *cobra.Command { @@ -14,5 +15,6 @@ func ToolCmd() *cobra.Command { toolsCmd.AddCommand(scanner.ScanCmd()) toolsCmd.AddCommand(migration.MigrateCmd()) toolsCmd.AddCommand(migration.VerifyMigrationCmd()) + toolsCmd.AddCommand(migration.GenerateStats()) return toolsCmd } diff --git a/tools/migration/cmd/cmd.go b/tools/migration/cmd/cmd.go index a29b6386d9..be18c8ce3a 100644 --- a/tools/migration/cmd/cmd.go +++ b/tools/migration/cmd/cmd.go @@ -1,12 +1,16 @@ package cmd import ( + "bytes" "fmt" "path/filepath" + "time" "github.com/cosmos/cosmos-sdk/store/rootmulti" + "github.com/cosmos/iavl" "github.com/sei-protocol/sei-chain/tools/migration/sc" "github.com/sei-protocol/sei-chain/tools/migration/ss" + "github.com/sei-protocol/sei-chain/tools/migration/utils" "github.com/sei-protocol/sei-db/config" sstypes "github.com/sei-protocol/sei-db/ss" "github.com/spf13/cobra" @@ -91,6 +95,76 @@ func verifySS(version int64, homeDir string, db dbm.DB) error { return err } - migrator := ss.NewMigrator(homeDir, db, stateStore) + migrator := ss.NewMigrator(db, stateStore) return migrator.Verify(version) } + +func GenerateStats() *cobra.Command { + cmd := &cobra.Command{ + Use: "iavl-stats", + Short: "A tool to generate archive node iavl stats like number of keys and size per module.", + Run: generateIavlStats, + } + cmd.PersistentFlags().String("home-dir", "/root/.sei", "Sei home directory") + return cmd +} + +func generateIavlStats(cmd *cobra.Command, _ []string) { + homeDir, _ := cmd.Flags().GetString("home-dir") + dataDir := filepath.Join(homeDir, "data") + db, err := dbm.NewGoLevelDB("application", dataDir) + if err != nil { + panic(err) + } + + fmt.Println("Aggregating iavl module stats...") + for _, module := range utils.Modules { + + startTimeModule := time.Now() + fmt.Printf("Aggregating stats for module %s...\n", module) + + // Prepare the prefixed DB for the module + prefixDB := dbm.NewPrefixDB(db, []byte(utils.BuildRawPrefix(module))) + + // Get an iterator for the prefixed DB + itr, err := prefixDB.Iterator(nil, nil) + if err != nil { + panic(fmt.Errorf("failed to create iterator: %w", err)) + } + defer itr.Close() + + // Aggregated stats for the current module + var totalKeys int + var totalKeySize int + var totalValueSize int + + for ; itr.Valid(); itr.Next() { + value := bytes.Clone(itr.Value()) + node, err := iavl.MakeNode(value) + if err != nil { + panic(fmt.Errorf("failed to make node: %w", err)) + } + + // Only export leaf nodes + if node.GetHeight() == 0 { + totalKeys++ + totalKeySize += len(itr.Key()) + totalValueSize += len(itr.Value()) + if totalKeys%1000000 == 0 { + fmt.Printf("Module %s num of keys %d, key size %d, value size %d\n", + module, totalKeys, totalKeySize, totalValueSize) + } + } + } + + if err := itr.Error(); err != nil { + panic(fmt.Errorf("iterator error for module %s: %w", module, err)) + } + + moduleDuration := time.Since(startTimeModule) + fmt.Printf("Module %s stats finished, total keys %d, total key size %d, total value size %d, time taken %s\n", + module, totalKeys, totalKeySize, totalValueSize, moduleDuration) + } + + fmt.Println("SeiDB Archive Migration: Aggregation completed.") +} diff --git a/tools/migration/sc/migrator.go b/tools/migration/sc/migrator.go index a26275fb6a..3670ab93ea 100644 --- a/tools/migration/sc/migrator.go +++ b/tools/migration/sc/migrator.go @@ -15,30 +15,12 @@ import ( rootmulti2 "github.com/cosmos/cosmos-sdk/storev2/rootmulti" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - acltypes "github.com/cosmos/cosmos-sdk/x/accesscontrol/types" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host" "github.com/sei-protocol/sei-chain/app/params" - epochmoduletypes "github.com/sei-protocol/sei-chain/x/epoch/types" - evmtypes "github.com/sei-protocol/sei-chain/x/evm/types" - minttypes "github.com/sei-protocol/sei-chain/x/mint/types" - oracletypes "github.com/sei-protocol/sei-chain/x/oracle/types" - tokenfactorytypes "github.com/sei-protocol/sei-chain/x/tokenfactory/types" + "github.com/sei-protocol/sei-chain/tools/migration/utils" "github.com/sei-protocol/sei-db/config" "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" @@ -51,20 +33,12 @@ type Migrator struct { storeV2 store.CommitMultiStore } -var Keys = sdk.NewKVStoreKeys( - acltypes.StoreKey, authtypes.StoreKey, authzkeeper.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, - minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, - govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey, - evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, oracletypes.StoreKey, - evmtypes.StoreKey, wasm.StoreKey, epochmoduletypes.StoreKey, tokenfactorytypes.StoreKey, -) - func NewMigrator(homeDir string, db dbm.DB) *Migrator { logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) // Creating CMS for store V1 cmsV1 := rootmulti.NewStore(db, logger) - for _, key := range Keys { + for _, key := range utils.ModuleKeys { cmsV1.MountStoreWithDB(key, sdk.StoreTypeIAVL, nil) } err := cmsV1.LoadLatestVersion() @@ -79,7 +53,7 @@ func NewMigrator(homeDir string, db dbm.DB) *Migrator { ssConfig.Enable = true ssConfig.KeepRecent = 0 cmsV2 := rootmulti2.NewStore(homeDir, logger, scConfig, ssConfig, true) - for _, key := range Keys { + for _, key := range utils.ModuleKeys { cmsV2.MountStoreWithDB(key, sdk.StoreTypeIAVL, db) } err = cmsV2.LoadLatestVersion() @@ -174,7 +148,7 @@ func CreateWasmSnapshotter(cms sdk.MultiStore, homeDir string) *keeper.WasmSnaps pk := paramskeeper.NewKeeper(encodingConfig.Marshaler, encodingConfig.Amino, keyParams, tkeyParams) wasmKeeper := keeper.NewKeeper( encodingConfig.Marshaler, - Keys[wasm.StoreKey], + utils.ModuleKeys[wasm.StoreKey], paramskeeper.Keeper{}, pk.Subspace("wasm"), authkeeper.AccountKeeper{}, diff --git a/tools/migration/ss/migrator.go b/tools/migration/ss/migrator.go index 829b7014a9..1da6d26672 100644 --- a/tools/migration/ss/migrator.go +++ b/tools/migration/ss/migrator.go @@ -7,6 +7,7 @@ import ( "github.com/armon/go-metrics" "github.com/cosmos/iavl" + "github.com/sei-protocol/sei-chain/tools/migration/utils" "github.com/sei-protocol/sei-db/ss/types" dbm "github.com/tendermint/tm-db" ) @@ -21,11 +22,7 @@ const ( DefaultCacheSize int = 10000 ) -var modules = []string{ - "wasm", "aclaccesscontrol", "oracle", "epoch", "mint", "acc", "bank", "feegrant", "staking", "distribution", "slashing", "gov", "params", "ibc", "upgrade", "evidence", "transfer", "tokenfactory", -} - -func NewMigrator(homeDir string, db dbm.DB, stateStore types.StateStore) *Migrator { +func NewMigrator(db dbm.DB, stateStore types.StateStore) *Migrator { return &Migrator{ iavlDB: db, stateStore: stateStore, @@ -78,8 +75,8 @@ func (m *Migrator) Migrate(version int64, homeDir string) error { func (m *Migrator) Verify(version int64) error { var verifyErr error - for _, module := range modules { - tree, err := ReadTree(m.iavlDB, version, []byte(buildTreePrefix(module))) + for _, module := range utils.Modules { + tree, err := ReadTree(m.iavlDB, version, []byte(utils.BuildTreePrefix(module))) if err != nil { fmt.Printf("Error reading tree %s: %s\n", module, err.Error()) return err @@ -125,7 +122,7 @@ func ExportLeafNodesFromKey(db dbm.DB, ch chan<- types.RawSnapshotNode, startKey var batchLeafNodeCount int startModuleFound := startModule == "" // true if no start module specified - for _, module := range modules { + for _, module := range utils.Modules { if !startModuleFound { if module == startModule { startModuleFound = true @@ -136,12 +133,12 @@ func ExportLeafNodesFromKey(db dbm.DB, ch chan<- types.RawSnapshotNode, startKey startTimeModule := time.Now() // Measure time for each module fmt.Printf("SeiDB Archive Migration: Iterating through %s module...\n", module) - prefixDB := dbm.NewPrefixDB(db, []byte(buildRawPrefix(module))) + prefixDB := dbm.NewPrefixDB(db, []byte(utils.BuildRawPrefix(module))) var itr dbm.Iterator var err error // If there is a starting key, seek to it, otherwise start from the beginning - if startKey != nil && bytes.HasPrefix(startKey, []byte(buildRawPrefix(module))) { + if startKey != nil && bytes.HasPrefix(startKey, []byte(utils.BuildRawPrefix(module))) { itr, err = prefixDB.Iterator(startKey, nil) // Start from the latest key } else { itr, err = prefixDB.Iterator(nil, nil) // Start from the beginning @@ -204,14 +201,6 @@ func ExportLeafNodesFromKey(db dbm.DB, ch chan<- types.RawSnapshotNode, startKey return nil } -func buildRawPrefix(moduleName string) string { - return fmt.Sprintf("s/k:%s/n", moduleName) -} - -func buildTreePrefix(moduleName string) string { - return fmt.Sprintf("s/k:%s/", moduleName) -} - func ReadTree(db dbm.DB, version int64, prefix []byte) (*iavl.MutableTree, error) { // TODO: Verify if we need a prefix here (or can just iterate through all modules) if len(prefix) != 0 { diff --git a/tools/migration/utils/helper.go b/tools/migration/utils/helper.go new file mode 100644 index 0000000000..c565e590b7 --- /dev/null +++ b/tools/migration/utils/helper.go @@ -0,0 +1,67 @@ +package utils + +import ( + "fmt" + + "github.com/CosmWasm/wasmd/x/wasm" + sdk "github.com/cosmos/cosmos-sdk/types" + acltypes "github.com/cosmos/cosmos-sdk/x/accesscontrol/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" + "github.com/cosmos/cosmos-sdk/x/feegrant" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host" + epochmoduletypes "github.com/sei-protocol/sei-chain/x/epoch/types" + evmtypes "github.com/sei-protocol/sei-chain/x/evm/types" + minttypes "github.com/sei-protocol/sei-chain/x/mint/types" + oracletypes "github.com/sei-protocol/sei-chain/x/oracle/types" + tokenfactorytypes "github.com/sei-protocol/sei-chain/x/tokenfactory/types" +) + +var ModuleKeys = sdk.NewKVStoreKeys( + acltypes.StoreKey, authtypes.StoreKey, authzkeeper.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, + minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, + govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey, + evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, oracletypes.StoreKey, + evmtypes.StoreKey, wasm.StoreKey, epochmoduletypes.StoreKey, tokenfactorytypes.StoreKey, +) + +var Modules = []string{ + "acc", + "aclaccesscontrol", + "authz", + "bank", + "capability", + "distribution", + "epoch", + "evidence", + "evm", + "feegrant", + "gov", + "ibc", + "mint", + "oracle", + "params", + "slashing", + "staking", + "tokenfactory", + "transfer", + "upgrade", + "wasm"} + +func BuildRawPrefix(moduleName string) string { + return fmt.Sprintf("s/k:%s/n", moduleName) +} + +func BuildTreePrefix(moduleName string) string { + return fmt.Sprintf("s/k:%s/", moduleName) +} diff --git a/tools/migration/wasm/keeper.go b/tools/migration/wasm/keeper.go deleted file mode 100644 index 955e5a9a88..0000000000 --- a/tools/migration/wasm/keeper.go +++ /dev/null @@ -1 +0,0 @@ -package wasm From 9432beef430c088ecb77256b5968feb250a947b8 Mon Sep 17 00:00:00 2001 From: yirenz Date: Thu, 21 Nov 2024 14:04:54 -0500 Subject: [PATCH 22/33] fix: complete failed transaction receipts with block data (#1952) * feat: fill failed tx receipt missing fields with block data * improve logic * set gasUsed=0 * debug: gasUsed * remove log * fix status check * unit test * update comment --- evmrpc/tx.go | 40 +++++++++++++++++++++++++++++++++++++++- evmrpc/tx_test.go | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 1 deletion(-) diff --git a/evmrpc/tx.go b/evmrpc/tx.go index 9d773c8720..d4d450e3ad 100644 --- a/evmrpc/tx.go +++ b/evmrpc/tx.go @@ -53,6 +53,45 @@ func (t *TransactionAPI) GetTransactionReceipt(ctx context.Context, hash common. } return nil, err } + // Fill in the receipt if the transaction has failed and used 0 gas + // This case is for when a tx fails before it makes it to the VM + if receipt.Status == 0 && receipt.GasUsed == 0 { + // Get the block + height := int64(receipt.BlockNumber) + block, err := blockByNumberWithRetry(ctx, t.tmClient, &height, 1) + if err != nil { + return nil, err + } + + // Find the transaction in the block + for _, tx := range block.Block.Txs { + etx := getEthTxForTxBz(tx, t.txConfig.TxDecoder()) + if etx != nil && etx.Hash() == hash { + // Get the signer + signer := ethtypes.MakeSigner( + types.DefaultChainConfig().EthereumConfig(t.keeper.ChainID(sdkctx)), + big.NewInt(height), + uint64(block.Block.Time.Unix()), + ) + from, _ := ethtypes.Sender(signer, etx) + + // Update receipt with correct information + receipt.From = from.Hex() + if etx.To() != nil { + receipt.To = etx.To().Hex() + receipt.ContractAddress = "" + } else { + receipt.To = "" + // For contract creation transactions, calculate the contract address + receipt.ContractAddress = crypto.CreateAddress(from, etx.Nonce()).Hex() + } + receipt.TxType = uint32(etx.Type()) + receipt.Status = uint32(ethtypes.ReceiptStatusFailed) + receipt.GasUsed = 0 + break + } + } + } height := int64(receipt.BlockNumber) block, err := blockByNumberWithRetry(ctx, t.tmClient, &height, 1) if err != nil { @@ -278,7 +317,6 @@ func encodeReceipt(receipt *types.Receipt, decoder sdk.TxDecoder, block *coretyp } bloom := ethtypes.Bloom{} bloom.SetBytes(receipt.LogsBloom) - fields := map[string]interface{}{ "blockHash": bh, "blockNumber": hexutil.Uint64(receipt.BlockNumber), diff --git a/evmrpc/tx_test.go b/evmrpc/tx_test.go index b41c07f2cf..e2d1896bf3 100644 --- a/evmrpc/tx_test.go +++ b/evmrpc/tx_test.go @@ -243,3 +243,49 @@ func TestGetVMError(t *testing.T) { resObj = sendRequestGood(t, "getVMError", "0xf02362077ac075a397344172496b28e913ce5294879d811bb0269b3be20a872f") require.Equal(t, "not found", resObj["error"].(map[string]interface{})["message"]) } + +func TestGetTransactionReceiptFailedTx(t *testing.T) { + fromAddr := "0x5b4eba929f3811980f5ae0c5d04fa200f837df4e" // Use the actual address from the block + + // Create a failed receipt with 0 gas used for a contract creation transaction + failedReceipt := &types.Receipt{ + Status: 0, // failed status + GasUsed: 0, + BlockNumber: 8, + TransactionIndex: 0, + TxHashHex: "0xf02362077ac075a397344172496b28e913ce5294879d811bb0269b3be20a872e", + From: fromAddr, // Use the actual from address + } + + // Mock the receipt in the keeper + txHash := common.HexToHash("0xf02362077ac075a397344172496b28e913ce5294879d811bb0269b3be20a872e") + EVMKeeper.MockReceipt(Ctx, txHash, failedReceipt) + + // Create JSON-RPC request + body := "{\"jsonrpc\": \"2.0\",\"method\": \"eth_getTransactionReceipt\",\"params\":[\"0xf02362077ac075a397344172496b28e913ce5294879d811bb0269b3be20a872e\"],\"id\":\"test\"}" + + req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("http://%s:%d", TestAddr, TestPort), strings.NewReader(body)) + require.Nil(t, err) + req.Header.Set("Content-Type", "application/json") + + res, err := http.DefaultClient.Do(req) + require.Nil(t, err) + + resBody, err := io.ReadAll(res.Body) + require.Nil(t, err) + + resObj := map[string]interface{}{} + require.Nil(t, json.Unmarshal(resBody, &resObj)) + resObj = resObj["result"].(map[string]interface{}) + + // Verify the receipt was filled with correct information for failed tx + require.Equal(t, "0x0", resObj["status"].(string)) // Failed status + require.Equal(t, "0x0", resObj["gasUsed"].(string)) // 0 gas used + require.Equal(t, "0x8", resObj["blockNumber"].(string)) + require.Equal(t, "0xf02362077ac075a397344172496b28e913ce5294879d811bb0269b3be20a872e", resObj["transactionHash"].(string)) + require.Equal(t, fromAddr, resObj["from"].(string)) + + // For contract creation transaction + require.Equal(t, "0x0000000000000000000000000000000000010203", resObj["to"].(string)) + require.Nil(t, resObj["contractAddress"]) +} From bf789f36105daf701f26203ad9dd6cfe125efb04 Mon Sep 17 00:00:00 2001 From: codchen Date: Fri, 22 Nov 2024 23:58:38 +0800 Subject: [PATCH 23/33] Assign owner correctly when there are multiple transfers (#1956) --- app/receipt.go | 75 +++++++++++++++++++++++++++++---------------- app/receipt_test.go | 69 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+), 26 deletions(-) diff --git a/app/receipt.go b/app/receipt.go index f41ead37c1..f4968e3c51 100644 --- a/app/receipt.go +++ b/app/receipt.go @@ -32,6 +32,10 @@ type AllowanceResponse struct { Expires json.RawMessage `json:"expires"` } +func getOwnerEventKey(contractAddr string, tokenID string) string { + return fmt.Sprintf("%s-%s", contractAddr, tokenID) +} + func (app *App) AddCosmosEventsToEVMReceiptIfApplicable(ctx sdk.Context, tx sdk.Tx, checksum [32]byte, response sdk.DeliverTxHookInput) { // hooks will only be called if DeliverTx is successful wasmEvents := GetEventsOfType(response, wasmtypes.WasmModuleEventType) @@ -43,6 +47,26 @@ func (app *App) AddCosmosEventsToEVMReceiptIfApplicable(ctx sdk.Context, tx sdk. // additional gas consumption from EVM receipt generation and event translation wasmToEvmEventGasLimit := app.EvmKeeper.GetDeliverTxHookWasmGasLimit(ctx.WithGasMeter(sdk.NewInfiniteGasMeter(1, 1))) wasmToEvmEventCtx := ctx.WithGasMeter(sdk.NewGasMeterWithMultiplier(ctx, wasmToEvmEventGasLimit)) + // unfortunately CW721 transfer events differ from ERC721 transfer events + // in that CW721 include sender (which can be different than owner) whereas + // ERC721 always include owner. The following logic refer to the owner + // event emitted before the transfer and use that instead to populate the + // synthetic ERC721 event. + ownerEvents := GetEventsOfType(response, wasmtypes.EventTypeCW721PreTransferOwner) + ownerEventsMap := map[string][]abci.Event{} + for _, ownerEvent := range ownerEvents { + if len(ownerEvent.Attributes) != 3 { + ctx.Logger().Error("received owner event with number of attributes != 3") + continue + } + ownerEventKey := getOwnerEventKey(string(ownerEvent.Attributes[0].Value), string(ownerEvent.Attributes[1].Value)) + if events, ok := ownerEventsMap[ownerEventKey]; ok { + ownerEventsMap[ownerEventKey] = append(events, ownerEvent) + } else { + ownerEventsMap[ownerEventKey] = []abci.Event{ownerEvent} + } + } + cw721TransferCounterMap := map[string]int{} for _, wasmEvent := range wasmEvents { contractAddr, found := GetAttributeValue(wasmEvent, wasmtypes.AttributeKeyContractAddr) if !found { @@ -60,7 +84,7 @@ func (app *App) AddCosmosEventsToEVMReceiptIfApplicable(ctx sdk.Context, tx sdk. // check if there is a ERC721 pointer to contract Addr pointerAddr, _, exists = app.EvmKeeper.GetERC721CW721Pointer(wasmToEvmEventCtx, contractAddr) if exists { - log, eligible := app.translateCW721Event(wasmToEvmEventCtx, wasmEvent, pointerAddr, contractAddr, response) + log, eligible := app.translateCW721Event(wasmToEvmEventCtx, wasmEvent, pointerAddr, contractAddr, ownerEventsMap, cw721TransferCounterMap) if eligible { log.Index = uint(len(logs)) logs = append(logs, log) @@ -173,7 +197,8 @@ func (app *App) translateCW20Event(ctx sdk.Context, wasmEvent abci.Event, pointe return nil, false } -func (app *App) translateCW721Event(ctx sdk.Context, wasmEvent abci.Event, pointerAddr common.Address, contractAddr string, response sdk.DeliverTxHookInput) (*ethtypes.Log, bool) { +func (app *App) translateCW721Event(ctx sdk.Context, wasmEvent abci.Event, pointerAddr common.Address, contractAddr string, + ownerEventsMap map[string][]abci.Event, cw721TransferCounterMap map[string]int) (*ethtypes.Log, bool) { action, found := GetAttributeValue(wasmEvent, "action") if !found { return nil, false @@ -184,32 +209,30 @@ func (app *App) translateCW721Event(ctx sdk.Context, wasmEvent abci.Event, point tokenID := GetTokenIDAttribute(wasmEvent) if tokenID == nil { return nil, false + } else { + ctx.Logger().Error("Translate CW721 error: null token ID") } - sender := common.Hash{} - // unfortunately CW721 transfer events differ from ERC721 transfer events - // in that CW721 include sender (which can be different than owner) whereas - // ERC721 always include owner. The following logic refer to the owner - // event emitted before the transfer and use that instead to populate the - // synthetic ERC721 event. - ownerEvents := GetEventsOfType(response, wasmtypes.EventTypeCW721PreTransferOwner) - for _, ownerEvent := range ownerEvents { - if len(ownerEvent.Attributes) != 3 || - string(ownerEvent.Attributes[0].Key) != wasmtypes.AttributeKeyContractAddr || - string(ownerEvent.Attributes[0].Value) != contractAddr { - continue - } - tokenIDStr, _ := GetAttributeValue(wasmEvent, "token_id") - if string(ownerEvent.Attributes[1].Key) != wasmtypes.AttributeKeyTokenId || - string(ownerEvent.Attributes[1].Value) != tokenIDStr || - string(ownerEvent.Attributes[2].Key) != wasmtypes.AttributeKeyOwner { - continue - } - ownerAcc, err := sdk.AccAddressFromBech32(string(ownerEvent.Attributes[2].Value)) - if err != nil { - continue + sender := app.GetEvmAddressAttribute(ctx, wasmEvent, "sender") + ownerEventKey := getOwnerEventKey(contractAddr, tokenID.String()) + var currentCounter int + if c, ok := cw721TransferCounterMap[ownerEventKey]; ok { + currentCounter = c + } + cw721TransferCounterMap[ownerEventKey] = currentCounter + 1 + if ownerEvents, ok := ownerEventsMap[ownerEventKey]; ok { + if len(ownerEvents) > currentCounter { + ownerSeiAddrStr := string(ownerEvents[currentCounter].Attributes[2].Value) + if ownerSeiAddr, err := sdk.AccAddressFromBech32(ownerSeiAddrStr); err == nil { + ownerEvmAddr := app.EvmKeeper.GetEVMAddressOrDefault(ctx, ownerSeiAddr) + sender = common.BytesToHash(ownerEvmAddr[:]) + } else { + ctx.Logger().Error("Translate CW721 error: invalid bech32 owner", "error", err, "address", ownerSeiAddrStr) + } + } else { + ctx.Logger().Error("Translate CW721 error: insufficient owner events", "key", ownerEventKey, "counter", currentCounter, "events", len(ownerEvents)) } - owner := app.EvmKeeper.GetEVMAddressOrDefault(ctx, ownerAcc) - sender = common.BytesToHash(owner[:]) + } else { + ctx.Logger().Error("Translate CW721 error: owner event not found", "key", ownerEventKey) } topics = []common.Hash{ ERC721TransferTopic, diff --git a/app/receipt_test.go b/app/receipt_test.go index 326dd64265..c3305c5244 100644 --- a/app/receipt_test.go +++ b/app/receipt_test.go @@ -372,6 +372,41 @@ func TestEvmEventsForCw721(t *testing.T) { res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) require.Equal(t, uint32(0), res.Code) + // acct2 transfer on behalf of acct1 to acct2, acct2 approve acct1, acct1 transfer on behalf of acct2 to acct1 + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + msg1 := &wasmtypes.MsgExecuteContract{ + Sender: recipient.String(), + Contract: contractAddr.String(), + Msg: []byte(fmt.Sprintf("{\"transfer_nft\":{\"token_id\":\"2\",\"recipient\":\"%s\"}}", recipient.String())), + } + msg2 := &wasmtypes.MsgExecuteContract{ + Sender: recipient.String(), + Contract: contractAddr.String(), + Msg: []byte(fmt.Sprintf("{\"approve_all\":{\"operator\":\"%s\"}}", creator.String())), + } + msg3 := &wasmtypes.MsgExecuteContract{ + Sender: creator.String(), + Contract: contractAddr.String(), + Msg: []byte(fmt.Sprintf("{\"transfer_nft\":{\"token_id\":\"2\",\"recipient\":\"%s\"}}", creator.String())), + } + txBuilder.SetMsgs(msg1, msg2, msg3) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(1000000) + tx = signTxMultiple(txBuilder, []cryptotypes.PrivKey{privKeyRecipient, privKey}, []authtypes.AccountI{k.AccountKeeper().GetAccount(ctx, recipient), k.AccountKeeper().GetAccount(ctx, creator)}) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 3, len(receipt.Logs)) + // make sure that the owner is set correctly to the creator, not the spender. + require.Equal(t, common.BytesToHash(creatorEvmAddr[:]).Hex(), receipt.Logs[0].Topics[1]) + // the second log is the approval log, which doesn't affect ownership thus not checking here. + recipientEvmAddr := testkeeper.EVMTestApp.EvmKeeper.GetEVMAddressOrDefault(ctx, recipient) + require.Equal(t, common.BytesToHash(recipientEvmAddr[:]).Hex(), receipt.Logs[2].Topics[1]) + // burn on behalf payload = []byte("{\"burn\":{\"token_id\":\"2\"}}") msg = &wasmtypes.MsgExecuteContract{ @@ -460,3 +495,37 @@ func signTx(txBuilder client.TxBuilder, privKey cryptotypes.PrivKey, acc authtyp _ = txBuilder.SetSignatures(sigsV2...) return txBuilder.GetTx() } + +func signTxMultiple(txBuilder client.TxBuilder, privKeys []cryptotypes.PrivKey, accs []authtypes.AccountI) sdk.Tx { + var sigsV2 []signing.SignatureV2 + for i, privKey := range privKeys { + sigsV2 = append(sigsV2, signing.SignatureV2{ + PubKey: privKey.PubKey(), + Data: &signing.SingleSignatureData{ + SignMode: testkeeper.EVMTestApp.GetTxConfig().SignModeHandler().DefaultMode(), + Signature: nil, + }, + Sequence: accs[i].GetSequence(), + }) + } + _ = txBuilder.SetSignatures(sigsV2...) + sigsV2 = []signing.SignatureV2{} + for i, privKey := range privKeys { + signerData := xauthsigning.SignerData{ + ChainID: "sei-test", + AccountNumber: accs[i].GetAccountNumber(), + Sequence: accs[i].GetSequence(), + } + sigV2, _ := clienttx.SignWithPrivKey( + testkeeper.EVMTestApp.GetTxConfig().SignModeHandler().DefaultMode(), + signerData, + txBuilder, + privKey, + testkeeper.EVMTestApp.GetTxConfig(), + accs[i].GetSequence(), + ) + sigsV2 = append(sigsV2, sigV2) + } + _ = txBuilder.SetSignatures(sigsV2...) + return txBuilder.GetTx() +} From 3807a81d1357ef3b68a28a8175921d61bc609881 Mon Sep 17 00:00:00 2001 From: Jeremy Wei Date: Fri, 22 Nov 2024 14:43:31 -0500 Subject: [PATCH 24/33] EIP-1559: Add max base fee as a param (#1951) * introduce max base fee as a param * add new migrations file * fix failing unit tests * relax test * remove it.only --- app/eth_replay.go | 1 - contracts/test/EVMCompatabilityTest.js | 4 +- go.mod | 20 +-- go.sum | 35 ++--- precompiles/pointer/pointer_test.go | 2 +- proto/evm/params.proto | 6 + x/evm/genesis_test.go | 1 + x/evm/keeper/fee.go | 6 + x/evm/keeper/fee_test.go | 24 ++++ x/evm/keeper/params.go | 4 + x/evm/keeper/params_test.go | 2 + .../migrate_eip_1559_max_base_fee.go | 14 ++ x/evm/module.go | 4 + x/evm/module_test.go | 2 +- x/evm/types/params.go | 19 +++ x/evm/types/params.pb.go | 130 ++++++++++++------ x/evm/types/params_test.go | 1 + 17 files changed, 205 insertions(+), 70 deletions(-) create mode 100644 x/evm/migrations/migrate_eip_1559_max_base_fee.go diff --git a/app/eth_replay.go b/app/eth_replay.go index 780267b9d4..d63a3f1ddf 100644 --- a/app/eth_replay.go +++ b/app/eth_replay.go @@ -141,7 +141,6 @@ func BlockTest(a *App, bt *ethtests.BlockTest) { } params := a.EvmKeeper.GetParams(a.GetContextForDeliverTx([]byte{})) params.MinimumFeePerGas = sdk.NewDecFromInt(sdk.NewInt(0)) - // params.BaseFeePerGas = sdk.NewDecFromInt(sdk.NewInt(0)) a.EvmKeeper.SetParams(a.GetContextForDeliverTx([]byte{}), params) } diff --git a/contracts/test/EVMCompatabilityTest.js b/contracts/test/EVMCompatabilityTest.js index 070eadaff5..37a9ae2f1d 100644 --- a/contracts/test/EVMCompatabilityTest.js +++ b/contracts/test/EVMCompatabilityTest.js @@ -484,12 +484,12 @@ describe("EVM Test", function () { gasPrice: higherGasPrice, type: 1, }); - const receipt = await txResponse.wait(); + await txResponse.wait(); const balanceAfter = await ethers.provider.getBalance(owner); const diff = balanceBefore - balanceAfter; - expect(diff).to.equal(21000 * higherGasPrice); + expect(diff).to.be.greaterThan(21000 * gasPrice); const success = await sendTransactionAndCheckGas(owner, owner, 0) expect(success).to.be.true diff --git a/go.mod b/go.mod index b56cc0e5d3..3b2e906fd6 100644 --- a/go.mod +++ b/go.mod @@ -43,9 +43,9 @@ require ( golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa golang.org/x/sync v0.8.0 golang.org/x/time v0.3.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 - google.golang.org/grpc v1.64.1 - google.golang.org/protobuf v1.34.2 + google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 + google.golang.org/grpc v1.67.1 + google.golang.org/protobuf v1.35.1 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -125,6 +125,7 @@ require ( github.com/fzipp/gocyclo v0.5.1 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect + github.com/ghodss/yaml v1.0.0 // indirect github.com/go-critic/go-critic v0.6.3 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect @@ -172,6 +173,7 @@ require ( github.com/gostaticanalysis/nilerr v0.1.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect @@ -312,16 +314,16 @@ require ( go.opencensus.io v0.23.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.9.0 // indirect go.opentelemetry.io/otel/sdk v1.9.0 // indirect - golang.org/x/crypto v0.24.0 // indirect + golang.org/x/crypto v0.26.0 // indirect golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/text v0.17.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.19.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect honnef.co/go/tools v0.3.1 // indirect diff --git a/go.sum b/go.sum index b7d33e008d..237eacc4af 100644 --- a/go.sum +++ b/go.sum @@ -457,6 +457,7 @@ github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2Gihuqh github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= @@ -765,6 +766,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 h1:ad0vkEBuk23VJzZR9nkLVG0YAoN9coASF1GusYX6AlU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0/go.mod h1:igFoXX2ELCW06bol23DWPB5BEWfZISOzSP5K2sbLea0= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag= @@ -1647,8 +1650,8 @@ golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98y golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= 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= @@ -1788,8 +1791,8 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20170207211851-4464e7848382/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-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1956,8 +1959,8 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.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-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1970,8 +1973,8 @@ golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= 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= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1990,8 +1993,8 @@ golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= 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= @@ -2255,10 +2258,10 @@ google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2I google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= 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-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 h1:2oV8dfuIkM1Ti7DwXc0BJfnwr9csz4TDXI9EmiI+Rbw= +google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38/go.mod h1:vuAjtvlwkDKF6L1GQ0SokiRLCGFfeBUXWr/aFFkHACc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 h1:zciRKQ4kBpFgpfC5QQCVtnnNAcLIqweL7plyZRQHVpI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= 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= @@ -2276,8 +2279,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= 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= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/precompiles/pointer/pointer_test.go b/precompiles/pointer/pointer_test.go index 2954930a02..a1f1dcd3d6 100644 --- a/precompiles/pointer/pointer_test.go +++ b/precompiles/pointer/pointer_test.go @@ -57,7 +57,7 @@ func TestAddNative(t *testing.T) { evm = vm.NewEVM(*blockCtx, vm.TxContext{}, statedb, cfg, vm.Config{}) ret, g, err := p.RunAndCalculateGas(evm, caller, caller, append(p.GetExecutor().(*pointer.PrecompileExecutor).AddNativePointerID, args...), suppliedGas, nil, nil, false, false) require.Nil(t, err) - require.Equal(t, uint64(8890698), g) + require.Equal(t, uint64(8889527), g) outputs, err := m.Outputs.Unpack(ret) require.Nil(t, err) addr := outputs[0].(common.Address) diff --git a/proto/evm/params.proto b/proto/evm/params.proto index 54d5ba3ffb..fb5067ccdc 100644 --- a/proto/evm/params.proto +++ b/proto/evm/params.proto @@ -62,6 +62,12 @@ string minimum_fee_per_gas = 4 [ (gogoproto.jsontag) = "max_dynamic_base_fee_downward_adjustment" ]; uint64 target_gas_used_per_block = 12; + string maximum_fee_per_gas = 13 [ + (gogoproto.moretags) = "yaml:\"maximum_fee_per_gas\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "maximum_fee_per_gas" + ]; } message ParamsPreV580 { diff --git a/x/evm/genesis_test.go b/x/evm/genesis_test.go index df2453b350..84ee837bfd 100644 --- a/x/evm/genesis_test.go +++ b/x/evm/genesis_test.go @@ -32,6 +32,7 @@ func TestExportImportGenesis(t *testing.T) { assert.Equal(t, types.DefaultParams().PriorityNormalizer, param.PriorityNormalizer) assert.Equal(t, types.DefaultParams().BaseFeePerGas, param.BaseFeePerGas) assert.Equal(t, types.DefaultParams().MinimumFeePerGas, param.MinimumFeePerGas) + assert.Equal(t, types.DefaultParams().MaximumFeePerGas, param.MaximumFeePerGas) assert.Equal(t, types.DefaultParams().WhitelistedCwCodeHashesForDelegateCall, param.WhitelistedCwCodeHashesForDelegateCall) assert.Equal(t, types.DefaultParams().MaxDynamicBaseFeeUpwardAdjustment, param.MaxDynamicBaseFeeUpwardAdjustment) assert.Equal(t, types.DefaultParams().MaxDynamicBaseFeeDownwardAdjustment, param.MaxDynamicBaseFeeDownwardAdjustment) diff --git a/x/evm/keeper/fee.go b/x/evm/keeper/fee.go index b00e7912a7..514b0d511d 100644 --- a/x/evm/keeper/fee.go +++ b/x/evm/keeper/fee.go @@ -16,6 +16,7 @@ func (k *Keeper) AdjustDynamicBaseFeePerGas(ctx sdk.Context, blockGasUsed uint64 return ¤tBaseFee } minimumFeePerGas := k.GetParams(ctx).MinimumFeePerGas + maximumFeePerGas := k.GetParams(ctx).MaximumFeePerGas blockGasLimit := sdk.NewDec(ctx.ConsensusParams().Block.MaxGas) blockGasUsedDec := sdk.NewDec(int64(blockGasUsed)) @@ -46,6 +47,11 @@ func (k *Keeper) AdjustDynamicBaseFeePerGas(ctx sdk.Context, blockGasUsed uint64 newBaseFee = minimumFeePerGas } + // Ensure the new base fee is not higher than the maximum fee + if newBaseFee.GT(maximumFeePerGas) { + newBaseFee = maximumFeePerGas + } + // Set the new base fee for the next height k.SetDynamicBaseFeePerGas(ctx.WithBlockHeight(ctx.BlockHeight()+1), newBaseFee) diff --git a/x/evm/keeper/fee_test.go b/x/evm/keeper/fee_test.go index 981a4b2bb5..78e0595422 100644 --- a/x/evm/keeper/fee_test.go +++ b/x/evm/keeper/fee_test.go @@ -13,6 +13,7 @@ func TestBaseFeePerGas(t *testing.T) { k := &testkeeper.EVMTestApp.EvmKeeper ctx := testkeeper.EVMTestApp.GetContextForDeliverTx([]byte{}) require.Equal(t, k.GetMinimumFeePerGas(ctx), k.GetDynamicBaseFeePerGas(ctx)) + require.True(t, k.GetDynamicBaseFeePerGas(ctx).LTE(k.GetMaximumFeePerGas(ctx))) originalbf := k.GetDynamicBaseFeePerGas(ctx) k.SetDynamicBaseFeePerGas(ctx, sdk.OneDec()) require.Equal(t, sdk.NewDecFromInt(sdk.NewInt(1)), k.GetDynamicBaseFeePerGas(ctx)) @@ -25,6 +26,7 @@ func TestAdjustBaseFeePerGas(t *testing.T) { name string currentBaseFee float64 minimumFee float64 + maximumFee float64 blockGasUsed uint64 blockGasLimit uint64 upwardAdj sdk.Dec @@ -36,6 +38,7 @@ func TestAdjustBaseFeePerGas(t *testing.T) { name: "Block gas usage exactly half of limit, 0% up, 0% down, no fee change", currentBaseFee: 100, minimumFee: 10, + maximumFee: 1000, blockGasUsed: 500000, blockGasLimit: 1000000, upwardAdj: sdk.NewDec(0), @@ -47,6 +50,7 @@ func TestAdjustBaseFeePerGas(t *testing.T) { name: "Block gas usage 50%, 50% up, 50% down, no fee change", currentBaseFee: 100, minimumFee: 10, + maximumFee: 1000, blockGasUsed: 500000, blockGasLimit: 1000000, upwardAdj: sdk.NewDecWithPrec(5, 1), @@ -58,6 +62,7 @@ func TestAdjustBaseFeePerGas(t *testing.T) { name: "Block gas usage 75%, 0% up, 0% down, base fee stays the same", currentBaseFee: 10000, minimumFee: 10, + maximumFee: 100000, blockGasUsed: 750000, blockGasLimit: 1000000, upwardAdj: sdk.NewDec(0), @@ -69,6 +74,7 @@ func TestAdjustBaseFeePerGas(t *testing.T) { name: "Block gas usage 25%, 0% up, 0% down, base fee stays the same", currentBaseFee: 10000, minimumFee: 10, + maximumFee: 100000, blockGasUsed: 250000, blockGasLimit: 1000000, upwardAdj: sdk.NewDec(0), @@ -80,6 +86,7 @@ func TestAdjustBaseFeePerGas(t *testing.T) { name: "Block gas usage 75%, 50% up, 0% down, base fee increases by 25%", currentBaseFee: 10000, minimumFee: 10, + maximumFee: 100000, blockGasUsed: 750000, blockGasLimit: 1000000, upwardAdj: sdk.NewDecWithPrec(5, 1), @@ -91,6 +98,7 @@ func TestAdjustBaseFeePerGas(t *testing.T) { name: "Block gas usage 25%, 0% up, 50% down, base fee decreases by 25%", currentBaseFee: 10000, minimumFee: 10, + maximumFee: 100000, blockGasUsed: 250000, blockGasLimit: 1000000, upwardAdj: sdk.NewDec(0), @@ -102,6 +110,7 @@ func TestAdjustBaseFeePerGas(t *testing.T) { name: "Block gas usage low, new base fee below minimum, set to minimum", currentBaseFee: 100, minimumFee: 99, + maximumFee: 1000, blockGasUsed: 0, blockGasLimit: 1000000, upwardAdj: sdk.NewDecWithPrec(5, 2), @@ -109,10 +118,23 @@ func TestAdjustBaseFeePerGas(t *testing.T) { targetGasUsed: 500000, expectedBaseFee: 99, // Should not go below the minimum fee }, + { + name: "Block gas usage high, new base fee above maximum, set to maximum", + currentBaseFee: 999, + minimumFee: 10, + maximumFee: 1000, + blockGasUsed: 1000000, // completely full block + blockGasLimit: 1000000, + upwardAdj: sdk.NewDecWithPrec(5, 1), + downwardAdj: sdk.NewDecWithPrec(5, 1), + targetGasUsed: 500000, + expectedBaseFee: 1000, // Should not go above the maximum fee + }, { name: "target gas used is 0", currentBaseFee: 10000, minimumFee: 10, + maximumFee: 1000, blockGasUsed: 0, blockGasLimit: 1000000, upwardAdj: sdk.NewDecWithPrec(5, 1), @@ -125,6 +147,7 @@ func TestAdjustBaseFeePerGas(t *testing.T) { // block gas used is 1.5x block gas limit currentBaseFee: 10000, minimumFee: 10, + maximumFee: 100000, blockGasUsed: 1500000, blockGasLimit: 1000000, upwardAdj: sdk.NewDecWithPrec(5, 1), @@ -142,6 +165,7 @@ func TestAdjustBaseFeePerGas(t *testing.T) { k.SetDynamicBaseFeePerGas(ctx, sdk.NewDecFromInt(sdk.NewInt(int64(tc.currentBaseFee)))) p := k.GetParams(ctx) p.MinimumFeePerGas = sdk.NewDec(int64(tc.minimumFee)) + p.MaximumFeePerGas = sdk.NewDec(int64(tc.maximumFee)) p.MaxDynamicBaseFeeUpwardAdjustment = tc.upwardAdj p.MaxDynamicBaseFeeDownwardAdjustment = tc.downwardAdj p.TargetGasUsedPerBlock = tc.targetGasUsed diff --git a/x/evm/keeper/params.go b/x/evm/keeper/params.go index 992a6390fe..b95ebc6bde 100644 --- a/x/evm/keeper/params.go +++ b/x/evm/keeper/params.go @@ -49,6 +49,10 @@ func (k *Keeper) GetMinimumFeePerGas(ctx sdk.Context) sdk.Dec { return k.GetParams(ctx).MinimumFeePerGas } +func (k *Keeper) GetMaximumFeePerGas(ctx sdk.Context) sdk.Dec { + return k.GetParams(ctx).MaximumFeePerGas +} + func (k *Keeper) GetTargetGasUsedPerBlock(ctx sdk.Context) uint64 { return k.GetParams(ctx).TargetGasUsedPerBlock } diff --git a/x/evm/keeper/params_test.go b/x/evm/keeper/params_test.go index f47323152c..7bbd6cb0a5 100644 --- a/x/evm/keeper/params_test.go +++ b/x/evm/keeper/params_test.go @@ -18,6 +18,8 @@ func TestParams(t *testing.T) { require.Equal(t, types.DefaultMinFeePerGas, k.GetDynamicBaseFeePerGas(ctx)) require.Equal(t, types.DefaultBaseFeePerGas, k.GetBaseFeePerGas(ctx)) require.Equal(t, types.DefaultMinFeePerGas, k.GetMinimumFeePerGas(ctx)) + require.Equal(t, types.DefaultMaxFeePerGas, k.GetMaximumFeePerGas(ctx)) + require.True(t, k.GetMinimumFeePerGas(ctx).LTE(k.GetMaximumFeePerGas(ctx))) require.Equal(t, types.DefaultDeliverTxHookWasmGasLimit, k.GetDeliverTxHookWasmGasLimit(ctx)) require.Equal(t, types.DefaultMaxDynamicBaseFeeUpwardAdjustment, k.GetMaxDynamicBaseFeeUpwardAdjustment(ctx)) require.Equal(t, types.DefaultMaxDynamicBaseFeeDownwardAdjustment, k.GetMaxDynamicBaseFeeDownwardAdjustment(ctx)) diff --git a/x/evm/migrations/migrate_eip_1559_max_base_fee.go b/x/evm/migrations/migrate_eip_1559_max_base_fee.go new file mode 100644 index 0000000000..f5d3fd9b66 --- /dev/null +++ b/x/evm/migrations/migrate_eip_1559_max_base_fee.go @@ -0,0 +1,14 @@ +package migrations + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/sei-protocol/sei-chain/x/evm/keeper" + "github.com/sei-protocol/sei-chain/x/evm/types" +) + +func MigrateEip1559MaxFeePerGas(ctx sdk.Context, k *keeper.Keeper) error { + keeperParams := k.GetParamsIfExists(ctx) + keeperParams.MaximumFeePerGas = types.DefaultParams().MaximumFeePerGas + k.SetParams(ctx, keeperParams) + return nil +} diff --git a/x/evm/module.go b/x/evm/module.go index a923df804d..29b504d85e 100644 --- a/x/evm/module.go +++ b/x/evm/module.go @@ -221,6 +221,10 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { _ = cfg.RegisterMigration(types.ModuleName, 13, func(ctx sdk.Context) error { return migrations.MigrateEip1559Params(ctx, am.keeper) }) + + _ = cfg.RegisterMigration(types.ModuleName, 14, func(ctx sdk.Context) error { + return migrations.MigrateEip1559MaxFeePerGas(ctx, am.keeper) + }) } // RegisterInvariants registers the capability module's invariants. diff --git a/x/evm/module_test.go b/x/evm/module_test.go index aecb5874e7..bfa9afae60 100644 --- a/x/evm/module_test.go +++ b/x/evm/module_test.go @@ -54,7 +54,7 @@ func TestModuleExportGenesis(t *testing.T) { cdc := app.MakeEncodingConfig().Marshaler jsonMsg := module.ExportGenesis(ctx, cdc) jsonStr := string(jsonMsg) - assert.Equal(t, `{"params":{"priority_normalizer":"1.000000000000000000","base_fee_per_gas":"0.000000000000000000","minimum_fee_per_gas":"1000000000.000000000000000000","whitelisted_cw_code_hashes_for_delegate_call":[],"deliver_tx_hook_wasm_gas_limit":"300000","max_dynamic_base_fee_upward_adjustment":"0.018900000000000000","max_dynamic_base_fee_downward_adjustment":"0.003900000000000000","target_gas_used_per_block":"250000"},"address_associations":[{"sei_address":"sei17xpfvakm2amg962yls6f84z3kell8c5la4jkdu","eth_address":"0x27F7B8B8B5A4e71E8E9aA671f4e4031E3773303F"}],"codes":[],"states":[],"nonces":[],"serialized":[{"prefix":"Fg==","key":"AwAC","value":"AAAAAAAAAAM="},{"prefix":"Fg==","key":"BAAG","value":"AAAAAAAAAAQ="}]}`, jsonStr) + assert.Equal(t, `{"params":{"priority_normalizer":"1.000000000000000000","base_fee_per_gas":"0.000000000000000000","minimum_fee_per_gas":"1000000000.000000000000000000","whitelisted_cw_code_hashes_for_delegate_call":[],"deliver_tx_hook_wasm_gas_limit":"300000","max_dynamic_base_fee_upward_adjustment":"0.018900000000000000","max_dynamic_base_fee_downward_adjustment":"0.003900000000000000","target_gas_used_per_block":"250000","maximum_fee_per_gas":"1000000000000.000000000000000000"},"address_associations":[{"sei_address":"sei17xpfvakm2amg962yls6f84z3kell8c5la4jkdu","eth_address":"0x27F7B8B8B5A4e71E8E9aA671f4e4031E3773303F"}],"codes":[],"states":[],"nonces":[],"serialized":[{"prefix":"Fg==","key":"AwAC","value":"AAAAAAAAAAM="},{"prefix":"Fg==","key":"BAAG","value":"AAAAAAAAAAQ="}]}`, jsonStr) } func TestConsensusVersion(t *testing.T) { diff --git a/x/evm/types/params.go b/x/evm/types/params.go index 905f9234b7..7b76321c65 100644 --- a/x/evm/types/params.go +++ b/x/evm/types/params.go @@ -12,6 +12,7 @@ import ( var ( KeyPriorityNormalizer = []byte("KeyPriorityNormalizer") KeyMinFeePerGas = []byte("KeyMinFeePerGas") + KeyMaxFeePerGas = []byte("KeyMaximumFeePerGas") KeyDeliverTxHookWasmGasLimit = []byte("KeyDeliverTxHookWasmGasLimit") KeyMaxDynamicBaseFeeUpwardAdjustment = []byte("KeyMaxDynamicBaseFeeUpwardAdjustment") KeyMaxDynamicBaseFeeDownwardAdjustment = []byte("KeyMaxDynamicBaseFeeDownwardAdjustment") @@ -35,6 +36,7 @@ var DefaultWhitelistedCwCodeHashesForDelegateCall = generateDefaultWhitelistedCw var DefaultMaxDynamicBaseFeeUpwardAdjustment = sdk.NewDecWithPrec(189, 4) // 1.89% var DefaultMaxDynamicBaseFeeDownwardAdjustment = sdk.NewDecWithPrec(39, 4) // .39% var DefaultTargetGasUsedPerBlock = uint64(250000) // 250k +var DefaultMaxFeePerGas = sdk.NewDec(1000000000000) // 1,000gwei var _ paramtypes.ParamSet = (*Params)(nil) @@ -52,6 +54,7 @@ func DefaultParams() Params { DeliverTxHookWasmGasLimit: DefaultDeliverTxHookWasmGasLimit, WhitelistedCwCodeHashesForDelegateCall: DefaultWhitelistedCwCodeHashesForDelegateCall, TargetGasUsedPerBlock: DefaultTargetGasUsedPerBlock, + MaximumFeePerGas: DefaultMaxFeePerGas, } } @@ -65,6 +68,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyWhitelistedCwCodeHashesForDelegateCall, &p.WhitelistedCwCodeHashesForDelegateCall, validateWhitelistedCwHashesForDelegateCall), paramtypes.NewParamSetPair(KeyDeliverTxHookWasmGasLimit, &p.DeliverTxHookWasmGasLimit, validateDeliverTxHookWasmGasLimit), paramtypes.NewParamSetPair(KeyTargetGasUsedPerBlock, &p.TargetGasUsedPerBlock, func(i interface{}) error { return nil }), + paramtypes.NewParamSetPair(KeyMaxFeePerGas, &p.MaximumFeePerGas, validateMaxFeePerGas), } } @@ -78,6 +82,9 @@ func (p Params) Validate() error { if err := validateMinFeePerGas(p.MinimumFeePerGas); err != nil { return err } + if err := validateMaxFeePerGas(p.MaximumFeePerGas); err != nil { + return err + } if err := validateDeliverTxHookWasmGasLimit(p.DeliverTxHookWasmGasLimit); err != nil { return err } @@ -151,6 +158,18 @@ func validateMinFeePerGas(i interface{}) error { return nil } +func validateMaxFeePerGas(i interface{}) error { + v, ok := i.(sdk.Dec) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v.IsNegative() { + return fmt.Errorf("negative max fee per gas: %d", v) + } + return nil +} + func validateDeliverTxHookWasmGasLimit(i interface{}) error { v, ok := i.(uint64) if !ok { diff --git a/x/evm/types/params.pb.go b/x/evm/types/params.pb.go index fa42412a43..ee867aa226 100644 --- a/x/evm/types/params.pb.go +++ b/x/evm/types/params.pb.go @@ -49,6 +49,7 @@ type Params struct { MaxDynamicBaseFeeUpwardAdjustment github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,10,opt,name=max_dynamic_base_fee_upward_adjustment,json=maxDynamicBaseFeeUpwardAdjustment,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_dynamic_base_fee_upward_adjustment" yaml:"max_dynamic_base_fee_upward_adjustment"` MaxDynamicBaseFeeDownwardAdjustment github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,11,opt,name=max_dynamic_base_fee_downward_adjustment,json=maxDynamicBaseFeeDownwardAdjustment,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_dynamic_base_fee_downward_adjustment" yaml:"max_dynamic_base_fee_downward_adjustment"` TargetGasUsedPerBlock uint64 `protobuf:"varint,12,opt,name=target_gas_used_per_block,json=targetGasUsedPerBlock,proto3" json:"target_gas_used_per_block,omitempty"` + MaximumFeePerGas github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,13,opt,name=maximum_fee_per_gas,json=maximumFeePerGas,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"maximum_fee_per_gas" yaml:"maximum_fee_per_gas"` } func (m *Params) Reset() { *m = Params{} } @@ -111,46 +112,49 @@ func init() { func init() { proto.RegisterFile("evm/params.proto", fileDescriptor_9272f3679901ea94) } var fileDescriptor_9272f3679901ea94 = []byte{ - // 609 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x6b, 0x13, 0x4f, - 0x18, 0xc7, 0x33, 0xbf, 0x96, 0xf2, 0xeb, 0x5a, 0xa1, 0x6c, 0x15, 0xb7, 0x3d, 0xec, 0xd6, 0x15, - 0x4a, 0x0e, 0x26, 0x7b, 0xe8, 0x45, 0x7a, 0x6b, 0x1a, 0x9a, 0x1e, 0x44, 0xca, 0x62, 0x11, 0x04, - 0x19, 0x26, 0x3b, 0x4f, 0x37, 0x63, 0x66, 0x32, 0x61, 0x66, 0xd2, 0x24, 0xbe, 0x00, 0xc1, 0x83, - 0x20, 0xe2, 0xc1, 0xa3, 0x6f, 0x46, 0xe8, 0xb1, 0x47, 0x11, 0x5c, 0xa4, 0xc5, 0x4b, 0x8f, 0x79, - 0x05, 0x92, 0xc9, 0xf6, 0x8f, 0xed, 0x22, 0x89, 0xa7, 0x4c, 0x9e, 0xe7, 0x33, 0xcf, 0x7c, 0xbf, - 0xcf, 0x33, 0x3b, 0xce, 0x32, 0x1c, 0x89, 0xa8, 0x4b, 0x14, 0x11, 0xba, 0xda, 0x55, 0xd2, 0x48, - 0xd7, 0xd3, 0xc0, 0xec, 0x2a, 0x91, 0xbc, 0xaa, 0x81, 0x25, 0x2d, 0xc2, 0x3a, 0x55, 0x38, 0x12, - 0x6b, 0xf7, 0x52, 0x99, 0x4a, 0x9b, 0x8a, 0xc6, 0xab, 0x09, 0x1f, 0x9e, 0x2c, 0x3a, 0x0b, 0xfb, - 0xb6, 0x80, 0xfb, 0x09, 0x39, 0x2b, 0x5d, 0xc5, 0xa4, 0x62, 0x66, 0x88, 0x3b, 0x52, 0x09, 0xc2, - 0xd9, 0x1b, 0x50, 0xde, 0x7f, 0xeb, 0xa8, 0xbc, 0x58, 0x4b, 0x8e, 0xb3, 0xa0, 0xf4, 0x3d, 0x0b, - 0x36, 0x52, 0x66, 0x5a, 0xbd, 0x66, 0x35, 0x91, 0x22, 0x4a, 0xa4, 0x16, 0x52, 0xe7, 0x3f, 0x15, - 0x4d, 0xdb, 0x91, 0x19, 0x76, 0x41, 0x57, 0xeb, 0x90, 0x9c, 0x67, 0x41, 0x51, 0xb1, 0x51, 0x16, - 0xac, 0x0d, 0x89, 0xe0, 0x5b, 0x61, 0x41, 0x32, 0x8c, 0xdd, 0x8b, 0xe8, 0xb3, 0xcb, 0xa0, 0xfb, - 0x16, 0x39, 0xcb, 0x4d, 0xa2, 0x01, 0x1f, 0x02, 0xe0, 0x2e, 0x28, 0x9c, 0x12, 0xed, 0xcd, 0x59, - 0x4d, 0xaf, 0x66, 0xd6, 0x74, 0xab, 0xd2, 0x28, 0x0b, 0x1e, 0x4c, 0x04, 0xdd, 0xcc, 0x84, 0xf1, - 0xdd, 0x71, 0x68, 0x17, 0x60, 0x1f, 0x54, 0x83, 0x68, 0xf7, 0x23, 0x72, 0x56, 0x04, 0xeb, 0x30, - 0xd1, 0x13, 0x7f, 0x68, 0x99, 0xff, 0xd7, 0xfe, 0x14, 0x14, 0xbb, 0xea, 0x4f, 0x41, 0x32, 0x8c, - 0x97, 0xf3, 0xe8, 0x95, 0xa8, 0xaf, 0xc8, 0x79, 0xdc, 0x6f, 0x31, 0x03, 0x9c, 0x69, 0x03, 0x14, - 0x27, 0x7d, 0x9c, 0x48, 0x0a, 0xb8, 0x45, 0x74, 0x0b, 0x34, 0x3e, 0x94, 0x0a, 0x53, 0xe0, 0x90, - 0x12, 0x03, 0x38, 0x21, 0x9c, 0x7b, 0xff, 0xaf, 0xcf, 0x95, 0x97, 0x6a, 0xe9, 0x79, 0x16, 0xcc, - 0xb4, 0x6f, 0x94, 0x05, 0x9b, 0x13, 0x61, 0xb3, 0xec, 0x0a, 0xe3, 0x8d, 0x6b, 0xf8, 0x4e, 0x7f, - 0x47, 0x52, 0xd8, 0xb3, 0xec, 0xae, 0x54, 0xf5, 0x9c, 0xdc, 0x21, 0x9c, 0xbb, 0xdb, 0x8e, 0x4f, - 0x81, 0xb3, 0x23, 0x50, 0xd8, 0x0c, 0x70, 0x4b, 0xca, 0x36, 0xee, 0x13, 0x2d, 0xc6, 0xb6, 0x31, - 0x67, 0x82, 0x19, 0x6f, 0x71, 0x1d, 0x95, 0xe7, 0xe3, 0xd5, 0x9c, 0x7a, 0x3e, 0xd8, 0x93, 0xb2, - 0xfd, 0x82, 0x68, 0xd1, 0x20, 0xfa, 0xe9, 0x18, 0x70, 0x7f, 0x20, 0x67, 0x43, 0x90, 0x01, 0xa6, - 0xc3, 0x0e, 0x11, 0x2c, 0xc1, 0x97, 0x03, 0xed, 0x75, 0xfb, 0x44, 0x51, 0x4c, 0xe8, 0xeb, 0x9e, - 0x36, 0x02, 0x3a, 0xc6, 0x73, 0xec, 0xc8, 0xde, 0xa1, 0x99, 0x67, 0x36, 0xe5, 0x01, 0xa3, 0x2c, - 0xa8, 0xe4, 0x63, 0x9c, 0x8a, 0x0f, 0xe3, 0x87, 0x82, 0x0c, 0xea, 0x13, 0xae, 0x36, 0xb9, 0x75, - 0x07, 0x16, 0xda, 0xbe, 0x64, 0xdc, 0x5f, 0xc8, 0x29, 0x17, 0x96, 0xa3, 0xb2, 0xdf, 0xb9, 0xe9, - 0xf0, 0x8e, 0x75, 0xf8, 0x7e, 0x76, 0x87, 0x53, 0x1f, 0x31, 0xca, 0x82, 0xe8, 0x2f, 0x1e, 0x0b, - 0x76, 0x84, 0xf1, 0xa3, 0x5b, 0x2e, 0xeb, 0x39, 0x76, 0xcd, 0xe7, 0x13, 0x67, 0xd5, 0x10, 0x95, - 0x82, 0xb1, 0xc3, 0xef, 0x69, 0xa0, 0xf6, 0x03, 0x68, 0x72, 0x99, 0xb4, 0xbd, 0x25, 0x7b, 0x0b, - 0xee, 0x4f, 0x80, 0x06, 0xd1, 0x07, 0x1a, 0xe8, 0x3e, 0xa8, 0xda, 0x38, 0xb9, 0x35, 0xff, 0xf9, - 0x4b, 0x50, 0xaa, 0x35, 0x8e, 0x4f, 0x7d, 0x74, 0x72, 0xea, 0xa3, 0x9f, 0xa7, 0x3e, 0xfa, 0x70, - 0xe6, 0x97, 0x4e, 0xce, 0xfc, 0xd2, 0xb7, 0x33, 0xbf, 0xf4, 0xb2, 0x72, 0xad, 0x0b, 0x1a, 0x58, - 0xe5, 0xe2, 0xa1, 0xb4, 0x7f, 0xec, 0x4b, 0x19, 0x0d, 0xa2, 0xf1, 0x93, 0x6a, 0x1b, 0xd2, 0x5c, - 0xb0, 0xf9, 0xcd, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x48, 0xda, 0x43, 0x66, 0x05, 0x00, - 0x00, + // 663 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x41, 0x6b, 0xdb, 0x4a, + 0x10, 0xb6, 0x5e, 0xf2, 0xc2, 0xcb, 0xbe, 0x04, 0x82, 0xf2, 0x1e, 0x55, 0x72, 0x90, 0x52, 0x15, + 0x82, 0x0f, 0xb5, 0x55, 0x08, 0x85, 0x90, 0x5b, 0x1c, 0x13, 0xe7, 0x50, 0x8a, 0x11, 0x4d, 0x0b, + 0x85, 0xb2, 0xac, 0xa5, 0x89, 0xbc, 0xb5, 0xd6, 0x6b, 0x76, 0xd7, 0xb1, 0xdd, 0x1f, 0x50, 0xe8, + 0xa1, 0x50, 0x42, 0x0f, 0x3d, 0xf6, 0xcf, 0x14, 0x72, 0xcc, 0xb1, 0x14, 0x2a, 0x4a, 0x42, 0x2e, + 0x39, 0xfa, 0x17, 0x14, 0xad, 0x1c, 0xc7, 0x8d, 0x4d, 0x89, 0x73, 0xe9, 0x25, 0x27, 0xad, 0x66, + 0xbe, 0x9d, 0x9d, 0x6f, 0x66, 0xbf, 0x61, 0xd1, 0x12, 0x1c, 0x32, 0xaf, 0x45, 0x04, 0x61, 0xb2, + 0xd8, 0x12, 0x5c, 0x71, 0xd3, 0x92, 0x40, 0xf5, 0x2a, 0xe0, 0x71, 0x51, 0x02, 0x0d, 0xea, 0x84, + 0x36, 0x8b, 0x70, 0xc8, 0x56, 0xff, 0x8b, 0x78, 0xc4, 0xb5, 0xcb, 0x4b, 0x57, 0x19, 0xde, 0x3d, + 0x47, 0x68, 0xae, 0xaa, 0x03, 0x98, 0x1f, 0x0d, 0xb4, 0xdc, 0x12, 0x94, 0x0b, 0xaa, 0x7a, 0xb8, + 0xc9, 0x05, 0x23, 0x31, 0x7d, 0x03, 0xc2, 0xfa, 0x6b, 0xcd, 0xc8, 0xcf, 0x97, 0x82, 0xe3, 0xc4, + 0xc9, 0x7d, 0x4b, 0x9c, 0xf5, 0x88, 0xaa, 0x7a, 0xbb, 0x56, 0x0c, 0x38, 0xf3, 0x02, 0x2e, 0x19, + 0x97, 0x83, 0x4f, 0x41, 0x86, 0x0d, 0x4f, 0xf5, 0x5a, 0x20, 0x8b, 0x65, 0x08, 0x2e, 0x12, 0x67, + 0x52, 0xb0, 0x7e, 0xe2, 0xac, 0xf6, 0x08, 0x8b, 0xb7, 0xdc, 0x09, 0x4e, 0xd7, 0x37, 0x2f, 0xad, + 0x4f, 0x87, 0x46, 0xf3, 0xad, 0x81, 0x96, 0x6a, 0x44, 0x02, 0x3e, 0x00, 0xc0, 0x2d, 0x10, 0x38, + 0x22, 0xd2, 0x9a, 0xd1, 0x39, 0xbd, 0x9a, 0x3a, 0xa7, 0xb1, 0x48, 0xfd, 0xc4, 0xb9, 0x97, 0x25, + 0x74, 0xdd, 0xe3, 0xfa, 0x8b, 0xa9, 0x69, 0x17, 0xa0, 0x0a, 0xa2, 0x42, 0xa4, 0x79, 0x64, 0xa0, + 0x65, 0x46, 0x9b, 0x94, 0xb5, 0xd9, 0x2f, 0xb9, 0xcc, 0xde, 0xb6, 0x3e, 0x13, 0x82, 0x5d, 0xd5, + 0x67, 0x82, 0xd3, 0xf5, 0x97, 0x06, 0xd6, 0xab, 0xa4, 0xbe, 0x18, 0xe8, 0x61, 0xa7, 0x4e, 0x15, + 0xc4, 0x54, 0x2a, 0x08, 0x71, 0xd0, 0xc1, 0x01, 0x0f, 0x01, 0xd7, 0x89, 0xac, 0x83, 0xc4, 0x07, + 0x5c, 0xe0, 0x10, 0x62, 0x88, 0x88, 0x02, 0x1c, 0x90, 0x38, 0xb6, 0xfe, 0x59, 0x9b, 0xc9, 0x2f, + 0x94, 0xa2, 0x8b, 0xc4, 0x99, 0x6a, 0x5f, 0x3f, 0x71, 0x36, 0xb2, 0xc4, 0xa6, 0xd9, 0xe5, 0xfa, + 0xeb, 0x23, 0xf0, 0x9d, 0xce, 0x0e, 0x0f, 0x61, 0x4f, 0x63, 0x77, 0xb9, 0x28, 0x0f, 0x90, 0x3b, + 0x24, 0x8e, 0xcd, 0x6d, 0x64, 0x87, 0x10, 0xd3, 0x43, 0x10, 0x58, 0x75, 0x71, 0x9d, 0xf3, 0x06, + 0xee, 0x10, 0xc9, 0x52, 0xda, 0x38, 0xa6, 0x8c, 0x2a, 0x6b, 0x7e, 0xcd, 0xc8, 0xcf, 0xfa, 0x2b, + 0x03, 0xd4, 0xb3, 0xee, 0x1e, 0xe7, 0x8d, 0x17, 0x44, 0xb2, 0x0a, 0x91, 0x4f, 0x52, 0x80, 0xf9, + 0xdd, 0x40, 0xeb, 0x8c, 0x74, 0x71, 0xd8, 0x6b, 0x12, 0x46, 0x03, 0x3c, 0x6c, 0x68, 0xbb, 0xd5, + 0x21, 0x22, 0xc4, 0x24, 0x7c, 0xdd, 0x96, 0x8a, 0x41, 0x53, 0x59, 0x48, 0xb7, 0xec, 0x9d, 0x31, + 0x75, 0xcf, 0x6e, 0x78, 0x40, 0x3f, 0x71, 0x0a, 0x83, 0x36, 0xde, 0x08, 0xef, 0xfa, 0xf7, 0x19, + 0xe9, 0x96, 0x33, 0x5c, 0x29, 0xbb, 0x75, 0xfb, 0x1a, 0xb4, 0x3d, 0xc4, 0x98, 0xe7, 0x06, 0xca, + 0x4f, 0x0c, 0x17, 0xf2, 0x4e, 0xf3, 0x3a, 0xc3, 0x7f, 0x35, 0xc3, 0xf7, 0xd3, 0x33, 0xbc, 0xf1, + 0x11, 0xfd, 0xc4, 0xf1, 0x7e, 0xc3, 0x71, 0xc2, 0x0e, 0xd7, 0x7f, 0x30, 0xc6, 0xb2, 0x3c, 0x80, + 0x8d, 0xf0, 0xdc, 0x44, 0x2b, 0x8a, 0x88, 0x08, 0x94, 0x6e, 0x7e, 0x5b, 0x42, 0xa8, 0x05, 0x50, + 0x8b, 0x79, 0xd0, 0xb0, 0x16, 0xf4, 0x2d, 0xf8, 0x3f, 0x03, 0x54, 0x88, 0xdc, 0x97, 0x10, 0x56, + 0x41, 0x94, 0x52, 0x67, 0xa6, 0x50, 0xd2, 0x1d, 0x53, 0xe8, 0xe2, 0xad, 0x15, 0x3a, 0x1e, 0x6c, + 0x44, 0xa1, 0xe3, 0xce, 0x54, 0xa1, 0x99, 0x75, 0xa8, 0xd0, 0xad, 0xd9, 0x4f, 0x9f, 0x9d, 0x9c, + 0x7b, 0xf4, 0x37, 0x5a, 0xcc, 0xe6, 0x6c, 0x55, 0xc0, 0xf3, 0xc7, 0x9b, 0x8f, 0xee, 0xc6, 0xed, + 0xdd, 0xb8, 0xfd, 0x63, 0xe3, 0x36, 0xbb, 0x94, 0xa5, 0xca, 0xf1, 0xa9, 0x6d, 0x9c, 0x9c, 0xda, + 0xc6, 0x8f, 0x53, 0xdb, 0xf8, 0x70, 0x66, 0xe7, 0x4e, 0xce, 0xec, 0xdc, 0xd7, 0x33, 0x3b, 0xf7, + 0xb2, 0x30, 0x52, 0x56, 0x09, 0xb4, 0x70, 0xf9, 0xa4, 0xd0, 0x3f, 0xfa, 0x4d, 0xe1, 0x75, 0xbd, + 0xf4, 0xf1, 0xa1, 0x2b, 0x5c, 0x9b, 0xd3, 0xfe, 0x8d, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x19, + 0x33, 0xf5, 0x29, 0x90, 0x08, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -173,6 +177,16 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.MaximumFeePerGas.Size() + i -= size + if _, err := m.MaximumFeePerGas.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a if m.TargetGasUsedPerBlock != 0 { i = encodeVarintParams(dAtA, i, uint64(m.TargetGasUsedPerBlock)) i-- @@ -284,6 +298,8 @@ func (m *Params) Size() (n int) { if m.TargetGasUsedPerBlock != 0 { n += 1 + sovParams(uint64(m.TargetGasUsedPerBlock)) } + l = m.MaximumFeePerGas.Size() + n += 1 + l + sovParams(uint64(l)) return n } @@ -562,6 +578,40 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaximumFeePerGas", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaximumFeePerGas.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/evm/types/params_test.go b/x/evm/types/params_test.go index f07fa5f3cc..7b09701271 100644 --- a/x/evm/types/params_test.go +++ b/x/evm/types/params_test.go @@ -14,6 +14,7 @@ func TestDefaultParams(t *testing.T) { PriorityNormalizer: types.DefaultPriorityNormalizer, BaseFeePerGas: types.DefaultBaseFeePerGas, MinimumFeePerGas: types.DefaultMinFeePerGas, + MaximumFeePerGas: types.DefaultMaxFeePerGas, DeliverTxHookWasmGasLimit: types.DefaultDeliverTxHookWasmGasLimit, WhitelistedCwCodeHashesForDelegateCall: types.DefaultWhitelistedCwCodeHashesForDelegateCall, MaxDynamicBaseFeeUpwardAdjustment: types.DefaultMaxDynamicBaseFeeUpwardAdjustment, From f32475234fad3ff67bdeadabe06cfb432effb62c Mon Sep 17 00:00:00 2001 From: codchen Date: Tue, 26 Nov 2024 01:01:31 +0800 Subject: [PATCH 25/33] use dynamic gas for address precompile (#1962) Co-authored-by: Xiaoyu Chen --- precompiles/addr/addr.go | 75 +++++++++++++++++++---------------- precompiles/addr/addr_test.go | 41 ++++++++++++++++++- 2 files changed, 80 insertions(+), 36 deletions(-) diff --git a/precompiles/addr/addr.go b/precompiles/addr/addr.go index e0b3c283ac..68dced47a8 100644 --- a/precompiles/addr/addr.go +++ b/precompiles/addr/addr.go @@ -54,7 +54,7 @@ type PrecompileExecutor struct { AssociatePubKeyID []byte } -func NewPrecompile(evmKeeper pcommon.EVMKeeper, bankKeeper pcommon.BankKeeper, accountKeeper pcommon.AccountKeeper) (*pcommon.Precompile, error) { +func NewPrecompile(evmKeeper pcommon.EVMKeeper, bankKeeper pcommon.BankKeeper, accountKeeper pcommon.AccountKeeper) (*pcommon.DynamicGasPrecompile, error) { newAbi := pcommon.MustGetABI(f, "abi.json") @@ -77,7 +77,7 @@ func NewPrecompile(evmKeeper pcommon.EVMKeeper, bankKeeper pcommon.BankKeeper, a } } - return pcommon.NewPrecompile(newAbi, p, common.HexToAddress(AddrAddress), "addr"), nil + return pcommon.NewDynamicGasPrecompile(newAbi, p, common.HexToAddress(AddrAddress), "addr"), nil } // RequiredGas returns the required bare minimum gas to execute the precompile. @@ -88,7 +88,7 @@ func (p PrecompileExecutor) RequiredGas(input []byte, method *abi.Method) uint64 return pcommon.DefaultGasCost(input, p.IsTransaction(method.Name)) } -func (p PrecompileExecutor) Execute(ctx sdk.Context, method *abi.Method, _ common.Address, _ common.Address, args []interface{}, value *big.Int, readOnly bool, _ *vm.EVM) (bz []byte, err error) { +func (p PrecompileExecutor) Execute(ctx sdk.Context, method *abi.Method, _ common.Address, _ common.Address, args []interface{}, value *big.Int, readOnly bool, _ *vm.EVM, suppliedGas uint64) (ret []byte, remainingGas uint64, err error) { switch method.Name { case GetSeiAddressMethod: return p.getSeiAddr(ctx, method, args, value) @@ -96,64 +96,66 @@ func (p PrecompileExecutor) Execute(ctx sdk.Context, method *abi.Method, _ commo return p.getEvmAddr(ctx, method, args, value) case Associate: if readOnly { - return nil, errors.New("cannot call associate precompile from staticcall") + return nil, 0, errors.New("cannot call associate precompile from staticcall") } return p.associate(ctx, method, args, value) case AssociatePubKey: if readOnly { - return nil, errors.New("cannot call associate pub key precompile from staticcall") + return nil, 0, errors.New("cannot call associate pub key precompile from staticcall") } return p.associatePublicKey(ctx, method, args, value) } return } -func (p PrecompileExecutor) getSeiAddr(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, error) { +func (p PrecompileExecutor) getSeiAddr(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) (ret []byte, remainingGas uint64, err error) { if err := pcommon.ValidateNonPayable(value); err != nil { - return nil, err + return nil, 0, err } if err := pcommon.ValidateArgsLength(args, 1); err != nil { - return nil, err + return nil, 0, err } seiAddr, found := p.evmKeeper.GetSeiAddress(ctx, args[0].(common.Address)) if !found { metrics.IncrementAssociationError("getSeiAddr", types.NewAssociationMissingErr(args[0].(common.Address).Hex())) - return nil, fmt.Errorf("EVM address %s is not associated", args[0].(common.Address).Hex()) + return nil, 0, fmt.Errorf("EVM address %s is not associated", args[0].(common.Address).Hex()) } - return method.Outputs.Pack(seiAddr.String()) + ret, err = method.Outputs.Pack(seiAddr.String()) + return ret, pcommon.GetRemainingGas(ctx, p.evmKeeper), err } -func (p PrecompileExecutor) getEvmAddr(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, error) { +func (p PrecompileExecutor) getEvmAddr(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) (ret []byte, remainingGas uint64, err error) { if err := pcommon.ValidateNonPayable(value); err != nil { - return nil, err + return nil, 0, err } if err := pcommon.ValidateArgsLength(args, 1); err != nil { - return nil, err + return nil, 0, err } seiAddr, err := sdk.AccAddressFromBech32(args[0].(string)) if err != nil { - return nil, err + return nil, 0, err } evmAddr, found := p.evmKeeper.GetEVMAddress(ctx, seiAddr) if !found { metrics.IncrementAssociationError("getEvmAddr", types.NewAssociationMissingErr(args[0].(string))) - return nil, fmt.Errorf("sei address %s is not associated", args[0].(string)) + return nil, 0, fmt.Errorf("sei address %s is not associated", args[0].(string)) } - return method.Outputs.Pack(evmAddr) + ret, err = method.Outputs.Pack(evmAddr) + return ret, pcommon.GetRemainingGas(ctx, p.evmKeeper), err } -func (p PrecompileExecutor) associate(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, error) { +func (p PrecompileExecutor) associate(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) (ret []byte, remainingGas uint64, err error) { if err := pcommon.ValidateNonPayable(value); err != nil { - return nil, err + return nil, 0, err } if err := pcommon.ValidateArgsLength(args, 4); err != nil { - return nil, err + return nil, 0, err } // v, r and s are components of a signature over the customMessage sent. @@ -165,15 +167,15 @@ func (p PrecompileExecutor) associate(ctx sdk.Context, method *abi.Method, args rBytes, err := decodeHexString(r) if err != nil { - return nil, err + return nil, 0, err } sBytes, err := decodeHexString(s) if err != nil { - return nil, err + return nil, 0, err } vBytes, err := decodeHexString(v) if err != nil { - return nil, err + return nil, 0, err } vBig := new(big.Int).SetBytes(vBytes) @@ -186,19 +188,19 @@ func (p PrecompileExecutor) associate(ctx sdk.Context, method *abi.Method, args customMessageHash := crypto.Keccak256Hash([]byte(customMessage)) evmAddr, seiAddr, pubkey, err := helpers.GetAddresses(vBig, rBig, sBig, customMessageHash) if err != nil { - return nil, err + return nil, 0, err } return p.associateAddresses(ctx, method, evmAddr, seiAddr, pubkey) } -func (p PrecompileExecutor) associatePublicKey(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) ([]byte, error) { +func (p PrecompileExecutor) associatePublicKey(ctx sdk.Context, method *abi.Method, args []interface{}, value *big.Int) (ret []byte, remainingGas uint64, err error) { if err := pcommon.ValidateNonPayable(value); err != nil { - return nil, err + return nil, 0, err } if err := pcommon.ValidateArgsLength(args, 1); err != nil { - return nil, err + return nil, 0, err } // Takes a single argument, a compressed pubkey in hex format, excluding the '0x' @@ -206,13 +208,13 @@ func (p PrecompileExecutor) associatePublicKey(ctx sdk.Context, method *abi.Meth pubKeyBytes, err := hex.DecodeString(pubKeyHex) if err != nil { - return nil, err + return nil, 0, err } // Parse the compressed public key pubKey, err := btcec.ParsePubKey(pubKeyBytes, btcec.S256()) if err != nil { - return nil, err + return nil, 0, err } // Convert to uncompressed public key @@ -220,27 +222,28 @@ func (p PrecompileExecutor) associatePublicKey(ctx sdk.Context, method *abi.Meth evmAddr, seiAddr, pubkey, err := helpers.GetAddressesFromPubkeyBytes(uncompressedPubKey) if err != nil { - return nil, err + return nil, 0, err } return p.associateAddresses(ctx, method, evmAddr, seiAddr, pubkey) } -func (p PrecompileExecutor) associateAddresses(ctx sdk.Context, method *abi.Method, evmAddr common.Address, seiAddr sdk.AccAddress, pubkey cryptotypes.PubKey) ([]byte, error) { +func (p PrecompileExecutor) associateAddresses(ctx sdk.Context, method *abi.Method, evmAddr common.Address, seiAddr sdk.AccAddress, pubkey cryptotypes.PubKey) (ret []byte, remainingGas uint64, err error) { // Check that address is not already associated _, found := p.evmKeeper.GetEVMAddress(ctx, seiAddr) if found { - return nil, fmt.Errorf("address %s is already associated with evm address %s", seiAddr, evmAddr) + return nil, 0, fmt.Errorf("address %s is already associated with evm address %s", seiAddr, evmAddr) } // Associate Addresses: associationHelper := helpers.NewAssociationHelper(p.evmKeeper, p.bankKeeper, p.accountKeeper) - err := associationHelper.AssociateAddresses(ctx, seiAddr, evmAddr, pubkey) + err = associationHelper.AssociateAddresses(ctx, seiAddr, evmAddr, pubkey) if err != nil { - return nil, err + return nil, 0, err } - return method.Outputs.Pack(seiAddr.String(), evmAddr) + ret, err = method.Outputs.Pack(seiAddr.String(), evmAddr) + return ret, pcommon.GetRemainingGas(ctx, p.evmKeeper), err } func (PrecompileExecutor) IsTransaction(method string) bool { @@ -252,6 +255,10 @@ func (PrecompileExecutor) IsTransaction(method string) bool { } } +func (p PrecompileExecutor) EVMKeeper() pcommon.EVMKeeper { + return p.evmKeeper +} + func decodeHexString(hexString string) ([]byte, error) { trimmed := strings.TrimPrefix(hexString, "0x") if len(trimmed)%2 != 0 { diff --git a/precompiles/addr/addr_test.go b/precompiles/addr/addr_test.go index 9f5400dc6e..5e257b1ab7 100644 --- a/precompiles/addr/addr_test.go +++ b/precompiles/addr/addr_test.go @@ -141,7 +141,7 @@ func TestAssociatePubKey(t *testing.T) { require.Nil(t, err) // Make the call to associate. - ret, err := p.Run(tt.args.evm, tt.args.caller, tt.args.caller, append(p.GetExecutor().(*addr.PrecompileExecutor).AssociatePubKeyID, inputs...), tt.args.value, tt.args.readOnly, false) + ret, _, err := p.RunAndCalculateGas(tt.args.evm, tt.args.caller, tt.args.caller, append(p.GetExecutor().(*addr.PrecompileExecutor).AssociatePubKeyID, inputs...), 40000, tt.args.value, nil, tt.args.readOnly, false) if (err != nil) != tt.wantErr { t.Errorf("Run() error = %v, wantErr %v %v", err, tt.wantErr, string(ret)) return @@ -166,6 +166,7 @@ func TestAssociate(t *testing.T) { pre, _ := addr.NewPrecompile(k, k.BankKeeper(), k.AccountKeeper()) associate, err := pre.ABI.MethodById(pre.GetExecutor().(*addr.PrecompileExecutor).AssociateID) + require.Nil(t, err) // Target refers to the address that the caller is trying to associate. targetPrivKey := testkeeper.MockPrivateKey() @@ -331,7 +332,7 @@ func TestAssociate(t *testing.T) { require.Nil(t, err) // Make the call to associate. - ret, err := p.Run(tt.args.evm, tt.args.caller, tt.args.caller, append(p.GetExecutor().(*addr.PrecompileExecutor).AssociateID, inputs...), tt.args.value, tt.args.readOnly, false) + ret, _, err := p.RunAndCalculateGas(tt.args.evm, tt.args.caller, tt.args.caller, append(p.GetExecutor().(*addr.PrecompileExecutor).AssociateID, inputs...), 40000, tt.args.value, nil, tt.args.readOnly, false) if (err != nil) != tt.wantErr { t.Errorf("Run() error = %v, wantErr %v %v", err, tt.wantErr, string(ret)) return @@ -348,3 +349,39 @@ func TestAssociate(t *testing.T) { }) } } + +func TestGetAddr(t *testing.T) { + testApp := testkeeper.EVMTestApp + ctx := testApp.NewContext(false, tmtypes.Header{}).WithBlockHeight(2) + k := &testApp.EvmKeeper + + pre, _ := addr.NewPrecompile(k, k.BankKeeper(), k.AccountKeeper()) + getSeiAddr, err := pre.ABI.MethodById(pre.GetExecutor().(*addr.PrecompileExecutor).GetSeiAddressID) + require.Nil(t, err) + getEvmAddr, err := pre.ABI.MethodById(pre.GetExecutor().(*addr.PrecompileExecutor).GetEvmAddressID) + require.Nil(t, err) + + seiAddr, evmAddr := testkeeper.MockAddressPair() + k.SetAddressMapping(ctx, seiAddr, evmAddr) + + stateDB := &state.DBImpl{} + stateDB.WithCtx(ctx) + + getSeiAddrBz, err := getSeiAddr.Inputs.Pack(evmAddr) + require.Nil(t, err) + res, _, err := pre.RunAndCalculateGas(&vm.EVM{StateDB: stateDB}, evmAddr, evmAddr, append(getSeiAddr.ID, getSeiAddrBz...), 20000, common.Big0, nil, true, false) + require.Nil(t, err) + unpacked, err := getSeiAddr.Outputs.Unpack(res) + require.Nil(t, err) + require.Equal(t, 1, len(unpacked)) + require.Equal(t, seiAddr.String(), unpacked[0].(string)) + + getEvmAddrBz, err := getEvmAddr.Inputs.Pack(seiAddr.String()) + require.Nil(t, err) + res, _, err = pre.RunAndCalculateGas(&vm.EVM{StateDB: stateDB}, evmAddr, evmAddr, append(getEvmAddr.ID, getEvmAddrBz...), 20000, common.Big0, nil, true, false) + require.Nil(t, err) + unpacked, err = getEvmAddr.Outputs.Unpack(res) + require.Nil(t, err) + require.Equal(t, 1, len(unpacked)) + require.Equal(t, evmAddr, unpacked[0].(common.Address)) +} From 5b53230930b15215a6f35c27f290abaafbd73db7 Mon Sep 17 00:00:00 2001 From: Jeremy Wei Date: Tue, 26 Nov 2024 14:03:44 -0500 Subject: [PATCH 26/33] Fix max base fee upgrade (#1965) * add more tests, bump consensus version * add upgrade to upgrades.go for testing * Revert "add upgrade to upgrades.go for testing" This reverts commit 3b35a908f75c83d05319bcda1fa49a1a7c5106d2. --- .../migrate_eip_1559_max_base_fee_test.go | 26 +++++++++++++++++++ x/evm/module.go | 2 +- x/evm/module_test.go | 2 +- x/evm/types/params_test.go | 9 +++++++ 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 x/evm/migrations/migrate_eip_1559_max_base_fee_test.go diff --git a/x/evm/migrations/migrate_eip_1559_max_base_fee_test.go b/x/evm/migrations/migrate_eip_1559_max_base_fee_test.go new file mode 100644 index 0000000000..9ca4376a47 --- /dev/null +++ b/x/evm/migrations/migrate_eip_1559_max_base_fee_test.go @@ -0,0 +1,26 @@ +package migrations_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + testkeeper "github.com/sei-protocol/sei-chain/testutil/keeper" + "github.com/sei-protocol/sei-chain/x/evm/migrations" + "github.com/stretchr/testify/require" + tmtypes "github.com/tendermint/tendermint/proto/tendermint/types" +) + +func TestMigrateEip1559MaxBaseFee(t *testing.T) { + k := testkeeper.EVMTestApp.EvmKeeper + ctx := testkeeper.EVMTestApp.NewContext(false, tmtypes.Header{}) + + keeperParams := k.GetParams(ctx) + keeperParams.MaximumFeePerGas = sdk.NewDec(123) + + // Perform the migration + err := migrations.MigrateEip1559MaxFeePerGas(ctx, &k) + require.NoError(t, err) + + // Ensure that the new EIP-1559 parameters were migrated and the old ones were not changed + require.Equal(t, keeperParams.MaximumFeePerGas, sdk.NewDec(123)) +} diff --git a/x/evm/module.go b/x/evm/module.go index 29b504d85e..436130340b 100644 --- a/x/evm/module.go +++ b/x/evm/module.go @@ -262,7 +262,7 @@ func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <- } // ConsensusVersion implements ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 14 } +func (AppModule) ConsensusVersion() uint64 { return 15 } // BeginBlock executes all ABCI BeginBlock logic respective to the capability module. func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { diff --git a/x/evm/module_test.go b/x/evm/module_test.go index bfa9afae60..7342282e0d 100644 --- a/x/evm/module_test.go +++ b/x/evm/module_test.go @@ -60,7 +60,7 @@ func TestModuleExportGenesis(t *testing.T) { func TestConsensusVersion(t *testing.T) { k, _ := testkeeper.MockEVMKeeper() module := evm.NewAppModule(nil, k) - assert.Equal(t, uint64(14), module.ConsensusVersion()) + assert.Equal(t, uint64(15), module.ConsensusVersion()) } func TestABCI(t *testing.T) { diff --git a/x/evm/types/params_test.go b/x/evm/types/params_test.go index 7b09701271..8474b13bbb 100644 --- a/x/evm/types/params_test.go +++ b/x/evm/types/params_test.go @@ -88,6 +88,15 @@ func TestValidateParamsInvalidDeliverTxHookWasmGasLimit(t *testing.T) { require.Contains(t, err.Error(), "invalid deliver_tx_hook_wasm_gas_limit: must be greater than 0") } +func TestValidateParamsInvalidMaxFeePerGas(t *testing.T) { + params := types.DefaultParams() + params.MaximumFeePerGas = sdk.NewDec(-1) // Set to invalid negative value + + err := params.Validate() + require.Error(t, err) + require.Contains(t, err.Error(), "negative max fee per gas") +} + func TestValidateParamsValidDeliverTxHookWasmGasLimit(t *testing.T) { params := types.DefaultParams() From fd82b535862ef8ceb748c8e886198c7d64396d9f Mon Sep 17 00:00:00 2001 From: yirenz Date: Wed, 27 Nov 2024 10:44:14 -0500 Subject: [PATCH 27/33] revert: 150% gasUsed refund limit policy (#1967) * revert: 150% gasUsed refund limit policy * fix unit test --- go.mod | 4 +--- go.sum | 7 ++----- precompiles/bank/bank_test.go | 4 ++-- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 3b2e906fd6..7e795a5993 100644 --- a/go.mod +++ b/go.mod @@ -125,7 +125,6 @@ require ( github.com/fzipp/gocyclo v0.5.1 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect - github.com/ghodss/yaml v1.0.0 // indirect github.com/go-critic/go-critic v0.6.3 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect @@ -173,7 +172,6 @@ require ( github.com/gostaticanalysis/nilerr v0.1.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect @@ -351,7 +349,7 @@ replace ( github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.45 github.com/cosmos/iavl => github.com/sei-protocol/sei-iavl v0.2.0 github.com/cosmos/ibc-go/v3 => github.com/sei-protocol/sei-ibc-go/v3 v3.3.2 - github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241120141252-bf6b5923d7d7 + github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241126162048-86648c51118c github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/sei-protocol/sei-db => github.com/sei-protocol/sei-db v0.0.45 // Latest goleveldb is broken, we have to stick to this version diff --git a/go.sum b/go.sum index 237eacc4af..e6cbde797e 100644 --- a/go.sum +++ b/go.sum @@ -457,7 +457,6 @@ github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2Gihuqh github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= @@ -766,8 +765,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 h1:ad0vkEBuk23VJzZR9nkLVG0YAoN9coASF1GusYX6AlU= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0/go.mod h1:igFoXX2ELCW06bol23DWPB5BEWfZISOzSP5K2sbLea0= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag= @@ -1346,8 +1343,8 @@ github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod github.com/securego/gosec/v2 v2.11.0 h1:+PDkpzR41OI2jrw1q6AdXZCbsNGNGT7pQjal0H0cArI= github.com/securego/gosec/v2 v2.11.0/go.mod h1:SX8bptShuG8reGC0XS09+a4H2BoWSJi+fscA+Pulbpo= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241120141252-bf6b5923d7d7 h1:5G1wqz9+1lDKQIpnoaP/oXneLfuhJozPd1/BDNCtaxw= -github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241120141252-bf6b5923d7d7/go.mod h1:kcRZmuzRn1lVejiFNTz4l4W7imnpq1bDAnuKS/RyhbQ= +github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241126162048-86648c51118c h1:SmV5dTPMgLOBG1p9bNpuBxJKFftehzdhSPdcrCowo4A= +github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241126162048-86648c51118c/go.mod h1:kcRZmuzRn1lVejiFNTz4l4W7imnpq1bDAnuKS/RyhbQ= github.com/sei-protocol/goutils v0.0.2 h1:Bfa7Sv+4CVLNM20QcpvGb81B8C5HkQC/kW1CQpIbXDA= github.com/sei-protocol/goutils v0.0.2/go.mod h1:iYE2DuJfEnM+APPehr2gOUXfuLuPsVxorcDO+Tzq9q8= github.com/sei-protocol/sei-cosmos v0.3.45 h1:l6ss5Y4OC+vvu+74lWz8EUBJN68x0CRuaEYtqA+TvOs= diff --git a/precompiles/bank/bank_test.go b/precompiles/bank/bank_test.go index 4a88ac6cef..d488749f9c 100644 --- a/precompiles/bank/bank_test.go +++ b/precompiles/bank/bank_test.go @@ -193,7 +193,7 @@ func TestRun(t *testing.T) { sdk.NewAttribute(banktypes.AttributeKeySender, senderAddr.String()), ), // gas refund to the sender - banktypes.NewCoinReceivedEvent(senderAddr, sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(101398)))), + banktypes.NewCoinReceivedEvent(senderAddr, sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(132401)))), // tip is paid to the validator banktypes.NewCoinReceivedEvent(sdk.MustAccAddressFromBech32("sei1v4mx6hmrda5kucnpwdjsqqqqqqqqqqqqlve8dv"), sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(67599)))), } @@ -244,7 +244,7 @@ func TestRun(t *testing.T) { Denom: "ufoo", }, bank.CoinBalance(parsedBalances[0])) require.Equal(t, bank.CoinBalance{ - Amount: big.NewInt(9901387), + Amount: big.NewInt(9932390), Denom: "usei", }, bank.CoinBalance(parsedBalances[1])) From 281a83697dab6b9d4e9b5032f3989bdadb72e648 Mon Sep 17 00:00:00 2001 From: Kartik Bhat Date: Wed, 27 Nov 2024 11:51:26 -0500 Subject: [PATCH 28/33] Ignore Version during Set Earliest Version (#1968) * Ignore Version during Set Earliest Version * Bump sei cosmos seidb --- app/test_state_store.go | 2 +- app/test_state_store_test.go | 2 +- go.mod | 4 ++-- go.sum | 8 ++++---- tools/migration/ss/migrator.go | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/test_state_store.go b/app/test_state_store.go index a5b0711450..194390f863 100644 --- a/app/test_state_store.go +++ b/app/test_state_store.go @@ -143,7 +143,7 @@ func (s *InMemoryStateStore) GetEarliestVersion() (int64, error) { return s.earliestVersion, nil } -func (s *InMemoryStateStore) SetEarliestVersion(version int64) error { +func (s *InMemoryStateStore) SetEarliestVersion(version int64, ignoreVersion bool) error { s.mu.Lock() defer s.mu.Unlock() diff --git a/app/test_state_store_test.go b/app/test_state_store_test.go index 141294b58c..f82bf057ec 100644 --- a/app/test_state_store_test.go +++ b/app/test_state_store_test.go @@ -126,7 +126,7 @@ func TestGetLatestVersionAndSetLatestVersion(t *testing.T) { func TestGetEarliestVersionAndSetEarliestVersion(t *testing.T) { store := NewInMemoryStateStore() - err := store.SetEarliestVersion(1) + err := store.SetEarliestVersion(1, false) assert.NoError(t, err) version, err := store.GetEarliestVersion() diff --git a/go.mod b/go.mod index 7e795a5993..3f4eb838c0 100644 --- a/go.mod +++ b/go.mod @@ -346,12 +346,12 @@ require ( replace ( github.com/CosmWasm/wasmd => github.com/sei-protocol/sei-wasmd v0.2.8 github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 - github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.45 + github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.48 github.com/cosmos/iavl => github.com/sei-protocol/sei-iavl v0.2.0 github.com/cosmos/ibc-go/v3 => github.com/sei-protocol/sei-ibc-go/v3 v3.3.2 github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241126162048-86648c51118c github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - github.com/sei-protocol/sei-db => github.com/sei-protocol/sei-db v0.0.45 + github.com/sei-protocol/sei-db => github.com/sei-protocol/sei-db v0.0.46 // Latest goleveldb is broken, we have to stick to this version github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 github.com/tendermint/tendermint => github.com/sei-protocol/sei-tendermint v0.4.3 diff --git a/go.sum b/go.sum index e6cbde797e..81f00b476b 100644 --- a/go.sum +++ b/go.sum @@ -1347,10 +1347,10 @@ github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241126162048-86648c51118c github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241126162048-86648c51118c/go.mod h1:kcRZmuzRn1lVejiFNTz4l4W7imnpq1bDAnuKS/RyhbQ= github.com/sei-protocol/goutils v0.0.2 h1:Bfa7Sv+4CVLNM20QcpvGb81B8C5HkQC/kW1CQpIbXDA= github.com/sei-protocol/goutils v0.0.2/go.mod h1:iYE2DuJfEnM+APPehr2gOUXfuLuPsVxorcDO+Tzq9q8= -github.com/sei-protocol/sei-cosmos v0.3.45 h1:l6ss5Y4OC+vvu+74lWz8EUBJN68x0CRuaEYtqA+TvOs= -github.com/sei-protocol/sei-cosmos v0.3.45/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk= -github.com/sei-protocol/sei-db v0.0.45 h1:95ygzGFMyvaGwEUmzlKi8MxwXfbluoNzbaIjy9zOG6o= -github.com/sei-protocol/sei-db v0.0.45/go.mod h1:m5g7p0QeAS3dNJHIl28zQpzOgxQmvYqPb7t4hwgIOCA= +github.com/sei-protocol/sei-cosmos v0.3.48 h1:kSDweeTaLZ4TByLqAD6/hmtgAhAJHwXU1beyqsVXJkQ= +github.com/sei-protocol/sei-cosmos v0.3.48/go.mod h1:XC417pB6NwxP/cQ2XTSZLzVnP8dMZ//4uCXS3SxFgoM= +github.com/sei-protocol/sei-db v0.0.46 h1:naXfSp1I3UgJJm/iSvXpdFzr9nofEOxp/EekcAVj7wY= +github.com/sei-protocol/sei-db v0.0.46/go.mod h1:m5g7p0QeAS3dNJHIl28zQpzOgxQmvYqPb7t4hwgIOCA= github.com/sei-protocol/sei-iavl v0.2.0 h1:OisPjXiDT+oe+aeckzDEFgkZCYuUjHgs/PP8DPicN+I= github.com/sei-protocol/sei-iavl v0.2.0/go.mod h1:qRf8QYUPfrAO7K6VDB2B2l/N7K5L76OorioGBcJBIbw= github.com/sei-protocol/sei-ibc-go/v3 v3.3.2 h1:BaMZ6gjwqe3R/5dLmcJ1TkSZ3omcWy2TjaAZAeOJH44= diff --git a/tools/migration/ss/migrator.go b/tools/migration/ss/migrator.go index 1da6d26672..e737a86133 100644 --- a/tools/migration/ss/migrator.go +++ b/tools/migration/ss/migrator.go @@ -65,7 +65,7 @@ func (m *Migrator) Migrate(version int64, homeDir string) error { } // Set earliest and latest version in the database - err = m.stateStore.SetEarliestVersion(1) + err = m.stateStore.SetEarliestVersion(1, true) if err != nil { return err } From d12538289a5b740ee45319b0f15e7a9d3ff20e0e Mon Sep 17 00:00:00 2001 From: Philip Su Date: Tue, 3 Dec 2024 18:49:32 +0100 Subject: [PATCH 29/33] V6.0.1 release (#1963) * v6.0.1 release * Add upgrade * Fix max base fee upgrade (#1965) * add more tests, bump consensus version * add upgrade to upgrades.go for testing * Revert "add upgrade to upgrades.go for testing" This reverts commit 3b35a908f75c83d05319bcda1fa49a1a7c5106d2. * revert: 150% gasUsed refund limit policy (#1967) * revert: 150% gasUsed refund limit policy * fix unit test * Ignore Version during Set Earliest Version (#1968) * Ignore Version during Set Earliest Version * Bump sei cosmos seidb --------- Co-authored-by: Jeremy Wei Co-authored-by: yirenz Co-authored-by: Kartik Bhat --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ app/upgrades.go | 1 + go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index feaf9502c9..3fa1a77dc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,33 @@ Ref: https://keepachangelog.com/en/1.0.0/ --> # Changelog +## v6.0.1 +sei-chain +* [#1956](https://github.com/sei-protocol/sei-chain/pull/1956) Assign owner correctly when there are multiple transfers +* [#1955](https://github.com/sei-protocol/sei-chain/pull/1955) Add missing modules to migration and add command to export IAVL +* [#1954](https://github.com/sei-protocol/sei-chain/pull/1954) Enable Queries to IAVL for Non-Migrating Nodes +* [#1952](https://github.com/sei-protocol/sei-chain/pull/1952) Fix for failed txs in block +* [#1951](https://github.com/sei-protocol/sei-chain/pull/1951) Add max base fee as a param +* [#1949](https://github.com/sei-protocol/sei-chain/pull/1949) Be resilient to failing txs in debug trace block +* [#1941](https://github.com/sei-protocol/sei-chain/pull/1941) Fix eth_getLogs missing events early return +* [#1932](https://github.com/sei-protocol/sei-chain/pull/1932) Use owner event to populate ERC721 transfer topic +* [#1930](https://github.com/sei-protocol/sei-chain/pull/1930) Exclude cosmos txs from base fee calculation +* [#1926](https://github.com/sei-protocol/sei-chain/pull/1926) Refactor x/bank precompile to use dynamic gas +* [#1922](https://github.com/sei-protocol/sei-chain/pull/1922) Use msg server send in bank precompile +* [#1913](https://github.com/sei-protocol/sei-chain/pull/1913) Use tendermint store to get Tx hashes instead of storing explicitly +* [#1906](https://github.com/sei-protocol/sei-chain/pull/1906) Remove vue code +* [#1908](https://github.com/sei-protocol/sei-chain/pull/1908) QuerySmart to always use cached ctx + + +sei-cosmos +* [#551](https://github.com/sei-protocol/sei-cosmos/pull/551) Param change verification +* [#553](https://github.com/sei-protocol/sei-cosmos/pull/553) Remove unnecessary serving logs + +sei-wasmd +* [#67](https://github.com/sei-protocol/sei-wasmd/pull/67) Emit CW721 token owner before transfer +* [#65](https://github.com/sei-protocol/sei-wasmd/pull/65) Add QuerySmartSafe in WasmViewKeeper + + ## v6.0.0 sei-chain * [#1905](https://github.com/sei-protocol/sei-chain/pull/1905) Use limited wasm gas meter diff --git a/app/upgrades.go b/app/upgrades.go index 1c1715f8c1..155ad55434 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -112,6 +112,7 @@ var upgradesList = []string{ "v5.8.0", "v5.9.0", "v6.0.0", + "v6.0.1", } // if there is an override list, use that instead, for integration tests diff --git a/go.mod b/go.mod index 3f4eb838c0..a292dce574 100644 --- a/go.mod +++ b/go.mod @@ -344,7 +344,7 @@ require ( ) replace ( - github.com/CosmWasm/wasmd => github.com/sei-protocol/sei-wasmd v0.2.8 + github.com/CosmWasm/wasmd => github.com/sei-protocol/sei-wasmd v0.2.9 github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.48 github.com/cosmos/iavl => github.com/sei-protocol/sei-iavl v0.2.0 diff --git a/go.sum b/go.sum index 81f00b476b..e0a76f2ac1 100644 --- a/go.sum +++ b/go.sum @@ -1359,8 +1359,8 @@ github.com/sei-protocol/sei-tendermint v0.4.3 h1:/Nx3Q309B4N61P3e6ScYiVuHgBRdapc github.com/sei-protocol/sei-tendermint v0.4.3/go.mod h1:4LSlJdhl3nf3OmohliwRNUFLOB1XWlrmSodrIP7fLh4= github.com/sei-protocol/sei-tm-db v0.0.5 h1:3WONKdSXEqdZZeLuWYfK5hP37TJpfaUa13vAyAlvaQY= github.com/sei-protocol/sei-tm-db v0.0.5/go.mod h1:Cpa6rGyczgthq7/0pI31jys2Fw0Nfrc+/jKdP1prVqY= -github.com/sei-protocol/sei-wasmd v0.2.8 h1:b7tnn3quY1msT0smbXIFdz83NXn8eYn5ARE0ShC6+1o= -github.com/sei-protocol/sei-wasmd v0.2.8/go.mod h1:gcBpeDTCqCscmYq5/rYuRZW0r3pGSO3rs5MUlPucSDY= +github.com/sei-protocol/sei-wasmd v0.2.9 h1:fqWITa0I8EIhk4oCpM+KIzKUJHH/2+zTgAPX8v1WaYY= +github.com/sei-protocol/sei-wasmd v0.2.9/go.mod h1:gcBpeDTCqCscmYq5/rYuRZW0r3pGSO3rs5MUlPucSDY= github.com/sei-protocol/tm-db v0.0.4 h1:7Y4EU62Xzzg6wKAHEotm7SXQR0aPLcGhKHkh3qd0tnk= github.com/sei-protocol/tm-db v0.0.4/go.mod h1:PWsIWOTwdwC7Ow/GUvx8HgUJTO691pBuorIQD8JvwAs= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= From 7c8e4526dc72a3029dc751b724e2921290c61854 Mon Sep 17 00:00:00 2001 From: Yiming Zang <50607998+yzang2019@users.noreply.github.com> Date: Thu, 5 Dec 2024 06:59:02 -0800 Subject: [PATCH 30/33] Optimize getLogs with parallelization using fixed amount workers (#1974) * optimize getLogs * optimize getLogs * Parallelize execution for bloom as well * Fix build * Fix unit test --------- Co-authored-by: Tony Chen --- evmrpc/filter.go | 115 ++++++++++++++++++++++++++++-------------- evmrpc/filter_test.go | 2 - 2 files changed, 78 insertions(+), 39 deletions(-) diff --git a/evmrpc/filter.go b/evmrpc/filter.go index 9bda11057e..205be0afc2 100644 --- a/evmrpc/filter.go +++ b/evmrpc/filter.go @@ -5,6 +5,8 @@ import ( "encoding/json" "errors" "fmt" + "math" + "sort" "sync" "time" @@ -23,6 +25,8 @@ import ( const TxSearchPerPage = 10 +const MaxNumOfWorkers = 500 + type FilterType byte const ( @@ -283,14 +287,14 @@ type LogFetcher struct { includeSyntheticReceipts bool } -func (f *LogFetcher) GetLogsByFilters(ctx context.Context, crit filters.FilterCriteria, lastToHeight int64) ([]*ethtypes.Log, int64, error) { +func (f *LogFetcher) GetLogsByFilters(ctx context.Context, crit filters.FilterCriteria, lastToHeight int64) (res []*ethtypes.Log, end int64, err error) { bloomIndexes := EncodeFilters(crit.Addresses, crit.Topics) if crit.BlockHash != nil { block, err := blockByHashWithRetry(ctx, f.tmClient, crit.BlockHash[:], 1) if err != nil { return nil, 0, err } - return f.GetLogsForBlock(ctx, block, crit, bloomIndexes), block.Block.Height, nil + return f.GetLogsForBlock(block, crit, bloomIndexes), block.Block.Height, nil } applyOpenEndedLogLimit := f.filterConfig.maxLog > 0 && (crit.FromBlock == nil || crit.ToBlock == nil) latest := f.ctxProvider(LatestCtxHeight).BlockHeight() @@ -315,26 +319,84 @@ func (f *LogFetcher) GetLogsByFilters(ctx context.Context, crit filters.FilterCr if begin > end { return nil, 0, fmt.Errorf("fromBlock %d is after toBlock %d", begin, end) } - blockHeights := f.FindBlockesByBloom(begin, end, bloomIndexes) - res := []*ethtypes.Log{} - for _, height := range blockHeights { - h := height - block, err := blockByNumberWithRetry(ctx, f.tmClient, &h, 1) - if err != nil { - return nil, 0, err + + // Parallelize execution + numWorkers := int(math.Min(MaxNumOfWorkers, float64(end-begin+1))) + var wg sync.WaitGroup + tasksChan := make(chan int64, end-begin+1) + resultsChan := make(chan *ethtypes.Log, end-begin+1) + res = []*ethtypes.Log{} + defer func() { + if e := recover(); e != nil { + err = fmt.Errorf("%s", e) } - res = append(res, f.GetLogsForBlock(ctx, block, crit, bloomIndexes)...) - if applyOpenEndedLogLimit && int64(len(res)) >= f.filterConfig.maxLog { - res = res[:int(f.filterConfig.maxLog)] - break + }() + // Send tasks + go func() { + for height := begin; height <= end; height++ { + if height == 0 { + continue // Skip genesis height + } + tasksChan <- height + } + close(tasksChan) // Close the tasks channel to signal workers + }() + + // Worker function + worker := func() { + defer wg.Done() + for height := range tasksChan { + if len(crit.Addresses) != 0 || len(crit.Topics) != 0 { + providerCtx := f.ctxProvider(height) + blockBloom := f.k.GetBlockBloom(providerCtx) + if !MatchFilters(blockBloom, bloomIndexes) { + continue + } + } + h := height + block, berr := blockByNumberWithRetry(ctx, f.tmClient, &h, 1) + if berr != nil { + panic(berr) + } + matchedLogs := f.GetLogsForBlock(block, crit, bloomIndexes) + for _, log := range matchedLogs { + resultsChan <- log + } } } + // Start workers + for i := 0; i < numWorkers; i++ { + wg.Add(1) + go worker() + } + + // Collect results + go func() { + wg.Wait() + close(resultsChan) // Close the results channel after workers finish + }() + + // Aggregate results into the final slice + for result := range resultsChan { + res = append(res, result) + } + + // Sorting res in ascending order + sort.Slice(res, func(i, j int) bool { + return res[i].BlockNumber < res[j].BlockNumber + }) + + // Apply rate limit + if applyOpenEndedLogLimit && int64(len(res)) >= f.filterConfig.maxLog { + res = res[:int(f.filterConfig.maxLog)] + } + return res, end, nil } -func (f *LogFetcher) GetLogsForBlock(ctx context.Context, block *coretypes.ResultBlock, crit filters.FilterCriteria, filters [][]bloomIndexes) []*ethtypes.Log { - possibleLogs := f.FindLogsByBloom(block.Block.Height, filters) +func (f *LogFetcher) GetLogsForBlock(block *coretypes.ResultBlock, crit filters.FilterCriteria, filters [][]bloomIndexes) []*ethtypes.Log { + possibleLogs := f.FindLogsByBloom(block, filters) matchedLogs := utils.Filter(possibleLogs, func(l *ethtypes.Log) bool { return f.IsLogExactMatch(l, crit) }) for _, l := range matchedLogs { l.BlockHash = common.Hash(block.BlockID.Hash) @@ -342,29 +404,8 @@ func (f *LogFetcher) GetLogsForBlock(ctx context.Context, block *coretypes.Resul return matchedLogs } -func (f *LogFetcher) FindBlockesByBloom(begin, end int64, filters [][]bloomIndexes) (res []int64) { - //TODO: parallelize - for height := begin; height <= end; height++ { - if height == 0 { - // no block bloom on genesis height - continue - } - ctx := f.ctxProvider(height) - blockBloom := f.k.GetBlockBloom(ctx) - if MatchFilters(blockBloom, filters) { - res = append(res, height) - } - } - return -} - -func (f *LogFetcher) FindLogsByBloom(height int64, filters [][]bloomIndexes) (res []*ethtypes.Log) { +func (f *LogFetcher) FindLogsByBloom(block *coretypes.ResultBlock, filters [][]bloomIndexes) (res []*ethtypes.Log) { ctx := f.ctxProvider(LatestCtxHeight) - block, err := blockByNumberWithRetry(context.Background(), f.tmClient, &height, 1) - if err != nil { - fmt.Printf("error getting block when querying logs: %s\n", err) - return - } for _, hash := range getEvmTxHashesFromBlock(block, f.txConfig) { receipt, err := f.k.GetReceipt(ctx, hash) diff --git a/evmrpc/filter_test.go b/evmrpc/filter_test.go index 49570d3ff5..d513f7534c 100644 --- a/evmrpc/filter_test.go +++ b/evmrpc/filter_test.go @@ -6,8 +6,6 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - // ethtypes "github.com/ethereum/go-ethereum/core/types" - // "github.com/sei-protocol/sei-chain/x/evm/types" "github.com/stretchr/testify/require" ) From 15333e5b3d6d20ab5e6f81f4f9d40c87f4e8bf73 Mon Sep 17 00:00:00 2001 From: Denys S <150304777+dssei@users.noreply.github.com> Date: Thu, 5 Dec 2024 11:23:37 -0800 Subject: [PATCH 31/33] Remove token factory config (#1971) * remove token factory config * move DenomAllowListMaxSize to params * formatting * add more tests * formatting * address review comments --- app/app.go | 6 - app/test_helpers.go | 4 - proto/tokenfactory/params.proto | 4 +- x/tokenfactory/keeper/config.go | 29 ---- x/tokenfactory/keeper/createdenom.go | 10 +- x/tokenfactory/keeper/createdenom_test.go | 36 ++--- x/tokenfactory/keeper/keeper.go | 11 +- x/tokenfactory/keeper/migrations.go | 9 +- x/tokenfactory/keeper/migrations_test.go | 39 +++++- x/tokenfactory/keeper/msg_server.go | 2 +- x/tokenfactory/module.go | 3 +- x/tokenfactory/types/keys.go | 1 + x/tokenfactory/types/params.go | 33 ++++- x/tokenfactory/types/params.pb.go | 52 +++++++- x/tokenfactory/types/params_test.go | 154 ++++++++++++++++++++++ 15 files changed, 303 insertions(+), 90 deletions(-) delete mode 100644 x/tokenfactory/keeper/config.go create mode 100644 x/tokenfactory/types/params_test.go diff --git a/app/app.go b/app/app.go index b81f37b549..2c0f204c32 100644 --- a/app/app.go +++ b/app/app.go @@ -534,11 +534,6 @@ func New( ).SetHooks(epochmoduletypes.NewMultiEpochHooks( app.MintKeeper.Hooks())) - tokenFactoryConfig, err := tokenfactorykeeper.ReadConfig(appOpts) - if err != nil { - panic(fmt.Sprintf("error reading token factory config due to %s", err)) - } - app.TokenFactoryKeeper = tokenfactorykeeper.NewKeeper( appCodec, app.keys[tokenfactorytypes.StoreKey], @@ -546,7 +541,6 @@ func New( app.AccountKeeper, app.BankKeeper.(bankkeeper.BaseKeeper).WithMintCoinsRestriction(tokenfactorytypes.NewTokenFactoryDenomMintCoinsRestriction()), app.DistrKeeper, - tokenFactoryConfig, ) // The last arguments can contain custom message handlers, and custom query handlers, diff --git a/app/test_helpers.go b/app/test_helpers.go index 5e36a976a5..16c1c80c1f 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -15,7 +15,6 @@ import ( slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/cosmos/cosmos-sdk/x/staking/teststaking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - tokenfactorykeeper "github.com/sei-protocol/sei-chain/x/tokenfactory/keeper" "github.com/stretchr/testify/suite" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/config" @@ -56,9 +55,6 @@ func (t TestAppOpts) Get(s string) interface{} { if s == FlagSCEnable { return t.useSc } - if s == tokenfactorykeeper.FlagDenomAllowListMaxSize { - return 3 - } return nil } diff --git a/proto/tokenfactory/params.proto b/proto/tokenfactory/params.proto index 2542d680e3..af4efddd80 100644 --- a/proto/tokenfactory/params.proto +++ b/proto/tokenfactory/params.proto @@ -4,4 +4,6 @@ package seiprotocol.seichain.tokenfactory; option go_package = "github.com/sei-protocol/sei-chain/x/tokenfactory/types"; // Params defines the parameters for the tokenfactory module. -message Params {} +message Params { + uint32 denom_allowlist_max_size = 1; +} diff --git a/x/tokenfactory/keeper/config.go b/x/tokenfactory/keeper/config.go deleted file mode 100644 index 4fa177429c..0000000000 --- a/x/tokenfactory/keeper/config.go +++ /dev/null @@ -1,29 +0,0 @@ -package keeper - -import ( - servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/spf13/cast" -) - -type Config struct { - DenomAllowListMaxSize int `mapstructure:"denom_allow_list_max_size"` -} - -var DefaultConfig = Config{ - DenomAllowListMaxSize: 2000, -} - -const ( - FlagDenomAllowListMaxSize = "tokenfactory.denom_allow_list_max_size" -) - -func ReadConfig(opts servertypes.AppOptions) (Config, error) { - cfg := DefaultConfig // copy - var err error - if v := opts.Get(FlagDenomAllowListMaxSize); v != nil { - if cfg.DenomAllowListMaxSize, err = cast.ToIntE(v); err != nil { - return cfg, err - } - } - return cfg, nil -} diff --git a/x/tokenfactory/keeper/createdenom.go b/x/tokenfactory/keeper/createdenom.go index cdc3549815..4394ffb616 100644 --- a/x/tokenfactory/keeper/createdenom.go +++ b/x/tokenfactory/keeper/createdenom.go @@ -79,7 +79,7 @@ func (k Keeper) validateUpdateDenom(ctx sdk.Context, msg *types.MsgUpdateDenom) return "", types.ErrDenomDoesNotExist.Wrapf("denom: %s", msg.GetDenom()) } - err = k.validateAllowList(msg.AllowList) + err = k.validateAllowList(ctx, msg.AllowList) if err != nil { return "", err } @@ -87,19 +87,19 @@ func (k Keeper) validateUpdateDenom(ctx sdk.Context, msg *types.MsgUpdateDenom) return msg.GetDenom(), nil } -func (k Keeper) validateAllowListSize(allowList *banktypes.AllowList) error { +func (k Keeper) validateAllowListSize(ctx sdk.Context, allowList *banktypes.AllowList) error { if allowList == nil { return types.ErrAllowListUndefined } - if len(allowList.Addresses) > k.config.DenomAllowListMaxSize { + if len(allowList.Addresses) > int(k.GetDenomAllowListMaxSize(ctx)) { return types.ErrAllowListTooLarge } return nil } -func (k Keeper) validateAllowList(allowList *banktypes.AllowList) error { - err := k.validateAllowListSize(allowList) +func (k Keeper) validateAllowList(ctx sdk.Context, allowList *banktypes.AllowList) error { + err := k.validateAllowListSize(ctx, allowList) if err != nil { return err } diff --git a/x/tokenfactory/keeper/createdenom_test.go b/x/tokenfactory/keeper/createdenom_test.go index e24cb54315..a81c9c1175 100644 --- a/x/tokenfactory/keeper/createdenom_test.go +++ b/x/tokenfactory/keeper/createdenom_test.go @@ -2,7 +2,6 @@ package keeper_test import ( "fmt" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -51,6 +50,9 @@ func (suite *KeeperTestSuite) TestMsgCreateDenom() { } func (suite *KeeperTestSuite) TestCreateDenom() { + params, _ := suite.queryClient.Params(suite.Ctx.Context(), &types.QueryParamsRequest{}) + allowListSize := params.Params.DenomAllowlistMaxSize + largeAllowList := make([]string, allowListSize+1) for _, tc := range []struct { desc string setup func() @@ -99,16 +101,10 @@ func (suite *KeeperTestSuite) TestCreateDenom() { valid: false, }, { - desc: "list is too large", - subdenom: "test", - allowList: &banktypes.AllowList{ - Addresses: []string{ - suite.TestAccs[0].String(), - suite.TestAccs[1].String(), - suite.TestAccs[2].String(), - suite.TestAccs[2].String()}, - }, - valid: false, + desc: "list is too large", + subdenom: "test", + allowList: &banktypes.AllowList{Addresses: largeAllowList}, + valid: false, }, } { suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { @@ -158,6 +154,9 @@ func (suite *KeeperTestSuite) TestCreateDenom() { } func (suite *KeeperTestSuite) TestUpdateDenom() { + params, _ := suite.queryClient.Params(suite.Ctx.Context(), &types.QueryParamsRequest{}) + allowListSize := params.Params.DenomAllowlistMaxSize + largeAllowList := make([]string, allowListSize+1) for _, tc := range []struct { desc string setup func() @@ -222,17 +221,10 @@ func (suite *KeeperTestSuite) TestUpdateDenom() { types.NewMsgCreateDenom(suite.TestAccs[0].String(), "TLRG")) suite.Require().NoError(err) }, - denom: fmt.Sprintf("factory/%s/TLRG", suite.TestAccs[0].String()), - allowList: &banktypes.AllowList{ - Addresses: []string{ - suite.TestAccs[0].String(), - suite.TestAccs[1].String(), - suite.TestAccs[2].String(), - suite.TestAccs[2].String(), - }, - }, - valid: false, - errMsg: "allowlist too large", + denom: fmt.Sprintf("factory/%s/TLRG", suite.TestAccs[0].String()), + allowList: &banktypes.AllowList{Addresses: largeAllowList}, + valid: false, + errMsg: "allowlist too large", }, { desc: "denom having invalid characters", diff --git a/x/tokenfactory/keeper/keeper.go b/x/tokenfactory/keeper/keeper.go index ed4ecc02ad..51a6d80a99 100644 --- a/x/tokenfactory/keeper/keeper.go +++ b/x/tokenfactory/keeper/keeper.go @@ -24,8 +24,6 @@ type ( accountKeeper types.AccountKeeper bankKeeper types.BankKeeper distrKeeper types.DistrKeeper - - config Config } ) @@ -37,7 +35,6 @@ func NewKeeper( accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistrKeeper, - config Config, ) Keeper { if !paramSpace.HasKeyTable() { paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) @@ -50,8 +47,6 @@ func NewKeeper( accountKeeper: accountKeeper, bankKeeper: bankKeeper, distrKeeper: distrKeeper, - - config: config, } } @@ -86,3 +81,9 @@ func (k Keeper) CreateModuleAccount(ctx sdk.Context) { moduleAcc := authtypes.NewEmptyModuleAccount(types.ModuleName, authtypes.Minter, authtypes.Burner) k.accountKeeper.SetModuleAccount(ctx, moduleAcc) } + +func (k Keeper) GetDenomAllowListMaxSize(ctx sdk.Context) uint32 { + var denomAllowListMaxSize uint32 + k.paramSpace.Get(ctx, types.DenomAllowListMaxSizeKey, &denomAllowListMaxSize) + return denomAllowListMaxSize +} diff --git a/x/tokenfactory/keeper/migrations.go b/x/tokenfactory/keeper/migrations.go index b58f47c09f..418ed89d9b 100644 --- a/x/tokenfactory/keeper/migrations.go +++ b/x/tokenfactory/keeper/migrations.go @@ -25,7 +25,7 @@ func NewMigrator(keeper Keeper) Migrator { // Migrate2to3 migrates from version 2 to 3. func (m Migrator) Migrate2to3(ctx sdk.Context) error { // Reset params after removing the denom creation fee param - defaultParams := types.DefaultParams() + defaultParams := types.Params{} m.keeper.paramSpace.SetParamSet(ctx, &defaultParams) // We remove the denom creation fee whitelist in this migration @@ -58,6 +58,13 @@ func (m Migrator) Migrate3to4(ctx sdk.Context) error { return nil } +func (m Migrator) Migrate4to5(ctx sdk.Context) error { + // Add new params and set all to defaults + defaultParams := types.DefaultParams() + m.keeper.SetParams(ctx, defaultParams) + return nil +} + func (m Migrator) SetMetadata(denomMetadata *banktypes.Metadata) { if len(denomMetadata.Base) == 0 { panic(fmt.Errorf("no base exists for denom %v", denomMetadata)) diff --git a/x/tokenfactory/keeper/migrations_test.go b/x/tokenfactory/keeper/migrations_test.go index e0db6d88b0..14ac521f6e 100644 --- a/x/tokenfactory/keeper/migrations_test.go +++ b/x/tokenfactory/keeper/migrations_test.go @@ -59,7 +59,7 @@ func TestMigrate2to3(t *testing.T) { store.Set(oldCreatorSpecificPrefix, []byte("garbage value whitelist creator")) require.True(t, store.Has(oldCreateDenomFeeWhitelistPrefix)) require.True(t, store.Has(oldCreatorSpecificPrefix)) - newKeeper := NewKeeper(cdc, storeKey, paramsSubspace, nil, bankkeeper.NewBaseKeeper(cdc, bankstorekey, nil, paramsSubspace, nil), nil, Config{DenomAllowListMaxSize: 100}) + newKeeper := NewKeeper(cdc, storeKey, paramsSubspace, nil, bankkeeper.NewBaseKeeper(cdc, bankstorekey, nil, paramsSubspace, nil), nil) m := NewMigrator(newKeeper) err := m.Migrate2to3(ctx) require.Nil(t, err) @@ -80,7 +80,7 @@ func TestMigrate2to3(t *testing.T) { func TestMigrate3To4(t *testing.T) { // Test migration with all metadata denom metadata := banktypes.Metadata{Description: sdk.DefaultBondDenom, Base: sdk.DefaultBondDenom, Display: sdk.DefaultBondDenom, Name: sdk.DefaultBondDenom, Symbol: sdk.DefaultBondDenom} - keeper := NewKeeper(nil, nil, typesparams.Subspace{}, nil, nil, nil, Config{DenomAllowListMaxSize: 100}) + _, keeper := getStoreAndKeeper(t) m := NewMigrator(keeper) m.SetMetadata(&metadata) require.Equal(t, sdk.DefaultBondDenom, metadata.Display) @@ -94,3 +94,38 @@ func TestMigrate3To4(t *testing.T) { require.Equal(t, testDenom, metadata.Name) require.Equal(t, testDenom, metadata.Symbol) } + +func TestMigrate4To5(t *testing.T) { + stateStore, keeper := getStoreAndKeeper(t) + m := NewMigrator(keeper) + ctx := sdk.NewContext(stateStore, tmproto.Header{}, false, log.NewNopLogger()) + err := m.Migrate4to5(ctx) + require.NoError(t, err) + require.NotPanics(t, func() { m.keeper.GetParams(ctx) }) + params := m.keeper.GetParams(ctx) + require.Equal(t, types.DefaultParams(), params) +} + +func getStoreAndKeeper(t *testing.T) (store.CommitMultiStore, Keeper) { + storeKey := sdk.NewKVStoreKey(types.StoreKey) + bankStoreKey := sdk.NewKVStoreKey(banktypes.StoreKey) + memStoreKey := storetypes.NewMemoryStoreKey(types.MemStoreKey) + + db := tmdb.NewMemDB() + stateStore := store.NewCommitMultiStore(db) + stateStore.MountStoreWithDB(storeKey, sdk.StoreTypeIAVL, db) + stateStore.MountStoreWithDB(bankStoreKey, sdk.StoreTypeIAVL, db) + stateStore.MountStoreWithDB(memStoreKey, sdk.StoreTypeMemory, nil) + require.NoError(t, stateStore.LoadLatestVersion()) + + registry := codectypes.NewInterfaceRegistry() + cdc := codec.NewProtoCodec(registry) + + paramsSubspace := typesparams.NewSubspace(cdc, + codec.NewLegacyAmino(), + storeKey, + memStoreKey, + "TokenfactoryParams", + ) + return stateStore, NewKeeper(nil, nil, paramsSubspace, nil, nil, nil) +} diff --git a/x/tokenfactory/keeper/msg_server.go b/x/tokenfactory/keeper/msg_server.go index e9b347ef19..ecb6d658fd 100644 --- a/x/tokenfactory/keeper/msg_server.go +++ b/x/tokenfactory/keeper/msg_server.go @@ -35,7 +35,7 @@ func (server msgServer) CreateDenom(goCtx context.Context, msg *types.MsgCreateD ) if msg.AllowList != nil { - err = server.validateAllowList(msg.AllowList) + err = server.validateAllowList(ctx, msg.AllowList) if err != nil { return nil, err } diff --git a/x/tokenfactory/module.go b/x/tokenfactory/module.go index c9279e187f..af5e0bebc0 100644 --- a/x/tokenfactory/module.go +++ b/x/tokenfactory/module.go @@ -149,6 +149,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { _ = cfg.RegisterMigration(types.ModuleName, 1, func(ctx sdk.Context) error { return nil }) _ = cfg.RegisterMigration(types.ModuleName, 2, m.Migrate2to3) _ = cfg.RegisterMigration(types.ModuleName, 3, m.Migrate3to4) + _ = cfg.RegisterMigration(types.ModuleName, 4, m.Migrate4to5) } // RegisterInvariants registers the x/tokenfactory module's invariants. @@ -194,7 +195,7 @@ func (am AppModuleBasic) ValidateGenesisStream(cdc codec.JSONCodec, config clien } // ConsensusVersion implements ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 4 } +func (AppModule) ConsensusVersion() uint64 { return 5 } // BeginBlock executes all ABCI BeginBlock logic respective to the tokenfactory module. func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} diff --git a/x/tokenfactory/types/keys.go b/x/tokenfactory/types/keys.go index 8fc6214de5..269cc875c2 100644 --- a/x/tokenfactory/types/keys.go +++ b/x/tokenfactory/types/keys.go @@ -30,6 +30,7 @@ var ( CreatorPrefixKey = "creator" AdminPrefixKey = "admin" CreateDenomFeeWhitelistKey = "createdenomfeewhitelist" + DenomAllowListMaxSizeKey = []byte("allowlistmaxsize") ) // GetDenomPrefixStore returns the store prefix where all the data associated with a specific denom diff --git a/x/tokenfactory/types/params.go b/x/tokenfactory/types/params.go index 52c8ce5c7f..544a837c49 100644 --- a/x/tokenfactory/types/params.go +++ b/x/tokenfactory/types/params.go @@ -1,25 +1,46 @@ package types import ( + "fmt" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) -// ParamTable for tokenfactory module. +// DefaultDenomAllowListMaxSize default denom allowlist max size and can be overridden by governance proposal. +const DefaultDenomAllowListMaxSize = 2000 + +// ParamKeyTable ParamTable for tokenfactory module. func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) } -// default tokenfactory module parameters. +// DefaultParams default tokenfactory module parameters. func DefaultParams() Params { - return Params{} + return Params{ + DenomAllowlistMaxSize: DefaultDenomAllowListMaxSize, + } } -// validate params. +// Validate validate params. func (p Params) Validate() error { + if err := validateDenomAllowListMaxSize(p.DenomAllowlistMaxSize); err != nil { + return err + } return nil } -// Implements params.ParamSet. +// ParamSetPairs Implements params.ParamSet. func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{} + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(DenomAllowListMaxSizeKey, &p.DenomAllowlistMaxSize, validateDenomAllowListMaxSize), + } +} + +// validateDenomAllowListMaxSize validates a parameter value is within a valid range. +func validateDenomAllowListMaxSize(i interface{}) error { + _, ok := i.(uint32) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return nil } diff --git a/x/tokenfactory/types/params.pb.go b/x/tokenfactory/types/params.pb.go index 74d3c5280a..5061f269fa 100644 --- a/x/tokenfactory/types/params.pb.go +++ b/x/tokenfactory/types/params.pb.go @@ -24,6 +24,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params defines the parameters for the tokenfactory module. type Params struct { + DenomAllowlistMaxSize uint32 `protobuf:"varint,1,opt,name=denom_allowlist_max_size,json=denomAllowlistMaxSize,proto3" json:"denom_allowlist_max_size,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -59,6 +60,13 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo +func (m *Params) GetDenomAllowlistMaxSize() uint32 { + if m != nil { + return m.DenomAllowlistMaxSize + } + return 0 +} + func init() { proto.RegisterType((*Params)(nil), "seiprotocol.seichain.tokenfactory.Params") } @@ -66,16 +74,19 @@ func init() { func init() { proto.RegisterFile("tokenfactory/params.proto", fileDescriptor_0f39a375875b281a) } var fileDescriptor_0f39a375875b281a = []byte{ - // 146 bytes of a gzipped FileDescriptorProto + // 194 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0xc9, 0xcf, 0x4e, 0xcd, 0x4b, 0x4b, 0x4c, 0x2e, 0xc9, 0x2f, 0xaa, 0xd4, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0x2c, 0x4e, 0xcd, 0x04, 0xb3, 0x92, 0xf3, 0x73, 0xf4, - 0x8a, 0x53, 0x33, 0x93, 0x33, 0x12, 0x33, 0xf3, 0xf4, 0x90, 0xd5, 0x2b, 0x71, 0x70, 0xb1, 0x05, - 0x80, 0xb5, 0x38, 0x05, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, - 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x59, - 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x71, 0x6a, 0xa6, 0x2e, 0xcc, - 0x48, 0x30, 0x07, 0x6c, 0xa6, 0x7e, 0x85, 0x3e, 0x8a, 0x2b, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, - 0xd8, 0xc0, 0x0a, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x32, 0xb1, 0x98, 0xb4, 0xa2, 0x00, + 0x8a, 0x53, 0x33, 0x93, 0x33, 0x12, 0x33, 0xf3, 0xf4, 0x90, 0xd5, 0x2b, 0x39, 0x72, 0xb1, 0x05, + 0x80, 0xb5, 0x08, 0x99, 0x73, 0x49, 0xa4, 0xa4, 0xe6, 0xe5, 0xe7, 0xc6, 0x27, 0xe6, 0xe4, 0xe4, + 0x97, 0xe7, 0x64, 0x16, 0x97, 0xc4, 0xe7, 0x26, 0x56, 0xc4, 0x17, 0x67, 0x56, 0xa5, 0x4a, 0x30, + 0x2a, 0x30, 0x6a, 0xf0, 0x06, 0x89, 0x82, 0xe5, 0x1d, 0x61, 0xd2, 0xbe, 0x89, 0x15, 0xc1, 0x99, + 0x55, 0xa9, 0x4e, 0x01, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, + 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x96, + 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x5f, 0x9c, 0x9a, 0xa9, 0x0b, 0x73, + 0x0b, 0x98, 0x03, 0x76, 0x8c, 0x7e, 0x85, 0x3e, 0x8a, 0xf3, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, + 0xd8, 0xc0, 0x0a, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x4a, 0x3c, 0xf9, 0xdb, 0x00, 0x00, 0x00, } @@ -99,6 +110,11 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.DenomAllowlistMaxSize != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.DenomAllowlistMaxSize)) + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } @@ -119,6 +135,9 @@ func (m *Params) Size() (n int) { } var l int _ = l + if m.DenomAllowlistMaxSize != 0 { + n += 1 + sovParams(uint64(m.DenomAllowlistMaxSize)) + } return n } @@ -157,6 +176,25 @@ func (m *Params) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomAllowlistMaxSize", wireType) + } + m.DenomAllowlistMaxSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DenomAllowlistMaxSize |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/tokenfactory/types/params_test.go b/x/tokenfactory/types/params_test.go new file mode 100644 index 0000000000..b0c32db5c5 --- /dev/null +++ b/x/tokenfactory/types/params_test.go @@ -0,0 +1,154 @@ +package types + +import ( + "bytes" + "github.com/cosmos/cosmos-sdk/x/params/types" + "reflect" + "testing" +) + +func TestDefaultParams(t *testing.T) { + tests := []struct { + name string + want Params + }{ + { + name: "default params", + want: Params{ + DenomAllowlistMaxSize: 2000, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := DefaultParams(); !reflect.DeepEqual(got, tt.want) { + t.Errorf("DefaultParams() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestParams_Validate(t *testing.T) { + type fields struct { + DenomAllowlistMaxSize uint32 + } + tests := []struct { + name string + fields fields + wantErr bool + errMsg string + }{ + { + name: "valid params", + fields: fields{ + DenomAllowlistMaxSize: 2000, + }, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + p := Params{ + DenomAllowlistMaxSize: tt.fields.DenomAllowlistMaxSize, + } + err := p.Validate() + if (err != nil) != tt.wantErr { + t.Errorf("Validate() error = %v, wantErr %v", err, tt.wantErr) + } + if err != nil && err.Error() != tt.errMsg { + t.Errorf("Validate() error message = %v, want %v", err.Error(), tt.errMsg) + } + }) + } +} + +func Test_validateDenomAllowListMaxSize(t *testing.T) { + type args struct { + i interface{} + } + tests := []struct { + name string + args args + wantErr bool + errMsg string + }{ + { + name: "valid denom allowlist max size", + args: args{ + i: uint32(2000), + }, + wantErr: false, + }, + { + name: "invalid denom allowlist max size", + args: args{ + i: int32(-1), + }, + wantErr: true, + errMsg: "invalid parameter type: int32", + }, + { + name: "invalid denom allowlist large int value", + args: args{ + i: 20000000000000, + }, + wantErr: true, + errMsg: "invalid parameter type: int", + }, + { + name: "invalid denom allowlist max size type", + args: args{ + i: "2000", + }, + wantErr: true, + errMsg: "invalid parameter type: string", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := validateDenomAllowListMaxSize(tt.args.i) + if (err != nil) != tt.wantErr { + t.Errorf("validateDenomAllowListMaxSize() error = %v, wantErr %v", err, tt.wantErr) + } + if err != nil && err.Error() != tt.errMsg { + t.Errorf("validateDenomAllowListMaxSize() error message = %v, want %v", err.Error(), tt.errMsg) + } + }) + } +} + +func TestParams_ParamSetPairs(t *testing.T) { + type fields struct { + DenomAllowlistMaxSize uint32 + } + allowListSize := uint32(20) + params := &Params{DenomAllowlistMaxSize: allowListSize} + tests := []struct { + name string + fields fields + want types.ParamSetPairs + }{ + { + name: "valid param set pairs", + fields: fields{ + DenomAllowlistMaxSize: allowListSize, + }, + want: types.ParamSetPairs{ + types.NewParamSetPair([]byte("allowlistmaxsize"), + ¶ms.DenomAllowlistMaxSize, + validateDenomAllowListMaxSize), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + p := params + got := p.ParamSetPairs() + if len(got) != len(tt.want) || !bytes.Equal(got[0].Key, tt.want[0].Key) || + got[0].Value != tt.want[0].Value || + reflect.ValueOf(got[0].ValidatorFn).Pointer() != reflect.ValueOf(tt.want[0].ValidatorFn).Pointer() { + t.Errorf("ParamSetPairs() = %v, want %v", got, tt.want) + } + }) + } +} From 5ddb9ab3f50fda1c02f1fd7213074a42c5979ff9 Mon Sep 17 00:00:00 2001 From: dvli2007 Date: Thu, 5 Dec 2024 17:30:02 -0500 Subject: [PATCH 32/33] Pointers contracts: support for ERC1155 and CW1155 contracts (#1755) * wip cw1155 pointer * cleanup todos * sync events with current standard * fix query BalanceOfBatch * fix import * Fix up cwerc1155 compiled files * Add 1155 requests into bindings * queries * follow same coding style * Add cwerc1155.wasm binary to `/contracts` * Add go code to support new pointer contract * Fix typo * Add updated protobuf files * Fix up tests * Deprecate pointer proposals * queries * follow same coding style * safetransfer functions, royalyinfo, set approval * adding in transfer and approval tests * solc and abigen * clean up unused artifacts * Add all go bindings * return unsupported for methods not supported in erc standard * fix query BalanceOfBatch response * Add new test files * fix Erc1155BalanceOfBatchResponse * More testing * Update cwerc1155.wasm * More tests * return true/false instead of erroring in query IsApprovedForAll * use correct response for query BalanceOfBatch * pass optional token id field to evm query TotalSupply * remove todos * remove AllTokenInfo query * Fix balances query struct * Update and rebuild CW1155 pointer * Add new cw1155 wasms * merge * Update cwerc1155.wasm * Fix up ERC1155 pointer tests * balanceOfBatch * adding in expect calls * remove unused import * Round of updates to cw1155 contracts * Update cw1155 pointer tests * Fix: missing ERC1155TransferPayload * removing unnecessary return * Update binary * Fix balance of batch * add minor checks * Update integration test with latest main updates * Fix up erc721-payload and erc1155-payload cli commands * Lint code * Update integration test with new pointer contract code id * Map CW1155 events to EVM * updates from cw1155 base * update cw1155 base * Test events emissions for cw1155 events * Update wasm build for cwerc1155 * Fix integration test 1 * update cw1155 cargo, add optimize script to cargo * Update wasm builds * Add migrations for 1155s * Code quality * Remove unnecessary lines * updates from audit on cw1155 standard * [P1-I-01] Validate parameters in the "balanceOfBatch" function * build pointer wasm from audit changes * update pointer wasms in other places * [P1-H-01] Fix "safeBatchTransferFrom" - change to "onERC1155BatchReceived" * [P1-I-02] Consider adding "ERC1155Burnable" to "CW1155ERC1155Pointer" * Fix CW1155ERC1155Pointer.sol styles * Update ERC1155 pointer artifacts * send funds if empty msg in send and send_batch * rebuild cw1155 pointer/standard * fix version issue * cw1155_base wasm fix * Update and fix tests * Fix tests * Remove events from 1155 pointer so as not to double-emit * Linting --------- Co-authored-by: shab Co-authored-by: Mr Meat <77750450+mr-meat@users.noreply.github.com> Co-authored-by: scottirvine <136702693+scottirvine@users.noreply.github.com> --- .gitignore | 1 + app/receipt.go | 157 ++ app/receipt_test.go | 432 ++++++ contracts/src/CW1155ERC1155Pointer.sol | 334 ++++ contracts/src/ERC1155.sol | 49 + contracts/test/CW1155ERC1155PointerTest.t.sol | 638 ++++++++ contracts/test/CW1155toERC1155PointerTest.js | 214 +++ contracts/test/CW721ERC721PointerTest.t.sol | 36 + contracts/test/ERC1155toCW1155PointerTest.js | 157 ++ contracts/test/ERC721toCW721PointerTest.js | 6 +- contracts/test/lib.js | 60 + contracts/wasm/cw1155_base.wasm | Bin 0 -> 454483 bytes contracts/wasm/cw1155_royalties.wasm | Bin 0 -> 510887 bytes ...81_royalties.wasm => cw721_royalties.wasm} | Bin contracts/wasm/cwerc1155.wasm | Bin 0 -> 381230 bytes docs/swagger-ui/swagger.yml | 6 + example/contracts/erc1155/ERC1155Example.abi | 1 + example/contracts/erc1155/ERC1155Example.bin | 1 + example/contracts/erc1155/ERC1155Example.sol | 60 + example/contracts/erc1155/erc1155.go | 1234 +++++++++++++++ example/contracts/erc721/README.md | 2 +- example/cosmwasm/cw1155/Cargo.lock | 1125 ++++++++++++++ example/cosmwasm/cw1155/Cargo.toml | 42 + .../cosmwasm/cw1155/artifacts/checksums.txt | 1 + .../cosmwasm/cw1155/artifacts/cwerc1155.wasm | Bin 0 -> 381230 bytes example/cosmwasm/cw1155/src/contract.rs | 438 ++++++ example/cosmwasm/cw1155/src/error.rs | 11 + example/cosmwasm/cw1155/src/lib.rs | 5 + example/cosmwasm/cw1155/src/msg.rs | 206 +++ example/cosmwasm/cw1155/src/querier.rs | 174 +++ example/cosmwasm/cw1155/src/state.rs | 3 + .../scripts/evm_interoperability_tests.sh | 2 + integration_test/seidb/state_store_test.yaml | 16 +- precompiles/common/expected_keepers.go | 5 + precompiles/pointer/Pointer.sol | 4 + precompiles/pointer/abi.json | 2 +- precompiles/pointer/pointer.go | 37 + precompiles/pointerview/Pointerview.sol | 4 + precompiles/pointerview/abi.json | 2 +- precompiles/pointerview/pointerview.go | 15 + precompiles/pointerview/pointerview_test.go | 17 + precompiles/wasmd/wasmd.go | 6 +- precompiles/wasmd/wasmd_test.go | 4 +- proto/evm/enums.proto | 2 + proto/evm/gov.proto | 26 +- wasmbinding/queries.go | 36 + x/evm/artifacts/artifacts.go | 5 + .../artifacts/cw1155/CW1155ERC1155Pointer.abi | 1 + .../artifacts/cw1155/CW1155ERC1155Pointer.bin | 1 + x/evm/artifacts/cw1155/artifacts.go | 83 + x/evm/artifacts/cw1155/cw1155.go | 1379 +++++++++++++++++ x/evm/artifacts/erc1155/artifacts.go | 22 + x/evm/artifacts/erc1155/cwerc1155.wasm | Bin 0 -> 381230 bytes x/evm/client/cli/native_tx.go | 6 +- x/evm/client/cli/query.go | 85 +- x/evm/client/wasm/bindings/queries.go | 245 ++- x/evm/client/wasm/query.go | 428 ++++- x/evm/client/wasm/query_test.go | 205 ++- x/evm/gov.go | 8 + x/evm/handler.go | 4 + x/evm/integration_test.go | 228 ++- x/evm/keeper/genesis.go | 11 + x/evm/keeper/grpc_query.go | 39 + x/evm/keeper/grpc_query_test.go | 36 + x/evm/keeper/msg_server.go | 12 + x/evm/keeper/msg_server_test.go | 83 +- x/evm/keeper/pointer.go | 91 ++ x/evm/keeper/pointer_test.go | 145 ++ x/evm/keeper/pointer_upgrade.go | 10 + x/evm/keeper/pointer_upgrade_test.go | 27 + x/evm/migrations/migrate_all_pointers.go | 63 +- x/evm/migrations/migrate_all_pointers_test.go | 35 +- x/evm/migrations/store_cw_pointer_code.go | 14 +- x/evm/module.go | 12 +- x/evm/module_test.go | 2 +- x/evm/pointer_abi.json | 2 +- x/evm/types/codec.go | 2 + x/evm/types/enums.pb.go | 43 +- x/evm/types/gov.go | 85 +- x/evm/types/gov.pb.go | 725 ++++++++- x/evm/types/keys.go | 26 +- x/evm/types/message_register_pointer.go | 4 + 82 files changed, 9586 insertions(+), 152 deletions(-) create mode 100644 contracts/src/CW1155ERC1155Pointer.sol create mode 100644 contracts/src/ERC1155.sol create mode 100644 contracts/test/CW1155ERC1155PointerTest.t.sol create mode 100644 contracts/test/CW1155toERC1155PointerTest.js create mode 100644 contracts/test/ERC1155toCW1155PointerTest.js create mode 100644 contracts/wasm/cw1155_base.wasm create mode 100644 contracts/wasm/cw1155_royalties.wasm rename contracts/wasm/{cw2981_royalties.wasm => cw721_royalties.wasm} (100%) create mode 100644 contracts/wasm/cwerc1155.wasm create mode 100644 example/contracts/erc1155/ERC1155Example.abi create mode 100644 example/contracts/erc1155/ERC1155Example.bin create mode 100644 example/contracts/erc1155/ERC1155Example.sol create mode 100644 example/contracts/erc1155/erc1155.go create mode 100644 example/cosmwasm/cw1155/Cargo.lock create mode 100644 example/cosmwasm/cw1155/Cargo.toml create mode 100644 example/cosmwasm/cw1155/artifacts/checksums.txt create mode 100644 example/cosmwasm/cw1155/artifacts/cwerc1155.wasm create mode 100644 example/cosmwasm/cw1155/src/contract.rs create mode 100644 example/cosmwasm/cw1155/src/error.rs create mode 100644 example/cosmwasm/cw1155/src/lib.rs create mode 100644 example/cosmwasm/cw1155/src/msg.rs create mode 100644 example/cosmwasm/cw1155/src/querier.rs create mode 100644 example/cosmwasm/cw1155/src/state.rs create mode 100644 x/evm/artifacts/cw1155/CW1155ERC1155Pointer.abi create mode 100644 x/evm/artifacts/cw1155/CW1155ERC1155Pointer.bin create mode 100644 x/evm/artifacts/cw1155/artifacts.go create mode 100644 x/evm/artifacts/cw1155/cw1155.go create mode 100644 x/evm/artifacts/erc1155/artifacts.go create mode 100644 x/evm/artifacts/erc1155/cwerc1155.wasm diff --git a/.gitignore b/.gitignore index 1af6db532a..a585bc1f4b 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,7 @@ coverage.out example/cosmwasm/echo/target example/cosmwasm/cw20/target example/cosmwasm/cw721/target +example/cosmwasm/cw1155/target # Solidity contracts artifacts contracts/artifacts diff --git a/app/receipt.go b/app/receipt.go index f4968e3c51..31b55a61ce 100644 --- a/app/receipt.go +++ b/app/receipt.go @@ -5,6 +5,7 @@ import ( "fmt" "math" "math/big" + "strings" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -24,6 +25,10 @@ var ERC20TransferTopic = common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952 var ERC721TransferTopic = common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef") var ERC721ApprovalTopic = common.HexToHash("0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925") var ERC721ApproveAllTopic = common.HexToHash("0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31") +var ERC1155TransferSingleTopic = common.HexToHash("0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62") +var ERC1155TransferBatchTopic = common.HexToHash("0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb") +var ERC1155ApprovalForAllTopic = common.HexToHash("0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31") +var ERC1155URITopic = common.HexToHash("0x6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b") var EmptyHash = common.HexToHash("0x0") var TrueHash = common.HexToHash("0x1") @@ -91,6 +96,16 @@ func (app *App) AddCosmosEventsToEVMReceiptIfApplicable(ctx sdk.Context, tx sdk. } continue } + // check if there is a ERC1155 pointer to contract Addr + pointerAddr, _, exists = app.EvmKeeper.GetERC1155CW1155Pointer(ctx, contractAddr) + if exists { + log, eligible := app.translateCW1155Event(ctx, wasmEvent, pointerAddr, contractAddr) + if eligible { + log.Index = uint(len(logs)) + logs = append(logs, log) + } + continue + } } if len(logs) == 0 { return @@ -319,6 +334,99 @@ func (app *App) translateCW721Event(ctx sdk.Context, wasmEvent abci.Event, point return nil, false } +func (app *App) translateCW1155Event(ctx sdk.Context, wasmEvent abci.Event, pointerAddr common.Address, contractAddr string) (*ethtypes.Log, bool) { + action, found := GetAttributeValue(wasmEvent, "action") + if !found { + return nil, false + } + var topics []common.Hash + switch action { + case "transfer_single", "mint_single", "burn_single": + fromHash := EmptyHash + toHash := EmptyHash + if action != "mint_single" { + fromHash = app.GetEvmAddressAttribute(ctx, wasmEvent, "owner") + } + if action != "burn_single" { + toHash = app.GetEvmAddressAttribute(ctx, wasmEvent, "recipient") + } + topics = []common.Hash{ + ERC1155TransferSingleTopic, + app.GetEvmAddressAttribute(ctx, wasmEvent, "sender"), + fromHash, + toHash, + } + tokenID := GetTokenIDAttribute(wasmEvent) + if tokenID == nil { + return nil, false + } + tokenAmount, found := GetAmountAttribute(wasmEvent) + if !found { + return nil, false + } + dataHash1 := common.BigToHash(tokenID).Bytes() + dataHash2 := common.BigToHash(tokenAmount).Bytes() + return ðtypes.Log{ + Address: pointerAddr, + Topics: topics, + Data: append(dataHash1, dataHash2...), + }, true + case "transfer_batch", "mint_batch", "burn_batch": + fromHash := EmptyHash + toHash := EmptyHash + if action != "mint_batch" { + fromHash = app.GetEvmAddressAttribute(ctx, wasmEvent, "owner") + } + if action != "burn_batch" { + toHash = app.GetEvmAddressAttribute(ctx, wasmEvent, "recipient") + } + topics = []common.Hash{ + ERC1155TransferBatchTopic, + app.GetEvmAddressAttribute(ctx, wasmEvent, "sender"), + fromHash, + toHash, + } + tokenIDs, found := GetTokenIDsAttribute(wasmEvent) + if !found { + return nil, false + } + tokenAmounts, found := GetAmountsAttribute(wasmEvent) + if !found { + return nil, false + } + value := EncodeBigIntArray(tokenIDs) + value = append(value, EncodeBigIntArray(tokenAmounts)...) + return ðtypes.Log{ + Address: pointerAddr, + Topics: topics, + Data: value, + }, true + case "approve_all": + topics = []common.Hash{ + ERC1155ApprovalForAllTopic, + app.GetEvmAddressAttribute(ctx, wasmEvent, "sender"), + app.GetEvmAddressAttribute(ctx, wasmEvent, "operator"), + } + return ðtypes.Log{ + Address: pointerAddr, + Topics: topics, + Data: TrueHash.Bytes(), + }, true + case "revoke_all": + topics = []common.Hash{ + ERC1155ApprovalForAllTopic, + app.GetEvmAddressAttribute(ctx, wasmEvent, "sender"), + app.GetEvmAddressAttribute(ctx, wasmEvent, "operator"), + } + return ðtypes.Log{ + Address: pointerAddr, + Topics: topics, + Data: EmptyHash.Bytes(), + }, true + } + return nil, false +} + func (app *App) GetEvmAddressAttribute(ctx sdk.Context, event abci.Event, attribute string) common.Hash { addrStr, found := GetAttributeValue(event, attribute) if found { @@ -360,6 +468,22 @@ func GetAmountAttribute(event abci.Event) (*big.Int, bool) { return nil, false } +func GetAmountsAttribute(event abci.Event) ([]*big.Int, bool) { + results := []*big.Int{} + amounts, found := GetAttributeValue(event, "amounts") + if !found { + return results, false + } + for _, amt := range strings.Split(amounts, ",") { + amtInt, ok := sdk.NewIntFromString(amt) + if !ok { + return results, false + } + results = append(results, amtInt.BigInt()) + } + return results, true +} + func GetTokenIDAttribute(event abci.Event) *big.Int { tokenID, found := GetAttributeValue(event, "token_id") if !found { @@ -371,3 +495,36 @@ func GetTokenIDAttribute(event abci.Event) *big.Int { } return tokenIDInt.BigInt() } + +func GetTokenIDsAttribute(event abci.Event) ([]*big.Int, bool) { + results := []*big.Int{} + tokenIDs, found := GetAttributeValue(event, "token_ids") + if !found { + return results, false + } + for _, tid := range strings.Split(tokenIDs, ",") { + tidInt, ok := sdk.NewIntFromString(tid) + if !ok { + return results, false + } + results = append(results, tidInt.BigInt()) + } + return results, true +} + +func EncodeBigIntArray(inputs []*big.Int) []byte { + // Arrays are broken up into components: + // - offset byte (always 32) + // - length of array + // - ...array values + offset := big.NewInt(32) + length := big.NewInt(int64(len(inputs))) + value := append( + common.BigToHash(offset).Bytes(), + common.BigToHash(length).Bytes()..., + ) + for _, i := range inputs { + value = append(value, common.BigToHash(i).Bytes()...) + } + return value +} diff --git a/app/receipt_test.go b/app/receipt_test.go index c3305c5244..c85ef166a8 100644 --- a/app/receipt_test.go +++ b/app/receipt_test.go @@ -465,6 +465,438 @@ func TestEvmEventsForCw721(t *testing.T) { require.Equal(t, common.HexToHash("0x0").Bytes(), receipt.Logs[0].Data) } +func TestEvmEventsForCw1155(t *testing.T) { + k := testkeeper.EVMTestApp.EvmKeeper + wasmKeeper := k.WasmKeeper() + ctx := testkeeper.EVMTestApp.GetContextForDeliverTx([]byte{}).WithBlockTime(time.Now()).WithChainID("sei-test").WithBlockHeight(1) + // Create account 1 and associate its addresses + amt := sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000000000))) + privKey := testkeeper.MockPrivateKey() + creator, creatorEvmAddr := testkeeper.PrivateKeyToAddresses(privKey) + creatorHash := common.BytesToHash(creatorEvmAddr[:]).Hex() + k.BankKeeper().MintCoins(ctx, "evm", amt) + k.BankKeeper().SendCoinsFromModuleToAccount(ctx, "evm", creator, amt) + k.SetAddressMapping(ctx, creator, creatorEvmAddr) + // Create account 2 and associate its addresses + privKeyRecipient := testkeeper.MockPrivateKey() + recipient, recipientEvmAddr := testkeeper.PrivateKeyToAddresses(privKeyRecipient) + recipientHash := common.BytesToHash(recipientEvmAddr[:]).Hex() + k.BankKeeper().MintCoins(ctx, "evm", amt) + k.BankKeeper().SendCoinsFromModuleToAccount(ctx, "evm", recipient, amt) + k.SetAddressMapping(ctx, recipient, recipientEvmAddr) + // Deploy contract + code, err := os.ReadFile("../contracts/wasm/cw1155_base.wasm") + require.Nil(t, err) + codeID, err := wasmKeeper.Create(ctx, creator, code, nil) + require.Nil(t, err) + contractAddr, _, err := wasmKeeper.Instantiate(ctx, codeID, creator, creator, []byte(fmt.Sprintf("{\"name\":\"test\",\"symbol\":\"test\",\"minter\":\"%s\"}", creator.String())), "test", sdk.NewCoins()) + require.Nil(t, err) + _, mockPointerAddr := testkeeper.MockAddressPair() + k.SetERC1155CW1155Pointer(ctx, contractAddr.String(), mockPointerAddr) + + // calling CW contract directly + payload := []byte(fmt.Sprintf("{\"mint\":{\"recipient\":\"%s\",\"msg\":{\"token_id\":\"1\",\"amount\":\"10\"}}}", recipient.String())) + msg := &wasmtypes.MsgExecuteContract{ + Sender: creator.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder := testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx := signTx(txBuilder, privKey, k.AccountKeeper().GetAccount(ctx, creator)) + txbz, err := testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum := sha256.Sum256(txbz) + res := testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err := testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + _, found := testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) + require.True(t, found) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[1]) + require.Equal(t, common.HexToHash("0x0").Hex(), receipt.Logs[0].Topics[2]) + require.Equal(t, recipientHash, receipt.Logs[0].Topics[3]) + expectedData := append(common.BigToHash(big.NewInt(1)).Bytes(), common.BigToHash(big.NewInt(10)).Bytes()...) + require.Equal(t, expectedData, receipt.Logs[0].Data) + + // calling from wasmd precompile + abi := pcommon.MustGetABI(f, "wasm_abi.json") + emptyCoins, err := sdk.NewCoins().MarshalJSON() + require.Nil(t, err) + payload = []byte(fmt.Sprintf("{\"mint_batch\":{\"recipient\":\"%s\",\"msgs\":[{\"token_id\":\"1\",\"amount\":\"30\"},{\"token_id\":\"2\",\"amount\":\"40\"}]}}", creator.String())) + data, err := abi.Pack("execute", contractAddr.String(), payload, emptyCoins) + require.Nil(t, err) + wasmAddr := common.HexToAddress(wasmd.WasmdAddress) + txData := ethtypes.LegacyTx{ + Nonce: 0, + GasPrice: big.NewInt(1000000000), + Gas: 1000000, + To: &wasmAddr, + Data: data, + } + chainID := k.ChainID(ctx) + chainCfg := evmtypes.DefaultChainConfig() + ethCfg := chainCfg.EthereumConfig(chainID) + blockNum := big.NewInt(ctx.BlockHeight()) + signer := ethtypes.MakeSigner(ethCfg, blockNum, uint64(ctx.BlockTime().Unix())) + testPrivHex := hex.EncodeToString(privKey.Bytes()) + key, _ := crypto.HexToECDSA(testPrivHex) + signedTx, err := ethtypes.SignTx(ethtypes.NewTx(&txData), signer, key) + require.Nil(t, err) + typedTx, err := ethtx.NewLegacyTx(signedTx) + require.Nil(t, err) + emsg, err := evmtypes.NewMsgEVMTransaction(typedTx) + require.Nil(t, err) + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(emsg) + tx = txBuilder.GetTx() + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()).WithTxIndex(1), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, signedTx.Hash()) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + _, found = testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) + require.True(t, found) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[1]) + require.Equal(t, common.HexToHash("0x0").Hex(), receipt.Logs[0].Topics[2]) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[3]) + expectedData = append([]byte{}, common.BigToHash(big.NewInt(32)).Bytes()...) // offset for token_ids array (always 32) + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // length of token_ids array + expectedData = append(expectedData, common.BigToHash(big.NewInt(1)).Bytes()...) // token id 1 + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // token id 2 + expectedData = append(expectedData, common.BigToHash(big.NewInt(32)).Bytes()...) // offset for token_ids array (always 32) + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // length of amounts array + expectedData = append(expectedData, common.BigToHash(big.NewInt(30)).Bytes()...) // amount 30 + expectedData = append(expectedData, common.BigToHash(big.NewInt(40)).Bytes()...) // amount 40 + require.Equal(t, expectedData, receipt.Logs[0].Data) + + // send + payload = []byte(fmt.Sprintf("{\"send\":{\"to\":\"%s\",\"token_id\":\"1\",\"amount\":\"2\"}}", recipient.String())) + msg = &wasmtypes.MsgExecuteContract{ + Sender: creator.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKey, k.AccountKeeper().GetAccount(ctx, creator)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + _, found = testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) + require.True(t, found) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[1]) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[2]) + require.Equal(t, recipientHash, receipt.Logs[0].Topics[3]) + expectedData = append(common.HexToHash("0x1").Bytes(), common.HexToHash("0x2").Bytes()...) + require.Equal(t, expectedData, receipt.Logs[0].Data) + + // send_batch + payload = []byte(fmt.Sprintf("{\"send_batch\":{\"to\":\"%s\",\"batch\":[{\"token_id\":\"1\",\"amount\":\"1\"},{\"token_id\":\"2\",\"amount\":\"2\"}]}}", recipient.String())) + msg = &wasmtypes.MsgExecuteContract{ + Sender: creator.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKey, k.AccountKeeper().GetAccount(ctx, creator)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + _, found = testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) + require.True(t, found) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[1]) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[2]) + require.Equal(t, recipientHash, receipt.Logs[0].Topics[3]) + expectedData = append([]byte{}, common.BigToHash(big.NewInt(32)).Bytes()...) // offset for token_ids array (always 32) + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // length of token_ids array + expectedData = append(expectedData, common.BigToHash(big.NewInt(1)).Bytes()...) // token id 1 + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // token id 2 + expectedData = append(expectedData, common.BigToHash(big.NewInt(32)).Bytes()...) // offset for token_ids array (always 32) + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // length of amounts array + expectedData = append(expectedData, common.BigToHash(big.NewInt(1)).Bytes()...) // amount 1 + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // amount 2 + require.Equal(t, expectedData, receipt.Logs[0].Data) + + // approve all + payload = []byte(fmt.Sprintf("{\"approve_all\":{\"operator\":\"%s\"}}", recipient.String())) + msg = &wasmtypes.MsgExecuteContract{ + Sender: creator.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKey, k.AccountKeeper().GetAccount(ctx, creator)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + _, found = testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) + require.True(t, found) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[1]) + require.Equal(t, recipientHash, receipt.Logs[0].Topics[2]) + require.Equal(t, common.HexToHash("0x1").Bytes(), receipt.Logs[0].Data) + + // send on behalf + payload = []byte(fmt.Sprintf("{\"send\":{\"to\":\"%s\",\"from\":\"%s\",\"token_id\":\"1\",\"amount\":\"1\"}}", recipient.String(), creator.String())) + msg = &wasmtypes.MsgExecuteContract{ + Sender: recipient.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKeyRecipient, k.AccountKeeper().GetAccount(ctx, recipient)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + require.Equal(t, recipientHash, receipt.Logs[0].Topics[1]) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[2]) + require.Equal(t, recipientHash, receipt.Logs[0].Topics[3]) + expectedData = append(common.HexToHash("0x1").Bytes(), common.HexToHash("0x1").Bytes()...) + require.Equal(t, expectedData, receipt.Logs[0].Data) + + // send_batch on behalf + payload = []byte(fmt.Sprintf("{\"send_batch\":{\"to\":\"%s\",\"from\":\"%s\",\"batch\":[{\"token_id\":\"1\",\"amount\":\"1\"},{\"token_id\":\"2\",\"amount\":\"1\"}]}}", recipient.String(), creator.String())) + msg = &wasmtypes.MsgExecuteContract{ + Sender: recipient.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKeyRecipient, k.AccountKeeper().GetAccount(ctx, recipient)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + require.Equal(t, recipientHash, receipt.Logs[0].Topics[1]) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[2]) + require.Equal(t, recipientHash, receipt.Logs[0].Topics[3]) + expectedData = append([]byte{}, common.BigToHash(big.NewInt(32)).Bytes()...) // offset for token_ids array (always 32) + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // length of token_ids array + expectedData = append(expectedData, common.BigToHash(big.NewInt(1)).Bytes()...) // token id 1 + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // token id 2 + expectedData = append(expectedData, common.BigToHash(big.NewInt(32)).Bytes()...) // offset for token_ids array (always 32) + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // length of amounts array + expectedData = append(expectedData, common.BigToHash(big.NewInt(1)).Bytes()...) // amount 1 + expectedData = append(expectedData, common.BigToHash(big.NewInt(1)).Bytes()...) // amount 1 + require.Equal(t, expectedData, receipt.Logs[0].Data) + + // burn on behalf + payload = []byte(fmt.Sprintf("{\"burn\":{\"from\":\"%s\",\"token_id\":\"1\",\"amount\":\"1\"}}", creator.String())) + msg = &wasmtypes.MsgExecuteContract{ + Sender: recipient.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKeyRecipient, k.AccountKeeper().GetAccount(ctx, recipient)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + require.Equal(t, recipientHash, receipt.Logs[0].Topics[1]) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[2]) + require.Equal(t, common.HexToHash("0x0").Hex(), receipt.Logs[0].Topics[3]) + expectedData = append(common.HexToHash("0x1").Bytes(), common.HexToHash("0x1").Bytes()...) + require.Equal(t, expectedData, receipt.Logs[0].Data) + + // burn_batch on behalf + payload = []byte(fmt.Sprintf("{\"burn_batch\":{\"from\":\"%s\",\"batch\":[{\"token_id\":\"1\",\"amount\":\"1\"},{\"token_id\":\"2\",\"amount\":\"1\"}]}}", creator.String())) + msg = &wasmtypes.MsgExecuteContract{ + Sender: recipient.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKeyRecipient, k.AccountKeeper().GetAccount(ctx, recipient)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + require.Equal(t, recipientHash, receipt.Logs[0].Topics[1]) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[2]) + require.Equal(t, common.HexToHash("0x0").Hex(), receipt.Logs[0].Topics[3]) + expectedData = append([]byte{}, common.BigToHash(big.NewInt(32)).Bytes()...) // offset for token_ids array (always 32) + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // length of token_ids array + expectedData = append(expectedData, common.BigToHash(big.NewInt(1)).Bytes()...) // token id 1 + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // token id 2 + expectedData = append(expectedData, common.BigToHash(big.NewInt(32)).Bytes()...) // offset for token_ids array (always 32) + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // length of amounts array + expectedData = append(expectedData, common.BigToHash(big.NewInt(1)).Bytes()...) // amount 1 + expectedData = append(expectedData, common.BigToHash(big.NewInt(1)).Bytes()...) // amount 1 + require.Equal(t, expectedData, receipt.Logs[0].Data) + + // revoke all + payload = []byte(fmt.Sprintf("{\"revoke_all\":{\"operator\":\"%s\"}}", recipient.String())) + msg = &wasmtypes.MsgExecuteContract{ + Sender: creator.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKey, k.AccountKeeper().GetAccount(ctx, creator)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + _, found = testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) + require.True(t, found) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[1]) + require.Equal(t, recipientHash, receipt.Logs[0].Topics[2]) + require.Equal(t, common.HexToHash("0x0").Bytes(), receipt.Logs[0].Data) + + // burn + payload = []byte("{\"burn\":{\"token_id\":\"2\",\"amount\":\"1\"}}") + msg = &wasmtypes.MsgExecuteContract{ + Sender: creator.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKey, k.AccountKeeper().GetAccount(ctx, creator)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + _, found = testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) + require.True(t, found) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[1]) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[2]) + require.Equal(t, common.HexToHash("0x0").Hex(), receipt.Logs[0].Topics[3]) + expectedData = append(common.HexToHash("0x2").Bytes(), common.HexToHash("0x1").Bytes()...) + require.Equal(t, expectedData, receipt.Logs[0].Data) + + // burn_batch + payload = []byte("{\"burn_batch\":{\"batch\":[{\"token_id\":\"1\",\"amount\":\"1\"},{\"token_id\":\"2\",\"amount\":\"1\"}]}}") + msg = &wasmtypes.MsgExecuteContract{ + Sender: creator.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKey, k.AccountKeeper().GetAccount(ctx, creator)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + _, found = testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) + require.True(t, found) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[1]) + require.Equal(t, creatorHash, receipt.Logs[0].Topics[2]) + require.Equal(t, common.HexToHash("0x0").Hex(), receipt.Logs[0].Topics[3]) + expectedData = append([]byte{}, common.BigToHash(big.NewInt(32)).Bytes()...) // offset for token_ids array (always 32) + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // length of token_ids array + expectedData = append(expectedData, common.BigToHash(big.NewInt(1)).Bytes()...) // token id 1 + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // token id 2 + expectedData = append(expectedData, common.BigToHash(big.NewInt(32)).Bytes()...) // offset for token_ids array (always 32) + expectedData = append(expectedData, common.BigToHash(big.NewInt(2)).Bytes()...) // length of amounts array + expectedData = append(expectedData, common.BigToHash(big.NewInt(1)).Bytes()...) // amount 1 + expectedData = append(expectedData, common.BigToHash(big.NewInt(1)).Bytes()...) // amount 1 + require.Equal(t, expectedData, receipt.Logs[0].Data) +} + func signTx(txBuilder client.TxBuilder, privKey cryptotypes.PrivKey, acc authtypes.AccountI) sdk.Tx { var sigsV2 []signing.SignatureV2 sigV2 := signing.SignatureV2{ diff --git a/contracts/src/CW1155ERC1155Pointer.sol b/contracts/src/CW1155ERC1155Pointer.sol new file mode 100644 index 0000000000..356f434e8f --- /dev/null +++ b/contracts/src/CW1155ERC1155Pointer.sol @@ -0,0 +1,334 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "@openzeppelin/contracts/token/common/ERC2981.sol"; +import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; +import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; +import "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol"; +import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {IWasmd} from "./precompiles/IWasmd.sol"; +import {IJson} from "./precompiles/IJson.sol"; +import {IAddr} from "./precompiles/IAddr.sol"; + +contract CW1155ERC1155Pointer is ERC1155, ERC2981 { + + address constant WASMD_PRECOMPILE_ADDRESS = 0x0000000000000000000000000000000000001002; + address constant JSON_PRECOMPILE_ADDRESS = 0x0000000000000000000000000000000000001003; + address constant ADDR_PRECOMPILE_ADDRESS = 0x0000000000000000000000000000000000001004; + + string public Cw1155Address; + IWasmd public WasmdPrecompile; + IJson public JsonPrecompile; + IAddr public AddrPrecompile; + string public name; + string public symbol; + + error NotImplementedOnCosmwasmContract(string method); + error NotImplemented(string method); + + constructor(string memory Cw1155Address_, string memory name_, string memory symbol_) ERC1155("") { + Cw1155Address = Cw1155Address_; + WasmdPrecompile = IWasmd(WASMD_PRECOMPILE_ADDRESS); + JsonPrecompile = IJson(JSON_PRECOMPILE_ADDRESS); + AddrPrecompile = IAddr(ADDR_PRECOMPILE_ADDRESS); + name = name_; + symbol = symbol_; + } + + //transactions + function safeTransferFrom( + address from, + address to, + uint256 id, + uint256 amount, + bytes memory data + ) public override { + require(to != address(0), "ERC1155: transfer to the zero address"); + require(balanceOf(from, id) >= amount, "ERC1155: insufficient balance for transfer"); + require( + msg.sender == from || isApprovedForAll(from, msg.sender), + "ERC1155: caller is not approved to transfer" + ); + + string memory f = _formatPayload("from", _doubleQuotes(AddrPrecompile.getSeiAddr(from))); + string memory t = _formatPayload("to", _doubleQuotes(AddrPrecompile.getSeiAddr(to))); + string memory tId = _formatPayload("token_id", _doubleQuotes(Strings.toString(id))); + string memory amt = _formatPayload("amount", _doubleQuotes(Strings.toString(amount))); + + string memory req = _curlyBrace( + _formatPayload("send", _curlyBrace(_join(f, ",", _join(t, ",", _join(tId, ",", amt))))) + ); + _execute(bytes(req)); + if (to.code.length > 0) { + require( + IERC1155Receiver(to).onERC1155Received( + msg.sender, + from, + id, + amount, + data + ) == IERC1155Receiver.onERC1155Received.selector, + "unsafe transfer" + ); + } + } + + function safeBatchTransferFrom( + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) public override { + require(to != address(0), "ERC1155: transfer to the zero address"); + require( + msg.sender == from || isApprovedForAll(from, msg.sender), + "ERC1155: caller is not approved to transfer" + ); + require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); + address[] memory batchFrom = new address[](ids.length); + for (uint256 i = 0; i < ids.length; i++) { + batchFrom[i] = from; + } + uint256[] memory balances = balanceOfBatch(batchFrom, ids); + for (uint256 i = 0; i < balances.length; i++) { + require(balances[i] >= amounts[i], "ERC1155: insufficient balance for transfer"); + } + + string memory payload = string.concat("{\"send_batch\":{\"from\":\"", AddrPrecompile.getSeiAddr(from)); + payload = string.concat(payload, "\",\"to\":\""); + payload = string.concat(payload, AddrPrecompile.getSeiAddr(to)); + payload = string.concat(payload, "\",\"batch\":["); + for (uint256 i = 0; i < ids.length; i++) { + string memory batch = string.concat("{\"token_id\":\"", Strings.toString(ids[i])); + batch = string.concat(batch, "\",\"amount\":\""); + batch = string.concat(batch, Strings.toString(amounts[i])); + if (i < ids.length - 1) { + batch = string.concat(batch, "\"},"); + } else { + batch = string.concat(batch, "\"}"); + } + payload = string.concat(payload, batch); + } + payload = string.concat(payload, "]}}"); + _execute(bytes(payload)); + if (to.code.length > 0) { + require( + IERC1155Receiver(to).onERC1155BatchReceived( + msg.sender, + from, + ids, + amounts, + data + ) == IERC1155Receiver.onERC1155BatchReceived.selector, + "unsafe transfer" + ); + } + } + + function setApprovalForAll(address operator, bool approved) public override { + string memory op = _curlyBrace(_formatPayload("operator", _doubleQuotes(AddrPrecompile.getSeiAddr(operator)))); + if (approved) { + _execute(bytes(_curlyBrace(_formatPayload("approve_all", op)))); + } else { + _execute(bytes(_curlyBrace(_formatPayload("revoke_all", op)))); + } + } + + // ERC1155Burnable transactions + function burn(address account, uint256 id, uint256 amount) public virtual { + require(account != address(0), "ERC1155: cannot burn from the zero address"); + require(balanceOf(account, id) >= amount, "ERC1155: insufficient balance for burning"); + require( + msg.sender == account || isApprovedForAll(account, msg.sender), + "ERC1155: caller is not approved to burn" + ); + + string memory f = _formatPayload("from", _doubleQuotes(AddrPrecompile.getSeiAddr(account))); + string memory tId = _formatPayload("token_id", _doubleQuotes(Strings.toString(id))); + string memory amt = _formatPayload("amount", _doubleQuotes(Strings.toString(amount))); + + string memory req = _curlyBrace( + _formatPayload("burn", _curlyBrace(_join(f, ",", _join(tId, ",", amt)))) + ); + _execute(bytes(req)); + } + + function burnBatch(address account, uint256[] memory ids, uint256[] memory amounts) public virtual { + require(account != address(0), "ERC1155: cannot burn from the zero address"); + require( + msg.sender == account || isApprovedForAll(account, msg.sender), + "ERC1155: caller is not approved to burn" + ); + require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); + + address[] memory batchFrom = new address[](ids.length); + for (uint256 i = 0; i < ids.length; i++) { + batchFrom[i] = account; + } + uint256[] memory balances = balanceOfBatch(batchFrom, ids); + for (uint256 i = 0; i < balances.length; i++) { + require(balances[i] >= amounts[i], "ERC1155: insufficient balance for burning"); + } + + string memory payload = string.concat("{\"burn_batch\":{\"from\":\"", AddrPrecompile.getSeiAddr(account)); + payload = string.concat(payload, "\",\"batch\":["); + for (uint256 i = 0; i < ids.length; i++) { + string memory batch = string.concat("{\"token_id\":\"", Strings.toString(ids[i])); + batch = string.concat(batch, "\",\"amount\":\""); + batch = string.concat(batch, Strings.toString(amounts[i])); + if (i < ids.length - 1) { + batch = string.concat(batch, "\"},"); + } else { + batch = string.concat(batch, "\"}"); + } + payload = string.concat(payload, batch); + } + payload = string.concat(payload, "]}}"); + _execute(bytes(payload)); + } + + // Queries + function balanceOf(address account, uint256 id) public view override returns (uint256) { + require(account != address(0), "ERC1155: cannot query balance of zero address"); + string memory own = _formatPayload("owner", _doubleQuotes(AddrPrecompile.getSeiAddr(account))); + string memory tId = _formatPayload("token_id", _doubleQuotes(Strings.toString(id))); + string memory req = _curlyBrace(_formatPayload("balance_of", _curlyBrace(_join(own, ",", tId)))); + bytes memory response = WasmdPrecompile.query(Cw1155Address, bytes(req)); + return JsonPrecompile.extractAsUint256(response, "balance"); + } + + function balanceOfBatch( + address[] memory accounts, + uint256[] memory ids + ) public view override returns (uint256[] memory balances) { + require(accounts.length != 0, "ERC1155: cannot query empty accounts list"); + if (accounts.length != ids.length) { + revert ERC1155InvalidArrayLength(ids.length, accounts.length); + } + string memory ownerTokens = "["; + for (uint256 i = 0; i < accounts.length; i++) { + require(accounts[i] != address(0), "ERC1155: cannot query balance of zero address"); + if (i > 0) { + ownerTokens = string.concat(ownerTokens, ","); + } + string memory ownerToken = string.concat("{\"owner\":\"", AddrPrecompile.getSeiAddr(accounts[i])); + ownerToken = string.concat(ownerToken, "\",\"token_id\":\""); + ownerToken = string.concat(ownerToken, Strings.toString(ids[i])); + ownerToken = string.concat(ownerToken, "\"}"); + ownerTokens = string.concat(ownerTokens, ownerToken); + } + ownerTokens = string.concat(ownerTokens, "]"); + string memory req = _curlyBrace(_formatPayload("balance_of_batch", ownerTokens)); + bytes memory response = WasmdPrecompile.query(Cw1155Address, bytes(req)); + bytes[] memory parseResponse = JsonPrecompile.extractAsBytesList(response, "balances"); + require(parseResponse.length == accounts.length, "Invalid balance_of_batch response"); + balances = new uint256[](parseResponse.length); + for (uint256 i = 0; i < parseResponse.length; i++) { + balances[i] = JsonPrecompile.extractAsUint256(parseResponse[i], "amount"); + } + } + + function uri(uint256 id) public view override returns (string memory) { + string memory tId = _curlyBrace(_formatPayload("token_id", _doubleQuotes(Strings.toString(id)))); + string memory req = _curlyBrace(_formatPayload("token_info", tId)); + bytes memory response = WasmdPrecompile.query(Cw1155Address, bytes(req)); + return string(JsonPrecompile.extractAsBytes(response, "token_uri")); + } + + function isApprovedForAll(address owner, address operator) public view override returns (bool) { + string memory own = _formatPayload("owner", _doubleQuotes(AddrPrecompile.getSeiAddr(owner))); + string memory op = _formatPayload("operator", _doubleQuotes(AddrPrecompile.getSeiAddr(operator))); + string memory req = _curlyBrace(_formatPayload("is_approved_for_all", _curlyBrace(_join(own, ",", op)))); + bytes32 response = keccak256(WasmdPrecompile.query(Cw1155Address, bytes(req))); + bytes32 approvedMsg = keccak256("{\"approved\":true}"); + bytes32 unapprovedMsg = keccak256("{\"approved\":false}"); + if (response == approvedMsg) { + return true; + } else if (response == unapprovedMsg) { + return false; + } + revert NotImplementedOnCosmwasmContract("is_approved_for_all"); + } + + // ERC1155Supply + function totalSupply() public view virtual returns (uint256) { + bytes memory response = WasmdPrecompile.query(Cw1155Address, bytes("{\"num_tokens\":{}}")); + return JsonPrecompile.extractAsUint256(response, "count"); + } + + function totalSupply(uint256 id) public view virtual returns (uint256) { + string memory query = string.concat( + string.concat("{\"num_tokens\":{\"token_id\":\"", Strings.toString(id)), + "\"}}" + ); + bytes memory response = WasmdPrecompile.query(Cw1155Address, bytes(query)); + return JsonPrecompile.extractAsUint256(response, "count"); + } + + function exists(uint256 id) public view virtual returns (bool) { + return totalSupply(id) > 0; + } + + // 2981 + function royaltyInfo(uint256 tokenId, uint256 salePrice) public view override returns (address, uint256) { + bytes memory checkRoyaltyResponse = WasmdPrecompile.query( + Cw1155Address, + bytes("{\"extension\":{\"msg\":{\"check_royalties\":{}}}}") + ); + bytes memory isRoyaltyImplemented = JsonPrecompile.extractAsBytes(checkRoyaltyResponse, "royalty_payments"); + if (keccak256(isRoyaltyImplemented) != keccak256("true")) { + revert NotImplementedOnCosmwasmContract("royalty_info"); + } + string memory tId = _formatPayload("token_id", _doubleQuotes(Strings.toString(tokenId))); + string memory sPrice = _formatPayload("sale_price", _doubleQuotes(Strings.toString(salePrice))); + string memory req = _curlyBrace(_formatPayload("royalty_info", _curlyBrace(_join(tId, ",", sPrice)))); + string memory fullReq = _curlyBrace(_formatPayload("extension", _curlyBrace(_formatPayload("msg", req)))); + bytes memory response = WasmdPrecompile.query(Cw1155Address, bytes(fullReq)); + bytes memory addr = JsonPrecompile.extractAsBytes(response, "address"); + uint256 amt = JsonPrecompile.extractAsUint256(response, "royalty_amount"); + if (addr.length == 0) { + return (address(0), amt); + } + return (AddrPrecompile.getEvmAddr(string(addr)), amt); + } + + function supportsInterface(bytes4 interfaceId) public pure override(ERC2981, ERC1155) returns (bool) { + return + interfaceId == type(IERC2981).interfaceId || + interfaceId == type(IERC1155).interfaceId || + interfaceId == type(IERC1155MetadataURI).interfaceId || + interfaceId == type(IERC165).interfaceId; + } + + function _execute(bytes memory req) internal returns (bytes memory) { + (bool success, bytes memory ret) = WASMD_PRECOMPILE_ADDRESS.delegatecall( + abi.encodeWithSignature( + "execute(string,bytes,bytes)", + Cw1155Address, + bytes(req), + bytes("[]") + ) + ); + require(success, "CosmWasm execute failed"); + return ret; + } + + function _formatPayload(string memory key, string memory value) internal pure returns (string memory) { + return _join(_doubleQuotes(key), ":", value); + } + + function _curlyBrace(string memory s) internal pure returns (string memory) { + return string.concat("{", string.concat(s, "}")); + } + + function _doubleQuotes(string memory s) internal pure returns (string memory) { + return string.concat("\"", string.concat(s, "\"")); + } + + function _join(string memory a, string memory separator, string memory b) internal pure returns (string memory) { + return string.concat(a, string.concat(separator, b)); + } +} diff --git a/contracts/src/ERC1155.sol b/contracts/src/ERC1155.sol new file mode 100644 index 0000000000..2e5084d383 --- /dev/null +++ b/contracts/src/ERC1155.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/token/common/ERC2981.sol"; +import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; + +contract ERC1155Example is ERC1155Supply,ERC2981 { + string public name = "DummyERC1155"; + + string public symbol = "DUMMY"; + + string private _uri = "https://example.com/{id}"; + + address private _randomAddress1 = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; + address private _randomAddress2 = 0xF39fD6e51Aad88F6f4CE6AB8827279CFffb92267; + + constructor() ERC1155(_uri) { + setDefaultRoyalty(_randomAddress1); + + mintForTest(_randomAddress1, 0); + mintForTest(_randomAddress2, 4); + } + + function mintForTest(address recipient, uint256 startId) public virtual { + uint256[] memory tids = new uint256[](6); + tids[0] = startId; + tids[1] = startId + 1; + tids[2] = startId + 2; + tids[3] = startId + 3; + tids[4] = startId + 4; + tids[5] = startId + 5; + uint256[] memory values = new uint256[](6); + values[0] = 10; + values[1] = 11; + values[2] = 12; + values[3] = 13; + values[4] = 14; + values[5] = 15; + _mintBatch(recipient, tids, values, '0x0'); + } + + function supportsInterface(bytes4 interfaceId) public view override(ERC1155, ERC2981) returns (bool) { + return super.supportsInterface(interfaceId); + } + + function setDefaultRoyalty(address receiver) public { + _setDefaultRoyalty(receiver, 500); + } +} diff --git a/contracts/test/CW1155ERC1155PointerTest.t.sol b/contracts/test/CW1155ERC1155PointerTest.t.sol new file mode 100644 index 0000000000..2a24a9239d --- /dev/null +++ b/contracts/test/CW1155ERC1155PointerTest.t.sol @@ -0,0 +1,638 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.0; + +import {Test, console2} from "forge-std/Test.sol"; +import {CW1155ERC1155Pointer} from "../src/CW1155ERC1155Pointer.sol"; +import {IWasmd} from "../src/precompiles/IWasmd.sol"; +import {IJson} from "../src/precompiles/IJson.sol"; +import {IAddr} from "../src/precompiles/IAddr.sol"; +import "@openzeppelin/contracts/interfaces/draft-IERC6093.sol"; +import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; + +address constant WASMD_PRECOMPILE_ADDRESS = 0x0000000000000000000000000000000000001002; +address constant JSON_PRECOMPILE_ADDRESS = 0x0000000000000000000000000000000000001003; +address constant ADDR_PRECOMPILE_ADDRESS = 0x0000000000000000000000000000000000001004; + +address constant MockCallerEVMAddr = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; +address constant MockOperatorEVMAddr = 0xF39fD6e51Aad88F6f4CE6AB8827279CFffb92267; +address constant MockZeroAddress = 0x0000000000000000000000000000000000000000; + +string constant MockCallerSeiAddr = "sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw"; +string constant MockOperatorSeiAddr = "sei1vldxw5dy5k68hqr4d744rpg9w8cqs54x4asdqe"; +string constant MockCWContractAddress = "sei14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sh9m79m"; + +contract MockWasmd is IWasmd { + + // Transactions + function instantiate( + uint64, + string memory, + bytes memory, + string memory, + bytes memory + ) external pure returns (string memory, bytes memory) { + return (MockCWContractAddress, bytes("")); + } + + function execute( + string memory contractAddress, + bytes memory, + bytes memory + ) external pure returns (bytes memory) { + require(keccak256(abi.encodePacked(contractAddress)) == keccak256(abi.encodePacked(MockCWContractAddress)), "wrong CW contract address"); + return bytes(""); + } + + // Queries + function query(string memory, bytes memory) external pure returns (bytes memory) { + return bytes(""); + } +} + +contract MockJson is IJson { + function extractAsBytes(bytes memory, string memory) external pure returns (bytes memory) { + return bytes("extracted bytes"); + } + + function extractAsBytesList(bytes memory, string memory) external pure returns (bytes[] memory) { + return new bytes[](0); + } + + function extractAsUint256(bytes memory input, string memory key) external view returns (uint256 response) { + return 0; + } +} + +contract MockAddr is IAddr { + function getSeiAddr(address addr) external pure returns (string memory) { + if (addr == MockCallerEVMAddr) { + return MockCallerSeiAddr; + } + return MockOperatorSeiAddr; + } + + function getEvmAddr(string memory addr) external pure returns (address) { + if (keccak256(abi.encodePacked(addr)) == keccak256(abi.encodePacked(MockCallerSeiAddr))) { + return MockCallerEVMAddr; + } + return MockOperatorEVMAddr; + } +} + +contract MockERC1155Receiver is IERC1155Receiver { + function onERC1155Received( + address operator, + address from, + uint256 id, + uint256 value, + bytes calldata data + ) external returns (bytes4) { + return 0xf23a6e61; + } + + function onERC1155BatchReceived( + address operator, + address from, + uint256[] calldata ids, + uint256[] calldata values, + bytes calldata data + ) external returns (bytes4) { + return 0xbc197c81; + } + + function supportsInterface(bytes4 interfaceId) public pure override(IERC165) returns (bool) { + return + interfaceId == type(IERC1155Receiver).interfaceId || + interfaceId == type(IERC165).interfaceId; + } +} + +contract CW1155ERC1155PointerTest is Test { + + event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); + event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values); + event ApprovalForAll(address indexed owner, address indexed operator, bool approved); + + CW1155ERC1155Pointer pointer; + MockWasmd mockWasmd; + MockJson mockJson; + MockAddr mockAddr; + MockERC1155Receiver mockERC1155Receiver; + + function setUp() public { + pointer = new CW1155ERC1155Pointer(MockCWContractAddress, "Test", "TEST"); + mockWasmd = new MockWasmd(); + mockJson = new MockJson(); + mockAddr = new MockAddr(); + mockERC1155Receiver = new MockERC1155Receiver(); + vm.etch(WASMD_PRECOMPILE_ADDRESS, address(mockWasmd).code); + vm.etch(JSON_PRECOMPILE_ADDRESS, address(mockJson).code); + vm.etch(ADDR_PRECOMPILE_ADDRESS, address(mockAddr).code); + vm.etch(MockOperatorEVMAddr, address(mockERC1155Receiver).code); + } + + function testBalanceOf() public { + bytes memory queryCall = bytes("{\"balance_of\":{\"owner\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"token_id\":\"1\"}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall), + abi.encode("{\"balance\":\"1\"}") + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall) + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsUint256(bytes,string)", bytes("{\"balance\":\"1\"}"), "balance"), + abi.encode(1) + ); + assertEq(pointer.balanceOf(MockCallerEVMAddr, 1), 1); + } + + function testBalanceOfZeroAddress() public { + vm.expectRevert(bytes("ERC1155: cannot query balance of zero address")); + pointer.balanceOf(MockZeroAddress, 1); + } + + function testBalanceOfBatch() public { + vm.mockCall( + ADDR_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("getSeiAddr(string)", "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"), + abi.encode(MockCallerSeiAddr) + ); + bytes memory queryCall = bytes("{\"balance_of_batch\":[{\"owner\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"token_id\":\"1\"},{\"owner\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"token_id\":\"2\"},{\"owner\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"token_id\":\"3\"}]}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall), + abi.encode("{\"balances\":[ { \"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"1\", \"amount\": \"1\" }, { \"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"2\", \"amount\": \"2\" }, { \"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"3\", \"amount\": \"0\" } ]}") + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall) + ); + + bytes[] memory resp = new bytes[](3); + resp[0] = bytes("{\"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"1\", \"amount\": \"1\"}"); + resp[1] = bytes("{\"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"2\", \"amount\": \"2\"}"); + resp[2] = bytes("{\"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"3\", \"amount\": \"0\"}"); + + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsBytesList(bytes,string)",bytes("{\"balances\":[ { \"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"1\", \"amount\": \"1\" }, { \"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"2\", \"amount\": \"2\" }, { \"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"3\", \"amount\": \"0\" } ]}"), "balances"), + abi.encode(resp) + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsUint256(bytes,string)", resp[0], "amount"), + abi.encode(1) + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsUint256(bytes,string)", resp[1], "amount"), + abi.encode(2) + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsUint256(bytes,string)", resp[2], "amount"), + abi.encode(0) + ); + + address[] memory owners = new address[](3); + uint256[] memory ids = new uint256[](3); + owners[0] = MockCallerEVMAddr; + owners[1] = MockCallerEVMAddr; + owners[2] = MockCallerEVMAddr; + ids[0] = 1; + ids[1] = 2; + ids[2] = 3; + uint256[] memory expectedResp = new uint256[](3); + expectedResp[0] = 1; + expectedResp[1] = 2; + expectedResp[2] = 0; + assertEq(pointer.balanceOfBatch(owners, ids), expectedResp); + } + + function testBalanceOfBatchBadLength0() public { + uint256 idsLength = 0; + uint256 valuesLength = 0; + vm.expectRevert(bytes("ERC1155: cannot query empty accounts list")); + pointer.balanceOfBatch(new address[](valuesLength), new uint256[](idsLength)); + } + + function testBalanceOfBatchBadLength1() public { + uint256 idsLength = 1; + uint256 valuesLength = 2; + vm.expectRevert( + abi.encodeWithSelector( + IERC1155Errors.ERC1155InvalidArrayLength.selector, + idsLength, + valuesLength + ) + ); + pointer.balanceOfBatch(new address[](valuesLength), new uint256[](idsLength)); + } + + function testBalanceOfBatchBadAddress() public { + address[] memory owners = new address[](3); + uint256[] memory ids = new uint256[](3); + owners[0] = MockZeroAddress; + owners[1] = MockCallerEVMAddr; + owners[2] = MockCallerEVMAddr; + ids[0] = 1; + ids[1] = 2; + ids[2] = 3; + vm.expectRevert(bytes("ERC1155: cannot query balance of zero address")); + pointer.balanceOfBatch(owners, ids); + } + + function testUri() public { + bytes memory queryCall = bytes("{\"token_info\":{\"token_id\":\"1\"}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall), + abi.encode("{\"extension\": { \"animation_url\": null, \"attributes\": null, \"background_color\": null, \"description\": null, \"external_url\": null, \"image\": null, \"image_data\": null, \"name\": null, \"royalty_payment_address\": null, \"royalty_percentage\": null, \"youtube_url\": null }, \"token_uri\": \"test\" }") + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall) + ); + + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsBytes(bytes,string)", bytes("{\"extension\": { \"animation_url\": null, \"attributes\": null, \"background_color\": null, \"description\": null, \"external_url\": null, \"image\": null, \"image_data\": null, \"name\": null, \"royalty_payment_address\": null, \"royalty_percentage\": null, \"youtube_url\": null }, \"token_uri\": \"test\" }"), "token_uri"), + abi.encode(bytes("test")) + ); + assertEq(pointer.uri(1), "test"); + } + + function testIsApprovedForAll() public { + // test response for approved operator + bytes memory queryCall1 = bytes("{\"is_approved_for_all\":{\"owner\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"operator\":\"sei1vldxw5dy5k68hqr4d744rpg9w8cqs54x4asdqe\"}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall1), + abi.encode("{\"approved\":true}") + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall1) + ); + // test response for unapproved operator + bytes memory queryCall2 = bytes("{\"is_approved_for_all\":{\"owner\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"operator\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\"}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall2), + abi.encode("{\"approved\":false}") + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall2) + ); + + assertEq(pointer.isApprovedForAll(MockCallerEVMAddr, MockOperatorEVMAddr), true); + assertEq(pointer.isApprovedForAll(MockCallerEVMAddr, MockCallerEVMAddr), false); + } + + function testRoyaltyInfo() public { + bytes memory queryCall1 = bytes("{\"extension\":{\"msg\":{\"check_royalties\":{}}}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall1), + abi.encode("{\"royalty_payments\":true}") + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall1) + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsBytes(bytes,string)", bytes("{\"royalty_payments\":true}"), "royalty_payments"), + abi.encode("true") + ); + bytes memory queryCall2 = bytes("{\"extension\":{\"msg\":{\"royalty_info\":{\"token_id\":\"1\",\"sale_price\":\"1000\"}}}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall2), + abi.encode("{\"address\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"royalty_amount\":\"10\"}") + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall2) + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsBytes(bytes,string)", bytes("{\"address\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"royalty_amount\":\"10\"}"), "address"), + abi.encode("sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw") + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsUint256(bytes,string)", bytes("{\"address\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"royalty_amount\":\"10\"}"), "royalty_amount"), + abi.encode(10) + ); + vm.mockCall( + ADDR_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("getEvmAddr(string)", "sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw"), + abi.encode(address(MockCallerEVMAddr)) + ); + (address recipient, uint256 royalties) = pointer.royaltyInfo(1, 1000); + assertEq(recipient, address(MockCallerEVMAddr)); + assertEq(royalties, 10); + } + + function testSafeTransferFrom() public { + bytes memory queryCall = bytes("{\"balance_of\":{\"owner\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"token_id\":\"1\"}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall), + abi.encode("{\"balance\":\"1\"}") + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall) + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsUint256(bytes,string)", bytes("{\"balance\":\"1\"}"), "balance"), + abi.encode(1) + ); + vm.mockCall( + ADDR_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("getEvmAddr(string)", "sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw"), + abi.encode(address(MockCallerEVMAddr)) + ); + vm.mockCall( + ADDR_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("getEvmAddr(string)", "sei1vldxw5dy5k68hqr4d744rpg9w8cqs54x4asdqe"), + abi.encode(address(MockOperatorEVMAddr)) + ); + + bytes memory executeCall = bytes("{\"send\":{\"from\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"to\":\"sei1vldxw5dy5k68hqr4d744rpg9w8cqs54x4asdqe\",\"token_id\":\"1\",\"amount\":\"1\"}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("execute(string,bytes,bytes)", MockCWContractAddress, executeCall), + abi.encode(bytes("")) + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("execute(string,bytes,bytes)", MockCWContractAddress, executeCall, bytes("[]")) + ); + vm.expectCall( + MockOperatorEVMAddr, + abi.encodeWithSignature("onERC1155Received(address,address,uint256,uint256,bytes)", MockCallerEVMAddr, MockCallerEVMAddr, 1, 1, bytes("")) + ); + + vm.startPrank(MockCallerEVMAddr); + pointer.safeTransferFrom(MockCallerEVMAddr, MockOperatorEVMAddr, 1, 1, bytes("")); + vm.stopPrank(); + } + + function testSafeTransferFromWithOperator() public { + bytes memory queryCall1 = bytes("{\"balance_of\":{\"owner\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"token_id\":\"1\"}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall1), + abi.encode("{\"balance\":\"1\"}") + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall1) + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsUint256(bytes,string)", bytes("{\"balance\":\"1\"}"), "balance"), + abi.encode(1) + ); + bytes memory queryCall2 = bytes("{\"is_approved_for_all\":{\"owner\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"operator\":\"sei1vldxw5dy5k68hqr4d744rpg9w8cqs54x4asdqe\"}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall2), + abi.encode("{\"approved\":true}") + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall2) + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsUint256(bytes,string)", bytes("{\"approved\":true}"), "approved"), + abi.encode(true) + ); + vm.mockCall( + ADDR_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("getEvmAddr(string)", "sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw"), + abi.encode(address(MockCallerEVMAddr)) + ); + vm.mockCall( + ADDR_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("getEvmAddr(string)", "sei1vldxw5dy5k68hqr4d744rpg9w8cqs54x4asdqe"), + abi.encode(address(MockOperatorEVMAddr)) + ); + bytes memory executeCall = bytes("{\"send\":{\"from\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"to\":\"sei1vldxw5dy5k68hqr4d744rpg9w8cqs54x4asdqe\",\"token_id\":\"1\",\"amount\":\"1\"}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("execute(string,bytes,bytes)", MockCWContractAddress,executeCall), + abi.encode(bytes("")) + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("execute(string,bytes,bytes)", MockCWContractAddress, executeCall, bytes("[]")) + ); + vm.expectCall( + MockOperatorEVMAddr, + abi.encodeWithSignature("onERC1155Received(address,address,uint256,uint256,bytes)", MockOperatorEVMAddr, MockCallerEVMAddr, 1, 1, bytes("")) + ); + + vm.startPrank(MockOperatorEVMAddr); + pointer.safeTransferFrom(MockCallerEVMAddr, MockOperatorEVMAddr, 1, 1, bytes("")); + vm.stopPrank(); + } + + function testSafeBatchTransferFrom() public { + bytes memory queryCall = bytes("{\"balance_of_batch\":[{\"owner\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"token_id\":\"1\"},{\"owner\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"token_id\":\"2\"}]}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall), + abi.encode("{\"balances\":[ { \"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"1\", \"amount\": \"1\" }, { \"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"2\", \"amount\": \"2\" } ]}") + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall) + ); + bytes[] memory resp = new bytes[](2); + resp[0] = bytes("{\"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"1\", \"amount\": \"1\"}"); + resp[1] = bytes("{\"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"2\", \"amount\": \"2\"}"); + + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsBytesList(bytes,string)",bytes("{\"balances\":[ { \"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"1\", \"amount\": \"1\" }, { \"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"2\", \"amount\": \"2\" } ]}"), "balances"), + abi.encode(resp) + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsUint256(bytes,string)", resp[0], "amount"), + abi.encode(1) + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsUint256(bytes,string)", resp[1], "amount"), + abi.encode(2) + ); + + vm.mockCall( + ADDR_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("getEvmAddr(string)", "sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw"), + abi.encode(address(MockCallerEVMAddr)) + ); + vm.mockCall( + ADDR_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("getEvmAddr(string)", "sei1vldxw5dy5k68hqr4d744rpg9w8cqs54x4asdqe"), + abi.encode(address(MockOperatorEVMAddr)) + ); + + bytes memory executeCall = bytes("{\"send_batch\":{\"from\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"to\":\"sei1vldxw5dy5k68hqr4d744rpg9w8cqs54x4asdqe\",\"batch\":[{\"token_id\":\"1\",\"amount\":\"1\"},{\"token_id\":\"2\",\"amount\":\"2\"}]}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("execute(string,bytes,bytes)", MockCWContractAddress, executeCall), + abi.encode(bytes("")) + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("execute(string,bytes,bytes)", MockCWContractAddress, executeCall, bytes("[]")) + ); + + uint256[] memory ids = new uint256[](2); + uint256[] memory amounts = new uint256[](2); + ids[0] = 1; + ids[1] = 2; + amounts[0] = 1; + amounts[1] = 2; + vm.expectCall( + MockOperatorEVMAddr, + abi.encodeWithSignature("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)", MockCallerEVMAddr, MockCallerEVMAddr, ids, amounts, bytes("")) + ); + + vm.startPrank(MockCallerEVMAddr); + pointer.safeBatchTransferFrom(MockCallerEVMAddr, MockOperatorEVMAddr, ids, amounts, bytes("")); + vm.stopPrank(); + } + + function testSetApprovalForAll() public { + bytes memory executeCall = bytes("{\"approve_all\":{\"operator\":\"sei1vldxw5dy5k68hqr4d744rpg9w8cqs54x4asdqe\"}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("execute(string,bytes,bytes)", MockCWContractAddress, executeCall, bytes("[]")), + abi.encode(bytes("")) + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("execute(string,bytes,bytes)", MockCWContractAddress, executeCall, bytes("[]")) + ); + vm.mockCall( + ADDR_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("getEvmAddr(string)", "sei1vldxw5dy5k68hqr4d744rpg9w8cqs54x4asdqe"), + abi.encode(address(MockOperatorEVMAddr)) + ); + vm.startPrank(MockCallerEVMAddr); + pointer.setApprovalForAll(MockOperatorEVMAddr, true); + vm.stopPrank(); + } + + function testBurn() public { + bytes memory queryCall = bytes("{\"balance_of\":{\"owner\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"token_id\":\"1\"}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall), + abi.encode("{\"balance\":\"1\"}") + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall) + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsUint256(bytes,string)", bytes("{\"balance\":\"1\"}"), "balance"), + abi.encode(1) + ); + vm.mockCall( + ADDR_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("getEvmAddr(string)", "sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw"), + abi.encode(address(MockCallerEVMAddr)) + ); + + bytes memory executeCall = bytes("{\"burn\":{\"from\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"token_id\":\"1\",\"amount\":\"1\"}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("execute(string,bytes,bytes)", MockCWContractAddress, executeCall), + abi.encode(bytes("")) + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("execute(string,bytes,bytes)", MockCWContractAddress, executeCall, bytes("[]")) + ); + + vm.startPrank(MockCallerEVMAddr); + pointer.burn(MockCallerEVMAddr, 1, 1); + vm.stopPrank(); + } + + function testBatchBurn() public { + bytes memory queryCall = bytes("{\"balance_of_batch\":[{\"owner\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"token_id\":\"1\"},{\"owner\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"token_id\":\"2\"}]}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall), + abi.encode("{\"balances\":[ { \"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"1\", \"amount\": \"1\" }, { \"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"2\", \"amount\": \"2\" } ]}") + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, queryCall) + ); + bytes[] memory resp = new bytes[](2); + resp[0] = bytes("{\"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"1\", \"amount\": \"1\"}"); + resp[1] = bytes("{\"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"2\", \"amount\": \"2\"}"); + + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsBytesList(bytes,string)",bytes("{\"balances\":[ { \"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"1\", \"amount\": \"1\" }, { \"owner\": \"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\", \"token_id\": \"2\", \"amount\": \"2\" } ]}"), "balances"), + abi.encode(resp) + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsUint256(bytes,string)", resp[0], "amount"), + abi.encode(1) + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsUint256(bytes,string)", resp[1], "amount"), + abi.encode(2) + ); + + vm.mockCall( + ADDR_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("getEvmAddr(string)", "sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw"), + abi.encode(address(MockCallerEVMAddr)) + ); + + bytes memory executeCall = bytes("{\"burn_batch\":{\"from\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"batch\":[{\"token_id\":\"1\",\"amount\":\"1\"},{\"token_id\":\"2\",\"amount\":\"2\"}]}}"); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("execute(string,bytes,bytes)", MockCWContractAddress, executeCall), + abi.encode(bytes("")) + ); + vm.expectCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("execute(string,bytes,bytes)", MockCWContractAddress, executeCall, bytes("[]")) + ); + + uint256[] memory ids = new uint256[](2); + uint256[] memory amounts = new uint256[](2); + ids[0] = 1; + ids[1] = 2; + amounts[0] = 1; + amounts[1] = 2; + + vm.startPrank(MockCallerEVMAddr); + pointer.burnBatch(MockCallerEVMAddr, ids, amounts); + vm.stopPrank(); + } +} \ No newline at end of file diff --git a/contracts/test/CW1155toERC1155PointerTest.js b/contracts/test/CW1155toERC1155PointerTest.js new file mode 100644 index 0000000000..07207b20d9 --- /dev/null +++ b/contracts/test/CW1155toERC1155PointerTest.js @@ -0,0 +1,214 @@ +const {setupSigners, deployEvmContract, getAdmin, deployWasm, executeWasm, queryWasm, + deployErc1155PointerForCw1155, WASM, registerPointerForERC1155 +} = require("./lib"); +const {expect} = require("chai"); + +describe("CW1155 to ERC1155 Pointer", function () { + let accounts; + let erc1155; + let pointer; + let admin; + + before(async function () { + accounts = await setupSigners(await hre.ethers.getSigners()) + erc1155 = await deployEvmContract("ERC1155Example") + admin = await getAdmin() + + pointer = await registerPointerForERC1155(await erc1155.getAddress()) + + await (await erc1155.mintForTest(accounts[0].evmAddress, 1)).wait() + await (await erc1155.mintForTest(accounts[1].evmAddress, 2)).wait() + await (await erc1155.mintForTest(admin.evmAddress, 3)).wait() + await (await erc1155.setDefaultRoyalty(admin.evmAddress)).wait() + await (await erc1155.connect(accounts[1].signer).setApprovalForAll(admin.evmAddress, true)).wait(); + }) + + describe("validation", function(){ + it("should not allow a pointer to the pointer", async function(){ + try { + await deployErc1155PointerForCw1155(hre.ethers.provider, pointer) + expect.fail(`Expected to be prevented from creating a pointer`); + } catch(e){ + expect(e.message).to.include("contract deployment failed"); + } + }) + }) + + describe("query", function(){ + it("should query the balance of an owner's token", async function () { + const result = await queryWasm(pointer, "balance_of", { "owner": admin.seiAddress, token_id: "4" }); + expect(result).to.deep.equal({data:{balance:11}}); + }); + + it("should batch query the balance of several owners' tokens", async function () { + const result = await queryWasm(pointer, "balance_of_batch", [{"owner": admin.seiAddress, token_id: "4"}, {"owner": accounts[0].seiAddress, token_id: "14"}]); + expect(result).to.deep.equal({data:{ + balances: [ + { token_id: "4", owner: admin.seiAddress, amount: "11" }, + { token_id: "14", owner: accounts[0].seiAddress, amount: "0" }, + ] + }}); + }); + + it("should show a specific spender is approved", async function () { + const result = await queryWasm(pointer, "is_approved_for_all", { "owner": accounts[1].seiAddress, operator: admin.seiAddress }); + expect(result).to.deep.equal({data:{approved:true}}); + }); + + it("should show a specific spender is not approved", async function () { + const result = await queryWasm(pointer, "is_approved_for_all", { "owner": admin.seiAddress, operator: accounts[0].seiAddress }); + expect(result).to.deep.equal({data:{approved:false}}); + }); + + it("should retrieve number of circulating tokens", async function () { + const result = await queryWasm(pointer, "num_tokens", {}); + expect(result).to.deep.equal({data:{count:75*5}}); + }); + + it("should retrieve number of circulating tokens for one token id", async function () { + const result = await queryWasm(pointer, "num_tokens", { "token_id": "1" }); + expect(result).to.deep.equal({data:{count:21}}); + }); + + it("should retrieve contract information", async function () { + const result = await queryWasm(pointer, "contract_info", {}); + expect(result).to.deep.equal({data:{name:"DummyERC1155",symbol:"DUMMY"}}); + }); + + it("should fetch all information about an NFT", async function () { + const result = await queryWasm(pointer, "token_info", { token_id: "1" }); + expect(result.data.token_uri).to.equal('https://example.com/{id}'); + expect(result.data.extension.royalty_percentage).to.equal(5); + expect(result.data.extension.royalty_payment_address).to.equal(admin.seiAddress); + }); + }) + + describe("execute operations", function () { + it("should transfer an NFT to another address", async function () { + let ownerResult = await queryWasm(pointer, "balance_of_batch", [ + { owner: admin.seiAddress, token_id: "3" }, + { owner: accounts[1].seiAddress, token_id: "3" }, + ]); + expect(ownerResult).to.deep.equal({ data: { + balances: [ + { token_id: "3", owner: admin.seiAddress, amount: "10" }, + { token_id: "3", owner: accounts[1].seiAddress, amount: "11" }, + ] + }}); + const res = await executeWasm(pointer, { + send: { + from: admin.seiAddress, + to: accounts[1].seiAddress, + token_id: "3", + amount: "5", + } + }); + expect(res.code).to.equal(0); + ownerResult = await queryWasm(pointer, "balance_of_batch", [ + { owner: admin.seiAddress, token_id: "3" }, + { owner: accounts[1].seiAddress, token_id: "3" }, + ]); + expect(ownerResult).to.deep.equal({ data: { + balances: [ + { token_id: "3", owner: admin.seiAddress, amount: "5" }, + { token_id: "3", owner: accounts[1].seiAddress, amount: "16" }, + ] + }}); + await (await erc1155.connect(accounts[1].signer).safeTransferFrom(accounts[1].evmAddress, admin.evmAddress, 3, 5, '0x')).wait(); + ownerResult = await queryWasm(pointer, "balance_of_batch", [ + { owner: admin.seiAddress, token_id: "3" }, + { owner: accounts[1].seiAddress, token_id: "3" }, + ]); + expect(ownerResult).to.deep.equal({ data: { + balances: [ + { token_id: "3", owner: admin.seiAddress, amount: "10" }, + { token_id: "3", owner: accounts[1].seiAddress, amount: "11" }, + ] + }}); + }); + + it("should not transfer an NFT if not owned", async function () { + let ownerResult = await queryWasm(pointer, "balance_of_batch", [ + { owner: admin.seiAddress, token_id: "0" }, + { owner: accounts[1].seiAddress, token_id: "0" }, + ]); + expect(ownerResult).to.deep.equal({ data: { + balances: [ + { token_id: "0", owner: admin.seiAddress, amount: "0" }, + { token_id: "0", owner: accounts[1].seiAddress, amount: "0" }, + ] + }}); + const res = await executeWasm(pointer, { + send: { + from: accounts[1].seiAddress, + to: admin.seiAddress, + token_id: "0", + amount: "5", + } + }); + expect(res.code).to.not.equal(0); + ownerResult = await queryWasm(pointer, "balance_of_batch", [ + { owner: admin.seiAddress, token_id: "0" }, + { owner: accounts[1].seiAddress, token_id: "0" }, + ]); + expect(ownerResult).to.deep.equal({ data: { + balances: [ + { token_id: "0", owner: admin.seiAddress, amount: "0" }, + { token_id: "0", owner: accounts[1].seiAddress, amount: "0" }, + ] + }}); + }); + + it("should transfer multiple NFT token ids to another address", async function () { + let ownerResult = await queryWasm(pointer, "balance_of_batch", [ + { owner: admin.seiAddress, token_id: "3" }, + { owner: accounts[1].seiAddress, token_id: "3" }, + { owner: admin.seiAddress, token_id: "4" }, + { owner: accounts[1].seiAddress, token_id: "4" }, + ]); + expect(ownerResult).to.deep.equal({ data: { + balances: [ + { token_id: "3", owner: admin.seiAddress, amount: "10" }, + { token_id: "3", owner: accounts[1].seiAddress, amount: "11" }, + { token_id: "4", owner: admin.seiAddress, amount: "11" }, + { token_id: "4", owner: accounts[1].seiAddress, amount: "12" }, + ] + }}); + const res = await executeWasm(pointer, { + send_batch: { + from: admin.seiAddress, + to: accounts[1].seiAddress, + batch: [ + { token_id: "3", amount: "5" }, + { token_id: "4", amount: "1" }, + ], + } + }); + expect(res.code).to.equal(0); + ownerResult = await queryWasm(pointer, "balance_of_batch", [ + { owner: admin.seiAddress, token_id: "3" }, + { owner: accounts[1].seiAddress, token_id: "3" }, + { owner: admin.seiAddress, token_id: "4" }, + { owner: accounts[1].seiAddress, token_id: "4" }, + ]); + expect(ownerResult).to.deep.equal({ data: { + balances: [ + { token_id: "3", owner: admin.seiAddress, amount: "5" }, + { token_id: "3", owner: accounts[1].seiAddress, amount: "16" }, + { token_id: "4", owner: admin.seiAddress, amount: "10" }, + { token_id: "4", owner: accounts[1].seiAddress, amount: "13" }, + ] + }}); + }); + + it("should set an operator for all tokens of an owner", async function () { + expect(await erc1155.isApprovedForAll(admin.evmAddress, accounts[1].evmAddress)).to.be.false; + await executeWasm(pointer, { approve_all: { operator: accounts[1].seiAddress }}); + expect(await erc1155.isApprovedForAll(admin.evmAddress, accounts[1].evmAddress)).to.be.true + await executeWasm(pointer, { revoke_all: { operator: accounts[1].seiAddress }}); + expect(await erc1155.isApprovedForAll(admin.evmAddress, accounts[1].evmAddress)).to.be.false; + }); + + }); + +}) \ No newline at end of file diff --git a/contracts/test/CW721ERC721PointerTest.t.sol b/contracts/test/CW721ERC721PointerTest.t.sol index cb2ce4e580..57c6fe0e95 100644 --- a/contracts/test/CW721ERC721PointerTest.t.sol +++ b/contracts/test/CW721ERC721PointerTest.t.sol @@ -216,6 +216,42 @@ contract CW721ERC721PointerTest is Test { assertEq(pointer.isApprovedForAll(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 0xF39fD6e51Aad88F6f4CE6AB8827279CFffb92267), true); } + function testRoyaltyInfo() public { + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, bytes("{\"extension\":{\"msg\":{\"check_royalties\":{}}}}")), + abi.encode("{\"royalty_payments\":true}") + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsBytes(bytes,string)", bytes("{\"royalty_payments\":true}"), "royalty_payments"), + abi.encode("true") + ); + vm.mockCall( + WASMD_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("query(string,bytes)", MockCWContractAddress, bytes("{\"extension\":{\"msg\":{\"royalty_info\":{\"token_id\":\"1\",\"sale_price\":\"1000\"}}}}")), + abi.encode("{\"address\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"royalty_amount\":\"10\"}") + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsBytes(bytes,string)", bytes("{\"address\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"royalty_amount\":\"10\"}"), "address"), + abi.encode("sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw") + ); + vm.mockCall( + JSON_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("extractAsUint256(bytes,string)", bytes("{\"address\":\"sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw\",\"royalty_amount\":\"10\"}"), "royalty_amount"), + abi.encode(10) + ); + vm.mockCall( + ADDR_PRECOMPILE_ADDRESS, + abi.encodeWithSignature("getEvmAddr(string)", "sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw"), + abi.encode(address(MockCallerEVMAddr)) + ); + (address recipient, uint256 royalties) = pointer.royaltyInfo(1, 1000); + assertEq(recipient, address(MockCallerEVMAddr)); + assertEq(royalties, 10); + } + function testTransferFrom() public { vm.mockCall( WASMD_PRECOMPILE_ADDRESS, diff --git a/contracts/test/ERC1155toCW1155PointerTest.js b/contracts/test/ERC1155toCW1155PointerTest.js new file mode 100644 index 0000000000..a503e31350 --- /dev/null +++ b/contracts/test/ERC1155toCW1155PointerTest.js @@ -0,0 +1,157 @@ +const {setupSigners, deployErc1155PointerForCw1155, getAdmin, deployWasm, executeWasm, ABI, WASM, + registerPointerForERC1155 +} = require("./lib"); +const {expect} = require("chai"); + +describe("ERC1155 to CW1155 Pointer", function () { + let accounts; + let pointerAcc0; + let pointerAcc1; + let cw1155Address; + let admin; + + before(async function () { + accounts = await setupSigners(await hre.ethers.getSigners()) + admin = await getAdmin() + + cw1155Address = await deployWasm(WASM.CW1155, admin.seiAddress, "cw1155", { + name: "Test", + symbol: "TEST", + minter: admin.seiAddress + }) + + await executeWasm(cw1155Address, {mint: {recipient: admin.seiAddress, msg: {token_id: "1", amount: "10", token_uri: "uri1"}}}); + await executeWasm(cw1155Address, {mint: {recipient: accounts[0].seiAddress, msg: {token_id: "1", amount: "11"}}}); + await executeWasm(cw1155Address, {mint: {recipient: accounts[1].seiAddress, msg: {token_id: "2", amount: "12", token_uri: "uri2"}}}); + await executeWasm(cw1155Address, {mint: {recipient: admin.seiAddress, msg: {token_id: "2", amount: "13"}}}); + await executeWasm(cw1155Address, {mint: {recipient: accounts[1].seiAddress, msg: {token_id: "3", amount: "14", token_uri: "uri3"}}}); + + const pointerAddr = await deployErc1155PointerForCw1155(hre.ethers.provider, cw1155Address) + const contract = new hre.ethers.Contract(pointerAddr, ABI.ERC1155, hre.ethers.provider); + pointerAcc0 = contract.connect(accounts[0].signer) + pointerAcc1 = contract.connect(accounts[1].signer) + }) + + describe("validation", function(){ + it("should not allow a pointer to the pointer", async function(){ + try { + await registerPointerForERC1155(await pointerAcc0.getAddress()) + expect.fail(`Expected to be prevented from creating a pointer`); + } catch(e){ + expect(e.message).to.include("contract deployment failed"); + } + }) + }) + + describe("read", function(){ + it("get name", async function () { + const name = await pointerAcc0.name(); + expect(name).to.equal("Test"); + }); + + it("get symbol", async function () { + const symbol = await pointerAcc0.symbol(); + expect(symbol).to.equal("TEST"); + }); + + it("token uri", async function () { + const uri = await pointerAcc0.uri(1); + expect(uri).to.equal("uri1"); + }); + + it("balance of", async function () { + const balance = await pointerAcc0.balanceOf(admin.evmAddress, 1); + expect(balance).to.equal(10); + }); + + it("balance of batch", async function () { + const froms = [ + admin.evmAddress, + admin.evmAddress, + accounts[0].evmAddress, + accounts[0].evmAddress, + ]; + const tids = [1, 2, 1, 2]; + const balances = await pointerAcc0.balanceOfBatch(froms, tids); + expect(balances.length).to.equal(froms.length); + expect(balances[0]).to.equal(10); + expect(balances[1]).to.equal(13); + expect(balances[2]).to.equal(11); + expect(balances[3]).to.equal(0); + }); + + it("is approved for all", async function () { + const approved = await pointerAcc0.isApprovedForAll(admin.evmAddress, admin.evmAddress); + expect(approved).to.equal(false); + }); + }) + + describe("write", function(){ + it("transfer from", async function () { + // accounts[0] should transfer token id 1 to accounts[1] + let balance0 = await pointerAcc0.balanceOf(accounts[0].evmAddress, 1); + expect(balance0).to.equal(11); + let balance1 = await pointerAcc0.balanceOf(accounts[1].evmAddress, 1); + expect(balance1).to.equal(0); + const transferTxResp = await pointerAcc0.safeTransferFrom(accounts[0].evmAddress, accounts[1].evmAddress, 1, 5, '0x'); + await transferTxResp.wait(); + balance0 = await pointerAcc0.balanceOf(accounts[0].evmAddress, 1); + expect(balance0).to.equal(6); + balance1 = await pointerAcc0.balanceOf(accounts[1].evmAddress, 1); + expect(balance1).to.equal(5); + }); + + it("cannot transfer token you don't own", async function () { + await expect(pointerAcc0.safeTransferFrom(accounts[0].evmAddress, accounts[1].evmAddress, 3, 1, '0x')).to.be.reverted; + }); + + it("cannot transfer token with insufficient balance", async function () { + await expect(pointerAcc0.safeTransferFrom(accounts[0].evmAddress, accounts[1].evmAddress, 1, 100, '0x')).to.be.reverted; + }); + + it("batch transfer from", async function () { + const tids = [3, 2]; + const tamounts = [5, 4]; + let balances = await pointerAcc1.balanceOfBatch( + [accounts[1].evmAddress, accounts[1].evmAddress, accounts[0].evmAddress, accounts[0].evmAddress], + [...tids, ...tids] + ); + expect(balances[0]).to.equal(14); + expect(balances[1]).to.equal(12); + expect(balances[2]).to.equal(0); + expect(balances[3]).to.equal(0); + const transferTxResp = await pointerAcc1.safeBatchTransferFrom( + accounts[1].evmAddress, + accounts[0].evmAddress, + tids, + tamounts, + '0x' + ); + await transferTxResp.wait(); + balances = await pointerAcc1.balanceOfBatch( + [accounts[1].evmAddress, accounts[1].evmAddress, accounts[0].evmAddress, accounts[0].evmAddress], + [...tids, ...tids] + ); + expect(balances[0]).to.equal(9); + expect(balances[1]).to.equal(8); + expect(balances[2]).to.equal(5); + expect(balances[3]).to.equal(4); + }); + + it("set approval for all", async function () { + const setApprovalForAllTxResp = await pointerAcc0.setApprovalForAll(accounts[1].evmAddress, true); + await setApprovalForAllTxResp.wait(); + const approved = await pointerAcc0.isApprovedForAll(accounts[0].evmAddress, accounts[1].evmAddress); + expect(approved).to.equal(true); + + // test revoking approval + await mine(pointerAcc0.setApprovalForAll(accounts[1].evmAddress, false)); + const approvedAfter = await pointerAcc0.isApprovedForAll(accounts[0].evmAddress, accounts[1].evmAddress); + expect(approvedAfter).to.equal(false); + }); + }) +}) + +async function mine(action) { + await (await action).wait() +} diff --git a/contracts/test/ERC721toCW721PointerTest.js b/contracts/test/ERC721toCW721PointerTest.js index b871af9d98..b04fc2f352 100644 --- a/contracts/test/ERC721toCW721PointerTest.js +++ b/contracts/test/ERC721toCW721PointerTest.js @@ -1,10 +1,8 @@ -const {setupSigners, deployErc721PointerForCw721, getAdmin, deployWasm, executeWasm, ABI, registerPointerForERC20, +const {setupSigners, deployErc721PointerForCw721, getAdmin, deployWasm, executeWasm, ABI, WASM, registerPointerForERC721 } = require("./lib"); const {expect} = require("chai"); -const CW721_BASE_WASM_LOCATION = "../contracts/wasm/cw721_base.wasm"; - describe("ERC721 to CW721 Pointer", function () { let accounts; let pointerAcc0; @@ -16,7 +14,7 @@ describe("ERC721 to CW721 Pointer", function () { accounts = await setupSigners(await hre.ethers.getSigners()) admin = await getAdmin() - cw721Address = await deployWasm(CW721_BASE_WASM_LOCATION, admin.seiAddress, "cw721", { + cw721Address = await deployWasm(WASM.CW721, admin.seiAddress, "cw721", { name: "Test", symbol: "TEST", minter: admin.seiAddress diff --git a/contracts/test/lib.js b/contracts/test/lib.js index 94a1388740..db9144269d 100644 --- a/contracts/test/lib.js +++ b/contracts/test/lib.js @@ -35,13 +35,35 @@ const ABI = { "function safeTransferFrom(address from, address to, uint256 tokenId) returns (bool)", "function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) returns (bool)" ], + ERC1155: [ + "event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value)", + "event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values)", + "event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved)", + "event URI(string _value, uint256 indexed _id)", + "function name() view returns (string)", + "function symbol() view returns (string)", + "function uri(uint256 _id) view returns (string)", + "function royaltyInfo(uint256 tokenId, uint256 salePrice) view returns (address, uint256)", + "function balanceOf(address _owner, uint256 _id) view returns (uint256)", + "function balanceOfBatch(address[] _owners, uint256[] _ids) view returns (uint256[])", + "function isApprovedForAll(address _owner, address _operator) view returns (bool)", + "function setApprovalForAll(address _operator, bool _approved)", + "function transferFrom(address from, address to, uint256 tokenId) returns (bool)", + "function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes _data)", + "function safeBatchTransferFrom(address _from, address _to, uint256[] _ids, uint256[] _values, bytes _data)", + "function totalSupply() view returns (uint256)", + "function totalSupply(uint256 id) view returns (uint256)", + "function exists(uint256 id) view returns (uint256)", + ], } const WASM = { + CW1155: "../contracts/wasm/cw1155_base.wasm", CW721: "../contracts/wasm/cw721_base.wasm", CW20: "../contracts/wasm/cw20_base.wasm", POINTER_CW20: "../example/cosmwasm/cw20/artifacts/cwerc20.wasm", POINTER_CW721: "../example/cosmwasm/cw721/artifacts/cwerc721.wasm", + POINTER_CW1155: "../example/cosmwasm/cw721/artifacts/cwerc1155.wasm", } function sleep(ms) { @@ -212,6 +234,12 @@ async function getPointerForCw721(cw721Address) { return JSON.parse(output); } +async function getPointerForCw1155(cw1155Address) { + const command = `seid query evm pointer CW1155 ${cw1155Address} -o json` + const output = await execute(command); + return JSON.parse(output); +} + async function deployErc20PointerForCw20(provider, cw20Address, attempts=10, from=adminKeyName, evmRpc="") { let command = `seid tx evm register-evm-pointer CW20 ${cw20Address} --from=${from} -b block` if (evmRpc) { @@ -273,6 +301,27 @@ async function deployErc721PointerForCw721(provider, cw721Address, from=adminKey throw new Error("contract deployment failed") } +async function deployErc1155PointerForCw1155(provider, cw1155Address, from=adminKeyName, evmRpc="") { + let command = `seid tx evm register-evm-pointer CW1155 ${cw1155Address} --from=${from} -b block` + if (evmRpc) { + command = command + ` --evm-rpc=${evmRpc}` + } + const output = await execute(command); + const txHash = output.replace(/.*0x/, "0x").trim() + let attempt = 0; + while(attempt < 10) { + const receipt = await provider.getTransactionReceipt(txHash); + if(receipt && receipt.status === 1) { + return (await getPointerForCw1155(cw1155Address)).pointer + } else if(receipt){ + throw new Error("contract deployment failed") + } + await sleep(500) + attempt++ + } + throw new Error("contract deployment failed") +} + async function deployWasm(path, adminAddr, label, args = {}, from=adminKeyName) { const codeId = await storeWasm(path, from) return await instantiateWasm(codeId, adminAddr, label, args, from) @@ -330,6 +379,15 @@ async function registerPointerForERC721(erc721Address, fees="20000usei", from=ad return getEventAttribute(response, "pointer_registered", "pointer_address") } +async function registerPointerForERC1155(erc1155Address, fees="20000usei", from=adminKeyName) { + const command = `seid tx evm register-cw-pointer ERC1155 ${erc1155Address} --from ${from} --fees ${fees} --broadcast-mode block -y -o json` + const output = await execute(command); + const response = JSON.parse(output) + if(response.code !== 0) { + throw new Error("contract deployment failed") + } + return getEventAttribute(response, "pointer_registered", "pointer_address") +} async function getSeiAddress(evmAddress) { const command = `seid q evm sei-addr ${evmAddress} -o json` @@ -477,8 +535,10 @@ module.exports = { deployErc20PointerForCw20, deployErc20PointerNative, deployErc721PointerForCw721, + deployErc1155PointerForCw1155, registerPointerForERC20, registerPointerForERC721, + registerPointerForERC1155, getPointerForNative, proposeCW20toERC20Upgrade, importKey, diff --git a/contracts/wasm/cw1155_base.wasm b/contracts/wasm/cw1155_base.wasm new file mode 100644 index 0000000000000000000000000000000000000000..635c22ac16ed45e6cdf9c91ade2fa7f04da0c1a1 GIT binary patch literal 454483 zcmd?S3$$I=S>L-J`~5g)AL+ZZQ8jA5Br z;2b-Nq6pWtsU>4U#3)d=Nx{(28Zg)`acg=*YaqZ$aKWMB;$9v#Z78Os#oU@UrBEo) z=KlWQH|N@GpR@Idr3{5}t>LrQntQJK_~!SX-#1rs&wJmQCP|Y1W_rW1?DXkGf6~*( z^3%F+@Ry4oC~N6S&nf>m!+qPXUP_%#c&utrmV}15ZJvIZ|B_?zEsCu1hmZB*i~6}6 zA85v_s+9iyZC>Fqe^|ZttEx7}h1w&xw4Xh!zYV>bWZ#`F=EvXlVDp}@dH2avNlW+b zd%x!HlgID5H|grB!_!|r`HoY^lSGeQ`|+Lce(?CT@_XNY&%2UFeDz(&A3Ei)4)3}5 z-jjDfc+Ugxxc463x8|0tj2GVhu6MkhU;fJRB-NW<_r9-x=RNPL%0}-!{`M1p_KmmP z|AxCCJbv;WU;7Q-$;!0&A&aekDvU8yWf7_J@0rI<9)pG9gU=wBpLtd`da_XTl|-% zjkMicYI-BNUA*B|=t58R|B|fMVKe+^Ev5P|RL%3GWffIMFIm#g+F6>V!s1RR>*vj8 zyVGgr&32Ne&8DjGbJl3LshGF(G~brx?RJ`V)B?YzOju3Q0Zp{?tl8v^W;1D|*|1By z+cTQV@?5nO_1?;|ywhPNRiYO3UxU_@Hm&$nDan&8rzQQz-1I|>UfY1g%F=Y1D?hZS z^X5rqbfZ_&LARB+vre98y-u%}<=rG*SP1=Tfg)Jb){Z>MvxEWhBL4vy{oMEd>N_h-#K zO_o~M<)_o~%$bd(e>y3D|5ra|*E9c$Yy0Eru=UR4?|k>kZ^)9Sp;z*WwEvEGz4z2T z?>hAk(Zwri`Z<6o5t^d$Gg6c+DrAalV7LT>V?oX z9l!e|g}uA)hD`6d`}n)=&C~wfci(sXo)dR}%{}iuo@d?v!Ys?Q|9#narhhm63*Vjo zo%Head(yx3w*T}0__g%tUEiC2ApMT?`_g}uelUG9{c!p>(;rBGD19t_I(;VnTj}?w ze?R>j=~L-HO#gQJgXup=&t$)l|JVF4{6zXQ>Cq?h@6Ufe{lC-i&A%^yGXH`62lJ=$ zr}Mv`|AYL8@(<@U|C8y_@67&l`l(>CdH~ zO#f~A>GYqczX8YQjidiA{q^+U@b8b)qyHm4`n#$A{Y3hW*-@H!+fSuO|9kp@?1Mag zSN1sn&Sc-4@zzFm^oi`~r_vwFKAinz_EXtUWFJ%U(Py%w&t*TF{c!e=vS+h@nEhib z{Bix&uOHXV^H%oHXz6XA$X>`^%8veQ_A?pX@c6H?qraN{Q1%5PWB(NSF`_^{U<&ASE~I%_Sx*8y%U_ywxNE*C=@v=ZUoWh7 zQZ#PK27OA>Te5`Txikiiev#gk3?|tj#+EY5^nNuy;O?{Odxly0K^s96+?51QVgVQ`G&Fr*+ss0yO>0gmCiAi3~ zzR=r0na>nED6e5o_gq7BH3rooU_yuU$DZLVm^_S@Ko3~_f}j29Tm6dg2}8O- zzq9&T`PT(a0X;PER&RhVLj$uYrB^$LhAnHOYi%?_8!c~R+;)gJfOy04Xd`!U0?@`y z$>QJ%#M#Gd` zxJv6?7E*IgX-Nc7K34m=+_gULFz|xT7Z5_$aiO> z{aG@|`_}%Y)-QU8h8dN6WjgwvOxV|P!lhL~qf-oS$vRxRLa$EIqg*`{>sqwcY*&Tz z47jm7TOBX-%XI9NS*Gigj@F{++&;_)EW6fArM5yve#fv0;o6!tfGZ&RC@Vy(H9A_$ z_U9e3ng*TnXOHGQ0o&X}eh153&G=cAQF`=3o8BNb{@26Ri{ghZVLy|0B3Ohrj2~`5RsnyT5g8hT4tOuz z1-FE|!iA>BFygYvP|9S`?L)FgX+qkzGp4H6TH>`Rk3#LZxW~&JTikvwT{MVi_E4YRy}|>w|3_vqyx+v9BqN4yK{!E zXF$_p5&gLa(GlSFiHy~(F-ZY8Hyx@8&8-w!b!gZhc$Gn{GOAZuL7X`W7U`jr!(OP|8K-J(FllHN z$60RNADrYdD;vU3D8xI;Kug0{`)#!8x0UsA21>)X8p8ynv%$i6yHG_^t~^jS813T4 zCeabrTzH;s;hrE6=Q*g)b9r{2E!A8J6}f@+`&CuA34>=d$;gTB6)Y{H4 z5b-8|vEI0?L|n8AQuP`jUTx*Q%JR(QVh{dXg(TmEwRGAUz3T)~V@k(?rpI~N7&jaz zgSbnA+GF$&)4yYwIH3o|0LwQDv&+gD_92#^x&ko*Nm^scxiT5U8GRa38@!ZSxujKU zb-=OY@DP>bS3Z{9lqA<1&V4AGG!WcyOH{0U^durYA4AqKOYw0A1Aiz7V``vfiNo zD5cxGT9f&B#wZClC4~@3EA`O0jl3Bl%x_A@FaXo^UDpe%Km}KPvQQD`OuKKEezG@e z`cjWVbAzEYgMI7cQTFf@B>N^^(`S?g>$p#==N(wBRg{-7#%5NvJ`6`&*B*C} z6iXYh*qI>76NBuGe%c1P4}f*f2`Vf+LJ@Fv8O$~6WiHB$tPv&=7untv`OT~@isJyj z9w8L_4gk7f-#gCRw=4`puo-l%`ZjeQe8pB8Ak?=%Ri5VyFf%Hok$E3A% zyj{eweeJXSxA^E0buOME<=WUpk=`-97Aati1AGO9=mU6CJB4Q&i=7Tp9>oxe8XRx~ceM13M-;{-1-(tz7e zfOkgRHl#Kp5HDWM4jaLNB6)eMAonMUAXmZd)c$NAzd1LF#IbKm9B6$&_W*EcI|~Ey zRV$Mz{7(t|XVPL+!G8q&wL1PbBiYxd*=47|Wk^q&T==zfrP~g$lC^_qM}IEzHzsdn z;BQ)gLz1lRg@Kk|vi`-~f@^2R5^hTN88^Uj<3?!>S!PB}d$mbaRFCr_8G~DWRyS~h zlRgSFT=0z{0V28;>5!+utYS5^xG8pSp|iA($${ir(B{gyH=}c*<2}Q}>NgkNXVyNO zK5Ekf{k80mrRT9Ovx7yGWtjvYfS6_z)ny{y07#m<^Of;7Rk;=TaXEm9;j)(*a@jLp z)Ma&y>kZugG3-n<`l(T!IQ=D3a&{F-u^{44#0qwD0drQkEQP%F*;!t0P03(@NUyu*Z~hZXB@%n|`^ zOC#$2#RQ1;Kei)VI-N>?JGegSqL6jra8ln88X9lc)i>-Y>406SZ_=q#{?B;nOr^%5 zDRrl6oKQ^)Qqf-%nZBSur{z^~&yx$b>hFvSr&q^y<*h|C@*C1sOUhd-DsQ1}>1NjU zRBa3TK9bC+-8;f=A50X zY#sRnb6hIpr8p~fwr8?!fo&R7wqCC3Ysc#Pnl+37yg7LTO?1mjD{dxGHP9ck9{W0Co@Ii zLkn4O6wa4T_%IN?uU>z-ET2+CnI$-kcL%6Mvqv$b3#yg{BuCABAICTwoKB~q}Ya|vZVS6Nlp_2j2J0$}qA4fZcPI`2L`^m7hUBnV( z*n*>rYs$>wcQl8lY0C5G0OUn*Tc&bJbC4QQ*2(QWb8uQSUwZ&~95T4)I%igP-~jj{ zeFDDPaO^k(=|eXs|GPl*7bCNfWx}f5lpJ-QafHQT-vAjG)IqaaHmkPVE7i7We`&JU zs0Z1;@}M?Va?$LqTt>HK2e=^K_HhBF_HaR)6%Dt`&Vz3<-sNlTx^ZA}8aZIWpDjJ9 zFPfEhyE{w#85$G6@MpJDU>uaeFe=e#%I`7pj1x40d)h=JDhlpt3M5<}5^s_28z-x^ z*tb4W$>u4HBwX{DBSXMj^roDR%9ZAtIuH|SuDv;$t4p0%9*I&%hCg;@ zqz_-2Lt2MBd}VxmQBk!Oy3JSUAe08uEI9pMc-~8u&bg#{vo;r$7kw7r=m7^VwETJP zAx=-xIp%GQ)Ir+*Wq3{-69!Cpu_&!!(OkmdK~l$qio?}Z)28jQfY7H-2AV+_1d8$Bni!yS zwlMJXOEu~HCgI44he>Mx5QSI{FeqEwi|CQs|Cu7Kum_t`nitzO44F#-dT`k}?ja4h zS(yYCMvRQ-J@7m(t8iWkE3{Hoa*-*5Gj&udCq}4LPOQ%X7gOO(Ic@O7ILr;ym9g0c zT!Nzsi*C`CCJMRjMH6kv4u(war_^x|#V^uai~f4j&P*N6cxr2L64PRRaZ(LQi&JeH zXmJ>%7ALdC8HyXix+@}Oq34gg>bcLL58jUo`|2?3pKb&d*0AVCi-^+vTRwm7 zql~+*@45rB&}Iq_NZdTRD{sO?(_Xu_Pk%n`Rn?-V+Kg^Sd7GKmteY{kQ)#LYebXI` z)DsT{xVu0E^j3``=&hyzn!fsopgr!De(h)jkiM^DVQdF1mWOLkB%haTi?1>m(@{1x zP&uEXGp;$hO)c&l^CFUwhAaIm^cmYm@MideGT6F^g{2Mp-mdl0J$m_8)SmE;wS{Iu zX>dO7!!mIe7C$H)Fk`3y*hLe+C>`tv26?*@#&qU|DQ5M+g(f#@NCYUbkM zld3dzQi!tU3~ak>xWjh&VWryBKw}!fh78@MfM6{@Q#78Di=tn1QCP%95gV$!ig*~J zSCK9ICQilD*ecNhVS#VI0b=s99>cYMD9dmFES;S!J|&bWMrS9$$|hXf?(aJDuk3ei zXEQ$2oVvv#c=cwy5?#YEd<4GO=63YB0F*oFe?Z^j0`@XZ6fY~~B`IFDd51v;Nh-9& zoQNX9Cs32JZE=1R7gC(g6BIx!(=Nmymx8%**{RSf3vps83=-;xA7mSISsfz=fg;k7 zrx|I;s3i^AzmhbxwM*hQo&uRDL{geGY)KkwZ(Y(5m?0I~Rs;fLU{y%?3?q3o- zHYNw91z^*fco&6Oa6_$abzp7du?cd}80bbI0N4EX@`i(R+$!}7!F6Gq?F~2x%wv-o zGmfvdD!CSva#~*#Z#%fvq0nMSAxz?+rlm>THt8?qDN(s_9iYwIzP&bm9rw7Icu`&#?Dy9}d{--ksm&`vOOC zf%49srWRzb3z@A zt1BI_!aNB%^gW`=Y~+eo5#IPen6vZ`F6=3C#aRWU8c`pSKP5m{t|p1dOdi9q*g@@6 z`%?F+x6c|v3F%`$j;GfJoy2qz_g#5+VUJNJZdikW{{5*kVx2QQHY&{C4rouf4_qjY zJ8W0WV=%?C*>#bj5i#IS2lvb(8HY4Cpfk(3NIQIyxSXKzRlHJ_4@wR=Aj9B#3=T4i zFte_(u|Hh*-`qA?!1FM+M!;xzTrZBlSOB?b`ykD%)Tgi+u|j{wRsx}@%3=A6MV{vR zJjezCPg4S6IB}p0kkW|Gwwa4>4$(+gAC_6<1mzEF3jN@My2L5imf#FOnmVAXkqBhA z?lYQlZKz8Ob%;I@vFaKr@u1uij7p1n0nRfFwq?X!RtT4syKCy)E!5LwBYj8>CSf^35R&=~ZU}!|F(}GHOw;YNKQfNihJ5i;zIDtPimZoibZJ zYLhr{A(J-c%eV#u^frQ?0jvPoea`BSjfr=FwkWxGoMxwsfmmBIrggzEcEiq|+cVBM zUHVmwonR8D5o7F!oy6`8vSfm_$_foT*Nfh2HdR+~xV{q{$+P0A-8uGw>mM&a0`D^& zA?^vAM@v`|n81cn_$E;{4%ooNl0F^dxqw6X=8SLZhHVMcgN-GbSNsf(mCq;Z$OwjR zKeCN$ZZ>fP>nhGvJG`M?^Z3pzFVVe;tIctFfy!+(u>92YJ+Z1Fj|bupY^SP7B!O2C z-(mT)NoC1I{w5&OkX0n;jAl>CF%uZzL(TvZ%b{VJRdq=(&$24(eJPVB>Z4K)rfDNl zV%T=tK(V4HXIo&vu^t|@h$;xL&D2KVucDhp5~fuL+6(Bca6m;c_vKxKVi@1~cWsL{ za(J>pJZc*+F1olW*F}4GwucyH_*Prna3kld@=*cdwsT*8ISTG`Il@9wczC=+Pq%@n zTn<776do8~!!XTSpl~(tH{gJeP<>f*E2iCx6`=adVYY{h@rR^9eib}1U+wflzS`-% zMtlJ{uNMnGW z5w@UFD)$~ z@yrmt3rboXc2=6}3lb4m%%o0V)gzs^QH=^nG;tJ%7Fs^t(!GK0WIx?|Cy6k`GXeuP24x3I|~V@wma{vHU8S9 zxt88lG((`2U*7s2qV4eQ65y@4JMLy^D zhg)A9)SG7Wnt*D(BhcwRK(*?fXnRHJIWP|mEhNGpUK0xV^3lMa3TQkiF|M|JF&uyX z@*Rk{b!)weVy20Jle_9Q_RQ2EHHD7%h6>emYr~j_*OnF0lyr9(h|_LDeXG)t)W2|* zT7#br0N_G zjhz1;y1l6C?c7w4^svn&-4O0WL}1@8&*|vAA z)YGE*mf2rJ+8o`{HrxHkAms~Gee~X9f-W(Y%mvUGrNo}KD#}0We@jN15Dr41G?Sqr zA*@!nstGFJoRz>ZEfo*etjs4aD?(m?WpEPN-`!g@bOC>?S+XK(TQNSsJq%(>zdoPJj?XH%5O=YaMR? zbk5-6=?osetQq_whcJ9@=r~nuF0vXST_~WXA*s-^5x9{uwn2K*k?vn;r5*lDFjUg= zQ-2dI?T)^Wl%S3*~@uUm_K`-jbzO&bE}zX-Qmu zioX&l!q^)A%6H)I6r+*6d{v{(E=*IRgZiM^Ev6&pCpFfs4jC_j?k=az%n9rHezvW$ zM4Iedh+CK?f+6Xai0!s-z*;??GscR_(oD;LJc*wK3EyCFs2F!`%0whc zVcZMbAkOA6D|Z#yntD8w?nieG8QB&HaN0Ltgiw+XmVSMmI9d7WWSyP2tUQ|%4Vyc{ zz@Fji<^*n(zh+~_T-%-Pl<{DZ2w0FZ(K7OL5r|>U2wX9X9)4B{b?kjn#OcmT+m zjYfe4$!ru$W6XT>^@6FAKJ+(C`Kf$KF7eU-td5nf0@J;V1Zgg3QoN;_=0l+-!DN#~ z%)~15Ia56Hg#9BrRybA;|Ha)hS)!yfE!n%yb^$hgn1lAWto8x!`gXUf{zzxmWv3jA zS&8D@aq-gFl?1v_^0LG({x0dlc%n{C*c{+r_boT@HZ=GZH<0pl-~mhV`M@Wh-1e3- zKg9wxaE+bTUw)JMZ7o0q%Vme8Gt0QJd zX3cp)5SgfpglNNB#DyjC*_42~t_4Fo@BpKCZ(XkN8b}hD=Lhy@_!<=^r=SicH1E&$ zP<`KevCY?*nNW|7PyR1r??Dg zn@a~pqbZQ4qaU||WoK%_J0Ku$6l>$`5)_fQB$8fJ26z*=Xf_5g3&CHOTc)61j5ADp zojvif(B5V)V5ZXC0x%N_Nt{+oyy#XezZo!-2&cq>iF?R^S=CebTPry*t4abUps+1f z1E!Kw!Ldd(0?imO?iXCAa6dT%AKggGarsFuc0Nb+5>y2muaE_P43rlvqR?x!M^j_vO z{U?SO6ME&Mo9KjqxnK{h%iF9Hdf5jLLKSzUnSbBNgdQ3PBNWdt9Tc3gqU)HWHY~WH zW5ES64J4P|r&Ajy1Dd!)JZvwp_BgpAC)()UeG`cp(-5fS$JX2%>macx+-7eQ!6xYn z>z^nU(1ge28sz}utyV7JQ|z^0L%!=;3T(9s4`~6<)3O@dtC=lvbL+aI${8IaX_5i7 zwxZ^Vu-ZXTnKEg2So57?$5Z3ncA?=wZ1VHU0d1jL5*rXvG@@Xod7%IqY_3z&>Onyr zB-d^e-uXW`L@fjlUaYO~;eaq98$H|9a<$FsHfp+-HJdAnpQ0t;YGI4MpY3fCmJq@_ zyqZ>GJMC>=i5`Sdt;F(ECFz@KvAveWn88acun=oE7c2}l4%`-WCe8LzTR6{Z0pn`5 zSSEzrpjrX)^TI-ip`WJ#>7KUS0hic{MfVWv z*#j`P2gzCu1V>Mty)c&H7mTiT;~_e+hN9>%*LGucn1}5~32-uHJ$;sZI;GFD*`oAW zc40x`m_9qS^jYDwrOz%1YJ@jsF#!qTpP-vU0k+c@vS+PSS`%t+jb|{!;dF)!F`HGr zzX(@s>hw42) zs>fz>uXL0X{IZV_E{)Kp)0CpZT{%C3M0wKNU1bD2Md)rPJ@ZI*}T zP+)ag_SVol^U>E?xx^(utRN$sr(_%u(oOV;Ix6;qz0w&)+13Y3Ocp4=8vbEy(6H(H zGG>hDB7sv$coY)Uy{RC6gt>Ii$}*=rHmzh`vZt$oTV_nd^;w=(r;^{YEjwrXUOTO7 z?|8E&tXVY$9feJ@E8u2=$L^cD%cudVtF<|H5d&*V<7v7k3OHP?ujU`r`i3W&ZYBL{ ztBk!@sr6h&G|FXwfZ@_X$yXi$z(B31U`DM6+XqruU9Gph=A=^V+fwV>b+z7hTQ8#4 zOQDb*5!8C0ys7n?d{XK3Og`!zZqrB&mrRV=Me^2MmKttxndeo*wT+C!_TyJe4L?&; z!_NST%TU8NuGSphH}zA#@3Lm_ud~n9Pbu-yEhpk0bxml~VMee}InC#KCt)PHyN5WwGsFyE<&UV{BVY;LNuKPEzOFpVmg` zYvbEjpye5!aCwaTs)M&;)OGMaDaLrY;C;<4UqSHxi>uE}^ZOUtwmEvf-O=)c+JTgA za$(tM4QX%me4C@ShOP`t{iV-?e0=R~2A2Bx_H5)C%u{!1a8#ORhSFGg3k(_L6@4=CRuEq{u zbPkrmk*cn0smcv+k1bajtPgRl3LYS;D5R#IvfK>6SM|*UD2-$f=C}C(y@9GiY_ReL zs$utr{jcf)e}%N?y(9@%Da>*KZBm_; zD914;k1fPmZtir=EV%OyG0xJj4O_RGw{qVUj0OM<89ZwT#@k|dawr=t%#V31rv`o_U0oJU-fd$u*x7A-Gnt!|g;FF5`BU)`XH+s4**?zpA_K5L6AI@|HCVTOdaQt0Isaf+EQAZHXu9$&T3}j|uY(K-+j-!X<7RI$$ z657BNHf>x~6c+r=13y{u!uY3+3q_>_!l`C9%~e0&%t)5A3Cxh6&w-#vXeHoG)#NmJ z{(Ma;FkCRHH|d)sI56VIPV|TWbn5#hbAT@Ia-H4{rR#{w?-d%QLP~ewK^0rw#WPIT zA_~RMwFSbe)Q&pTzFJ#!)nM)C{T4|~=RRE2)jXY*T+N0`7^f{KPNh^vKlO~inN#b6 zzghk%_cymW%MRz5Mnr}jaN+PnTJ*yY)v(45CQAUcq`bE^{tJ1Ww<|qGXE5T9h!int z8|ErHB~rzPEzq6b>0vgpU@R7-xMhz)F@|<3erCsLX^+7Ngr7AaW-Z5_{eK4~WlV$| z{<9P2(I|ElJ#OKuhBLJt3i4rYAvD!w3jWboz^EF79NO%?E)4e93Od}?SjRv z2m4$#KkK74KkK8H=V!fYbNHs(9KPvK=^P%Z&Eb*Do5L?$eZ#GZ7cA*?Qj2LlhZlmw z@TM`XHUH#WFKoA2JB>yvuVz_m$NgY4?OYkN?f3o$W4*$ju-D#Z_66giCQLa?Y&jK> z{HzBgbCS8mD3||4R=8I9!mH_xXf0Qpz+$dO2FTQr*UVg(@5V)V|;h~Pl2sDYT zx@yTgFB3VvC3$CqY>L_B9gZh+Q(hjJP3b$IBxt&m9n24AF=V=)xI<(vXJOY%&fp(B^ualZ>N09mV{mqdzbI$Zc*ZAM{+DTc@cwR_}l^aXOwpV5U8ustM=I zVAWeBnvDI9-QjqjlUk#%Ka#oG*p4LgmP^QNn|rpCLDxa%%{%(?-NJgN9v`*N{O&|DJv2sWjH%1yX4|Ku%DVbA>!5 z%ln8fmMX!%S$B1}~UrBZXXOEf-PR7tA>m zZ+baVY-IGFTsYT;NIwPTS<20Yb8T2p1?3Tq*Wq%hxi)<60#8{j*9PDd3gkH{_8mZv z$P=_J94|nd8g_zYm4OqXU1iy9&c<|0hfj=L#IWzmyV7KOsbai>Wt+t=i>yg-slRpEk3 zD$8qp?ggeElTq>Uw%@}G}sf;=H9=O&u@;`kM}tb9ZLD{kW4F+b?w{gHYM$JisSI>`^t z#W81>41QXXFRRRkIG3DIH~Q@(y`8v&lR993ONp zd}?3|%qH)6ZDM0A%>_OB3MB84wIhqfkn|FgcPa(t5fqtAPu{6sJ5Tb?^8cTbcYyV* zod8wM*a?4%l6O9lWvF5GGZ|e@Z{$VdX~dQuU4{5z`XPBUYZpYnnO;Lrv}os5 zakcZRyyfb=szw<7%;YfCb-)M1K~uPzc~HMlbMpTJ^72n(9@Jl*2Gsx6%bLN*uU014 zcVyEkdjjz+vYuRrs*e`ybmmM$!-` za%>lNG8CRh<>A_ibPCO?9ReEyhM~@xvjYfc4Tfwj4A_oX@Q>+qJ#Y<;8E*7tQZ|pk zXTr$}EoX^GCrvX&IPro?(a^iC3i72-G;IFj-IcQl2b6OO%PMn4^R`KEe}05}E~{?L zn9b>S-fFE+KCobR;OC>a>&zso^#&`HiU~jNTcGu5>f!4X~ z=ju%ziO$1bLMAaCGJOy-EC1#6=y|3wE?p>=EKm0be}SXnGO@8w~D;HZ)_qYNi_v&Ya-=jjJWO?4UQC@ErX3&}DJ` zt2ToNr*iAT%bLNrUy;K{!L*n~ZMg$0nC#%)^4Kt2XFSG(gONrlrH!&FY|P6?eqh7H zYRcpeeF|&_KkY0>=qAO>F#ip_Ni%P7NCjs&NE69JXsrmm#thVjgp#&NKu@d~`{00( z(h{G4=CuTUM8R!WWANwCGQTK%f}zpSDVWWym-JHHC3*R4PXZ_<$#VX*yv&^4$AMvd z$|6b1-{Lo}Zyk28XVw`Xj};5d6;Sq@{KWN+VVgG$p5)ye)IT6SFKJlWl}%!Q?QMSHk)PIR_;jK;y3CdcfcU_n|trb5{VWyQpozqsX%wm4@^RSq& zz0I(gAAF4x5}|WRGSY!U(6S}OTFZ(XoNYOG)5)|tYk5}sNkB&FhuDk8sT)31k>_%* zCbuz@5O~o{l8IZ%%E}mwzM>EB6254y1W+Y|=?}%IW1fkiLD8H8&q8!-=>GCUXX7 z-}#=|2rB=&HjsVGcgkpH@5CCvWRmkCj{6t>Oe4+G3;owj6;zg&llvF?SrY$CDGNIj zAIr-}y-&5vMlfDpwk5*hqdLbtFZb|uD4k+{k_)G8oWwith6@+pK-L+lyp~v`Zcxe;A-X zix&Ju7G7k#AR9Ko*$w?f$3d7!L=e|#b_3Nr0D*0_v5m<@nX_V$-L(!pHf^;r3yr-5 z0$L_MMv&n?q|7@ks9qfl!2yqU%8hy&Pa1gn?K>rYLOg!TF`vy~(#>J&VesRIwiyCw zHt*ya9K8n3T_;z+Ir06YC;nLyeg>=KnG1IcoF_Q>Cu|UKpzGS1haX)_&uYiU?)#JW z+Go>8kAMbr96rKWMWj(Q8|6%mNo&Wn+GQ*ZGsV5K1Cmx zbE;@-^MC+2wxCXpC22Qz+b!5eurL$fL-avthb&;4McVG20$pFMr;7^H^!rW88~B#y z9l|0zf$37#*4q75vQ#3zO9#-tB_juzMcvkXVPae$#l47g zZ;S6AYKa?!^$&AYPE$4@&OEx2l;g76;@Yz36$_>fWTl;g-TzePUw0#V$1|riX8437 z>KK3r#?R(~5LV1MuqR_)U9n1dlkY1Rdf7Rp!XlZ^svW(@uOJ|>J znto;0VvZI)SE&S%?DIh{Es+{$(OjRYQquzGcW^rIw=9Mika)A-wyKL*7X-DKi}QZv zBJtJ~RB<|Rv9LNYihT~Ay@1WuiiP&*3yV)T!JuJqCQlR);p$-+5)meDD*+PXwK>a2 z0gQ-8+l1Cu$v&3NPQ^M;gJHY5Wj>I6y}(6X|ht+(ic2W{^mtILLU+ z8rzw+MqLkvpkqZ_=n%X4ecvX?+>{*T&^So=R+uc8Iek}s4NsCb<7-vngD7-HO;Egs zbOY8vOM;m0k4LB|#^!_iQGSaJl#g&*_)3SZ!WDwg7aeCU-!(R4Q%TC-3r(0E+6MHpg*^=B-$v zHvN>bIwmw=eC6oWNoSuG7A$B9ZVN}>O|ihnH3FX(KvAtes*A1u!pZTXP%&PjiCVn4MD z(h-ph^J(W+MQe$6dcI-^X~Q(zA>$nm0xZ95eP)plIzNj1PpXY0sXP?teMPGq@Xpmb zl#+;e8>!y=3Jv5d9hu@NG^iuq-<>|h!``2oi<(gt$AjtOaXc|4raCE2F~Nf2L$#CA zx^dC%q_piES$1}^T_>e&E0+AwG(c0OPHE6dL74u7lh&IOsntkvos0&Mb^KY!Pewz# z9jM-yCfa-9U^Pi%Kh~`5uM;FRdJtC_WjY$|&33|?AEvhKh<5OP0M7bK^XDKo)=m1s zF|F)@!i2e%as->lj@xRfUYqghTZl2G)PAU)k=6-jooKB7+wItC)fs6RJYg-Nh(o}~ zgsvZXHssM8@4#VuFx&nZ@@;H7`b>$`UM(c8)W)#L{KNQW?G$3<<_17D9nu2_>d=8o z?lp#ptH6oRMF3zYSf9c(_=?D|5D2dRm4&Q*x~Vwz3u-p884kB|&P(tAkaGqC*C9%q#J z8Fpt*hNX?$CT*P!n~6?Ce55Ch9f@WwUGYgQ+Ip+CC2qAlKRoWQrAipI2)+3)szrNo zzrP4a)Qbah8_(Yx64qa`T({d?h8*^Qz&pj5n9i_GzcA=X(lKiG*i_)zS3ju`$VNMz zJSk?=Z=Hg=`{iFKxE%5Jh*o5x9yeP7V5qc6%Z(H$W)%Wk2b=}@!6`O??K5$#3I@Jo zxK#9x4B;>SnJSJ#{nuwUlCr^vg>>X;SoHZCK|avYq0$J#*}?JqVIF3@RIR(6Flr!Y zS~Kgu7>B2Je9i5A*7JbS*>Qk|g9hGwQFsm=o?MPFVAyoTp=HVH-cx3#d#js}OlP~+ zab;BD3W<$aPJj)c$b38luVxSwm9Iij>8asENiN3${I3h}b_Q*8xIEY)JeoTubjFLK zB2iSXLK^?nC)uQo#4dbot>l;0sgfNB%JVGx;@x~8O~+hDnN|6PwnbJJSI4dSfZi^3 znBra~6PlEfut5eabHP*;LqXDqL}M!X9A_4A>Ond-F)FZEf(MBL@y;MeMx1mxR63*| zZ#m$c44YBFUuI+poihpyYZVlj3my=wkyg%tkV#nvNCCT=Vguz${7n^`BO3NGMnW_$ zWDzx+2E;5_}vR9azbl1Xg>!6MRlI<((L-5PvwbKf6sY37hz&neJ#- z?|@VmkpH>71Ix2>ZfPVrbW6t2d7Cv^O_E!Zw;Nf?Tj$2#YV!755~iUZkKLkgnH6of zfPuhXCrHyjXNR000iP;_uM!+#m2vgpG?yY~qbSwf9nGfLP$8GQ8#Lt4m|XqkeoWN3 zpj@@DNNotYOnaSXfJGLitKcysN9%bSo1Dkq;2ftx5&S{!CWuF^n{tf^HCs+T0a^NJ zKoX(Nz)FKvV?NL?*COn#O!{HiY}hxEdKD>jt_ZRf3KGaM*CfysiH|991BZqZH|9y8 zX{S0on9k<%DV$aC97G7(^3BPY@bsoiJ2ywxK35wKxD++@o*6NE0@{m~pTW$xkWUpY ze4OfLR>lRRSKYj6eca8pJf5(@RtB&O7Oyl$3A%2@a7ikV|M^13uDLT!wD~$jKYLh@ zZnYl93+Apz)3N1(>oG^3eQt{bRBG8f%HLo>n+417ipRGtq5Wq2{^0)EbvWRL)jm%_ z*o*CKirU;om5ZUisNHC9UD}GGh0m<$40ompacAYAO!+}&F?EqXmiZ8Idye#hkIJNh zkIJNhk7CmJm+I&^_^$%u*CmZ%yICwj(vaw&H|+^2Gv!mZ3uT1;@*|N`%o8Pk=0#-P zAv?;Lw@B+4W8qVhKqBaUxusT|mrP7-9q{FWOvLA9`#@Ftn&f#`(;a6A?=J%aY@h|) zoE#FA?=aid*6gsa{%zj;K~^7;5Sk~!<)-8>PV3&~b&pCS#P2-n05)I*)G3-ZnJ$>E zjydWkQ&=jw>-g=^J?Z;)*L6zUj*c zbhgL2vyO;CojFzHC&%Wr+J_g+c>lcCr{j_qdZ`_m6~%csF4F;zn5#Yp59G6P;vTg?jQ)-6iN{2s5e^xsl{x@qW_pHJ_v*wOR6REwM{=( zB45*8@NVmPo43cAjq07@!^t zoeI#8{j!hfW{z-N9^$wN1~=5{+FCfpl^5LbXMosE?d|!rp`iTyX7X$!ftsG zv95kgpb&uZvlbwl`BAcZROlkx@Gu6~YG`HT=WMJfg2$YN3K7v3I7qb27C5lC26ETy zc;a{th#=7rmH`Yo=LU?TsWWXvnmB$3(3|v|_0g+&KPS*|ZTy8p|{zbTT@NwqWcd;3)QZnQeEZZtju}W z(^dGmHeV-a?40euIuONhpPo8ITmT17cm?}>n?A2KPK@yFV z{1|(uNo(F(ouv1FxiCOzJ9?)TS&l9J6scGtZ+oPNRawVSa+KYbaMH_~(1ku#DF;Z< z`(&~F4cmRiaN>4%~lZeLeCJK>3T5wX~WeHVv~mb^i|_E z{JfiSTqBQ;ZM9lyySPS?EYM=7e4XC7L3-n)FI41>n>p`t_@;CxJuv1D7skxCbg^CR zt6dDm`P;I~^o9(9juhSVbX;udSoIIyzbnZO76WZ!a_C44k;WODk03D~lIM$OnY>)~ zjS*uCXd8O*UBxi4qn4!29xPAh#J88E0PV6xDu3Z4fDP|(xods&tPliH54oVqamu9~ zcUQD_=LhXhkr<(;j`hm{(KeiZIYfwF&wE&OLmiI^7-i}5YBITYe~uGcLl|&DKO+`G zLr^%C|EAaUhTyCjp!jn6YVYi>J|k)u3vl$Mc2W+RrG%RyhI8Ad=0$g)CvpOHMO5)U zYz&EEi!``d;b*ViCH{!RojIQ&g;;)@&)jj-vKx^U|ALKcM};yo8fc1Cj&b>+vl}qU zujUQ~^DZu*wt}PFF{2|~K4k@Wdck2XAGd)0%R&I)ezf&*2-KJJi@d%4im z9xndosu%343JUI+@J=p2Y)!3r!7`WMwF1Dc0R!&xqgJ5k6Wh6NmLIZ$gaX{YvQ;Ih z1iohZCswdr6>y@RPOZC-b>eQYKRZRGjT9$hUZToP z+8doq4TZrTP#9v|%Rw&{3iB)!=CThRmCI4H$ho--g7#H|wgi-p_|hsDrnk$wC_f?; zzJYs3VdECGQbS>pwxcjj3WcpF$bf#qEiQW}5rsvXMXy3(do`dilx#dvXMV#IH3ar6 z9EH1e6sEzWfP{-sm1hh?gSJDnj2|36m#Qbz!kWkDTsGWhQumL zA`CFhxOC_y*M*1;tpnmrY`L#(U0W)vG{Gk!eW86md7bMEDerTA zK83_=1e2Z!o1K>Oain6id?~fFZ;iP5D&6k<#Z=V&SX#ghJ$Awry+pH-6~lKY?R65y8ZbEbCXzKk=>?a`52Df?bL7>L&EI&YeTI@Mg!M*>}6B507=0v z3Hq>yga_VUs2+B$7lZ0ykA_`DVgmAs9Tm=v`Akj0<6$sKSW`g&f2A&3Bmqr$?+|!8 z0)LX$K=6c>0tg2Tz}38bp@4)#W(tIjR8U~4n&l^XGl1cjxD9al6t@Dz`GD}eRv9R4 zq!k#ZGY1UQnFEG&77Q<^0S>m(#^+gVNl0JofUV=+S~9){=JFUSP+MXzJBV6axw=M@ zpl$8yDqciVoNu7}6h6nrH>(Q8}|a#9s&O&w!SQAUM# z_D+BqHm`7W#07yq;6jKBya%x5D+m}Is0Q!e8s`C;TyIB|*+tj9vqIQ+F5|^C2owZH zUGYt+P@jA`s!%V4yQo5Kk17-|VR&yJ{dxu%X5@be{;cFbuZnqYH|aT9j`DvwFwa(j z=#l(KEs^|Rit-=+1K0dzwp1nfr3ai>@P{sz)Ww0x4qf)5wbcawaz%hDWICwzaT2vRm|5D0KT=a&n zYQIlEcG=W%p66gHx}Fhpsp|*eIVE5g!)vgpTsZEYaY8@ri=^wLZ%@N0S#LQVwC;N# zQ!et|a@pk{JZVW`7q&9oN@aoM#b?miTaZ`z(f?~BDP6Ixlv&~Qlq(owvdfOLNT!MR zBR3>Zx1oA)IXGD|xr@iH;LFt_<{AbP1tdGF%~~3Jh8>yCYp8ERt*-NSoq3qvAk;@1 zZdDivjuA~v)mM|ej6v&FPFa6l`aJ>enGBo}e^b`KN&bC4SpOwUz?UQIpXwxhv|@dN zPKaV*+6TJ>rhS+eiS}U#%AiMDi451NwAvC-1NguVimq@4!_-i;vUb5kk%j$7c*4s< zOg-pJJTK{?u|Ip!u@!YE)<&SAZ3RPlK?}TqKd1cE`!|xCljKba-sJKn9#$3WA&f?V zmI;LGYXH_zD3ZZ*gEW>Zv<&*73XQm+3JsV8+G2+%%m#hCh9@<|l1&(fG#5i;m9gZs z;mVefTV>Bmo^u75RlVmZlV1PIv@DDwUB5;2+bqG83A7qt3DVp2H8VrS<4oW~k5Z)k z0p28J^9N?xtsY>F(m?DN@s-DboK5{cQ*D63185J%r4{opr3oWxY>P-JBaP8xwzRady#^pT-#m(+z?l8MYT-@v) zaL2~;f(yOrUoC!IXBG)L*_oKGBf&Wtq3|?Mt%LT=6Z8AJVx%}8BTVznL6c{XXsL{^ zh|#h`BpHFHyts}k<};@dgy-+M$dU^x?nZ3yhqx$*U5tBZ-y48mrhUg42p=4mxiuN8 zu}=A6niyh8O|JFlRq2fjQdCp?o7+bJ3dJ1Df3kf%@cGI3Ue)N#v>r@Vt&ZtS1J}hS zJH_eDc;5lG@r^O~jFn*IU5}$_Q0ZjUf?s)k=Txc(o&`cdWGv%rWVG9;x>MT)T;=W9 z4wS`sJLc->7^}S|mK8g!%VXFTjF`^v^1D@eK&%T5prW)F)nD9`7hRZ_HN4V}@T8uP<&ac8-2n zQEUA8gp47Y#N4^IxPfmaOm^zH{Z8?^{rO=o=-9XVSf5TOH@+EU?G!g!T7q0B9g`!* z+w;9VFWMK~$9&FR=EYC|c7byZ57k%RaKT#f6Ixhd)q<~dv0T!#g~TzkQ+&%!lJ=q7 zC&L>?e?;BY>`ZWB;EmCD(Q;|Gwx~UKf=+FXo>o+@P6NEOc7)Ki)dNCkdw3X<+(6U! zO?m=^1dgj>x<94tg@IC;d3Y%BEJXp?#I-m(HIk=OEz<7%xm3%unmw7KnsR+CHOpxS z6LV&_NEd_3LhThdxN+xHB!YGWPXBU1-;~r|!S#8$%(y<6+M;sz(X?7sMFN2G0g2>pMhRPC z_qAW;i;6SK+PFB+7xxv<-*FM1PYjUpe0lH1@OBv2pLBG85xy_w<{bQAdh1zT5xQq8 zd9Vi6AQN7!WCDwWe(Ey8xNN6B_?{nFJj~L_bk2KDJP1F>@eyGc42IwPojo?_@cSH6|)g}@a?rD1n898CezJ;G%L zO-*xv+p)$7K3mW@(9yF&3O*a8AoD`^P%jhPbP6f~4P)XzEe9dDht&rh(H@}J*S%TD zPM0PYztw&at%s$=L8|S9k+ zc?e=`5r|;F;gci@D`1OR6(AAiW^g$JQABZ|f<@=XC!$n56?mGBBuGW$#?ZB^^4hRB z9!HZd77>Rg7O}TXEPf=F60?d&MEi-{+*a);@^EJ?JyMl!7Lbnl*wjL`c?)ATrV9gS z(#K-0VQ!{UYuQR=#8DijmR9k_D=MkBnWUPrNbq|4l^v&EKP8ks&9Dx6s!s`TO zHjyj6p}@AWrISliSOc!Q_H}_t^w%=|O4t=*O{xG2_d?nGa?U8heRPWZ?eAgj7s@jW z?_tTx5yV8T4^vAk$nCTG)fG*YZ)B>L*M8)#5r0$Trgi6|r!p!3%nC*Ib;XTu^I`e! z54`eiu*)02>IOPBczrm)3&a$>EYjf?bX}g;GiS-d5b#XJA+UA})gZuPpX%seQbV2C z<^pA}*e}qt?|&Ja2LUNHR5IBgbsX?;LNr-Wl5I#&q|%V-t8d2Z>*TZQmmlHv8~yg9 z-0swEBCnAq^7{RP6nDEBh9^0&bx2ZK@QSeoXrI2eci8)yZg;Ww)h`hz24V-KSs3(g z76(3pV1a-WstW`I{1Ry~+9zd#@;Tu@G*^ul#3*E{Fe;SK?R7X6v_Nm*S6F2W7J3$o#57S50w7)MdnaA9F4uTfdWHTzogSH7e}hV- zi7?vY`Wt+Y+$mb%mW?XJIspEWCTsic@_Bcw9iRXnDrdjHQp0c^#Y`6*C)6Zggu@M&nV#n++*_No=J;q zIlPKTl+w}vo0n}@UV+*%mYmDI#1s?xPjsB#Q$M`Zm7|#f>64fmjgUaqXapsFo4}qu z?4TD@=>{}J^4ofkUk_m}kABRS6x67lMFQ7-(pZJ9tQ%cj2~o8|WW)h!gbWL-nhu3L zeIq6tk!A{d#hn@(*XW1guo90#VCRRtegOSRdy8t~$ap7B21N299z<867AIE7zPEM^ z>8fhMZQ@g$H$&bJ1nGlCQ30}Q%ttL1TdNT1Q_};A;{nDHVQoEVOW&P5pgk-G&UvYL z^$Pj71yBYr?19RRXUOFb1Cdb_7=z{vHP(t~&MIry8SO8^NLIUcvt%amgMEEi+*TG4 z&wC^Hkd4IiYV|A%l}4kE6hr3Ia=5WL4Bn`I3T6~Q^I<)U0w^CMpTEQTA4uM{_O5KL z2otv@WZzN*->tZ=K@h9~DOONV7`JQY8nH2Jx%nJ(I;MW9w-n}p&i@p)r94(ondg{* zuT7`{PqCd{)OiQ7%rN?o=AiW2IA%@95V2Ry-D{h{1PpPGiQ{&h>PXaH_O0=)x_2&SP|! zf@mRy7X0`&P@j!}WNLA9BpUSufJ}?696rZ6XTCW3RUEvqn$-vU;7uz8wRxHKw&X#u7t_PJfEBOC-BoBw5lUD5| zW(VUx1PB4y1ku{bXZ9g3jZiSo$|rwTqDDdLq_UTPV4@}yci*KSKcOFsB12mw03);C zZ{^x5iK#2o+b4}1{P4t&P_z6o{uC-X43w1Fq3wo{Xs*~n-F7G>30{~Zph+aeh~T(| zNqFR9RS1$b*2_;a%CMJ-`NYF&Vtbha741}zqzAr_DI~J!GL~Pe{9>t;MF3#-n3!Gp zEN$GBaM&6IT7I}{uuR!a*H%(P2kCLPW;{qwN664X`_Pb6E(rSpJqSYHF|9yH%e>2F zL@-#`jAajG5gUX4eq=g91g?nf`W; z7fNj;Qyu5A_M1EF8haH}&8jA`((3n54@d{acCUct|T z{-C>Ct1`rF=w{!#M;KVYd#MB^U{R?$tIwW+?oeDq8L~%40A*;lVq@G`4#;dk zfe~ONGprzzNJ`$<@eH<`W=~+O=rL80(f5H`+WsTf<^h;0_qzZ;mjYL+R?sq;h@Boi zpi&ZSbs<}c-Ak~EopqM62RN^{RI4s{UFAt|+z1+jAWVXx25c9;x~x}=_PX8{wX)b8 zLP1}P%)nI*iUw9RtQUE@1^%5-%To6V8YV)o0XK+I!_9cpwVTl^Ftrku#hxUIYC8Xh z+$*m8zYaqK@||Vihym&T2&96Gn*h$a;k{E{eMbYf6gCKj_K@c!?hjs)k63&gAzB#? zid+RO<3(8DXD}LaG=<#kI*x;q(Xc=T42YDKWiw=IG{Eois3<~|afrW9@FF`V{keUGe(&O^V`mM^XE?KO=+oeec88 z-FcMT*L~Fu(yZ7Nllrqwa#O~S1#_D=WkRo4KK<<JRfwU^<`dNM* zeMZ7Z2Z#l&q0ob=6)SLxYOYiu|K?Y0gIvBlpQxPO*sYS6i@FR@tUCjsfhSb=RqA3>2&%7e zYeq^gKu6?PRsRBSw;2Yw?1|7f3RMETY>oK(fThp-Awv7pu zd!mXoGudXwN{+F@`|kM7WnY6%;F94P76HMLGFGe#hC@8Pli#zCn6csv*3{5km~({Y z>F%)9Jl-;2r!|JL@{uqm&DZ7>;>wIFDr;p3J~<2F{ln2(p^anX8)-8HoiR3wFksXR z=iN!uwRWtys-|sT+}mM}$e?PD_P%N6w1aE*#xPtrSHv8}{3C_AmY$&cT z*O9@TA|a8&12y5pqI?#!21rOgm({^vL?Z-OX?C0vVG5>^3%C?5DMMA6Qr2}fgPud( zR}ip7Fl#0lLi9sqI-(p`@E|yXA$R4XY%xuEmsq4((tZT|? zO;b)?Qzl0-Xv(Q;%4yJ)6_z)nDW~OTO*y3p*OYY!50a*=Ti28gE*kzkO_`GshSd~^ zuSLI#~x zCAL+X>#Xi+@vED3&!D!Vdy3|1hl0IaW^_+;l5EmFgVKubiL$I0DUj|7xTm_OR>Ms^ z<&d&2sC@@mb<;iV2^_F$L9rgRA)q?Xy#HhU#Jw#nto|& z7$>@>3%s;$BnBIdHFwSkB^JnRBnoa)vxB%h|aXoTB1h+>3j0iQLO9XXjp& z&a<2^z`c0m61W$uwwZfT#O!pw< zT75;_fhxT_O} z?a-9Ihl_+{r~4;MiXM}-?@5FTLa$=2KR0;UX(zbFEZ`h56*@z+lg7EIxq6g*DaG=) z-J{XAn;%%rx~FpmXg`se#SY0r7Yf0Q0opwe(C$?M+UVs9(C$?M+E#Fsf*7FP^8oE$ z6`*Yew^73*whwY=V%^?6P`$a2JKEk`73|^80<>Wq7LUEl3koj38v?X#z{=o@0opwe z(C)gbjG&7>>s~VyrHUQ%IZAW3s;1{rywg8d1 z2w=$hJQ3cShmY<|Hbz+*54C0*-Alw|#z2gL;#DmWgXrWKh=Jw4N;rv}y^L-(dpX8L zX%zsVf-w|}=M}iq?wyllyRUvMPz7U8ObI2YCMW_nlZQfz zpe7;&zF4*0+qUUsVqQ-+_M2xK+sTf_-ik_Ypp>Y~zKcOpa;-ZQTJRXX06UCy(bPFYX ztFBJp=R(n0U7fiZvQRwHIbESF$btkwHqW^l z7WB&J!38LYXHi*3R1voz^Eh=}Q!bJd&*S_qE2KsRkHHUQdsbutWm8b20<*`VWO`6= z4;oibguRx3mES&=k!HKhza4Mm`~_kxmW%C2*&|*4sv9Qh4gA(Q%8#6nb_3qh?olj` z?S%hi$U6d2k$0L^!G+l?lZhvyN^D<}3(f*NCt9(63sneT|Io0F{^b0D)4Sx@&y1>G zPA6HUDljf{s>-HRMV#6y>}iq(T!dp)Moq!lX{JHgkK9S;F^Z}Py;Quk; zj_MT4Zxh(;kGq#I4|t8LUpe|nRaQq?{4^8iNd2}v&m2@EL(vvtyVMcuREvYbI&W1r z&xbWNIixe9dI;knxZ#az|3Cb3mKB~zwb8QkdgS5SL!2>}RaiKeoiGzFE3i-$K%FMR zrNhPm7mg3og<~Xy=2zpN2Oq-c7Sb$lG+XUXx7QyG7l0kA-wGRQT$CuoWyBP?>>XP+ z=^j`jPpeFp%PuC%rQp0FE<15Tb7^3?kkZ_c=dg;NXqA7MtDp*>XqBI_g6O>Cl~=5w zB5|_Lt)L=t5{<2(B5}^#UjZN-4#nS_KR-#ToYB<_AclX zj)tJBs!_#)qoEO)P{1kqXE{_A0JX{&n_^&-FR~%)IG-1qlm7{?ErDs;qa2k9_Ddp9 zf*20JD-xYdNo^h4*g|JX!CNpRnW5HL;xlBts6q=O(l<;8@CFS)({7bdG%bJ2hu$hT zW@q^vvwVULH=(e$$pWn8t_|RM3C=9=&jHVi9D88kY2aU-EEudWK5InB)>*&E_I{W( zRAu13z>EhsYp5@<7O}ErjnhcJp);5;i=N|XO*zgUXKAJXeNb1p;bXeuEoK3@!bQmo zM3(6ZSZOEb$#CD~{t3T-G3Wk6eh*af=5Sv=2C}xwbB*=UDKO3+R=Ty#?RvM^UNwd?CeZz1Kq{bAC#IJ;4CFHzz^uUd3Kelm)+>F6ReqT{&m^j| z_2UIfRDW6zB&t85E6|e7*{}=fz0DcZMIp#q&o=xlYDk#BYdmWu6B{ zr|k@*X$xn92b|NPD88j+d?ZXi*OL8z?7e@mWanAm*?qeE-oC$PdPaAoE6o6>o3V7q zjPPvGO0!rYI#ae0g{cyhYEh-wE&buz)oK(Xv)V0h6@f9xMzIZ6Kp1WC;;EouVatU` z#99~w6A-ol;T1#%RpOWls90gkwh9!`Rt&qJ@ArA%b58f|p1D^)__0J&y62p?&v}17 zzn|xQUMN_s91BT~msq(PvL%-ZHh^?NxX>Bm29x6+DCRHpU?TWq3XIp1yiz|${~hIz z_impkEiI5)6V^ly&-H3JU(Rq2J<(3`AjzU%=YVk`U-f>P>yPf_lLKvH3~ryNXI?#g zD1v19P9IeYl@iR-m3JP|^~^hDI(;}5olRE(ye!2Jp@$J&_0M`6Cwcdt)Nep)GHSsK zEf8m}Ri>&(!SdYl!@_u4eo;N3aczaw5uLoB8dj7rAmPzgwNE6 zCkkM|nVV8+}NPNO|m4@2Mvvdq(fKsxBOp z50_{H`?Do%kdQ&hi@M(>FR0WvgJOHrb0MpR4n^&xNn1s7BS*O85>O03=jO!O z@kym?Qspwv6@+4~)Jg(PL$MArG}A0-J>LZE9DjaPU3lCS85YBeqH zpW<*L*d@OQ4^X6##$isk>WE+&T9keCkEN85bEkS7;u>0Mho@%~iG`(4q<^YD#9~TC zA7Segk}S0-C(K+F2EYDba^f%y4sYP?9dhQ56csDR+2%;H4=ITqyH&>vdD;eOFU`$E&(i4hhOlN z`w3S;!H4=1RjONYHC&9E;U&pOX*l)^d$Q_+6MBPrstbtF$P;J}H9s?!`e$5zlrY}9 zM3|4r+bTIvNoW&d=j>mIuvnG^Z|B!{-WI*SQ(fKe{C4-+&i}>_O6W*hRtSilHfk0& z)3s#a6uO;|$XTYIX(f=k*IoP**5jh(p( zT8l=jfsQ6jMh&5WBmdjVOpi%#L?h(UoL$8)i98z1%}4J?fYem%5x5H_7Q<~6zzs?Y zPX*j~p9DYt;Z8;eBOp>)<|4%&^K_I~O3n0?@}=etL-%7yX%_vJ11JM)0xA%$xPA0i z4f=dBv8RNFY7w8}b6xT%BIheKTUOfafxt)jV-yhcR z?Y5rnKG_Gge+F=CoPCe#&xcqhJHswSvtOB&`~$ zRE{k15KF7Zv#YLiYMrB^_(ohpD_nP{)~#t8iZ}XpuFtn8Q0o3lGpf+|5t(@}Q8p@E zs-B?4M8{8bwP`)LpaBvZiB=ad07&JI8eTF{kUgNL5EWf^YT4XtaVc@JogJ^hxpmG& zGjHPWgN2A>nl1q(WnjI^V1V>laD9Ii&0o(mPe=kW zD+vhu+9?QI|Jr1cvhhiNZRBF2a%`pYZ;N!02)Yk9Cv zgsPT_3cg8!<%3|PVwxfyiEo&PP|z|_3GjN*sQL{^BL#^(X}*G~m>gsMzMlz9*8lr- z%Pz8eb$#Y;sWR`;EvDIfbPenO-Kpq|u3`QEvS>5H{foMW5ATIk^n6qFoNkeop4F8) zpV2icIG>6>(-b|eTkIfa4`KZ`d!Wdy;7{B?GZ9AdnBETaznKRXZ~zpY&Tol$N}EKC z3C$7|VN={^p^4kYlf8-!(3p=Ti!qv zA;^VIHV^5#RNc2EgNyD#=d->-Pfsc!{Q>DP+IG@AsyHWtq1Ymz2sS>Go+}L{VTPkT z?L7!U$*RT4Qqhx&bbB*bQcDe~@{EL4s_Z5Wf^0!#phLtS-CYzn#6QUZw~_1c?PpRR zamg{rQr+qWpVcUI>ptR;K1d$zi+7YBIjGBCBdeCIlFNSJ4f)T`pz5 z)3S6)JD@sm%rhj(VBS>RaC)*;9;&}$a5q|-lu*7d(Ud{Z`_XCj10xgrr^`!d4D(m) z-8iHPIVn1Sh~~?!RMnwsli+}uq60C5_GYr;5p+2_QjA%M8aR#G%WuWToANm6A&-rT zJyt;4(G9vRm7>z5FK}yx0Z|G%$|gMZUOHxRe5a0iO{y$ZOh^r$DYVQ`AZxlMAqwcN z$(Fl!T?4%g3VJK)(_6PNdQ@=o3!KrV8D&|7XZMu>mk+7Eh9VI&$8D8-W+dr zmhy+|@<*o1F$pK}4>hlr)nwfZG4K7B+050?>V*UuV(cEI27;nf%N&v~&i5p2u#%7~ zJ1B!9s-r+k?Fj(ILaJHp`(QKK#&Mh#5rwmUT#Y`^W;(Em`py zcLZ<&s%t^#S$dFUMZ<_#zo&7Yya)rN)t_l4Q=ipe4y*P2i21BG`}6CJ7<`wP=E+OWxQa$vip$RZ}iHHcQb};m}V1 zS$NN6E(YtW`=&L<_n<2YJBfAaCo2^%VHutFp2=8@9oD-B38k>o5wi5tMzB!nn+5CL z-xuV7CJ@0{$dQa+d(P&mtuVXl-u;2&AyDLuI!%*1hzjD)Nf_b9%|YjMxyURylRy)5$lMXt*JB&M!* zgvi-xFm6*;8CT8@Y$mWbbZQxFWd_b_8;I!;l|0y#h%#uY&RWz$@aJ9x7FkU@61kr5 z&-W)OeXxB$IsR>@?}x9S=Ib5)q}Zz{|5UlWSAUY6j77OGQyDGJ84+O(Ys$09kgn^! z*aejH6i)FQO?b_3v?}5^T3hiOt!casCD6hqZyw;=ntcE_>~$IW&6!wExL}CIvTqoS z_#2BW(hfsO{6`TkUa~eD&~n`4C1Ck`RpLR?T+E5c&64>D>qr@#sKtX=ZOS0HEgmEl zh9OYqBN(LQCFe9qh6%F80G|XOt;qm|@Oe-lVwQQ3TQ;@3AP&$fAx-QY3&X}woU9H=p0?_~no?BK;X^|vCM{OOD69(-8098<0PZT zJ&i`rih3}M85OijYjTGF5~C8O`F8bk{g`@#_#nqd4dJXKpa|VZj~HL6%N9xrvj%8P z#bI1X1^+vv5kqJ)s*{)JhkNp8U3seaZIU3B=?b_1RZUc8bp%!y!CL!Slp|BYT6eQV zVvMYEvs_XJtEYaT6>vRbs};}3a=_nyz1tSD-~>2!wk|Lz_(5zq@Res53+60LW)cVlmaz7K-g_yB<2kaPI%@(36mrac6?khXp zqoQzf??>_xjw-varysOd4q;f7LIy!XufDbeENvj}$~OB>_E%cvnk6 zXZ3&tbib}hK((Vu8n*?4dwU#6ST993f?;cm?A^RBE_-^W9ucMu@?$xVk?im@`nxDFJ;uV*r*cS5bSc0w5@ zd&)cV-!yIEiBSiDDg^!lRMp{?UacCUkc_gfs5gS!tl^R_vz2 z602V+IKc&ng%wbn>YV*VsX}rYc}SqKdL7fBx07~Hy$fP~o)uP(2GkfZ_0&5lI?Fm^ zuabr%L!dufmUUU@FIjZpBFn0bVlMGq;2LM7vLL1aF!0$$N-^Xj!g$wDYER6nVY0#s z z{zGSN|B+G#7|UyMAA#)ta!32I6x z4)V`7x72u)%Q3r)aCu0}gq_Mr5Y9=yI@j~KxqA%CnWjViD{}e!wbZp&?V(79#2XK4 z6ZurEp5_!l)54``l{IbveZd-6$Lc*m%_4%Xf>*QQ1y;_mJ@^Z$&wv?`;S5uJBmd%U+gTukW2)qi^GO8o)wH54; z_IR0ovd!gcB^LJM`qi2Wl$8Od6XsL6u!JC6*lRTa*}~qAXnPV^pl3(JP*aAX=14?F zYnKSWZAM7+7F!2-5|Ch1LA;r=%basT%P#Y%3tDy=?1Ow#n`%R5>NU37CF|{T>@t>_ z9!8~{60l?!m?L002pX$1|HUDvDX^EG&kcfpR#r;})QU$H1}F&nys?Lnl;tdmJk1cY zS3=qeuV9k_ydwxYpmw)G&^UE~!I8N^{PRE5z2*6*DZ+T0BFn!Lu`tOG-2bq2Q^u%J!f*x^okn<@k~!GsJ%!#8Ie3a zXAtI}hk7Nm!2RwA-J;4TbuZ4&pR&BFymIv4r|M+32<-m&fZ;LAPYz7DdQT5bxO(RX z5H8z*ZQPTY65ZaqsW2OPU&IS>zvKeCi(EmuXZ0`#uzl!x zOc~EL!Mjx%zBAwk*7=v9`j&1S7W13RdKBAZ4mNL0}#xfAelV&3zSDF3v zY?~3#2h@Zms9thnTb2QYF!Sv`+;(Gk;kMn;ozs?ENS<^)&uA;yROhz+ zF@d?|FmUA%TT}GvQCoBBtob&nn9l^k7bnM5r@;y-JR%m9L^BVoh}*{zeKiLk1MvAzC+(yER_Wx{0hEpo7U1H}0d8HIcQ%Bx-+oLQioEo@-OS!V!3` zIYv+Xs^CxkJ^-g29Q8AHnxbJBViY{rR(z+JGa=~7q0Ge9;kHH6hp=L`!fo|!8j-%0 zF|ZYGJLlI|E8G_P>2O=-IfdKeDbxz~XX0li6SDu!KQ-^_?gj;D&Av_nQ+VNUTj_zI z|DXxC)w#EIxUGO`GzrIL;oW?j;R@}iVB71YnT#aiU1hHYG1`TDdg5yXB1#?S0%~u^(@`!t*w*<$Tfw#t+Dyta^R5*bDA;xofE!FhQl#?jQ>uJDjf(A^NAyB7?$m86FAyt78qx;SGBIj(xvmUd_nbk-S8nHS9A zlnPIurZk6)8pqGU=%p9r=vp1;3DGm@XvfyR2(yRXR_)l@=PgaQV{5Un^UjM+)NJzf zwqt8$T~}A0ZQfGz=OuAazQ^#x3&+;VaR1U{Ye5~8j2v5wub?i8*jmP0mqctWb5fUx z(BvhE*jmqQ{risi+H+I!wZGcL*T%G9FM&Dr)&XftUHpa9s5;0&MAZ?@k)9M)=K=6r zC&1kczT2p}L!x>97R|ZwaiCf!8P}4m!f@ZX@l~{*m}BOtVkZg!b%0g*(&BItO{fHc zL0s;2+zND(WY*#~Fk^wv;yB!|)AU_54)^bse>3861+xkz+an^pigCE>U!_S8htXbR zO&xp&bb1GrWbLrCVzo_>D*1SRyy=vU-G&PSPUT?Tk0Hx?EqtXw^SZwocgcAVI@6^Z0Nm~}j*%k*}59OFB z@KAsi#jtyQl$Rx^O=-*WYDxgAdnA{pB%r!L;@*_Dti_qqmgUNuqb(aP|1NnLp0tu0 z>V{$;d#!j($H$@5E~C>*(@h(n@fL{FDPXIu&N~cByWl2A-2Mg&w%7~HP|yU_Xj}KgOeGEypXBFzrN6~Q z$nB!ib7t31C)ohYpyR*pk?q71FEvr82YyE3FER8YYhB0$sss;f@|CyZzv>EF@n1ez z$K8XI@+EGu`b$VVCHTcS_9fM(rl+F6WNbJCH+ZBgk(~!(V8M5fX}h>t-MeM ze3x7^lwx2F0}FJLZL-tv#O8r#n^%}s56sLJHK(3J7a;q2?)-p+9;XqBhoj-tbLL-B zaq?*~G`rUbwzG9q!2_+Rf?aJ?xGBfJ-AuQ_!gvW%!1`B;Pdw$19#(y>Dve3}eOf$YaIZ?*yo@;_*rt z>(6?qDf|xf)F5K`3&QUhyzNtrO*3+)y#oRi71FEA3)v^FW9D>JgW0#@?*yKIy>J5Y z_{NRH>m0n|m{9)CLJCxYQbCGj=L{)O21*4fhM!qTu@xAKePKwk~oaZcH+HN-hKYYz=&33lERQqH@eB_p8O z@kUEVKmnwnB?>+6f>9$yoO40ar~$Ij7Z5&+8=z+fo*j{n-jEWRLYhcNq3MMp9dm56 zBOP+gvF>5f zl?6f`Wa)8Pn&8@!CSpQX5TKT{t%Scw68z0_#QiPKl$^4 z%d`DJg9pRKEOgjr5C}QeF4Z33xF=7IJfLbKq6sh4Z4*s+nNU|-n&$-Y-CC1tl(=KP z5|4|lnK=cN>9m4=`0eEQwYr=T?*5lBzjGoivm4(|6|C%4$}o3HvZh}($w73NVikpF zkIL67i0)7dqI>Pl8=F%KehQ+aFe&5I$gFPzB3>UmqU#i0b~cZQKGBGjYWE{WCnO%;ZN;)rW1gG3wCVn;(Yda!Vc?qsM?Z_okqIV8fr9DUT z^~qoKq^{O5C+MKw7GTbxohSGOWh8lz!t#8udxy(qotC0>Sa4qs3{&(TVK_?RM$8`PYemc+EG}Fr z^&pv4$LtMCjY=_lOhglmR|oD9*I2HM3nukmMeQ)F5+gKKGPbZOM&{+=WLci0eDn?C zsDws5O_oWui_-h+RN6-t<1!q*i=aU!eFYIZG*TzLk?6H8@^c#mp3AKeaW1!vaVc#V zH!<-T#q({t2cNrdugYt6jv1?FQgw~ za8V|Ct7O1j6difxH)ww8L3z(N6!`Zl4udBh=qHHWq_`OUfcGZegs1H74E$~KjnU~_ z;CNhaR^$`eYP%C{9O3RB1h_nOxv|dhwsr%3x9W-`g0O5>?|$@Lr@Dg1UL+k5nf!V( zi7JQ+MwvLUPjI3&N zKh13rGsQP|D?ElP*@r!$_jK0;eF8im!ZIz)(Trz@`cEaN5TasBzj6qKRy|Fk&j)EN zuqZXvy^nFm!Q1;CHogiVM1tvHmbIx^y$koBAV-LNua9d1l{iF^W#*<1Ap~if(AFzb zXsc-_Z~|pSy0X%7f0DM&hO`CXW>TuwENzus=!p&oM(S_kj2Mkjf6m&IxC@Fwd_$bt!SZX$*N%Sj<)}YFnEQ~BKGbTw%5&QE zUfWEACdXd@KIknATfdOQV+pant}Y~}({xboT01BgYN-HM0%}`9xhvJ+_UcQYtmAN3 zs?RkK@Qp37mCL4sWS4WR9EWfn%QzjB+dj;t9I)sEMa*8?^e&y5NNP(~MMohh#C&{N z^8yVWg;sMZ#Rh1z3CcaWBPdto!>6{inh+sjjO+n~op6e{vtz^agqo8L1PE=450$fN z7W=a8&)c~yPe1%c$MfR1xGm|Ohlfj z9FDe<1Mx;K_z$5)axuPv%j3VMh#Y913Uqh^7ic^;M}WrbMG+twqo3&!@hk+L9OiN~ zb=M6R9G29|7l4ABMtdD`LafHKtX(?Qa=m(nhwY9}wcIEVx4Uf*P@$dP5s6&L#w?-2 z+{34BHisz|(Ao0x_>CZDNTS}#LCi%R#0=ljs0sx!L%sD9D66AmxjR~y8U*6Bj|u_%o!$7Y<^6(m~8*1ym3-0pU>Xe-ra*5TP17OYcs@+Ni?fCF&SU8N2r^tBE)*O{gk~{*E%chZa|BzV zN0*4aB^PrRll2ttDD@t)&byAs?yvyd5szIP7@XlWm1E$k%V)QV+IteTnEh zR$2ba)TQu)WbvnGu%NUpIddEjL3RL!Ad6u(;WL+}0q#A65K7bSn*YFTu=~S&JYf9& zENSv2(cmP{+El6*kq zQ%ep(c1qY1#zB!t<%dvoMQtrq;u={CAJ-MeOh0K1GT0`u`Q<($Oa-Fc?biN(y6Q+NJe!xk>M!{uO*UaLTg`>Ni@d2NaGDzK{h zA)b$Q%sB?tJDUfrwU#Zb2iW{#gC)`vJfjP-h!8F)>^2iA91ZiPaD3{pHl?G7%fb8E zYjo;|nbOEIjn${2o@a@>mTz^nMLlzvoer5(21rhV{QzA{Tw<-dzv-vwf)WggdPAwx z9dtZL>X^`r7Nj*1i9TVf=~nuYYOx4ZcoX(DI~|>MF~fwIaX#DYL?V#Y!F;n8q9Kwl z`_3|P)cVShy?{9OTf`BzF5(DXWny8Y#8E0J3^o%-85mv?am?}U90 zM@WOc=iB6vll5FFe{sJ|6T?=9bLS+X-;j%8v0_%=M$fZA)?_zK9DcJGr017Bvh|@v2 zs)J5iqy1NkYnCX1{nc>?3YCyN@pmTmmm!}q6P4ikLQ@|7j#vP0-iZ*db%*})(s_v=Nw0K-r%a;3olL<~x|X03q?;6XcpEhQst?Akym+u0 z@A^{S4YecbLak^A5jW2y<4WW3!`+SsSHEt@6|ZYIh?p^OPZ(4(?cs^H;SU(L;SU?q z3ETGN>m3d?bJj^!E3Vg$lzA*aa)u_Qo(U#T2J&U zxp2R$fdPyc>9@pB(r<4fF`bhBOCVq0XL#@)OcGyB5hY0r;a?TeI!-4IY2t3_WClQ8 zkm&-Zhc&GWy!!LbU#lH9P6#H@t-B>lb#!^1Q-v&&@R!{zjbD~$7+FR*o)E+Mi)Dhp z^5Fidg)IQySF9qSoi<2@@WnRARXsCaP!zXXf9&H)bdQH}7_m;Wy`aF)ojhR-3Qqbh zp;2qnQ7_VO)3V!xv{%b+XY~O0(QXXMZujON^G;(0qGZ$&O-U2~WG{u`vTf4{hHQ;! ztlmEaGO|PxIktnn9Oc4-mRyi##DT2mpo9kpveaX?q$e(C&W8jjv zE=J&(nhm@GZNHtDI+hWSa$0IBUFdqqA6{Y+&lWiu{mUf5_S@zl^136@)}m-IF8#%t zxLAC}>d_KkZ4hW}&|Yubf-YrcLxODCg4U{iw^#qX*^})J+xNAf-_tzER51~d*8(7t zl{o^Q`ly{#w!W?$%`>AMltEDH4zq%SUP@nqQrL`=1mhBe3WD)*$|V?I&zn+!Czsl! zLTMav+(X3UVdgYrQ4)s7UhdXGb^9fjKf(yE?sRls{Ql~pdN}Cnpvl#pt;xn=aK~S7 zDx3Od^)X(mevUuo#^G`(i`8bmFcoeEHMH@@4TRoP?-Ov-X>0_7-fYLv4oFGjfUtz* zWXHhJae^3NMDSm$yTS7>H4hfS!$cwx9P6coaTD(#Rc+%71{rS&w^*L{a20ZR-pEI? z@7O;QRv+&=5Bo@}U&ipwXh1fURH{>rWr<3QRcIGG>xGd^MicOqoh`yeo@nI!l+ol; zK0=^2zSrVEVmq_Kq{-3Ji+vyiSxU~=mXb@e{2yohR$V6jk1;B<=X`%?1k>gc@ncCa zjYiOG%q8+h++ici7@K1q>U{@iFg0xm@BD( z#*HM$16=7Y8A_5a@FH9$3-(m+u#vjJ@dd<;)CJZB&bJDz3t+{_Z%9Ilhz@8BA)jqx zl?d7e0|0kJ^wK*m<~Pl~X?eZ?F&&}#M$`cjLWOWlpjI+T$Ay-|6S;sYbgIn9cy%Paw&htCAn;Qbxa3V>F80|uoGyg z?xdZ_nR%(YX_dR=ts@!z#yo812PMVjnd2k_zX5FtDa)_e9w(Nq}{h)@1$X5K9u^0BKz5NALp$r6(z02dxYB_z{QZ5v0}E2!!w*iLHok zQYlk4P^CvHCwRf_>sPTwx6gxWuNSEtgt>`AK27{)Ga9dj^rE~B{%+kt9jG3_xGH(Z zf}5w7x%!H7Qhs%Ld3ltdPUv@;VEwKH^hklMCE{p_Jbi-x3E>v)DHU_{G;?}Q{T_~s zi7bEj)rL)K^wi%Nll~P+ir+5YLWl!{xl!Q2eqVrtW!x^_tkuM=O(jnWm6{nwuw>w% zW16OJbx+-jCz1J&uJ{dH3$j3FXf?mOQ~8T8o0>G~42LNT2CnQzSEMQQ3QjM87P*;! zZ!#^vqF&V-BRet;Zzj#l-MXxPXszu)QqK{tdeqNHbPzQuV#==qlmTB7J4JBD z{?R)N_IW{4btWa2fRanJ(?{ZDw5@u`Z#C7#(C|Hmr=KXC21n=bFo_({ zTW)DCM+C?ery=#0Ihhu=I%z5FH^3y^$-@IUg#M8)9HG-vEFy_KegTSvPaP|+5khbf zn})kANa-VPQxVUaAidKYN>f^fit{6qY1q=11-^X>>u11MyX5OmNOzzR&Znva3!gBGrt5LnAxunI@=Y)IN?HV_aVbR^yU@I53ATQb;qVNp%@fQa;s^ingK%MYJwDO4rY->jFRm z@U`sZ<0n_0sh~2^B`heNVZA5fOrD{h^e_<)vHksAZa6*O09&CKNl;*QIbdvi`;bCUhiu^%l_FzlpA0CdhZU^<8t|%b(KFXn|na=AR`%LHM8kBA=fD**4Wn#CM1foRjn)d`oYBis*v`%fc((wQu531l z@ftO&8WtQrHEJnX3Hcy!R_I?t(Mdy*B8$>c@NNRuQ$tB97#RvS5Dn!8djGmk=k*;K zk)CUYLUS*F7%;8YFwDYU!Y~Mi0!5~VF{)uirZa}|mrc)$>d%^oS7aEFqt-BNaGN)b zycSwe#1JpFzVzKSk@|Tx#1}5~o3(}=OXJf3eP#zY+diq$gx$eKNmMIZC_Igtd~QXKEvxx}!&2-Wt6R3{8Po=W=5&aCgn`C<* z-YD7oR2mTgk_Qk9as&XDdoXfa$5Pf-KWWT7*H%B7GkC7UqpX`}tDlrdeysHbI+-*E z84nRa{tB#qyUVQ}E|*@*_QrHARoE6Kl@VNkYcjbpF)vEoiL!8F%3XPXU%pG6rgp~Q za8cper8>YV6D$XGUF=LTiF&*1I2NdxNG_P2yT@O7V7(uEhX>Za)*T*L9oP9PdtfsF z*v;6uV-X%2ckFRZaP5J$S#hL=$uQEUqGDQkJ+hJ9f<(qF>?}Y-@$+AZ$WRH}NtMwiV)Rc?3 z))i{aX-7KH*EH!sUxQk8&$$jxnCH2S{*xll@dY?Uu2zQdIJ%(LhS;tN>sFs78zW;A z4PeFUPCkAXf-n_Bcisho(SFy<=FC${1O@LrQP)$wLVKH0DHLp6cMoxZjye!d23L7e zaW9U0RmZkN!rYdRb|jbSA3tIfOlWYb|4$~{A4FQHK*LkT&4&SneMMJchUjJ^GN5wV z93Rp}n+CIvsnjCIAu^1}3%jf{sgH6&Tq(I=FF(S?;R9W$@frSmo5ZMr{8z`h z;JacMRdtO-x6x0Qoad~|30 zcw1a5RkRMkj(Yu=l6<-J&AM8#X3H4BS^xK8rKi0eT zR9^|t?32PUjUg{!*-oi}4SBf$$#Wo(sNaA`4O*LKm>cQ?5p1B7Mc1z<8OOigrY$vg zX}Oobi)9g?ztGKM1Kd3k2--N+*RCXbUB;HwBjj&4V5;N5++<(9rob;7?8hr^Sa5iN zl5VxnMtt7gnvhi6HXao0Z=_a3sUxK~*+I$E2y-Zxb?pCKhG<4e8=RQO!EyhhuWsN+ z*u-4V>2TgKC`2D$seZ@?#icV@3A^^bkCX>Ka;kji-Q(?Y#9NbNY;O7>74py-UsWFa zAbNXkz3!0)Thpc!G^j<{^|>gq@Rj53wNj_r97suvnImesidK6F|EIL4B~`;VBsP%o zD&FukfmdnvP!ZS>$RYRiP(mb-CD$>KrC4JiOEGr0a#{IE*>|6>>j}_+Cb9&v2}{r} z(CLkSA3rqK1$N`bV0+E+hV)nS#f88TU2dAlkH^i;bs!GYhbu_kz$Nscu3-EFx(;M4 zAAMRTW}Gop(^#7fG3+n^Vze@t-_?XCXgG08G3guKEBFjxY&f<*^&TvQ3XQpOq^o7D zDk4B~r85IMs2ADHWXd_jAaQlrn8$mkrCOT5tAWt%;=7sDtQF(6=jZR1#nE?6dBC#Q zmpO@k-x8y^c@4FWO#vys*&Gu}9k9<-1R6!R+DPe;`ZiK3-zQ^lkW!ir1^5F3OXUzL z!g`E(NyOIE!H@+4iYpNM@zer=pcx6k@zD!31)frW)C*DI*6Rr2`>VONyby5>nb-sz$f9$r*!~h9h{^EkhMh>XtF(ZKu3< zf7k4TO{_2wX6>N{k~R?iXm_8;_&%D_^?=@aq$_U0ZrGuqpYE`2V_(v)`I!|y5d6V= zXjw;1#P}*Vk$3<1AQA_t{i<^N7Q1-T)3N_n1e#jTb|*VL1QJ@n|DXujSW65Nf^~Hy zmO=ZDdeuYPFdJPCt4^qp0HZ5zeahzM*dQEmqjbgcjVFeS=}Zs>>F2NL2~%K-sMX~> zTc-5JvKv%Wn>L}LHYz!eG)Y$?FTfp>FJzxvnKpU(lTe{`XO%%PB1TeT?A7amg_JjMtiTO@$HiGaNnqal`tE>Pp84~e5N~*fs;F^KsH<2 zp8XkNAYS#Sbp`#N;wpUPFN8_l$#Y_Hx`jDf?y~{+s6$=2A9d%}?gzZ|Ot&N%h)Ef# z3`Wh=_B^$a0J;=*OE@KF4t0kqZYCTyWfOuIC1zRGpQuG!%yY^1BBNj|D=%DMzo2w& zyhNF-yr#+M>O7uF6Le1+!rklx7QfH@N$x)}=%~|B4io4^e-ie_v$5HD8_&k$TCcHH zLnI;yOMr2U00g{=rDfz#h}=T{z;ey}b`XNrq==aK3)@osrnebmiA$WR2g?cfS<)m5 zG>O9g`bLxJ*W71iN|V6)gC>!qH#{dm>2aopC4)SKCQ;OyMA6bDilj-%8XTI0?n09& z8cm{TG>Jk0*k}^Pv?fuAfxMY2xLnUAYZ5LvBhq0_q6kf*2u;F2-WDI-O1BFMcM;Y{ zHE(bU1VEZZAx%P?GsSX>T9fb>O7(~)0lya!4NU^tm^6vPxY^PqEVOtdWa1|lT8der zrD%i}b)?ZG3b8Q1p7@P_y-jkVr5*PYZc|Gitjw^6RuS#sHT1S5RENuv@!-@3a?yB@+^oWfHZwRUkTzb{zhGyl;+QSrw)# zXBS@mqLdc8nc9M23eB31^D-1UF$M`4_3fR^52(UIiafHAjliDPGz50~+?ganUBN~? zOHk*c2yiasFc1_=P|xJhu#CV0x?5m@@>x(<#Ys@tdZ0#XS@VKwxh$wt*E(d-O}HiE zEA*5E_2LRX6EgE*kU+0x64Yx7NYkQ#VAaJaprq?I^NHDv&zYi(_}aWrFK&v_-x57U z2$yh@iJTS@W>6Ek1c5>1nEP5Bvf;K3&tbW3!L#XH3!X*js7?x_CJK3)i{xqMImy#q zi7z|TA%t#RgglM>48?$8#eN!DZ?xmI*%m`=BXoO7CRXnW5e>!&OR0hxF~*WJER=cg z6STKh~i%^bxC(s(O?st(~6)gO2)(JrTXLG;LFdAbPK^ zbt-31gEk^~(`6U(d;^1-8@gWHfVYZx2*Rb8Su{=m_y95hhT>5|r?xw>&oT2_R$eFD z06TK3FMjstKfH8phdR76qLJu_?mJc+ltU3uQI|64I=^4T(~A#=g~&v;q=0g%K%$l6 z0|&U{ln^p?69Fm0afvRYpgHSnCL8Ahg$UZZ@T)28;R3w<-)b`e>UeV>!V);Z4%$_KrnGZNVqOoowR6()q zaFf?pu?YA4q2K_gZ|t}2RUhLA#8-Y2YbVTuJAuTuY)Q5&Q3jNb{vYpEnN#HhvsM1W z9;$@8sGaH|Dya_W-c~BItVsS1lF`pFX{szGORKjwZsmZ`(OBRJ$1*F|5eX4baKTi% zRW9q;6Io@^vPWDnoa%H($h6G6h^>k?;t9T3E!|$7uUDAof7d)LH|ND(zDFlg~ z0QQeABWvo{dF+QDzYzdlk+iD`?BM)A2;{@ zG|O=vX!8$luO8R^10TY-a7M{*9Fg=e5#kTBhesZiN0#L4eLzoK&-$wJN0-oP@cCjq zqpWo-UO}iG0tAt1!U@McVVTz!1$k!LN8mjUh1X=ZcOh1htnwT|?cXnk!R7(}#&+WD zt$V)q;K98uRXb5F@5zHlndR%H1yqmDghGoIQPj zIZqu3@JJ3Ypaoiy9bja+W(zbST-${=cje6oN7I4?8&$8haKT3XL^8@?qi(_Q8Vs48 zg}ce{&^Y{r3Cw%U6{v#08q%bG80hE$y*uV}nzOq@7n~8_qU=~Re&nggH*Q`P-e|DsKj!tR=PL_MU-sin* znJ#t|-=*D%5IF6JhcaqEJfvV(`{56ZARUR|2GBFl-onN#Uw0(F3~7bAB3-T;RM0R& zUVWIoQ(~2r8(Wb88?cJas8b$c=kb$Ikyo$S$X4T0atl$e`p9Q(Yzpc$XM2f?9V z^2tkH$OHHW3%My&eNvYV99!U`Fisi7sj@!&beOVMm8AZ907ET1hg_yOrp(K`d^O3*>?+ZqPq~nZ0LL;4s#t z^W)P#MXUwP*<1AIw$||-=cN?#-JE>nI_Ju<&_29F8YFp7B{7<774Hf=R3qd$m8Q*|BBLb9XfN~H==b4VxlRLCY;?Wu{CZ$9}WqeIti0&v| z?UQx<$F?HZ{CPTN-Y! zey(Y3qkUGj%oTm5#XH*cE~!lDjb+1QN;;Mr<{0rX9+czH#Hq^3s{J zs#j@(gX^Z6NWq|N$j0(A!X>_{eatB>-sVK{dAmr9x25K`=I!Ucq8ue)l!M?^ON)nV z0qt+H%d~im_BG{5tI3RO{K+StGeFf z%M)CX^T0wCz?Yk}c&QAPDD4Y}Cs{cvPW=$l;CbW|dBIWM4j( z4h$4PQzFoFO$(sNpd|dQNtuzVP(S04a6m%{hih_eWXV7|5%@6z!k888zv;7OYLJ!h z)yjZ3SKOFkRG@x7EZfq+e6~899S_QmG}B^^ip{OLfSvd2> z3(3LAb1l7iNbPqG72|Lg0zw{@Ws=2wV8DV%ut6Ycl#G`IEL2vDj<2{3rtLQCY`6&-jE>(bVa?eZ z-;zh5OpSZDAIv|H0?$_*WlxO{7B9_yprb74wrik|wLFOogy?$^sCZ__R{NNH`ZO$;daSX?NdGPKou}Cd#|lx8Hcf)EgoA-&ntZEqQ-4ALN)bc~mB* z4(~vPQCpkj6(Yk(rmX_#upJ?_mJT6as_>W81rTGqRZ@X;wEB=mr115?HTnMN`SU)6 z#J4Y?y*E(zWWA(MO_k3jxg1B$0W3b%WKlXR+IqOI@{y@3&(-CRHRY+BZ`yENVeTnn zZFd|POb7_2J3E~gZ8yDsl_6+P<0Y6)2QB}<%WthZ-}qM6?2?2tINa<%Ww2W{NMd10 zOLgFl8-)9m2LiuVM8gS)o^(T_axy0N2_r7V2~Q|VcC5|OsLl?gqgkiwMF40V4}p2T z(W&Bi2$YaAj!{^u?q<^`uk=Y*s5jZtsomUGjil~vj#wfeui!jhlPy2vxyBs4c?Z^e zwn<8J;G%=Ico!*0e@1B!3jr@!ga5IMw1I`6){%KP??86MZT&$13WlopOB6BlK)KRn z$4}=J#FsX|JdFl*nVyFP;;N!?k#y66FxlN4Nn5FQ9P&Uw^Iaswu&++(!pnl*uF!E3 z!S-&DG^#F*iQtJEQ@zVqcUY;`ArI2xG);0lI6O;-JS-EAu599R0&~&5)99spAM%jy z9nzTYiG#XadZt8Cr!{s;YR4oZ?omD6ONTtv_TGAsNUVd=y@X4m@5dnz;yeYMC!g=Y zDl5N;0!uVAN~xT~iHQMqs-($4!L-UqjIRV!%58?W) zkhdf*&t};t&DUSnFX0{ia~_gB%xn$=NJxPP$!}-bzZ7VkHYd!_vVW-QU2;;-WZ6I1 zyg+-VK5}w{G5CO+d~KJJukB0cfAmLw>^=YCqkm%8uLz8@?6;Z_1T#j=9pLi@9Cumf z1Rdof^%xhPT#Bg2)?<5e6{fPR9uxAL)Ko%5V^c2bF?gU4kqexPz9)-pD$DAzQsqnW z<-JqymM(1dxF^%QJiAhll?r(XTH3*hXHzfN?nMBcCmI2jq{(t?EgC9i`>3dG!cHir z;dOroR*2X7ro`z;Ok4rrNoD1BIqdl89<5C7P7OdXj6nZlNy$)U;XD^hN*1O#n-H{9 zF^N5eM5iu)>Ss___**|CIAuLm)Px^v4VF%(*ZR~D8tjw3@s-kKpYDyF!~J}Zuos@6 z?Twwo{rTSbwWWo*7t#KMwM3fG3s(E~H1= zi;IVd#%SjMAA01u#$t~58IEpl^^(@1Q`KfkQ;_5IU5d*OK_afZA#PK)+r%${()FADJqDbw@qd z>mmtYS*0xR&Uq=a9%bOwwl%R>&0ygf z+^>EhFrK`l8XCT_7Wd#~$~S=7MC60{?AA&Mas9b6{V>QjfCsXr#UH$S8Io!A+1dd| zZtGTOUaZT%+?2BkE_C0V?aUcQ4kg`*EoxdFEynt8tst$*V~0=&yUisT{15_E!bY=1 zEKq-zU?uxGQQ#ft6i%~L{W1=fC-v~qJ5xLjVn=DNSz*og&FEPyz$he-*U3Pa;sw}M zy1_XjGjVnP*IaK8+iZ3JC%AusKMvFRiC(w&y$F27heepUc%gu#H#*ltWG~3_DnRN~ z--opDHUxs&YZt#>PAKv5Z{&@B^%osB=_xO4A0?<${nPvb=;lJikkQXeCxE}IdQ}b} zA!1+MIY0z4VAQQhHfyDZe7@;>s%i>lLruM)#R&~p_o`^D7Jo!{rSh}T6&-7*xFK`! z7)|te$apH(Lq;IIaCK)TYLW|qnpBv2ilopR{jx>*?U3k?(h|I`)TE@S+zd2~L}716 z3A6wlWU4PkB_EgN9f>;P5iCb_6#U>mP7Sup45-@*gI)WjqUe5a_j_2O2o-gCtWbCK zORSLosY54HYji7QmNdZ{EmM=`&6Df_f3c%QQ!Dre4$w1P`_8G=iKzITOiRB|yE;m* zy0L)zsCwc1&vmNa=odXZxp}F-l1UY?E-=yvt$#`5iwKByK2|BIUlcuI_m9`={Ox9Gv5S z1q=uNl>7+LX{)xURG7&fkcKLKWK1xdY#*qY(muSgXT;3rKzhEC;<+^XHDx=h?@8lm z4|8l{(Zoj6=hc2{nwOFB*(t0wAlH&q2Jevar1e6k{i^_mWfU3#eG%{_skcnjpQq`Hlq@iXWOzKt{lT_8{ps;1zZz>q>M0k5xT!D8oM|6m( z#ZUlQ^h6(*2IhD`WvB*ej2x#p?x~G(s(l*eawm;)5GvvFG|FuY<&;fCz?D(1=iI%8 z$`*W)deiy>M00nHax$riL`GSSX`k;G{lK)Em!OfhCRa0qBOh3FiUK&r+=-P1rMMwa zZH*x^@666Xs!jP(rzmJ49-`&pn^yF*sB?{)Ud?`{iw#zGt3SfBH2}p1)xO|sW(!Q8 z8I%Yh5vl6SXKDfnnsWHMM@C=LhR=}JJd5)4ll*Q;5bO+aE(H}u55y{3wf??p?Tf57 zwW=Rh^?T65dX1Y}%el3tE@|QW!9rQJsls42DSUc*c>v9;JKIcTYiczC2HB(ZoARMR z=y(FzAmoNa7qv+LQH@-1$Oj3kJaRGLfWx_82o9&e(EDbKzg%PTUkk9E(pnF-cnQi_ z!OLghn~8!FnBDtz^78uimo|Y3k(=p|TPVaEBl6A( zVn85?c>Lnn?vCD(d}PkP_KV$aUqUHN6`_>gAXH&wro{?y6#Nqfbk{_&RQ&(Vhq)u8 z-?tpbh oG0k#W`Ayj6VWHX&jL8|mAKVqW0jL2nY_l4Yg9N*m?5mnrYLj+3`X97# z$~3`cT`EmiUB^^qS=yyk+X-WvWjFOUPZrlD167bMM#0YnEPs}PE# z{YS=Qq~{omh!}XxrN(3K6CSJ7c^Ge{-yuf0hW9@A$ z3t{Phful(nwtqu;xZzctUK{L8fIOTOj@N_LV70l!MPtd^z&NW7gI5|(YJ;JST9i{)GDdX(p)so=<6l?C zzqN;l#q#$S-xKvLrFzE8y&H(&q0*_Xe6U;Hp$e0iPAZzY{_)h7u-I z?vC?Iybk)@KGB*;;xT{-v29h71x8IElz2|c^pQ0ax-e({lmwO6qqY3HR1O61F-H`Q zk^b38I~;dnIm_Xx;-5^0AB;43JluSEU(x9n9KOM;Pmx4VUAU$0_jk1VO$3SioqEyz)r@{Kk3&7}sWZ3Ugom z#;ew+7-_3ZZtjM9#ov%;Oe=nY8B3Uzr!3(M1Dij=35)XU(kcKh+co+z;q71LkaK08ZJ+5C@BJC*KuF; zNs^s{Mlh!KZll9UV{N=X}ZnRL>`w3$wczlH1b=N zYl&8&7cw0&LIyHAts)|nWGf{ojl2P;Lk36eJ=WuF6^10)k!Tw)Ad&Fcb7THEqFY0j zGz7H7^flw8-WwPyE*pr3QzF#kHB_>R)9)!>(3DiL#ht`G#nFOjaP2JPMB+*#t3ZJa%Hz0^iCB+R!J#x7m=n#dV zMP}=}T{W5n_E#xwhtE&%kJ;=V(L_Ch4abg8Qq^pWuj~N2akBo_eE%l)t`U_62(FYs z9Ps8~6AT0uo3k^rNLk;I`U0e)^j1G|uJcwwZFOefTcr|@s9p;uU}kbyC*iKyhB=|x zu75MzZGIyeOS7>fVrED$ZW}8Re*iCmEC8uPz}S!&pagv3dt|ZFTmn2zK8lnHH)!XTwiitJa)if!5l-E#!DHQ5%e;K5J}q07y|Lj7=jif z3~|h$mRQvqLr_p)6`C*q#$A>b;rDa}3}LU3Atf*b2um0u@@^ojF~sCg@D0##BpeX1 z!q+^6&mV{h$`v#%<+nCMDX*ysS-(1AI`%{t^CIg!vRh08&Hrd}aC%?AQ{Z@}kJUZ@ z^c?ckhy=6}xokt%%t0<>#FxN(tkY@jqWjhjt8U%u2le5SKGfT-4{iNtNqVOJw0EE0 z?2Ue<%X{EdvZ1>b+vO7{o~lG1XH_v`vDdzMq0#hD?;Cb|ogV)c9?^5TV@x2Yn!PJ` zvp1)k@&UE`UJsi1$m)x~@^c?vf=*i+tKOxG*5-_tJU%w3*5kcjZ}wltc)xI=@h)lg zdPS^Wvj~e;uXv&-#KFy&LzksUcZU_geTyu44m+~I!eLc<-B0$l3P zPB=sZ6KHh=fTP5(xD?LP3H^t7=$-K7md;Ap0w zUOUYG-Rf6V%YH$w91^Ww_w^kIk$0=#)+t~8k7(di zU##m3c3A|MBI`o8s*%Jf^D}DES@>qY-=Dsp z>c&15F00a?QKgr-Qs`2RE|03Z(de-YQNvlXw5m#Hk#j|b)I8OECPq_*7YEt*?g3;0 zS7`1*LLZ9t<<4+@eSNU9&XO;A(I5Rmh8N4Vf?xpj+fb>F$@bLMX~?%H-7#nq1doZJ$>PKe*PzyW!m!7AAIiD{}lar=5s^qY@y-Pqxo|+ zyDa!zneLh4(;)npdc}Nj2D`jI2I0GZh*u7(mKp5wx*BHRr&o-lOVbTCK>9EB$|2P< zgHDEggPZ_&E;^Y)*!K6k>aN%r$YHZp^)c$5iysE%S*UX;*eukUO0-%26EU0%0{JWr z73kJ1AKUW<1(@Ydq5sSn8X3lBx$3d^GDM3s^I**U;Mes^%tD(VJa;d}uQ)&Wzb-nK z9>Q3XUYgF&P@7sbIW}J&tA}(^dF&|-{vxBCU7RTf_ooX71jbvwT(dl;QKezkVrJ0f zg`+h6Qov%>jA!90-mT>l(oA#phg5tK`D^c7{i3T_cojRAL7UF+aTS}1xtLV_#4cd< zf~)w{!c|Ob$m+#1#u`q;-M7v1{Te>o=$K^ZdZ8`~oAl;*zKp7Cj|}5(LX7wGqQAGVZur>`eVG(vZcN~`8#;4NR*ftj_h~=7X&ZF z%weJb^Y-UzvZLxSbY0z9AN{I#`ls_d!y+2dg^qw6O^6KU1KD;kkusenk-?6&>s4PV zd(Yw9ukH|vu4AnD;&mPNEWEypk6EJ{a$!`!fC8iSasTz56>3|fHoj0;V+y^DbK2ZQ z({Q=7VM}y4P!tC$)7;D#Cw6?H7Vu?YY2w7H6hwOi0dEc{CsWU&mD=q(v4gtjUZF=zfbtBPPox(B?aLobY+ggo@W&iuRjGEG zoH-~OlGzvK?I+3$nU#OKFUs2u$_oVSq`cjl^6CqXhhVdX4Nv2IjHe$s|B3&xxT4;R za0yUziB{kM87Y`QIm^NsDBH{>iU-*Oz6c~g#G3~gI<8+X9RU<4Bmqz=BD~Fx>B)Y&w_licDJL?) zx%UUA?H8umnPhC^kvww^fb0)!+b{Muq$U{4hAU!5E~}C0V0l>^nGOar9juXw^h|S+ ziQEGq(`7AWTKwq@GU?Mmrh_#y9c+*(wOAg!z53Uh)r?HMa{FZJ+k{L9nfQc=`j&Jh zEo7pWgiP|Jk>h1U`$;h2d$~uysRi3mJeuVfVZlbZadijMQR+@%Ma#?i|2Fh|pFrawy6*^h{@P`Gf<>d;j7=5X$ zI@0hZ7VtzU8?%G!mqyB(&Mw6emg*rOD$g5&<_pl^CnT$d-^{>-zDb{)u8JU%OK1gY zT~kwXdg9ij|F6qOv=_Hm@8kLEIDKCE$QlQHy zVg*7r&VLDayj-}b&>clO9{FH-M3Ig-%l9pJi{3J^j)WSB^xNYNc~LxvX7pm95ab0B zlXnw&k>ebJ=BIywCF=)yk;lDR;oa10^0K2^Z;+B=;H?%hJh|X=HZV}3&_G$2>g^wQ z`@e-gAlgHyl4uX{M4~zSqBjB_;xNSF@x*IAiP8|xu2%2R=Y$tXXwoP715!H?Q1D*; zN}Pd&rZ2Q#5H=#EG8<}kee_sQd*`&Fjz7VZoH4~=SEI=h@g(oEa%sOjB5eRIOv7Lh zKRP`KD%Bu7mJwkGMjCO3qWT6k5Xu8~dSs8X5DVM)`tJ2~2ot=M~ zp@0e>F~I<)`wA&4V(aeQhRdA|i$PDVi)yeU<9Lw0LFZqXsV1dUnphiBrA8v|H6a$TcFoMZT%`7$SR0j#`hyNBoz+Q+!wOSP@?eC_T_< z2hx6P@csL*?{LgbiIqW#auG_2l@c_qYl;iRLH?N0C=0eho=`?j@m5TjOVbn^@YtNq z$+tv{p{A<~34`c>>N}zOHZ3+V%0pZsz-fkfKJV_bIi>D@%O;wH9;v zRUp18+%zC0!HHs^#7c^8L<*X6z55sG!Eltx?*%B=0%`!|5;fQjFMPI_*9Hl+O@yPmbrx`nw+@;i13YHD@?sC`iV*jNZ^5pFz} zUER8Pc%HULa?N48oCRWXcQ2Z_J1RNVo@Tznr%gjoU_lF;&+06w6Xi8>o z%ZUh#Lhe7;$IElze~wISs<0>G+u-|Os-4RhbaF~2{#wEBTy#JF^3i=El?-uaPXfQi znFV}seI6f7Qt|qlxwp zBK7VRZdI*S(zCG%XG$uvvd#9iBWZiu5p7S~Atrt3eROHBViF-lZ3S-^Vv@eFBD#Qg z{VR226(R<6pV4?{&Y;la4nfCw)BE{M7uKTX-^4b5e{K*8B--rpMcJ zc~@IVnW^`NU|oyqW#j5|J0-fda57V05>DFnWud26{aX!xZ8yZKEu73O@GgWCFR+@u z*aDxJyS{DVWM+6tIGHy*ll{+Xgm?hZ#73WQPh1EQZQ*35<|Ldfs@W`cb}b|*w&jwU zDzjYDuCw7Bf1s{z>}D~3$f8fMj+w=HkKB+K(Mr4;7Z4R|bQ{iHjr&`I*USL#O@i0V z0B6LkT?$@jwWUi^z#b{#1(jM!eakX`$T%jOy$v161s61bEX(|{;EQ?Yk2rZ*L75i3 z2Co#0_^en&vRdwaVlKcU&JI2r%WBAlbd?@fiCf!5vf1_Emrk&X|l z8yn2?MOEk-Se?Tf)J$zvd_)z?(pzr!AHbQ`EgadD_Z`kmZCYcAaC9!^-!}5X!$4e@K}(~?WDMSV^w*0rsYqlW*x3{(q5KX zMRRXlVyfngto7cw#8k}-7kj4?JG0pHn8j4p|29uFGRBk};7x>;7u6ogG*RaXv7h!d z?*_4dVlf|j|8Dt^+Fbxi7eVa@7xSUBbNEmmph4;PHAYcqYzsK-Wu2DUzg*tn1(}S-L(SavrjkW594S&BTDMHpT%~w-p1n zZuJol@|RS_T6tLHtqDrPrOafI0b!Nq_F4W_V8Wo>mjW!Hged?Fmlh5>o+AK^n;Za! zUp4&cDFAF=gjHPRQ^zMvf2w+D?R3>w02mD-+x{b0t^hE#sL-u689Ic>ucQF5{H>!A z^n+qnC}cFkzZ?LTYe~@vt1^l>m@Z`8@-W6hym~Ty^awUkpaB&3H)YfAjeetN8J>bq zsi07Spo)SgRj{lA>{=@LJr%4|uvTyo>Xg=!%zl_A^zy2diPg6Hu}ZRq@V<`NagX8J zO3AvtuX;8fn*t53NbCU=qr)q1;a^xaVkg75;-wqgz!y8D}oe^(Vt zSs}>-TF`98Xh91qKCvSzK(Ml;8iplvrQj3IqG7>NRw-aXXFJ<>?bO{49VE7>julX- zQA3LA$cA==(n|`F8s-qGmAN5OKlb6~+$2r-2Y7~T2x%1gwDNL7q@Wj<6Z@o-y%j7) zINGn9s>FkS8;(B7WKGXfue|)~&f8+Y0hvlPD}QB^wVWrb4%ki0LOj{2KlzP+^M~*I z((irri$2FmvqQ+zOAjDxY!MLIhDyieR3Bs=hzkiqoytC8TZYCCrcG>DVm+FIg#9juqRHm4{(C6lq0Bxl+9@2ZZp>>pEA<-{AnkAs1d%#ui0o zh&-=|4zAQWp817Zk17E;lz2xIpvr8S*a{HPX*mBCajOROzSxRd;hhP2QaY}I)7QZA zQF(=$cj*<0t*kizvjQ@kBwV20!RicW;~nI%u`{?0)|8is=*{v9y?BHZd)G$4Vjf5+ zXFBG9FwWEkPW0js>1K?6M`Kjq`M%ZnOQ-t2p}y$Io?Qv%r7qmhGR55PKAe)P(91Zkxm&Ay2s$gk!CyHS7wXOKWs$-E^q# z;!iF1G-OJj8db}+)74VMy{`elDJ(O!Sgze({Tf5z2Z=pBR)avzsc%yd=2{bksc(6) z6@*DGN$gSfu6(+JV*i!0W&$+z$BJ|pXb853la+|yB`|*2z!|}}BTiYPa6KiX;*>e! zb5kJekmN!Q@!6$D?; zsg5qT8e6Fw!@{uIE?sML9TJd`RQnL%Q`AkfV{Xaer!@ znZ_+h{!Kx0zlLPaD|_jX3?b<%XuH{ZAabpJ8a3No5)bW;eo&l8#RA;z3HhB!4T^VF z*Q1k200otI_9to;bT3*p?d>oai9C4^n)iY@_->1%J;5KBX7aQYq_tT!^>I`5XsE3Q z-i8Nb+3%pD{eVPW@BVUs63lKYNvodf-3*Z(<$k}!$o)x-^fo-csJG#5DmZ;eOXfX9 zB?`buUnst`DURiBcrc^=@_;O8xZK$=9BRL`iv?et*!czgXuo4`7kt8W%#2PSoY&61 zdAmKjtz9Hta6WdC&`9he3B_P5mQQ1DZzvIeJ*4p-N@(Y$I#eF2Jw97?SGHoJsrZl( zb-@>-a`p?ouhSGnBD4+0yJP@VOyKXPs6+1HOVA4%_+lT8=?I%81*4bLbfijk(BDgN z5Y&Kii9Xm2iQS)g6dm=queyg$%gN0;H5#U?E?B1hIzHy%3#8bn_wi^uq_=CZ?T!}2 z_AnAKuPP)2Rr|-AaNMqoQ}}#rq^^ESC_RW+1<~DRWV@-?j;J}+hRQD;UU)jEUS|(X z{ngHo=r0Q#{S7!sQicZKZbNX8wx0(1^$gOC;9#J@XB4@Fa2O>N>CVzEJb{ESMmxUH z`=0I}9~Q%UUtjD#h3xqt-yQ+YFtI_}F?>CF0U0T$_CkcXxrUsY^==c=MSgwf1SAY8 z@_0xvL)NZ`h&5r?0^UpJ3T<=Hw%+u$o|uf7AN}n0locdx-)l@TREikGK?vFu!y7QQ zg`dt?Z}e&UB#ALJXfY;wl&m+j`GJoBDIv!A753n^zfIPgeq+6Hm;leWr`KS=wHTvA zX>-;?i!qX5l&6!0Gi(f*WA8wMoX<)y<^bt5Y8~(dcsRU_H{lK%e~exPMx!8qR19Nw z;yi7ZDm0=v@lWxF)R6egCI?W&?g!*j(oIU9al&v#BCOw0t)Cw29746S=cdhww7!vb zS$3c~&Fc4colQ-9?3Z!!Wo;`B;hj{JNwiru=Mtp5%%Y7qH_jDpl+Lh$&Xu?Y(e(XL z6m!_7u^5kpTO@tubo3gxR>%S?d1)A;jX=JsQfUH(1;@2r{e%=SV=Xo7IA2C8tTxV) z6nGQ}dRRZ!q51syx(=cFm-8CP!%+r89yp^T^n(`DK$17bn5mF%ijJDFHc1VG7AKm~ zV$y2AH`2I7Ga%oI7BepIK!{T>X@q^5Q?xkkqyC+uwdq$HiKKIm3G^x75C`^0)>{(1 z5g>>I&~iS67*R!YgnbWyvnF&uKizYYP z*4*ZAg;l||kJtQ7`#WP&F*~G51#GS<3#W@Fy)F|`F?F|aDX%SVbKKn& z1)!(OPcqm7dV6j0X4r{>=SM%&OLXJ-SS7G~uM%psdU}m$fKq<)H+ou%|MSZf|7U(c zwt9ZD9x*jPE&lKI*_`xeVa{-?X_=@=Za5ZUW_~PHaU|xwKMf_mjt>8R=l1GxJv{KC zb8&X%`-({T@qC^;G1M*nIYN!3xP>=Scc+RZ(n6Xk+%HlZ=Q^!*Az6;5TB)rWFd45k z>0mQ8bJ9CgqCb{GU?&!bd0sy-=+MAPRlpu7>;Os|O_Zey2%W173`94auAh<8+lRxc zA?=%~e}}ddKwkYUt^pOw&jP_MSt}@ICnrfH{xIcrX~UFyymM;EJFRpbrYCX2o0vzv zYanI&_IN06=1JNgTfYT_^q#8cOpBrgn`!YNTZ8r>n-lRwK&J-nK{kWdAj>pJL&n+< zrGral@5zXB@j+G!@)ZHjV``;1SBK{eQW&N1kNKm#;dC>|z?WMRn!Sx}xj>(fpxQ2O zn~?BYbDa(gbs)udaR&@9W%AwebAyR#^9#MG`rieUHq#bQL3;2Sov1cqP=>zeI+^Db zL9vJgNzh`1e2X?nnsnVM#H5qATIi-eomeRJPV+5U5l*4@6BkoZ<1a|k34_xbhcUQbXIr^2Imz(cy;Bkr< z2sdewCCPvkki~rG0)fm;z*7cA&-F9>9!CbG8i37Qzz4;5BmmSQVl;nC1BYe6Ax7FG z83+UD0DJaRs5e0)C6yH%*&rbNlb1XDno^Pa+{d&NcLxwMS$iW2FL(Nl*i3&yLt`&z z9sIQ-e$4qleMyKvml3z-{ck1mZvvWaWOttb_x3o!xt~sO?jkp%0_)HQE;{;vi#)F! z+lHCzdajnLL+Z$j!J|6KgOv%P`&}Ff{XISz zO)X5$tqY0?-Jl%MK{$;Kd1K~)cXB6V5MXTP-Oo$Ss; zYUo!pYrn@@qUJ^!ZMjv8rmh~COeo-{DX1TqkCpVWW7&W@|D?JF z2K7gp&ia8GaznG|wiMGy#c3KdzJa9z6e9)f_hFJ@Cx`P6JmF!OXm6@*!bOvIQ8 zn11jAQz(tlD3jnZq09MNYS3&J0Nj=-htQDskuqBFD52s`N&&}@2^?R?J@}Tv5!~)# zm8l!>N_4BorklX1V0GyPX-h=sAX94OwOl=o$ z9;Yz~PFe%NDwGLUtM{EqS0Vyx<2+qbQbjta)1-W-6IG6yH0PEu%hIDs0Y|EkFlks9 z6*g~Rw-T0$-$`Qo!6gzN_BmW|+{IEXu;~YjB&C%B28z!2>o7Of4d3L55rY!;Dix8e zYxEanZ_+ZGf$?fn81AQA zXoRP->}TW479|*8v@NZ?Rt@R*H*hVxU4e=xruW>JdaVvU6Yn7ANdhTx>>?23xFE&&ru`9aRI{)!Fy+@MZpt z&h(Loqg6t)0?*V;3(HbcH5gMu0tTf%Hdsdg8!YP^%la)W^UuaI4J>1sdm=1Tb-;MP z!7{aofw14gGS^`&qjM*)5C)bhn3VSd%hp6(EIg=6!Rfk7M5wkV8zw#F>NjY1w0e?Y zSUn*Uzo8b1lKKmi5!cq$!XX{#L`0o+C3YZLh)%p2vBJ%3m#J8AYTF1BU5SRHN-c|8 zTo;0Lg|i4z0&EaOwqkx-5rSaYGFuYyY}S|#fLo~pTChNe-zT#o6f~iO3|loiaP*TT zMm7xz9Rk&i4y+wT3(z6*c70^Ll+fX*pltypS{z@bVkWEcdM^HwF6otUK-kYK@H(Tew# z^~cT#!G5Cs<$=s*adAv8nLmB0klV9<{v#}o=6%&MPhK!LLLGtDR- zH8Z_a7T4AU(;GxH)G*y1ni=)f(9E%>h8Ba3p(VkTc}px_!h$hQ80t3xaLcJ)0`Z(S zfYTdEsnHt&IAjWX|68K>OPSuwN>T&(LV6FQy8wjWG(+%jzA(WD1O?%u(X7aEF04p` zR2C)^d@UvrekT_o{8lc!Eo)ss_-#=Dx~N=uf}Zjgo{(R72Wg|G_QQbgen59;kJR2a z!&!TpW;Dn6Q(@^T=N&7M&!EVLAfM(Iiplhr3wJ?hIGyZ2HZsaIig2?SqMYEx{fVxc za-w3BJrWXtBm^S{i~&Px^fB~6Gz|E$o!FaZWup(Th#Sdzbxz!CJ?Sw=_}kL$e^owo4{H@^JHRNj8P9nncT z%vN+VxvB3`l#5S{WG8-MvPi(C*}yFhz!G!s(|sbzP2mZOSFnoUQlAUUC$h%!iP-b& zWQ|LLL2yZ2p-i|YR^Yeq2mec;EiflVhJo9=OJI(~E5w4GP{?oPZy zmKcVnPHAYy=Q#$@hlYA5(Z=E;%o0;}u)~0IL(LsfBwL1<3oIJZS9TaZ9FuoY=6@Z# z32+~<36>1#oCut`ho+cJP1Z2kUo;a2e-rhF3WHuEs4Br3Knj(moZZfDTE-w!lY|JU zhsXRgzSd`aEiT2j32`Yp0yOSO*t-mK20yqf(njp0`n5P}92s2y0VtpqehLF-RAtf=|17lA2#+1^V@I1BO`|U5O%l+78$(Ly$>#=mBE=3sl4>OQ^a5-q`LlTQ} zIbdOiI>!;^nnNR*cXS^82=H~Fj~cTdmaL2NMZG#`l*=+S zflC3HbCD#d9>pfe19@Uc14WI9HTKKFo(v(F(8fSjY%S45c<%BI zQg?L2x&WjCxe73$$n}F5QO*%0uEgPPgYV&Z71YsTDt^Q(4vvnC!O`(tYh=wn(;81} zKGt)#`f{+T10p4DG+X}_J%cb=5qo2I=D?*nc#6u5*_jFck#V832MD!w_6Adht!3aa zl-;;rUJbw{;ht9_n-5$o)@!njWKD`fwPJT(E!~tCu~~cIsMK!lu&~q)vY=L1^Y0%3 zk|k$|PFLqX#VNa(XB=I4#`bDKBL{11^nDK{<*wkvIBu1#n#ZTxGA5%3p9fjmz zVzA*{k_Jz>(aU*0=V4>P6W;`#DM0~;o$9jefK)gj^&OBbjVv?JfEVRe&Y^rPw4GT@ zH;-?J7p9JxlH3siMrOuPB8WNe5W}bhEQpu9C~bVU0Wj=R8TU`*{|R%YN$itYNC!Sn z83hs!Xo?`-fdbk2tVV&_H3hO6T~0Gf@J<9Qg1|_suyt)ipdTM;S4gGFM#3Zg3UF!IbSa9gqsM1eAB>9 z&7k?-8Z!-UD*i-x+%MVt2Yxyl4Z>7w8c$7N<}(2^pAMM$L~A_dnE51JC{ExO%w&P7 zm{}5t!k(FVxgAe!$3lN-xCeIF#w0eVfxHecsz`hM4AfPR1>-4%EWV;Buo?{?0XCXw z2-c}>S`qSzcz}FRkTN?FW{@`ItEmoPO3LaR29*l| z`F^{TFF5k0G@?egZ8b!O1q8r?R$dUGh!sJAK~dMCNc$;hSecx;$i~2>4-|13a@um9 zpojv4nj%8YLMbPgmUn`p-z?Oin;YCX)XX=bMpH=j4VSew_ZahR^2KC8#Shf5v+Z${ z#tQ(n<_$n1xG)>E3#MQZot8)=o=c3Qrl9N!(;@6;9TXGVtO;niR-H2Yu)otU) zZCRtjOt%f8>>RCFBCCnXNiuIH=G``gip(2$z;M(Z&%2yti5Dj1q$#~2IjIxnq|RCH zO-{mu5>K%wLYT3QImpnuil!gf{8Y&y32ZIGERp$R87R`@To{{MF!(N`6|{Q%B8dJa zj9ZhfS;Y{mhWVq@4g{y%*1=>t`YMoh^Tlf0MEYIIjJ#g|HnVbB|3+jFW@d>XrkrXy z+(*zAI zbs3ggGo-=Sn)E!u^J$1oVlh^?)ypD|FI3`u-*w1&i|iX`zVHH#!Zqat0T zIwqlmRA+!;vr&xp=vSW&)Le!Dji`YOj}&+l1|sXQ*|Hnhxnq5h`=oFit>JH?C`;-=NjI?w}r`JLDBMxw8xqqRFmi5ly-9r8)rTs1Sm9Qz2|h z`iY9lP#H%EoJ|p-q5;}YA?~!5CaU)h^nz#jI%-}c&kz+&k*Hw{S(AAfSPKstYYFcV zsnl8mDLdd6eG+JCX|cd10gyUv#dp{ zDN5REX6^+&fhI&6AXIdN{SURVlOknHSu>0-A$-Mitu1r!v(^mQR|gt2xw%lR5%o9d zF>6G@HhL_i3p{Oyg#skDEYt(O9ERD3ja!yWF~hb%5dt-e=91h!IVrXSsSa8V2T9h^ z>Y|Z!@r^`jjapc=x_$b{UF}j0#%OicAw;V?K`oeeTZhSL^_uk7%kX@X(IoTk#8cl~ z84U=lWweGc>>13!5Yq5OiU9i-e{{{;HJFb{wnVyCI@)tw}=f)TRgUDYE;VTR3k`OEkU&E&GRpWLL>0v$%stl)+@P)5xH{mO6J9ps= z?J#c$UpsfCmQb3K*Nt{$7w#}AVjI0^N?t~oS>_~p8G&d>Ubg5Bq1=S-NOd6x#TKA| zuC{@cSf9xIFiB$g8JUTCoV6tOH+H1jKl5c#Z70$Vstp0&foR`Np$PoWD8P&*3~=t+ z*ysVNM1;CoqHS{y+(%~UM45$(1)8+`A;poO+M3|vj{xZGwBG1pRNOXt(4n*5pSaP( z2sc6shMTm}BVw_!QNpUCmZgmzk&XV-v~lt{0#8)25lBPqq3J<+m7T;R@>Bof*R!Kp zMjk$7g=ce#Mu=2$g2H%lGa^92v(ZLl?1w}u{MCwQD%}mub9t}bUoFoy1&94|0Bn)B zMZc>QgWO(3L_2gZC^Cqv`m^^d7pL`Q0 z?-zPRT(smTO@>my4kQc+DGZ&2i!EWy0bOi&b0&F^ZSrWXl#uQ3|7-V2s+8(`Zfku% znCk0*vNu#8*(OqbFK(^xW2wIGjn>EZlvLjPvA6b6-Ne=}V}P=xtN3 z7+OJmK-MjbX-1ycsj@nx)@9wQAf0OHwf{Lb6kz4%$J)cCp^XCAZQBFLCYB5Sz?nsH zZGaYfa9o*IjzMkFF07QubKeDT`YJu2gn08p1PGtue?YikAA^cicvub;14l&xQ4fA) z+=iJ{f86A?y_62gUK*W+>|+Y#-f|nwURoq#oZC+c_sQiI59OCy^3Xi$K#WVVyc215(7W8g+- zcvh(#qOnpBNf8j(oSf2I!Xm%WA~c3su<)2Bfi51E zdxJF=wKkJ4=Q)!R^`~WQ(WF}hGE+KgVXG2#w>TPYhvOcEh!%;E6OC#F!;{aj!3n04 z*@cQHqK8Nk*YOr%0LAyK;bH6%Bu**h?0I!qj}FIxDqK6O62U10l&Ve-k;eVZj< z_DEzTaJQvJE~^l@ok}5lviCB|o>~)RPomTyph$;hOR^_@5<%&6fv8CkJv!B__s+H>Lf4~LC zCi(K2pXL7lx)2JML%~IrDvpmc;(roJgFDf&GVASJJ@0u7&#Hw%^$&F+^a+Mry`cL~ z>JNmsdP7aUP{yTQ)z1RGTzS&d#J6#lHMc-fhI2-YPVxoJ0j_*an4~*%tg@xr+ z>EU4z;J@2hVA$MTh&Lba^d7=ffHakhz4>fy6RIHIwNM2#!rW7!vvw1>l)@~9z_J)5 z4d?b}y?I)#p8RS0K81WuxQ11tKYU;OtxoSR`@lIX5-T~Z-|QC11!7liiQ)+C)pJy! zlf>In+YV6h4hi}gevk?ztm{tt(K>?^=P7=jFjbSgd;jO8kRmSULvC_)&0GhOwFS@3 zC995dMekV0N2Zf7GGs>2^H}`8C1B$l1U&w@qgylM{8^tS9-Z&RNGEx;jaJf+@o4)6 zr)4BAHk84ap9G4?TPIoSFSmRqF<4D8lK`>c2QiG9WPv*}>TvvnCUmO$bePa7pU^3v zP-V2Y303c>h%c|cNdipz>W%ajs@DO^Z5i+|-pRIN{D!h(r8?~HZWiU3jA05(_Vux& z!&sjwvnk!!`ak>kzvT75scCsNv~zRQ@>=@p&6}3rVynBGfr0~R8)^`#qZ9Pvo}3Q$ zin4`e?w63F@#u`E9l*6aWFv|8f&p!~W7D&Xf>UxshwaLgD`o~vTd$3kB_$YbKES2a zGTU=D-&7a>Kx=Z37X+K-27)K=vC;sX%#7+)@hR!P7O~y|ybNmuR%Wj(Wv`?+((VPc z>=BhqIVi%~*N1W1Qpi@DG-w-=(c9k8{VRVM_9N387Mg-l4s08dFlX5nXu1f=QGIPp zr?eeL+m=P>9txj;ma4l(T0TGlF#Ta8D43*WzKXO(4iC~0N+mhYHYkVyBgl)-@mwhg zEvEq)OC#kg4S$b&FRXc2`@KKn)4OT16GWFGHFI=Qb1-vHA%1OC(GGfuP@UA^C#mD%3SpnvsEorAJ;{Jzc8bV&W!r~$u}?S zm15$}E8$I&U^nZ0Rd3E!|A#J$wX7Lje{S;4H}uM2$2WDBU@3o$_w$D?@a97Gv@YVl zfXuVHe_nq=$6w&S_?w-+j*sJ&IK)rtm7Tj|r?S;=eoAllcI=KF6js0aFZE`(`rmaC zZ)^+^Ygn`6|IXh`f(cn(O>)>aJ9OOCv3kr;NV@6QLe8~5H3n4o@8kNkJF!?7DMH4u z$kwuc^RhS61b|P5H)T_4y!ndWT%4%$HGi|$l&f9~Y)f=3NdO8v6^a1HvQL9%&!V-; z0d+L%ijfJq+H8&KdS*y)@Mt#su567DFcnwp{w>T7DWQ52(MdF|jf0pi;)dd&J~uKi z%dOHTwP(O}qXm$Pu_Oqx3gkj`wBvy2Y<{A7FtKciKaiXC2BIGebSC7QHvbw%hE+tN zQl6rUgg=)MH1!(CDIpep;*Z*S`S_Hq{^#0f#>L^RxZ36z7@>Iak95cO?UvsWay8C$ zU<^A#bQu==H0zI!G(Y@4*BT$Fa=8f#S+IB(vuINAniV8xE*3o*LfQ{<@=g0vYxH(i z@O*2uPuGjB(SDU*XpP>X-_N#2EnS~6;YJ7SP`8CUX|`ik+*Qxyr>md4yonTC7TR4{ z*k;|Lx{#Zb&)%luXIPGhti@b4(}Ubwx|sKf7^5jHn3`?cF-bELtTGLdWG4rGoa3Pr zcYcw@YLyFP9q$cJMIG(aeo%2Xh3(BP*a9El=TUw@TXUIxZHGC8^i))u=C>ggj+RO; zT|o8_Wy(o#NF4G#<)M2`uA|&fyuAquaB=xc%C}WXU3$*?sNCW7TYDOr+t8p@2Ez!qdNC7z+hB;hD-6sGMCL2 zzuLCJjFy?KtJE~hY|U0LGT)>vDBfMp9?dpele1ON+l}Ap=#Cd#JLDR+3Gi2nl?=ur_9`*{d()&t%qZ8%pfZ6xDee+Fvr3CLa|3@%PuKHL zD!_2Lq-q^QfTW{ev$wY%wj&56KKIG|Z!>NO5?F=amHr{s&*Y3&s%(_;Ux#T^bk~%G zd?*xy+H3!R--|s3fONb2O6)8Seido>mGo@^L#WP zzG;goTMG7v=!Q^ZTV+o*DwF6tSFEYlV}v3T+`SRkU7re#9;1FPT&Mdpy(kB1o3Xaz z<)-gY%T$HfRQwfHamQ#T_9oV#;$!1^Z(uELxL)nU?xz$3>j1`EXZ>NLbz0>e>*yY< z2iK6b!YV4!eXrTb21}8Ry39gl)?WM2`}W=b`l5flpv$o|Hmh<2<1GY~Zb||dbZBC1 z`*@qxm|TVZ1aeD(?T-5G<3vKTF^zFm+*#EmzIPxSM9#I;c;z ziHMH&IcBGCYn!)O+h(N^aC8ulFR%uw`uVj9M=O34)_`GK+Na6 zExDRAAm6^+th04Sb&lXAPI`a5HkcnFUu||D^w?g|9YHImeU2M(+&T=yU*0yM zqd1`}B`x$B>4MF5UUkntDkJ1diG?I~Krrna8fPnx!$tz1t*+Q0Gz2@GZj*5CORXS% zpaI=CSm34Sm0z>^bp2}eoRz#nRJeOAXD#_9nuQJ9s(J})CwT;PPnCD&WWk)(tgwTb z^CCppk(Dx7ZMi(j^l9oz5@Z%8Js@8?qvaE1uVpQubtp8otOcA^e?m`|MagHYXB!2q z;B57DU7$^;Ptv1IEqLRXJ{oYAH@)$LQFQ4cvXp1WeI%AXb&uvbP#zmG<<+Pw{Ndv=&NxdYDDu@@qO-Xs#^e6B}3J?U(*avp15tEY0Hyxe@ySRva z`;0KU>POTKsqxB(Thp#Y{sP8cqW_aFCTJuN=IFqr%CK)aT z?Q-ceLM~l6*g%Q+=8Au6kC$r#Iq%eiE$yNi^QJe6#xf7m-UeFDfmSm z9iv;R2S!YG>7^h|GH)q&CEDeY97aU{mjzo*CWWF|aRjTBV|ahoKM<+(N>D7#eJUmq z6wBPzxf@a}b(qemsZ`2-gT$hVUy#^h%vD4>sHuraBgNYA>>w1iTl?ryzm6gDsTb7U10|HM zuTSG>6NtHI%k0t7TI`izZs+#lF}V+E_eN>$XojNVjS`IOjY^RdYht>s!Sn$?b+0~WUdcu80CJdk-gUWp2=xhAMB%e zHmsZTJ|1}`7$6#Jr&lM|E?B*!y6|2(%}8d^C{>{^Sl?$)Ml^j{{fcxOQ|VZpBb2>! za&IE}0;%-KZg1YLvGl&>*-mHEI;7P0&iCYl6~tob(O^$S^}P zNN!3{SOAnD=IwhlsJ~hd^AVr@hkf=>Y4-0Okb0gPMYz?_Hi3O3vguqWnQhR_?c(pl zkH~PBOXqnH7f2hfxRO+^9C0POt`ljX>+8JF-iO2dLcICNyA5NL*28!wwH^{h98OwK zE+q#R1Jy(yK}gJ-N)EzSo|GJ(g917sD=0nK%slr@KB4qj`0qJWdQR@D^k~hH<(Ujb z6iNL|VoS&g$iU2?LH+gZnzKA&+KyQT$n_QYOZw_B`wAprV%QJ*N_^N?;sGEF(ZKr3 z-=IyKgkn98+VrAEX~m1KNbg1hae4`w4atCJi9}l}w^`j@xfS1B<#AYs4%b0?gI=lL z5pEUb(N`$)8bwifFpv)Fstx^@XZ1utcepsdvQ%jFoa)mf#gB z=CxuO&X|E$->_mi&&zMRVwr?~bW8KK?WS8waBz`G*lvXXP1Y@GVK?1!ElMp5NG&0W z86bs}T}v%y4quqmj9GB;vF-l^pcCfshU8NFIwZM-8k6J_&EdJ5!@*JCvl1kzD95OQ zhFLu9wZ?2ECpS_PTAiE2+sO=`1yGhDn8DGFhk(3>IXqR8q#ae}X2+3gB@9GFe1po( zmLsn1qD!FJpuNNa;|#}4`0=Tc!6aJ7^Xj~rgfT_v>CltuKK2`Q3X_CZs>W0}bGvp&x;NAjxP&^wM9J>Hr6XxZ zVRT7SvJUkmn$;Z&Ii(nMUR}j!@Q_cp@#~H8VAtt}uEtf3gi1>mOb)69GlR(_`w_e} zk5ZZJp!b0p8wQiI*FY-CU{0pdAbY`xBA1YIm1Hl3xFCD&p??NNZeZ^)La+9UcHY_|Kx#CHKfO~!Wc z+uD6wSUgMKeFH)F^|TEE)cxM5pOAp=uZTs>SMAjG|4|a{0@ivb3fBfeaVvGqn0Z4e zpA~GmHHT{YN6-eg8{S!36Zv53J5P~oKhHoMa+&yq4mt*Rb3NzOp_T+8eD0iQrnnBAyoifeSqglS~1D6W`mw`{+6 za2w)^IeU?q-<2UMLvPBprZ9aEtGOaSf=SU5t&yoETC<|a)H*dpGI);73n;yhT2AtC z&17q>GS+g)5gr8)_Nj(P0r53>6c%J_uq~cJwq9`A8euyaq!FX^h99Z}e4)AOck(Eh z>MoB$E*ttJ7(Nv|3JbD>7!)qJjcvg_3L-ZM*Gvw0k_ZL*BlnU6k=cSA*mjU<$bkws zav3pBZ1U3_igMtB7Kw8*M4qT0LAmS0s3t1*uv8FJC?Gzr7-=I7Q#N(~JF^MqLnIuAF z7~{n^7a%boB*jb;A#K+Z;YW=n;~yR^Ab~`}5q!+srNS6-F&}ujSLke&sBKAwAxNSj z6~;DPI-G9sbY?<^Q}(-MZ3x_U_pcoRa0jMxbEC!>4yIpj;2G;NJ(tt2@hx#9>WCdT zGa;UC?}&}t`;~<#iFwh--Td$A9Sb4}VyX4b`g8|U3%}}+3wM$urnJ#aXM3r`kbp*q zgJYct1Q}!|79uuiBOb2=*-tz1wufLK<8E1Jg(;jFxno1p$Hi?*;{W zRYGj&bO^dJ2=FKjgMwxhhP`e=wu@WVnFm(Q#(7wnC#XLz}9GI3o2{@d-Lx{S(7Q4 z4E(48%kBH3Vv;|dhSqKVVi`+ zlE51j88XjGLj0n{kwm#NigJn!SyW^QAs{ZYm~3WrRgocpnOjLMGDJIe5Q`KN;-MhG zh$O81z5G;2h|YWpNFnL&1FAI2bo8`oFC|tg$aJ}6x@MG!X}HZO5py{-qC|+dxalYn z1=71rm%B`tZ;cXJWaeB#6NSw%r}t34y7GwMRFufUD9&LvmgtrPeu~JEl4(&Qtc#3! z-T^_|O-G5`8e?9xDC6>5fM2zw zWkk^p9v<9E_0Y%dti@Q^v1ABs2MNo+ABWJ}_wFoVea#2ChDF{kU&(o^z{juQAlEM^ z_H?St`$)G-Y+G}^_#Z)>S%G^f=z9CwaoL#Gcm3e+XNO5 zg(CAr661}@GGD_{uE~q`CP%sA2bM^)oBZ;Y7}}AVO@) z8lc!t9H1U+DiK1VN9IDiB}OP(*iC*JM){>53{cv$-NOLYi+&x1?p~0<`a2t-{+jr; zUfRD)_|&8mGSrexPEZ9iIT0)-3oO4B0?v^@?hJ}1hZC*QZED0ELoPG4Pw4C*70L|Y zF39*K8{H<>-jnN*ozU(y3J;@kDSYk$W8YNvi1p-bhU9GwZ;Pr8K zV=mAqENzcnl0$kQdoil(3 zy-XS+jGH0)04HX_#yvS`{fbkA6}ra?DKODjy;hR7Zr`50oz~uY`dhQ?#IYad_Q>gP zC!xWQ&wB!OnutK;A z82CL7J@R`n=p%V4L|0@Z@1;YD`$DZ=I10d?1L{5EO@q(CLP~oC1cU$_`q{JWWbh|CNu>SPvdvD4xYQ?55O-F3E;{>xd#P z>_!w$j8DPj0LQ9_7}QNn4% zc%!ORW?1hQCyUFcsO1qC7-d3CMf7|FD$`ClSIcQ_LJs6iL4_RRwLCh!1I(xB@wQ_L zTY7{gZO0OIYU@@W+e)jL*y##lO+Y>lEyn>Gy`#nff`Q5FD;#JG2d07X;3%^*6s8l5 z^Bf$Q=B0oGCIJ%S9C3hNOxuZK)A-Von`~P3-ysx`0XSMzY-d#LKcA6Qr;sY>(_NFG zR)VTXvs3GV)n*B$&5H)CFH`Lf0QA2yi&Oz*F;2JZcdx2}P2gwwH-VR(t#NPjD ztJ35?gnI|(k{6PY`k;?I5q7tSiW2{b5@Xs1=CaZ#Yu2r;U{N+iY^SyT<9;pCX&iHZXMaORiNe+Gx;5I<>ZgGC;2gup?tg@;Iw|`j*iDDP8vvN}~ElU3h}c z6r*c|{7W2@u&qFClj|_WsR?7e6Whib(f^rL2`Zn}Od%tO$bYZvJ{-l-C#csZ=4p$h zjmRFGWpsMAA!#!=M<}bq{B3SFG#f}uJ~xM%5SDqDiDo9e^)S(0qz4PLnVeD>jGZxH^=Y1Fn$@(TbGT$K%o{u~&TT?LvV6>x^NMcQDqtJ(==K?HMLkCK7RWwR z5kjb7%`v&%H95Rb&Y1lZLys48ek0b^PU62UTh@ zbM`2B=XOH`NJbM8q?=t2E)q=Pq2*qgPIPRTMNT0Q&R8gY9e_o3 ze@TsaD7`_(gAQXKb{KnL1p3G2O-{NYjN0O@dI}3-GpvP&Lnjm#gcsBIpOK2C%P-t= zaq`pwtX5wQ%E$3D4&CsGK3vQTG)+^EJrr-4Uf`wJWAtlc$5f_|2p?5 zg+;za9;Fb?@D)m%@(qttfBg03QQ9dwCU-d#t8g>-@!F? zVdPqS`uIZrF;aGY=s?DAGhmb~tMy`sbkB0z_7~AT~u40%cT}p~5 zvFJVWuBf^Rm(q050E4D%raZJAZPqeX_*gW=N_jLV0`BlBlDU}!q_i-qWMZq9Gf^#aK+(6lSGih0RMdJ!K$rpsf{3v{Vg+ zpmXdgmd4BOm^0~t-%da4?TK+1@=k8k*TgnVUz-V@tmAy^o-EAf4qx(Qy$8gweK9jM zOz>!B;gfgpGGT!%iNKP@!N0}OK2&SwSS57&YEFI`VbqMw=)t%@kb`SR=K5gGXA_AE z{3uuZ!c=okr?do8ZaO0G81H;~t7`rsY0(eTNHp&cTs0p=)%=)LbGa~qJOF@8Fndup zeJ?{5L3qp^h9nIN4#N)U!QR9&8_8<6)xohZvIuf>NwFQU6bhOon8kx82cBZZJ0a*H zU+q_eiYxnuxr?Fy_g{-eh)N&LK6ndR1TE~wB8Xx2%%E?UgU#0K>(h&{@HOp4z|iqk z<3-RmyNDYPTnje@o=3C)^cLaDs21k0JodK5k(^aa7NA57@<~Q?!(HIH&^UDi-T#Csx^6?AO#>RO;^96 z&Dk?yb9Rpb>^xlxZJALt2@Ti=?-|R?E<1bR{%P*$@x(N-r*PCu3vmOBMg<1+8hOiI zMCODbYYdW;!)q-$A$7w0C6zqn0tL>M|6YS?Gbrl|&J#Uem%L=Je!DqbZjS*-Gu6?F z03?DX4wwB;ocLnvW9QZHo(Yw8wVTM80?@D*(PU1lSEN$sUS_u;c(4~JMJn0J1iOnI zGc-ETCYTK-+6A^wS}Fv#bpe~XPr@>|X!c+&npq-20-h9D2Hj{nO}Z|crTxfVm(1dR zWJ#R*AURD8wB2a}icC699(1RPWhu1n$z7Msx=}JSrwJ|z=6qwv$dlzLW_3OCr0bC< zUIE{IwMbPC?gZh%79PA7=MeEentk^z&=y_Y#9B{Ij3o|3hrgL)Ua26S>n&mmAC53VN@o!Swh!k8X}sn*rh#X^}^XJ z-#XgsGWIC4Yd%sBSlKw+k9aapvd7NKldE${U@aj#C$4la@O1x{zVmD&d#7(&rIl(C zO*&H|8mm-Ep_SrOk+@!0$RDj_ao2eRbIo<$!1Q;WH;@*t^9C~6b>2YOy3QNe%dYbV z0R-2113S=l-oVgtoi||P*Leewyv`fI)wSOcid{8N{}$m!G9xO7d>CapI+Aw?Cf?2~`R~SQwnUrK^;U$MOt%qc^V_$%smNZ6>Q8$@h#lj{T?vM`K z%f`1^#R{a&B+q4KUwwmAkr%s7$h^L@nk}+?nF8{2n{e4ztdRu2N>fe?^jkTO`^w(Sgxfq3k3L3$W5bDpmJz2Crq&wyr^E(!Qj?qj$N{n7dYxkCrjxl zCBT`#&o@e5wUXx=CG6rUR|8Qjlxe;^7;Dt|OwZ^SGjaZVh$b)MVm z^M7}freD(S6}$bUZlAN;7xnJjEg^qV?z@w-t@yqF&itaT@3^adLD$xu%CcXSh%?XV zT2x=ufu?unSM-Z3DvDh%b5+8lH#G7;`e$nP^SZ^x`?{{b@M|jioNihD*L3|^EBZ_* zx~l7sTG6L<3*CNI*PpPWS3=RtbJ@B;q8IC;%erOlUeNUo>))kN z^t`UWYRz2KEu(l&*N<7z1>IsJdsf$fYac$N+pF+;4&qWqN({mz*Wte*|1I+08kUvK z89Qw^nn}2V>Tm8pPU9`AmpN+TfWWb=@-yRB*{X`au!c-Mzc7_e&vaXM5L3R`UV@18 zUI)2?OBWvwmp)R7<*9mtv}@HboYxwi*DcF-PS?*^(HBVbr73-ww}T_kCtCZKIZWW=HOh*~mJ^s8U`_b=^#|KOXsTYng` z#v$+DT%Sz~nbZ04WDLV8nd_vsF^eoRK)wDUOuc;UbbxK#B#Ye9CX*s0Z-UyPuz5`DqWII zVlP?!M=L5QtaQA@9GwP=_ClRU3p(sU@+#!er8*fY7PNDyBPML=$$C@~x`Tg1Tao&a zmC-nxoEV{w?OJ7otI+XrpUSy3y1N=WIpl@n^tcPzO?BF{zIe%sCT3a}tumL4j25dh z-i=#aho^N?;i_@iRXXCo;Lc;rHhii-ea;g6U-a@iyoN1V)5TBZ(dIDPiU}={J%2ko_t|S1v8{U( zN7lruf>%?Ww2`GBG_Wd2N(HpADnjT5RcF)(f~fu&OE>p^!oZoTv)nIn5FRa_oBuw= zh8GYWUc#lSBy!x{ohB6K%&5(l20-aCOVUY?S3~NM4$}aLu&$vicA)NFiAAY^&h9l2 zp|f|+HZ%e?|iho{GAIqxMRSwP>_L53!S=!woh zN`*q0Gu7~W`AVoW$PzlRioGpIc?j@<3WFp?6LX)&<~7TT#|gT$%ehU|Fi^%pKfyz& z$Xpv0xH!WRCIP-Iqa^1=wl5Iw460w4IbHlXltl5uqfAi6qL5+GbmzRf%%=^+VqHua zxilkKAo29{j*riYj6!>=PyNbfRvqNWx#`n|2$m}3@D=E8k|&);>KW(%g!#5!zM%7e zU@PP|Y;yzyr(CLImq4v*zyW8ya*v)|nvv$V$4+17f?L)a@!_hMdqgy{iI?@A<^V}W zAH<`A_OM(LgBTqLch1(@3VEBq0KdSM_0J`f^Y^K`L_lXep8C#l7B>Q6 zUctpxFOZ~mQRzl4n3=Y8E`X?OGWghKI5PGMCQ`OMUc`Wsy?7#euQ3V`;Q+b$Eg$ltR7Ff69^}L>X2GaLoBN|p^)d>sn zPOZb8oG?yK=R0$bDOEK2Dg+flRW&`_ha+3OcjTB|zw{5rS2x?e$;LhwgY@ zHd5}81~v0K%8qa8cemVUh6Cg!o{kaP`s4ndEGze|=l5fOknxX$v+VbS5FLtj=D|M6 zOUeuu`{W5i!rn)1$j>7DvWK>kJ#?C1Ix5J?csMD? zcnnIK=3;2()N?wh4N;8A$o5Q|<+T%}Bxa6M5pYf8pz}C=k=?~!F4DXap2VAj_n~v0 z#sS%bm$^3aEfsV?^G{GTeAB1vDG*_C}Dt7iK@P!E1fsQHyVHrEh}snZSAunp%e8+SW5Lap-rUQ>cu!PQLlj(_4cZt`^08e zy^}sk;C)#?&i|v$tT@*Zt#)~p(R0W5f$ixRCufUSa<|ziuOzFRNMcl5Yhm&)wo3$d z6G`}+g!UIeMkHsoqNAov9+wsuFaXPfLGL+Bc4hV)Gvvq~VD_99T?+8nI6y5js(AU% z9MgibG-6t)&@>Xd!f+(UKysL36EB}s!bUd;J)zr+(}H*U(>YyT{W+#2tDgJYx)gsD zD7msWA$8g5SxoL|5zcm;qv&C50Ip;uE<<;YLALm@ zJf3q|$(Y&P7Sqfe*ov&wGg(QzZcegNM;|H?9G8w1Yso4>B-xu}B`NQQ0)bZSEf?(W zm=P!bAPW6*OPb!XDt{mJle?g^a+h>gYL_PF0*}>h0*}?M^!};##Z)^y@J4Glx@b~M z3*&wgEnt+S7NXT9wXo>qvd}LvACp@8)u&loH`1Hb zvKKKj3N3SnaS~b9AkaZ%>8>&BK&`^jxgb0;FWg+5b`gmZrg(*&6gh;Bi%upq;q;=js|r{<=sfhewHj^Q1v|V zpHvC7sLncM2Vx2APb!nAjGBm&^rHbF4vLQLHYl{g~lf?h`2ykUe+G@5DFiVzxK!A%?riE3;Q0WZ= z4>#t>pXY#&2}j`Zy1)an5uo7#H{LXjFhZ{YAo{rfHi4WBP0>ta3=tC~xM*w(x&?d- zfy_&)?#kSR@iuDemoReKPYsaM(E3u#V%^O=^%PGvR+G;S>eX2rzl8H>uiYals2!VM$5 zHz1#3szU6Msfvr6s<=tAnasE{RZ(`_Rjtd6!Jvs0hDyy;3lS~CHv-e(N?B+G|Z1r{u2Zf^_I+3W(8F!aWqpc znH6(r06&ID1T)prdVZ2vl#fO;)soB-NEnIMwaX<;OQW}!ym=PO6_-Z<4K5!5te4Cf zB{vHs&SO@Vj6cc~qatH$OJWL`?O0ukAbk1|fjvB2S7?gL@NmkJbb;zc9*1QIPFYKI z(*fZnbS=2SX`x|oLMCTwWN_jd3{H$!znTW8I1v<^!O3P|SA)|xS6d8Doh{lDKCqxI zK@>DsLk*>;Adr#^BpHLHsK$^9fR*9tjSNB)ViRGb)|~L#vZg`MMHCDw1r)>VOkLTT z4pyw_83_N9;%cxr`D(4ouCy1b*J&T8NSHP(&8}o)TZ^mP0s)gH$yW8Suj;^86_1=& zl{HqR6kf<=0b7!fkOEs%jc<`3wwk_{;`x5?S{jOIE$`KzEP1?5`34(H+k>NT+2w{;8#N`kSATFhZkT0z+ z_CFR9I)Ei;ul3a|L0f^B;WS_uc&8`$v}nK#OiRhz1VH&7t zZzQC1+fT=BKVH)W2&kq82slzV!5}Q~h1%M)Byq^CJvj=w%FOoq-+}MmEUkW!iV@Su1A#xneC#E-(j3Ks}7IR@@ zdfH6O@5GH~#EnVB9+@7#=D_r9XOcE7%W;IeUfh_Ab7OAqPKsUN#*_ta%w3ZkZ|RuX zQNFB>LASsBj+y_0v+kT5htX~^!7vc1pIjzQFkd=1?wfh7VS=&!&(4h@nrIQ-G1fFO zN5W3}<7pfcCxrGCovP;1+bUwxAhH0XVnQK=wre_<*ccGZc1`Dvcn^+jk!bpQBaA|{ z;NHO={IGxyz(e(yTPWg#MtH}$Pi5a{+?+rUZD7yg9%%QxDwC*O58Q4-90TdZiv|q_ z3jHB>Fs|^-L}6k>HJ&&YsE%cd&6u%!vH!7k}7%DyBlvKVYFY`^9gzwFzzBvDUEK?K&JqN!*tNn`0*Bh;vH@ zKxME1m-*_D@O=x3k+adv{CH0i9L;H9DJIn%G?}MVr#L=?l5b=HQV64Iu|1uV3tJ{t(|O#wAtO2!zoWJ}`X^o&s(i3Sv;p zi!Ef;Q3l$-c|k2gcSk7V7Pkbo012r1f^aU&D3x3acSUrh^gCJP(tT@%tvFF|MTY}R zgtttE=ycnyZ_|k&1OfQ-S+|d=i!<%%tZLl`c)yqcay`%RHR;lyV zYjyPH$&OyGJBr*JkZ7`_k)#JM(xB-vJkD&{XcWW>-a9zRWX~8Yk$DQhQ}h&M6!aM==D00`Jrgi@~TN~Y`vcQ*!RT+)ROfZnW(bEz15oO}zktruHh*Asc zTD-eQ76_|SkZDvvID^nVbl^&;BlB9U)B|ccM8HLFa~jE8q@ItI@kg5px`;-Sr+Ehx zx<)3M+_VOn+2jR-%SxTVrkJerQY+vXTu|f`@`gZr2UmF0F{FiSL2+gSn)r-G`NPCzc$IobYo6fZ0$7@N4vwCB1G|hIN;m-V|-Id&_ zr)*-Y$QGuzum@J_{sFq^i3?0VQnQ}mmNFx$ooa&_QOU#X!lYMETa%i1${*oEbq{l) z?Nj9H;F|~i*#myL-`Zz}?!*LPAF+_!96w`gDFd9AuK0b02@(^-#Aq!rTy-e0r_rs& zG=!Z8H8u=TtQ7&ox&XjeT7vEgsFrFO6zyvOwpc))r2lUv>f>m;VB}^i+A79%AE@FH zN4udd;a=Hzrbb%@jUv-g+!@bPB{wp}aA=dOqV zQo%tCd>gX%>Cl7yUge&0zfPRqUwxYl33fz4OJ5%YUHD*Qv}$dV1qjjRY?(cZphfu| zqcstooojClkuXotmxr;(!% zcF{QQLGC9V_fR0LvM%QylbHs~TdC-N_V0(a!`>0=m*cBC?`tUbNK>=a**NyW>%5OT zLq&1T%09$`1TA6gVci->Kq!fkzL{p-763|B?hCf+y_2~@UswO&99(0X#6_BnW22$X z(g;(IcileJTIo2A{f*-^S^~&8R09Mm`)O6yxkhE%Y67mu4N3#W&;Z$97qMKPgTy z{wNb07s2KYgH~LHO;+Ld>^n7@zYuW+DM71pH2Z*~%t;n!?%u&t$wo6*a77um=9R?n z7>g`>mf_j*^=WyB2l2hgg*+&VOlb*!qBGb+{b{uQB~(%a02?;M`_ClXb~wT zXL0SvG#H`PC;iW>uJ7ImbMTFD4B9QW~&=U37{EZ4RkmX1IP}8_pdFEkOgzcss|DVdXQ9D z`N5UV6i7S!Xw>2pu!a*qRMGaV83)UjL*~$7F>_eN%}gl0=bLSSk%1+fUIms~U6f04 zdUB>=65vuo0k|BH?Oiv+rmW9z#;Ib(A|3?5kk0i|o#<>uLc%i6A0+;Qi|zMWagkxg zjo>T76O+;{z6v76Hj?Vf&u>y*a#!md`&{Rse?jNao$DO?YMo!jhUh-&32HYDyS28T~>!x>Qgpxo2L%OgGUDg zlnffhkLK1>n2_m0rOQfyGkv=78HNvAFm$;aD68H*;-_?rTl;_EmbI5U5Y<3Qj85 z$E$vikZ@=I86?;MfCkz?=4cu%vlTqbW~7qFgx`emYD#QE^ru_A-g2c<_Mdgz)&Ljd zegprpLp7QN0i;yeF?KDN1_G|kImhnGKfoOWKM4~d6@YTB@Jv*y&*k|a5i#Y}6IkPy zd6QqKDCez*RD)=@c%E(n?mP1bxlyKeCGeEZ#B5SnzqFwXflYfwJGz{7r#^QdNN8qh zH`Rzmi8X4NdA2cM;A zTVTSkho=y^;`f^`C^mtO*MM|M(=j%|-1NbrJvL-BKYNHxP#A<@Qt<~dHesOHgh4Yl zfiF^Qf(23#{orDme*{~e#DK>!spW}6G!VDEb zx-3K~tSMo#M?5xxS3Nd?n^OsjEQ~6~Cg^34P0*@USAUV&)d371o1jG4@Qj&8Y=U-D zTZ46Mf;DKd309lMCa9M}j)~X=nhLQA++9C5!P0QYGY2(C)=-R1NR>5wL;AvJp-!yZ zW95}j#nl9GLjghCIr3)Wwj$_GaJhLnPMh&j#1M1Xgq;QE@(WJB1Mb}&VpZZ5WkWLa zp;1xu^tr=tSq1eDnAgpv-E@>e!`(IZnjvs>`%O{ZYu9r7U7d7rzIFp{?VwF1m5IPo zG%VA9$=E2SIAT(m&yhr_x1NLmD;2GS2Z~C<;|~ioAgTN|9&hl?GF5L}%k})aR_3s6 zKoh?X5^r!dHTEPKgkf28m+FUxpog zS)%UC2#mK}*2S!3LXjGiHh|f=-qQp>&MSt!o3M+q1;>@|5IuJudUl|C`bXG1{l`-D z@)ND{Fb3biL>ykGp+9;{`m}2NK zlvsAizMl#&Lf9|+oC!}fjiie{+=xHlAuG4MTRgly`}6P4_IuOBwySB9T8fup?Cp{P zmj*&epSnm^INLXm;34&}pHzg(OfY1mQ(+^5PwlsjOP2nLamkPxow`FS*Kctjft-+rU* zWEv4eWV**>MiUugIbLL@4YJY}X(^|fVFdq^gXMbnl#-KpUO~*!B)b4_p6g(w^blAG zTbl?_n)6*OTppG@8FD4sv?Hur79x~$9x(5c7AN-Q6OPUkJm7Ir#Y)&8n9KTbMOUB) zg*Z1G2m*p+Q7y|}8vs9+$9v^HfeQ#G@#LKx z?5!u1eI=UE7WO2zu`s23JsSWYDjNV7&jz5xfWBXUD0RpXd8nY#6`=nJRx#+_uw1db zW2KT5@du&oS6a$#6mkG?mm=G9%xsf&mg=9?Da%)?GiDeVO7XdNojgVmB{G(gwE1D3 z*b;V59~8sJMc&RbQn%}_-JXYdP$lMAi{ui#W(6RTYwG1 zRoberoODKDB9saOmCj8Z!MVLCl=y!{PW`%O!i^m^U|di#NMkp zu0x)lvVJ|AGx_x60@=FgUu%@Lj~g)<+h#C07UM}4UH0*B-{c>n)itcfE`Og7=rP~B zY6P0dWTF)@0>o}&*}Le5VnrC(%}!G!RXWjomCi@$Qwp}l(*kiO7;&gmJgK-8(uHREas4Z&G0ltVSg=ZisSwIzxMCzT~bwWo9TwSq(B!Wh3SUbd0Kg>?@=hM?mU#6&X~FcP)PKl z*cGLQZllT_Hig$_L6QuaUe(>Tbt=s(CKV=zn8&V}l(@kn0mvu{(ur&UnMhAN0vX#I z!Tv7Wd&M$8;S8QTa@3OEI#vfXN(&vW=81QN)(nM8T)n zy%dCHFnK0Of8Go}NmS(677jTkJkSZ5M92Z|wj0}L0zhE5jwR~AMWoDA!5Y@l>{Mxg zMTb@91Na2O-V-eY9H#1ct$-_CCkxzZYz|;gT~NSz)fI4VY6ZL_po$8(UUmgsZAGs} zCqR^viULuc21F@~s5MwC;MSl)l+|VmxO#~gI;nuuR8YWuN3H0?At z2UtT7u@C~lR9OQ^^@RhezIIm_P;$zEjhm!Si&&hErH=tark)FE6zpL}c9v)ai8syb zHp&!|XY!fQTufZtTVndT>02eHhkY*X;{Sb%is=|_onUIcLiSeU0sx_}Gwb5?@EnDKE`tg0t|c{8gHv24mdAn{IY#boqGl()780OV$RZ=kBVmc(fU7Ba(21dXbA zpq)lhoPe0G(ddXZ;vF^^Bd{V-(E0<_dYufe_BG)7DzDltNcJa56&iyL551kd~SEk)*H5H!LmhHNO9WUqTIZZgX6NSyoy@!Hi%&a z0!y>U?TN^MZ? zbJwj*#UjlQD|;y<7+8Xzw!ZIOnQcB`xCr;SRoGxGc46dc+>`diM(IajhFl&-1z3`Q z<5|7->GKkEpV93VzVL12ZIGwVYG!-fAL0=@!h>9R|HI`{RFpoXI-R!av!olbVLUXU z1Z&aQ0f1Uth}@^BiY>qFVAs}lHdb4oEfEJ`dyoaRF3Hg#6^Khxfs6%GusmLIHE1Yc zS&JZeRgGmiKDE1ih=b;9%`}>F#qGJT_pn)6| zYXtK+fFdMC<1Q#f+%*-VI<BYq{-i16f~8kt*7F;PM{V#$ivP>WdX z6}NkJs?r4@Hsp6lW0n(Is8yfTlSH&GD#3vErE}zjZY50Xx>T)DbV0Yg^*mPvGuVlp z7eD~tWlFR(;j66Ta`7X%K*PXe-m8T{_ z+{pPxDv5dJYw(?d_bd6 zs&Cf!KVvL-_1;z5Z0!We}CONw6-U@hq|hu8r@&JrDt zpkO_ESYa@_(;-9a>cmrW9&>%VW%1S>MsC0a#Xh5E6hCeril{4QnrRS05#@cGX1;#1 zWn+<^ICa*O(OZYDU)I|=Deb$Z$q$v~Kt*$)6?))Y(gWwzxpj#&%B9QqNi3k58=lAJ z3|SzdWe1R9E={#EF8hjKIxLEixUI}b`*Zy?8{nPNtnQHcZY8nDCTYQgI zJ_;?CwE5dVwMjgHtk(Vt#KYL9HFu_JeP{SKZ+=T%In2%EYjoPv)z5q$A3Zq;n8lGS zNKAwn91$e)fto+w!cDs4cJVuHr*Sb`ISr8RKynh)q(7Q53P9@ojCe1e;R)}K@m2OU^ogTm%0@s49FG0s-y4-$9lAEDsYYl5A33!7wQ+IC7q%+4w z)PhD%@iuE_o!d@8lXUU)s_MF)HFGUkGrPt2$qKL~>q=xcRR(4*+&h@VLbzZYwvYCY zR(LI+{U!PAZ9UBR2pI;*gCzlq?hwr@29#ztleD6yG#soA*9z6RFd3?Wt{W>Ckrc>p ztGLA&7EO!-hFnTuNK^HYI6xCM8pC+d;L%+%X0Xj2i#Yc%RH?HF^74n|GKr(-I-yf& z7Ks>@TwCOhSSxygN819fq=QRNY!&}^PKjs|04c4OSgHf$fnRcF=*4eNx3b}nMf4n$w94U zK-;1-5&L$lgcR=VOk_5K7Tr9C1zgu;9C2sjf`)5av<1f7VJ2wN_zZ&<&0Wx-e~O}lTR$DW|tpO?FD9bBDFZZ(Nc4n)S@lhr)$v|RHQ|tOl#M7 z(4w)+HMD4pJ_ruR`ReJAWimwQEjU5V%eN6O%W4XBU~8}1ZS~s{6|QQL$&hbu;tQN| zC_nL#vR5%wN--dQ8ZW4V%q2Cr=s?d=8%-V;A!7pZ4&m^$MFYYbmnb5fe~$F=5;J~yq| z6uhXRo9iJecvv%oi&*3l`INH+76slbryx9X^N7nKExUz1}UJU?`2zYJOQxkPFTjy zA(Dula)1QK@rEv*N`{20D}$N|8yTd$b(WO53ol8Q4=n9T}rn65meI!mc8?O5yazi&lbdEyc%b~J0+#$JgGV<<&c>H zX&JIW1BZwB@XbXUz*}_Amj|a|H)$z2&FGZWH)WCNOXQ;$Og~S5C$jVDcoM9|t<{1v zF=xkF2|~EuGwSB_KdCWbb(cvOa!ZY2x=~|PXle{MQH{Z1M=8){YD{0JIYX4Y#gCc` z?VhN9zIR|TJJMrVQ035Vv98rI&V6Ygw<>PBH3qB3FxhNxOx_Y}1$d5!8=6_JD_sVT zW+yWDVFbP;So4U9W3LT|J2M+YpCSZWoc27ZGc+KggjGb&$J%1woxBUI=nIbZISpI& zqR?7yd#7!C^48I4WB^mCX*2}A7>WQp+!TOraEuxQ>x;jbxRxAqEK=>7+tv4`5hC^B z_h^X!(KRQhs$w3izxOMfS@muFz@z%Lez2kRgctv73k{=1Twl+KxJ3OiRz?wV1_Kt%1_GwXX222y3kEFoa+@Q!BoP)_nE~rMpPB({@>A7A zYiFvi3|KS>G<}a%E*(fM%JlSOe`^z*G#$uZ2?nhAtr@WNKn5%d84cg+w+L*iB^a<2 zqRd2LpF5hF^~tKyXJ}&Z^U#l};@{xgjFovufSzCc_^)T{S$1cZF=)E>%lxJundUmx z)M*isiTc{HzRnKyRiFRN@BPBG>grHe4_s>{Lyz-#F&K#4uBM<6_1rK88FAg!6eJR^ z#h)+*xl$oh5U>h&_Znr;$bia8MF-@+LpOMwnIEMZ8l6n zNaoFWYVE285}@(02rXY2}P)DR+?MG9Pg0TVPvnizz5RR7O@zLH|~ptKV)sQ;fg@4%%GU_3R_z-b_KghAGGl zbry!CJ2wTE*JqbX~~D#;3X)fr>-heOOC z28f+d@nef|$jf(3-#CT+0=JnoB{Ql>OJmDia+bgyDT#VY3@O`eJjdb57lb_riPH$a zPUbrWJCJTkDr6>=Tlq%qrOPd-zeuFJRUwh$9Ps2wB7Ogy_Ih~Q-+KQ6+u5}L04?43 zA8<24A~BALL=GfeYyZIj+F1SW)2uH?dn>R>AJh_{C1j>(L;K_+zJx5X?}>|Vo7Ez| zXg3_Sru_%DAQA<4X_nL<0?c!5|dyMTTGMn#7l#H_JtQu}=&ndNK)j zRJY>`H(T+=_tBxaGy*}f+8e$oRWKlvOsCj$YJ4$o><$m{W(r^aRDqxexOda3szRBb zZ{UmNR1O~102lI}dLXFzQ7vqb&NT4_r{y-&X`LZ`0$vWXx=`I-yoHgrH;zVwBd~yCU-;LhZgaumtp4# zD47j%oyACimj(DDxF%w_HO`nmpz3Xg0AEFa2{HJq0}G!7k8aUsk`UZ$0@%(;Et70F zkx}5QGO?u#!T~8Q}vEf?sn_6j$0owVPH9Lci6WL&hJ;}imBV~lH zDR;Fw15Zx@E{K(;btCWgT>UPTS;)lPLbRi3M5`8MafDRXR9DDerdqgD!eM*MkUJ~G zTM8vC%6CASb;YXmysmqQkKwA%pW+%V!cV9S*Xe~8*OF(t@(y8LMfLLE+vJuQ8Y_At zT+eZ(1XJ3bIMlh5SYL>j6n~b3c%k=L-vWcPem!BnfkIX;Br=J>;21*|JFDhg@Xxjg z{%8XQlgV4YvxgySe?Xd3Z(7zLL%D5p&f5nh?K4IwWB5#}ZBbpaJ`)-fC|FTlw35ii zXe!JvWF@}CDkw%o^LxwZQEeC$Tz4LKn?=o2+KGQNv)F1vt|)V1F+_#Vg%49Pq>L#H zzxMKr>1$5Y1^hJ+QhW=*4SG+-0o(+CH!w|E1h)rKGXu1tX0~0;Y}fN-Aoh^Xi?=%h z0|J>Z#AiyZvAd{=dr(M7juGD8ukZJfL&?Q615|UzW3thHj>5DXa{`b1$U%+^rsqs! zhKaJ0GFqTl$Xvz6%vJp|L)%lKnX9CAoUZ;PZkMFk?NykJ?~twLIZzmd>xx>yn$-}G zZlvCKNnt`&*-~w*_;L8F<{gIz(wbZA-$N_bhIxBi2}^mSUrS{-((IqwaN4z!)$D@s zS6M9hWA-XHL}9DLmL>MO&XUPuE77_wIZE7}mrH$Na$n<%J3LNj>lb?8!V&pW>*3z| zR`Fx}?jZEB$z{175|L*|asmZVf;A_KOmoUtS<^(XsnFbY-n8wTSyt1fe`1}L8-Y5g zoAm~oxM8s!f`XEy?KuWL&*G0uF#Sxf=!`=C4&F~vA0{_r3{TjR>xHIlho|d~OVw4m z%wG{?l2Hkn-m1e=Uno{GWz{dtg(?~^(|+`77=b^JS|DyBBB`Se9~50W*GeiA90OU$ zs`c6NSK$i;OHwX`{zTi!y-U4(pQK*B(AL;nY{0QevN^+8l&B5`sz~jN*_;pe5bUQ~ z)ob|4s&{%b)zg26A5ViBb_#X%nsDSUo_#StU0ryVA79{)J$tOxdfcs9Ic?_xEb$s6 zkSq^QA@B<6vJnms(N)NrxHQnhvt<)hxEa<`iUOxBv_vaHy%Az0M@seYJ>P1z)iMs( z>$IGNQ($0Q+x?O39V$x+S7z6?Kt9HPguOkC z+&YZ$Ow+I43Qc;;ls6~FVobl^=dL(2o?-5kZKG_VDiZ!wPO+=$XWPl2rf{MDh_ker z$Pu{cTQ6G@&Sh!(toBK=(!ywJkV_@2p7=S*Cfs>&zfKaOBe%BA=XPxKw_0hSZFfrL z$NeAEQ=FM^W1oa(wW>e(SwL&C_!-hdYi6H%F8my{7>{MJ)(9cjM43sYKF)d?sC$us@a4EPh3V!iaVM$MLF4phB1cURi2xd7}_ESQ;c zF{V&6kr0>`<(Hh&D)37*af)UYOEIM=04!i&0=Eaov!X^*u!bJ1mlaQm{8Sn1`cwbH zjBu;vEY7#_z*m_aZ>8yG0TrYfOc{Tz_Ri4^a(HHbs+G4pQ^17G zaq8X-cSiPP=U}4%L9$g#Gsvz6-RF{*!+l5mBiwg|q2a#hVR`^eeF>OoobNLD!HflN z>@i?&Rh^V!MUCUW_E8evIm;-yXh;fsWg3=^go}KoNDG^^mL6(T3>R$2q9M5T{DY`u zhU97#4*A|C2!3SaoQc)?ha#gCykYd_y$eitIWS~-qum;WmF%#Rnj9#3Td^)05aYnZ zR@hH17#(|f#KdVGnMyi8n$?167F;qE4=!=R*#PxAi?kk19%ve0fDwwT@ z<<#jhN7onSEd8BfwPWaueW@i9p3hqaqge+W!Hi*d17;GuObK2vt1C`jr_%!`(`Apo zPK~<2%PbQwc@Fj~1_26D7#li+zzWzP6DJ6lAdf)=k(ffv zI1>%y$%sO6Wa1DzV}hC3cs}3n+WXvd-;Y*Hwh1wGSG|4Cx##R3Yp-8>t+m(2xrAw2 z^CG&N^x>w=i^8d>j?m7AhCRxiGz=I*aLdw@CkKJ7(-67>EuxHfddN?T#VMRIh#5BM zGS~=6h0Kk&I5&8FYaX8OD(3ooiBhMQ)IiC1H}t42i`-e5MKaJLVO*PV&vVV%Mh1* z9jIL!JOpQ{Q^+~(kJrRSI3$HneMkzVdi#XDn@2ey1-~kih7`>Dkz|I_{Ma#HphcCw^tB#Tm@aBuwMmQ`qXref+l94Cf*6M{}4n2~a$beW7Haw%Oy z@%{m5F*F&kK*nrCgJB?8uat~YC}#rRQW%1hk{)yyN_x7sfKS&J@aZ}Uc;rq8B+LSS zo{W*~ieN_n;*8NCV}u%mgfE(mNx7MHF8~oTp5xjw_gmgU%P{0NE#qt4Q_#~ZQN4@B z@%OWu7T{z!m0N}v+oV`a zzg^lc#fC^*NwFmzVFE6NeoG2E(Nz9l?Wy0gcABBT(V3-z(4T@ZqCo$2ZS+sqM*nmT z`b&x-v>Ce4-%@N>{dR`_9;NVqUW5ULz3m1hzF+YML@ub^B? z==GEfw}M0lQQ0MfruF<&(Our0HST+QI6a^iv&{r;8eIbQh8Fcs) z;V|18u68u6_hmgRupqLuUcs&mB5zKM*{XnhLLv0{gmgXard94cE^dRhhZ&$z5#Wlb z2(pifqinX+|0A~OO3lFx;8jC1nxcjuEl(-1m?{;X=9UO`lTjbUPr zfsqgNX=jS|ASJ>Shy6yA3cCx#T>Pfb^hKjwxO(Ncruy5K>5;co9$p`?@?n&)Ohu3e z%ha+taeG!NftI0V3o#o`F_>xDArybPzZ<7mQIj2n!%N{57;_8|#2u4Dc?_!!#YRm1kx4%mu~?_OM6sZxHm(bBTFYFh zRjOt_lut-4*Mt!nuHRax8XFyULIbx%J7=SvGeJ40ro$AwCF=`33LHa_C$xi*C8@Ov zY9zG~SE2U1;XA}V3bYr#gQ4J}G-;V;621#{p$Bp57lpdd^jix=IRF_^%ZMYd7t2F5 zI{a!Wmx(Tu&Bicrvl}g*4Fkn3`cLLT6 zuT*4#-nmjK5%w$+X6^*}S0o=`48e+IinPriS=+2s7FsJ6jK~seR_9ntiJzrwRJA?~ zz)Aq|E_h4C3h-;lfsot@SQ_rc(mpdq=0SqjUa8DH3IHP3f&)Izc#RC^`Dlvxl{tq+ zO0`ZS+^|CiH9@Q=bcEjasrcRn%eRs;ykxU?pjbn8h3- zl~Y33bY(-fUX=cUjSPshk_<(WivYrG_`a~Jd+Y49=`h2EEnmQa}7eV{G3|Oqm ze$LU<1$%Ru6FKfWfY;7DriFj^#RU2iHT<+Y-nW@v-aO3z6o<$Am?|#bipt|x;2#5-1nTW!(8G59Ey^G=ghv{lVyPAcQTBjh!MIV!x*Lr#LXfL z*4@NSv0dD-#i5q+Yp>Jk!Q%Kyf+@gBAM*`bB!*iK)8lj*n zoGBYGR94H|yJ^s*9#Tu{b@)wTJN3Tv;Wtg!_M4__c*r83_#OLA;~GpGf6mb!5$7X% zZ)BP_RLd+--kXec5!r!{^XZ=fUnlhzg-<}J(cNqoI^1!T0+B`rD76`!{Q6_Pd|wJZQFCn{i7WXk&J%4`L6lF~3CTZ|rF8IT&jWWeUHZHj(=$ksG{0%0Y9F%PHtd-|7X$R*9;c zHy{KaG(kW1pz)wpCuGlqS*2;sg+~lJSG{*oFBtX3F6Dpt6&c~bpi2@;eqQCz{i+^) zR+m_$KBMxd{OI}g=sA_&=SR=#l2neLRQbbx^h|p6iP@v4b$Qe&^MD>CrFVpu7B|-EKd* za|rx{AzPE@6ErA&E@iNfm?@xK*(=sN*xMw^%A|o1?an=x0TugM1u5kVmtcUie-Ss0u1$%o(L;5cu>|BIUXSmmRi(o0X(a7fJeTe&@Kvrrx18{R-ZqZffi9L{aIBbgG=!glTvVOa?7P4Owr#|xgeT7 zY5uJV!j$}u_L<6~<&Gds>3RvwG^wsRB=h;%lj4hmxc!4rl7O^-p2`%MiRVMX|*a@Vr3APxg?VlgV} zUsL@;h4Gy_=}2GAd=yk(Kb2k>|Ht;Pv9#fBVj5=-iUt|X6{NETI!rkkV3WxNb+t{V z!V8le6r~&#WpYrk{__`dQ1s-WfCI=ufl3@}BCCO{kmR7~v=8eOu2D@mDBQ%X;c7?2 z4KDqsUeSMNPau^YP3Q!aWC3MW3Y2)ROcZ)7P&Xdo%5mxBQF&uWNudPp_+NFUWWI*b z*rMAppCJpNGYnMUp3f2ysok`KiYKkLD^~Pv%A_k7%VYq7y9({5sF%Kj*JR;9^&XyH z8vp&~Bc08soBxbWg$)(7YEDDvw##PduY<|Pjov6iWd=~TFT!Zj9 z@(rBse5Vc_BpbSJJMWlcx4HEmkf^U1UZ*T=y5Bty-YI_p%Z%vDGR_<=ETLE;(D{Ks~y9$jG_;(OB;Mq8$Dd84Q zN95IU+32M4xoKhjjh)vpX&k;DVOM1YR+aU0V6%dwN*!o=hF4zo`r=k$sZ=Cc8g%&@ zu5R;{l1825$uaf>P>_3NlZ79ZD^I zA@5)Ors9?F?0-)op?Ik@`i-Ae^DN3cYnx6EdEaLErE)fgdXh4^7=;*gDEa#S@wQcNZ)FBP0_&+~_i z$v5i$p<;5iN(VkunU>*cNfM+UmEFxxPZ96-(=rGvdk^ZMtSDvu2(1I?*mVsXV2C8Z zBWpBTD)oM{tNM?Y&vv7|XS&NA{lpJpA?(taA)KjAWz~#TTBt`Hz~&k~)guOjwU%&e z4`YU5_OU1;vfWSJ9GN=!VPm{sc(%cjS8zs)Rm0I;a~GfKa(E;!e4;zKR^`*($y6l= zXCKC_1RV!h%KGD)CKz7sO@g$5!wl9x_%VP}ag%{#@WM<5Uf2TVdy8o6fg;+vSVUVF zipgR9{>5%E{4W3|I3yE}_b=n1TtW<3zNsV8B-Sx*H>cmg%Us}hMHgBG_hiabfDMWS zgeP?Y3gLLZV7e$#nq2MunXK|fN7xDv6IZlbcwxL%G7osjH$q(B-U@F+GTa`# zQvIp*;(c=1AMeOQ7;`yU3&}QFPURpyAC1Ur&8rhMgfFQ#>Gz~BOh((kS9;2x*#BGU z;uIX&{=)VK>Ib7kZb&QTh4Htl#S`#sR6IGOvz2nkr+mp+n!Z>4$50{h|At)tZ{X%l3InLe_rfdG>Wx@R>4Pkp+{qEIuDtMIs;lU= zdcjGUp!mJjRrgG;OWj@$NN8U|uf7PqFN}YcY1&}d(%vJy-y>WeDfT{qL&tXMvij;y zp1^CC`WoL3(gdV{j0v)3G8_$3|N8e#Uat2^n6>@A)b0L@>2Na@fd-zw>f-~!V4mWB_1+4?oxU1bcvkiXh{6fO}@2w8pLpr?x zY5I}K^9(c14(nzSm}=+b2ou=V6Kzv@)18y5gawIWr-S;Kh~oPK>3R62&YM>_TK&VP ztM^Pcs;gYSO2-H#Dn-J8a4C2WIJXuoXxkJL< zZ{edGW&}67O8we{B65#folgi=Ws2Pw6S{vMoAQU%K1iC~Ee4n|C_OnS_gf1A*#acpzp_ZOYhVAVJ5{PiK=7BY}APfr?GPpZtpYjm$7&%rV7ww^|%Afw|#` z%xxkIBU}bI^S#7DYUH_xcJ{*srPU_s()9YDsn^Rd724VrDxSD|uP;yS!brfX9yZi1 z9VK@+GetGQ(kxTpPy~Ivqs={#M}6Vl^nX%+=3U7=okaZeViOkeP~4iT?P>2Uf7w^7 z^`G?y7BENQ{Zq0wJlOS#KA}&%f;J@E>32LOPtD>I9&Zma8-0e1)ExGN<89SkvXF#+Rm3-I3^B3ig~Q0%ml zkiCaVNpu{IpncbgkhkDS*LVIWefv&-Yk_{D8!c&FNM})p>h5F(9_QpRc*6xl&hkhq zBfZEFHZ5K?v6)AD87ozES@%R*B`RTrIdy*;7}UsWCW@WmTgJ|+KJ z)eywZq_(~lRc)iXPH)`OywT5ut~bu|2IlZH6ff6$jLdS{5<^D&*B2)!h*8|6AhGe= z-(;mGSn3mVN`@fBHoT+7rjSg>y3m;Xi`c0AfQ41h{>A(Nx#sf$n>Ub1iehZ;p$~;$ z#=TJRg|R&jPLcM!Ds0!@EJ(&XsQH>)zA~6v=as1uAf)vphPC{ZJuI`QhZ+MGL0$JC zCS{@|igWhHk=@?d$ZvQ9T9TO16BBb2%*v|rSyy*}+vvjpJ!=UqYKR80jxxbkRM_!N z)YN+Yx?FKa%ydk>IN!^87FB6Ojfb5Nv3FB}*hDSedryOb+fYp>f7FkO`5bOBpM-p? zvi{&fGu9FJD2vdl&eT$F^8+#(twvPq4Cb0L*1uZm05;?$g@Sr1Y%|lv7)`^S)fl+H zak5{9RAh=1=nWK`0EXh&twAoLwPkWfg;+G?eB`wOp2U)_#-tZ#^v0xv3I(T%-I}A%% z8^+?ew2J3&O3vT3lXHJ?T~ZEYJRH!qK7dT9$K5{IP23IV=1mYeDE-Jgfs-Pg=X9k@ zzCePxm68pvvU{hSR@H6HEzCq&e-SH~7o^xN8v88kUu{04Csnh6wkJ?Qh$2BP=UJ}m zjmGgeGf3n&W^3-FGG@G50L$xhY!S_CSghZVU4XTD^^MNgTvk`VUU?RL(ANd^hDqQo znDVp$$IiV6xz=VpJc3whUSB+u-g!=CWEXliJ;L|r&++-`BhJyYx6mtp?y;08yO4|# z7YkW19&WOb^7>I)xp?wwo|ll|)3ZgP$xLzW-7 z)1v>rs+;C7n(rhY6gh;&gqq)F+UhXnvKcfO!A+&SLs*Z&`1DvBX4zPlw%I#mS+X_g z-~I9yT7<^OfNc#zP2l#~nKj7Taaljpdh$gZb#}2B-Md^Jp?BX<9Z3V4!=29EHtuRp@nlwT1&K8xL5cB{K@P-^NDDzQ?N1*@!%-hkPTa>CJYDi7iPRS6!G&B=KDkV=lIV|O-vseh8wj_AWPx}$tL zl}}M>q7d}Y{`8hW_EZ3oN18+Bm14F?B=W$|ZAoyg_i;~PsQg8na!HW$dd`uePDb#6 zN=9G`Vgwg-&j{W@!2s@~p#S$$&;eP*C@%3%rYJNgmRL=zUGO+dPlysP6;@nM0DW1MHv3VQvjM~IU z0lSF=QpwE9HeE*3dcv4^6H>|Vh;Q8MGXlRRj7wU+aYc-aX?rP*>tS*G#JT$Sa&689 z5zle1_w!a_UEoJnbj(Al%)9)8L7jicQQDfAE_cdsKk1YxOexp2UeQD~(t9piO zQJGEMi`obSDC~AtCD@Uh4xO+-qpoB>3tibgT1+GiZfh2Qr&RS$nwJmGW@~4ZU3?FC}*>@DtI90$L&RiT> zJ_3zfv>>IxS2~_M98bp;3M>*XWsqjg!ADxyU^&L_$TCewpuNDSQ>}64KLs4|k@u+6 z46)vS+m%mJixp|YVL;xX&ctx*HuGn3{uv)SeYASz4|NYO!%!u$ywIF~=CmBPOR%)& z<;Z|G;H5B7NZ0JdB~vLTGLX?u`vnCmxU=SWKr)>v&Nmb_DTjXA!5b$(`v6kFJ@vii zUvf}Gya2cpTC2bspdbI133iuxz>?_ALSN;Hc%YdGyut&N=D&nEe}vVya`Op|wO-MQ zj%?gUZYnn)<&hk46e2ZdqP0D9J4s*w&_3FEk{F33v?F~dNyrPm{JGU))Nr4)gQ=su ziB52kxDU73wO-r-jEVcaz^CRuaNoqZh!eNJkk-!EgM0wvpnZs3K}Eb@7H=$G{g!cY)6Fk zFH#9?T)s!yAE!&24MUTd-ZnJ50nIMFTtD{-+|otnF8(16tYh({0ey zr|FaPbw8llCGaL4XPH{8aNYi?pxIB*uy$6B)`*-!h`8p1^j@U9|$x+&tvF&=!Oh@VkxNv6*TJ@pxJtV7-< zaYxOTWPKs2rc@#P*|p&cRS^WlUI96k@}JDhlH2xEP@$9TOFKYG`@Dr8bzanaV?}lMU;ZI2h#Mn zBaM{{YjZN;XVRM6?Qg8JGbNE04xNOH_yrPa&F%Il&I-hoW8muPf=G)XKam!ZE+Q@O z6qhQvAkrGhoT@KGT64Sow>4bx>U_g`KkfEsmt+e_^CEXqKvHU5F?m<&%(e+gZIP?d zD0_sp(2wJ%WIl9H32 z6JDytsJJ+bL<*u^*h@!7CH6#Ew6ax)i!53pF;$vQ3e&b5NQ(U?-3WJ1&G`hQIPh2u zkybg2=3ZpG4+>KaO3%8}ZaJ0mz`kDpA z9f08;z%UD%=d@Ujm7W%>irtkgvx4&ipIX70|5TOI+WC4x3XWV(3n(~ha*|pk#U=1r zuy*6$qs`_+Yd88qXB{;k>fVc0p73MVZjw%e>i(x)Ks+ya=h?%af|tnQc@QgdI1Aq8 z=h`6tOS(4FrZ|V`j(-!K`=ufBpr zFKSgWSwLpx$HV%M98IYAr;aW1=F)}w^YSB><6p70W|QFR2)A1)YU)Up&-eu%;a$jc-n-y_{4>ds~6Ik}ORM zCQDpd5+QF)j%`-d<=ABj8D2=e@s_~ZBaP7(XSQ9#kn3OgML_%-u9>Qjbg2M=?>wJj zgLJTV+DR>&WQcqQm`sgy>L{B)Vym+|xoC@c%dH3?xj70!#WCu9 z=!07{v%wV)?xsL(y^Df}u<+A-b9?-zI0#-j=bqs6RP4E*D3(ErlfxM_kVND4*)Y1Z-r{=v!##x^OO}F9o#h|hEUt;I6kG6! zu5pa<`i10|i0z+3pyq+C#M}ppq&=stJ*b#z=CZ`sbAGhKbjsrqB1saUeYDb{P(Mj zou63L{pg|DqX%`#&QDxpt`pZ-t^n_tA6=L|dIwL42#}jL_I=(P5ALRjU7vSx#Q;#C z(w@(^az%v9?G&-&^DR|}Xa%kHCod!RsD#lz#*9cf4vf%ZcnaJ?mG}J?E>iYBo$lQL zw;i13jzvPeiFb^z6gfj~DJ_+z!YZQlDSDG@sQR;1-KXll-SY#HbGYZl)n#L2vho8c ziU*AY-~01<&^Yj&B!CAEeqiYH$G1~Gj8J)9I@4@x>vB zhIDm$ZSZ%=A?|zA>%dtq*x4QeXo;$p=;|9gH_C1#@>~*oIYGhQCJzaGUjdK`eE)1G z2fl-tOA6sxZld2SvC$R7?K08tIb3^2tgQGZDF&V`>Lg;I8gG|J-Iw{MP~cUo?svuP zbw>LL;E5P`7_ItI>nG%45@`*j;5t%g56hAWC3Bm5u?5kL8wsL z^7vCuTC;&qxQR}u3EJRbMdU8=yFIqXO!i6YAMYHSj_G?(X@~eW!oF|Kl2I|juG4|7 zujB5Uo8VYl;UGI^1|8v8gm!PNc!_gw)wzc-8=jw-9E!E+Znd|@=*avlYlxm;M{a!^ z;nyc74M;RTSd@UPE{<eG+>THERN1ZpXpb|$#dD5ye;d+kDotwB6fF$&%Rev;Q z;@0GTP#((I^-z1<(U_$#zP5MJk*7cp^d~p428ikU1ti}W? z`?xAwyi8>~YDx7+!1V63od+{o)eN;~`|$Bj>~J9RT{txgoXS(3KdcU*)Qtd{CRE5( z>P}B%BftwZy93GgXx7oq8&YF3^mDt+e?(Lw4vFpLIMToo+sGBum1p7KFbmgrzFnjF z4##$SR?cZwj(2VenmNnltlzYhZA^iT8R-R?kjVZot#(CcuXPB;#C8PG6^b`Hs0l$TI|x<`7$yp; zC>Hbf>C1J95&5jN?-aE6Pet`|37Hh#tCw})R2~SC#W$@SAnq)p2}cK(s{@L)9?iG{ z4K@VY6=8w_id<%|_XXkJq<-$-vEQn(->$&xH0*sbY^L@ytWYO+7(4fAE6aNDzpqgX zd4SRecT%>xVNL+gfND??Gc$niG#d;Qv8f5u31Kl|4L@itM$9UOX@q{}W5p!-WZx(q zWn4z+r)KYPd-kd#Fq6PY;UdT^T=WVH7mI{t3yqAHsHZ|pAtmt{lJyGxIKoD%5giQfC?5VJc|8J52Yzk>YY-cwKg)M;B{Kk>*O|+Qo<;- zij#ted#G~+A)U^lkwmKZ(=ZvX7e!6=?|uqc?#HSFfplV>-La}dEThaT0PjYMN~;_H zev;zBf4xO(C*r}8D6}VAD>+l~%!(&+UTKNA(ADvAK|S+-g`Uf6E4fTcL6)`x(pCdrXA<s z)X(bT35M%quB!d2eMxF*EHU;=o-fUo5D^Ei4W`Fq&&mBLz>VsR9CSK9nO}a!`U*FnA`R; zbU42Z9mX=$#W8C7qTAfyiZ0zv;brJBmZ8JbUWWR&+v1gTZa*zU{lf`AiDl?e%g`aP z(lT^^oDZ?T8m49F{`hsa3?0TY6y5w$C|65>C!3%&n<<_kM(7f@ts8-bx)bN`xXN6n+pfdC4)w4k;u)M0zZ&9KuL&PZ;StVQybTV^1}1EEX?d zF2tjyY_^8*0xQk=q-Mx$o}`#laNY^Z_{)6ev1uX2lN58Rcic0Z*YD*AHY_jXcLj&r z!-q;*>TR^mPL3HsJ_i8mCDArkt;7LpaUp@sx<~zgvWT@&7cRw$Y5%lPF%po%&I63} zTqY?|_w;~31Z4sutie(Q3Nav2D|cFyESZvnZTU`cQym_S?04P`PBk{*i9Z;Yx`!ll zAh&<7bRP>v-=olVM6!at-lum5;wET*DQKRRurHhlMsZ~kP1%=v_z{{{-# z0UD>@*`ME&KOcXMjz7U)!#+OsQkUcD(#-3K=H~^Wwh73eUr^h$SAXySu|>T^x_!Fq zPul+cUj0M*6)zvuJO6?vpH^85tLf}?Y|hkc_&5n}5+8@-(_--I()x=eRUvCS34S3v$hd}ai>7h`z4WY)-J-0 z;;aC@QJm3=MY#w^!g3CsZ}yoWVr0xiRBO3!+Lw?^GsLdyg%GLCP=gRgnvNm<@?kKR6NvF~nSiNY$bjk@_1FsfB=@Aws|o z9c`w9A%sW;ltKpI3BDGoGMOojq}~GV3{*f(tJ<5ZGDND}F}x5&6X2W^sZR)VZlDLB z*TvItnGmTW&8b)-+$?b`DBq_kRRZ)a8U8UFQ~0VTX+cq@tDKN7N|R-mP7;$rxakKi<}#Th7g9R`2GX%Hz0!z@NZd4iw$865%K0+e{-Gk(Tm zK+j}0moPzOOeZ&#PwNnS`eOL%EP6pOweMF~E8b#@R4BX}d4K%ZWAfub3dtpMS}d@a z37u?A;fYz*jA(0B2x-Iud!3~Iv}#%ffkT|DTJhrXU$^9y&APCE>NezVqiPSd6$q;z z@$14;8j#6RI5JQWHLwaW3?v>066t#60SzRD2ja4N|xk*QwZcr_z#vj#riJOH0 z%D_4c;>@kd%=i{>{JBbLZ!VyIut}Xn);j4GdL=ch24&go8 ztEsK%18IV^i%#Hp7{&oT_F9qlcFd3HLm0puR z14Imor&oywDZGQ%-{PJWw@G!mN~+61^N`TaW8qNY)O|+Dc7b$r42}~+UanrI6f@Gf zxR~v8;ASH~6=MtfVTWMM8)jNoS>1Ze9*WNm$j0paN=h<<*;Z^c|5tMN79PNkMo2s3 z#m&`H!=qTGrA8#freq>YyQyiKq( zO=blx5!s8^OCR~fu^#qKKDw%6bF;G1Ewj2@l`LLo&Q^3H>IAdu5)amzflJ_w8}YR) zWAN7wT0jFTRhS6lNtwSpXK|Ef-3X$Nl_fjO6gl!~EtX)}T%tpDE2v&fyd!7bV%$l! zwjdH{Gx6WNVo%fpa4k24!9KJ}vpCgj!Y9MND{~664^;vlw=n(}csl{Ox$&&00~sZ7 zA@A1H0q4?ctMdzW5uFxkq$z_O(B{NB)v1JV(own3{9D^;hk7)GGx^Bq={~VpE%o@L zTv4Lr{qYReuiY5a1HSc`rw7G^hdR&vfW|*0Q(m<{uEZnu>9QlT=C|tL4O*KE2?3VZ zDylIEHOGXW`H7{-pyHhM5S8iCXd)ZFNMA6-!l!Lz=kmt z#6uFJi%*80q64GV6SCjCLwm+FA5+X<6An%PMG~-o^t|zVTrX(}XX^vFw>JLBg07WE zy>VB)K{huOv6s}?W!hrt(lnA&O%jNhVz#v3s5m67CPoo#7b*LhW40V{D77gtSVK~1 zAix0u_l!5(GoWaXP!|QR;ZrBxFon9b(HH9{5mNt|W44xZ%+^vn^h)UKm@QcVbWkzd z>b~NbEgypg0JKIGfxt5gNJ4ldEG+koH}v{-l;RCbaS`vxf(H<#=wOqGH|#YbfRG@+ z=18}$Zsy|+L5cBuS^3Cp(TX=@;Ue6XKN;L*#dBAEh$S|->&EyBbcx0WO=DQm_h^jq znND_TOSqdGAxod*4HcLe@rHe^$&9;XGfcSaXU1JqycTyEcZ;tGclU@lOt|~|e-#Xe zLEKXQM+(@31lWwXcH%O#7YXSXzbWpIo4r^$Yo5?7HXwp>DW((t4Q2}Yh+qKu#N@ex zbImZ_rax~$B!UY*-ED0^-1}3TX8tU1 zK;$_2_J=?xVmj4nzDYY)P=HWKj#LZT)^V68n4Qm3RI;b|_cIjAO|N(>KiG@{U7U-< zn8KCPWdWHm{)IB>vxkv<-UNe^hu;MoCB+ei>~|4=1R92>@m1&hEI)nJ_=Eod4d4d4 z@H=>4pVG}EKbveGzp+}ZaXzC{bv{OlefXkMb&9aDFO#ZMRvTD?ub#Fw-2BS+wL|R$ zojiWJJH_;_wLzg(85&e(4?K{CINM6mB{677kt@%^Wy%W$%LXbS@gt@YW%`uVK3aZO zix%!b(*=T*&nqb{b+PVrUBP>ry6)yDmcltdXCVuR0``i~v$ZltQI+l~dsB%qzPMG@ zV!Y?2qb0_CH}@EMC*gE5Qg)=D(3Vv}=`BoBGe#6)^@gENN4YCf@>h7saHp$k&10o< zjyl`WbF3Q$s%w6qc8kL{Y!uQnTTU-t6TqbkOqPT(iwLWZBYH5>hFuO~lnEQ}pN+IA z+|xCF!}dBJzs#M*Y;4lUqZNriY*f*0vU*(^NDW^ z{gc3HCC^s<9CynN$XIY;2=W}VV)z7?b)=toKhIM7335YVlyv$D$ygmhb3rAN?2Gyq z9rz0>Ip^@RD$&k9qmmWg^D2w_7Ye*6BuCL#lq8vO`G9_t!KLFPFu8ev1QHANb069Q zs2w7--~>5&M4+ni&)6QASKO+UEN=UO)b_>H_615!?W44k`Oqb`2qW6kZx!h=(mPM6 zj15GOr$>*b@)9LKUJ{=p{?C-4`$);6p9J5cezcfF#7m?OHaKmo5R^&D(k)IEr!+Tr zGvt)mpo2Fm5*vV!Ik5rl*i9wnh^za+l$hRVULe!d?@YTWF|K7wFaSJdgUPO%s^OX5ON|7r>wk)S#^u#hK0o?mx6v@?wzuAdWI6y5h8v5i(m5eeX0Qbhil)3XICp{`;f7<0& z@w1?WoWh}y+%tZHSyMIjA*LPGn)zUC=89U6JFpxJQo{&jBCUKX_~uX zTi41@+KB3i4FSPbG0ss_J)8I*&7Na zhk-F^-IlXAm@#bMNB6bKVE-9dO5I02*eiqm=k&q?;`vX!d`>$x?fmq5=D*|&_W#>* zu@DwkMdA*ag@LR{z3~qg#i{xK)q<@$!cxQPA97L=h$uCg4FxJrOm)uTbhO@~8rgYe zhUDVdWSMnU80DA1B=5NQFX(xaIOFw2e{nX_P7jcESgdkAMU?KHIER|kb? zzu?rpB88gnd{PLuN66h-D`x$a`Aqg`4BTRaNXOB1nEHv66a$}r;BaQSBnJ*D7)a%S zdZsHvS~~{#i^id6tMN>X(+&tdW4k8r$xL^4ia5T|g_@D%{#sy)_48~Vp6HG|LqppIo|mo=p7`RVA%Gv0oGPQSN#Ej5_@N2j_R0`6rTh5}byyN_ z4&EraJP2E^r#aw#2k)Xb#s0(w;>>^`ZqWOn=T0vFX0S|a~&I@hj?Ufi4( zOqYcpfLo~8)gGEtzS8!k)ROmTHOF4t58F-0Ufb7X1ox+=i?LSFvfy)KgqDd&B5Ark zp+CQ6lF&S81UOwO-V%**?6o%UgPiI7VI11xI;>Z+&<#&(>+Im?x>GIiKx9$oTop62!FtBp}lDBkZo3aXZ(F659GzPX=mNlM;p}2sdE3U=$3J+ z6Ynvvhf%-A-hNQll}jFvzg(^28mTIma_}H&?#-EdKsarqHbuGPz z>UpuIqVwbTYAD{er7paP4*g3y_~+20<*`wvo|WS$O3gC zahj6LsjR}A%@Zk@7}qt)L^;_q;lw6j5z85nk207=XCig}WH4l&im-6HxM~F%LDqJb zsWQ@Oa+ky6NQTB;)`{_Sc;S3XijJ&rox1xrsH#+`Kr#NHSx@IQS;y>BC?&uq-5F^i z8R@@Ia*+#9tc^ZkM$mCKljYOJWT={{TXYQSt`=QwKIUhn!08V8)}j1#*PXC^q+4-< zC;K4<3pjGc6(E60`+OTP8GT~O{8^fp0F{QX=@1(0aoLIx>@W#D0O=Fpt&%v2Y4d>D zD`muK9w5!j)@l%d991kKJ%=%GhP4I}L~9{(ob*yQFg^>x*}{booGoNQIEEz6){B_9 z+v}hH@Rl}!8qD?6x_Rj5(|Y13`_MuI_}Ny)0B`%R_?K0|Mzc5%FE-jDfI$Q%B zl3ZfdLcR4`{U<7fmh4Hq@C!8c!#yRyZ@>8A!s-9 ze!a4LcQEU=-~1W9xx8z4$UxVA^CNn5vHoQhT3@z?h%dX{@n4BIf5TN*0(||nu6IC( zj-%hUKYdp3jq1-_$)|Yb+x`0!eX}?>Sr;VEm{ydH_L~p#m`2(N@c#5B6xn|BLwfV7 zxi`1s&AIKXzfly6Sa?BE++JEn!L=lI#k^2$KuXf`88;`3@B;~D4Ac~(X-}qH-cuAF z0ke}%aY~|)58-+d&cb>|{w39=GrC5KD1gmi)a;>a)0jA*pbY!)6){CiafMgPkrSeO z3rzMw3O$u$r|QL-S_;l`ZY4dQ04g*v)yN#5uMd3}pYbZXRMRawENy`PfTY0#)GK${ zzu6+)`c2i+K?F$0Yq$m8LJgMJt>^dvE%{JgKGiRl-?=b5qb?}hP@MJ*)9G>o*BCt- zsEvS#fHzs9ciMo4xftyeAf|7Zw7?PrJ~s7cuFdJn_~|aOCkAbkwB9>qQetbhP>OMC z1&|Kvs+d0FoQ_P`GKQ={vxy4c-20yVE`gVEs8@vvS?`jx%1481op z*bPMIyfF&mR%nXWWnrCdwv+fsDN>-QR}2`iCAQ0gRc@h-B=BiDIlUm}YIcZZ8Vg1v z`sYOqQcC&lDb`|CV>gTlGgJ^%MHiBml-5gx?;R~Gy{lybojl3{#Gh>XQ0VPl?dPs$ zQ<*xpOILGpR;_gcExib{L!j z&kqIG6XLDAF-*WT;HA_ep(jk358D6=&J?<)XqVK=~0 zyWDog_&sRnQX_2`(WIdCcv22gz}{d*k;@I=ff{l|;gNP15k#nX1PhuOKWuzkj&&{l8-sol1KD7&Y#2e`lJ`|{rvzlk3#f{V*;-hN0>M}6%B-o; z`C43g<$PU!>$R&zX91%sec=(Epz10odY8%5o#2JB*t3Mu-n{_L)i{G0eH+nyF}xik zL*l)Nks)gZuH`8;6S}JvEmu-441whj_j3FvsY^{J#`>v)LONs|$cj0Df(~@vBn7yg zjC-E#mD9y{0y)tM@u4g&f>=x@ys#l$7k4w0I}}WAzc{$)tDk_o!jYEK1^PE)l|Zo+ zdN!sgv^7CMS`5^aZU&lB57NW2Ac$I;2&j$NF?EV8ZO<_~6|Kq&bh@0ZiXZl17OhU5 z?(vwR?LKI5K%^*&q>eF#sh@arO)pUMdNY|9n;8u*Y!uKN&ae8hCV)lJ6*7Jl3YI3` z=%1F%l*W@}B_J)lGD`U}edCvnK>DN1$dHyGRLv}K1qg%*wSdpg94=DCDmtro&rEx& z9P^Xr+PaOjDmN|`WIqZ^JA@4#$VqR+`(%^z>P&lRz#&yA3g^XUk!+R#4B|(v64kC? ztB&!9h;hxD6+$&dfBI1oDq*OJRX^fCB^&e|>tiI+?=PajI!BXsJ;gGg!1&mHB&p?H zEi<^{{6?$VzVRrN3**;ODEFgHIBhHV6kCr_&Ac%~U?i;cr?wi`%O3(&zDl45*%jLQ z+j?OIo`P<*?FA*^NV+!RyiH!TVTz%F2|$2~p}`t?g?Z72UvXZv)f{8Dx--VE{yhz5 zwF$FZwW4a(l%A##QN`a~Noq8qGiU%?0Nb2Py4OxD4XYUcNFnsauGk7jQ+}ye zBtEwZjASaN6Kw)pROU%^b8P}^P83C(#*|(yY7^LkHi792FY#pl*rVZUXTv5N%t(8D zp_ro#g6L{PE@rU^h*LApAk_=bU<(uDRu^SoDo)){R+1%eooX)x7kAKJQs8C75?9JE zi<&p7;?(*2)Bgx$IbqHw#$cP8iXd=*AR3YhDy-O|ayNKJlV{V`IX|P9==IpbVJ}if z;VKe%=)JwTf||@ zU%}Vd*WxZ4er0{t&hefi2}o=uPk|C!fgPJXd=_(?_R`Hb64UFGulloOZe=<+cENT! zrtG4a4r~St*EG%lm#;P-8B4S@3J;SaO^Br_U6IixrORpRdnnh3X{fJ+Ii)0rdZ5ab zwx@oVUYT?`e>3G%VWy6ECb({tdxiN{q8y*PYV?3}_Q$nw;ViGDOmc&Qh2-(hEpeQD z4e#Y8lHdq+@;lnh)*pKrc2-CJ94&8~0AIqMCQGN2jdIryc{ePdN)7kmAG@ ztRTFXP7{-*jg<(jJV0jvnhj8Wyc%uMpHCJ`!#WYMEN|4k-Ub?9*KuZN{G7(H9dt_tgq1p2@0z50zEbx^Fr_4!@qJhigrRzSLx8N_s5afmz?1j!4q9`H{v zte-BmJjfV9QkxmYg?uAwTH=PO+|-KEcAy)zOw?W;cQA29MW%B9WM-3rDvXPVJ9+0> zo`P%|WS%3-bhn|Jm4j^?4+VpE9%<*J2@yTcQIfi%j5*~Uity9w@=eheNZ89 z$Bsz}1n1Y`#2G*8)>c+Tkb2&NuQ zl;@-Y$UjVXPEA2=$s)k3Ww?K_;IVGdkttIVm@M*D0qiZel_jRDLB=W5l?1;!(jGp` zh>C|uk@^R8mOQ%~;M|d0(#Ab}6f873A*h>4d5YTYmkskyUpo!U`U)qsRX53BSn>8GK(^AGP?b(rErXBfG ztweWH#(Gl5P|c)_p|U!DHQe#QL&_L_grtm_8kv)%2W)S++R?Bm-KMdxO_0}r5llN=@hI+Zs9sj>Y;pIW-K&%rM(Mw2(L(UG;0i2%_ zCUd^t|6Mlla@+%;z_`E?X`;=^v)!EJF4f6_J*5j7I@Sh^AHrCBwy>~vP?eznyy=Yf zLPv&^zO83oh=zw(ZY}dYnO_UCfsmG@Yb!@wJHr}=UOl&8CtatlrhYzFWVs_?L?^gK zy$9gs6%o?TS4=9fdUk18HwtH%Tlt-%W!i^^jVU8$<@bF1N&*o~N%h zqARXT8Q;=%!J!!W+BUa%j>%{IIR|GEtON-|TR<%NMPy8%SHQS&l*rM$hM?a9XGu=> zPjGPkv36gYU2ySxz3xb}&Eh!t5gY|*j6W}>4R?^STsMl&048?<1+JAmgknE_4*v!d z5wGf|Z6OSG{M~+JsVrlf2!^SJYsKEN1&IoTV(vWX#aAqfcurl5s8Q(?OamYo$DKC_ z#(^DyU<;Q;FsxBnmYBo^07<|;602V=s}~dErHYoauLbG+%%!P9|JsgV!$2_YrUAi? zVCmWjmadIp=^6yHQ(kCg1as!8c?1I^WNQS^&Zo#lX%X8IY-M{l4Vpa>Y|uh5Und0f zbwV&-Cj`@VLNM(D=OmP7dMe=-9h%`*iFmv`ZvFe+I0-TrOaF&-hCUiG!T!P6i|InraEb1Fn6q+-fpBE*ZDE( zoM@=|1-FO7Rlv%L&pL2(R4i?yPP%DqKVD0F<}=sM{QTmtC4T<9y$E@^1pDX# zdh66kFB$Azq}|-JtodxL4fA&B?C8DH;}P#F#$yg<#>BwoJ7#ZD?NNpHNak3BZU+jz zSRFYm5MGVYTf%(W$~cXj<0&TZ6o%^a(_6}T%jRueyk+yYD&B;SxzE*16K9)77eQ0n zsD^5S3<5jPP=KqaX!CPFqm6`TxgyoxEfnN~U{&B%N&TugR6bIvlWm=!S++Ridi{Pv z1=$fK*gwqWMtt#LcP`I6A>gN3SzoBoo_Ucrv0$k3xyt z{qFejjwo(-516{JfKkmcKVcCW`Qo+97$`QG-ld5XicH#v5p(EY4`;x4PP4}Y)v8xt za$x8~i+Qa=Y$!OD<)!U@QpO0I0De}G`e+b2Y8kscxFx%0CTO7YQRHxI)fpA%c_<&O&Vtd^)Ch9WxXGWK;SLQEu8mN~|nz2ZjNk zIg|R84B|@$PA5igRn*`MIN32M>XTvyh-1A>HZU2tmLac5v+aFv2a&95vCT{)gDu~JFw-e3_exVPY6Q&@oytO zvE@z7s^zVRO?P1D_seD%?0i*(zpP~0)4pf|PIY}}sH3?cd|9-_2|yAX^#fOYG?&-p z`a(_e27T?kdHf`VtLP@o@;|p!tVS%#vxpja!@py&1pE-3nRx-`C8yBzp1GnrXgEwHtLAIGQ#Hh!Zmud(mF|L=Vtyv4 z{ev(|wx4e>CJlFkF`><@U@}P$1~VgI#n2%12W3p=^Q83r>Qz1aKnz(1L_H z%QdGWT97wqN-iqFbh?%y=qzRAFcws&>&?>(+>zAE>C*P)r-C-Xr8+)Pt+y9wPd7PZ zRLXpYX4r3FfyKfZqu6lCIOGJ;VWcQ@3-v<`DQ{q2kid?8s<6t1`VsENYSVXYk*uyt zcd$_jD2OQNB{>x7*6lY4rTO|ObK1z%rKCqHUvah8+#I>HT5oQSk#MQGIUyiE)|?fu z6|e{|+I+V8~7^mJ?GABF$KUUh4h}!QNaDUYh5ue%30~@2wU4-dScJ=5}UD zV#7AGJi*wRDE!D8)iDYVirL_yC}@cikMUwK%6oTXl)*AHyS%&2E|;ps#4cx#gI!XS zi26RUdzG-uBhi710%oa%8yu|Auu4KJ%qcP8n^iW7_=3~|_tU7+AO>ELbE^7Sw6sB5 zofem5CuqYZ*J%+F)5u|x8aediVT(nQ_|7bn>>w=`S&3hexTDP?*-82}=a8l_k&7aQ z%@;R=J)W8FkH+DTh4_>fi(0x$CVG{^fi|G<#^f4(d0l!PC~n>tfrQ@`MCW?2^8J_FVx=Vr%WLus+5p_i5Swv=#T0zYg;Mk@S6X zr*s78&AbpWqu5Y71T%vfp8yd(`7pj1#2p%h{K?mX`mDQPIx{Cpb**W=y2eUrb#)we zo#~LAi-2UG3|`u1$u0x?$1Fy86|N%1({xV-iOHOsQfFsI_Sn(HmwA}T-mi98@u)do zoQX6AJ_p&qe+StEnMCnjP7)|k8neKF9 zm=ZGR!q|;q<_>6odoXemMb%wf0E?TaV|0R2_|Tip5kG5=79DU|2JhkX)*Q)vh{8~+ zUs6!S3P6JH_)FFheCUVI4nC%IoCJ)%o;{wXrduh{^B_Snm-}!YY6e&cX?9r%ou#Pe zGU-J23Wk%okqU^Bd*)xMbc_{nlz&?asbLy{!}kXA-aVn~3|s~j3#fX5v5(P96e{4! zMw{fbGc2GePH8~G`LT+V69Un-Vbx@@NtMKTqTr^=_{doZ-YRS}B98qv>`E}D~2PEufmI6(mpZc@BV?9s`< zHz*jILdF>==&w78LZ)6ck#rTW1GTX}Q<_0fW)B{bMm1)rl0vb%L!lrzI=z9D!lIEZ zp;E5YZ#8#>g2pQf(zVOk$0;sp2$a(Iu^v*P-Jz0MqftmVa~@Iavq`aS&PDd)us@iV}rY5G%|8 zNnJ(c9xS2Hs6PvtG6nVLC^ZKlfaU;Smgayv=0Ge}UY(>7GKtCRNdM3wX|Kymja8Cm zM?B?XrreaEtbmi1rJfnqZ*`kJcK}2E&;KFaKAyXx?37(7zne`w|BK>&$$1VtA^@wy zB`Zd6@ZuOicr>N}^3xKtjB3)&OJ6?Ho2`%VFWc|J9$!}0H1?#vEyquGdC%kZ^4u+G zyc|3ii`#Z3SX>-;;wA2{&4xl$@VujlY3Ud${E-c8!4Am<#Avtv*(YguQHL6`?&#LP zsM{soqSi71-TFX8TI$xnty>?6XqfzgZud3kBmPI-?sh)n_x}bzEY%OWV6beeyTrB6 zN7UdofU3KUV8<$R38g@08MZJY;q{}I9LPnRaCi_VZ$ChKE1Cd3J6=GCF7-jahfN7h zn|pL0AwqM%sr$z2YGa;4X7cZ0b}uozDKdsOWbk99VY5QhE7saPnDt7wO5O!6C3`T7 zKh+VsYrVj(C^Adsa}`Ml<#QFuFx9Q&Tt#w2A*We%tNbZk_N=?pql+rzT*V8zE3@&HN8skWLD#%!{Az?V#Q{8Gn8l z(adrSH~wnAFE`&mKXbIj#s$3gXnjO!RB|gz>?}$O!MG0-&WqQcm}^O-z6u%W(5QGv zf5y|&UVEez(&W4SXaZB>rxBGRFYwy;(f5?`RkkTMdm#Kdy%TxCHoca-NKKELrsX7~ zF{)}#8^KPldpY{PjS9qssIwalj}%WJLn7_xrem$6rr{kZpd8Z7cM5%P1QmwLqlHtT zhPfKX1%DRHFD$HpqRW)_ZN%FROJQBKjQexs4Ul>DtlDDgjRBX#pU|Z(u=fZosYzC zDQXQ+u;J)vdG`%Ej#l+|Rlf{E(cT4Oc`N;}ztID%iWR5ge>EE?oY!=f_f0lb+&lS( z+Pj_t9Lvg?HWh?(Puf6X>gpf-7}AnaH9#?32X3K2j8G@(E!`67E#1`TyU`YDF26y) zljic}DxU{FaAIa!k}I@SHk&9yl+hW~CuaRvCVBr2C1S!OpS%oV{2;>kDui($)vII{ zeoaNONVQklT7FlYs&I!CbA`EHRlP<>?Or9!np|6VCd%p z8a3(U=~7u;jg!D@Q7(o6%Hic59sf$NuRZ-kd~)f2{=5^BFD2z_u$PF=H|SIGg`{V( zo~<1YJh9?*b^WivfUE15*}LF~zpJaOukRet_KUaZ%R`X-wQ7C8{0!H|){AR%v>y*- zwOi(pGmd#=^{&xc?{kPf3cG@CrCm)?%cQm9&d15`$odJI*8F#bv7{*G=iZ&{c@aCV z(M-mG>}eq117w`PjU!(%@o$j-k7868&rz-4j}NNoZ0RUox0W+=1*6IPFV*FtsB__77M1im!;CFTOD z;)8s|a7-u=Nb||@ORVejo{3bWJP^h}_R2fxe^m>Ci<~N>#mfbqE`u^^B-g7t4wyc* zjv7vmugSh(C6lz1Oy?+%NT$KdR}(_QrV8*_=nk2rH@m4!8=WTmWI10|NC(X?m|oHw zd$u9VRUFMTeubJkhB;$Zh9HhdQ(Me`s$$kHp3{k@%4%V+FiAByZ>F7vY4mG@22Pa>XUP~$enU3g*w`{#o_j6k->7#b{*;Btq_rZ;q+I=0t z;sbee_fv+3NrMYb_YHm4I~+TNpYU(&(HnzLy`fVAEmU-6!0ZA{GAqy z0o73U!o)k3xLu!sR63^`8#cT8`Jp^To!aWNzrEFGjfY?AyqSG9-pD*T&PJ$A_{cQx zSfRSs@ziUHjE7Vt8J2eWL`B-5vxq5CZrBc+qD{ffR(~5kjv9*5Ykpmyji9|jYwK4g zI?NSf$Oe~qxL{sCbN?2B_UuVNSZR8#q$Gg=>^brz zaNzKv2=wsuH0^&OUF;!y|GJK2TjI@!!S9bDi< z?aY@lIv;>9@zauwNQoge9sMWjXsM279zI7?^ZhshdYRd5Cn)xNHC#}{!^AW=+!ZDu zXbBhx7^7D&Cn@@@P{1;ex=y;DpI=uUmw$RM zerUS|8;~wZaLS<2>F8SdL{ZIyVx|YgoK_XYP$#O{0^6_eyw5oQL*#nRbo!uA zo0q6w9@#+;HzIX$6|8%q+=K6%KH(x71z-qXJQBCBF zp;0_gZ?Z@yYyfm)9~wO;!*ZjG9;7NbmJMdt1SQJNXJng4GY-cE&F-!a$`oxZJ18vc z@xc1I>KPvj8c|?lqVE9b2Mo@iY=QGq0_Xb^I3EU_a`Shp!_C5J5VMqy=@vmAN{$8C zNsE_@yUcFu&N3cR=nYc73HVqWJnI9SU%_px$x3vZ0gP=00lbFT8}dD;P(lBEc>qSA z`IX$Jax+|m31G5-sA7Z2c|m4{hqw-ON_KoDoOzA1cJm6UoxFf0l(oqAS^{#xt6sg;dh)EF zJl=ZpjGvH>J1zVP()APaj5kkMyHXEU%I1k|nX;j4?WZnb3b~;Kn|%ER!e~CKYv=>c zr)&%;8?4qkqUZ7a8ia~Le{fTanB$#p==glXwrdtZ`Y{s#Z^XxsiC>8IHXmP`S3v7& z1vCVHLkah^0wPJohFV{rZyl7H>FW8a;^ny=<8rFNE9O_Tt=fbUmIPq6J3h>7uRs>` zQFAnih^i~TO!pSAJetfF_S!d|g1RRJeevCWoT-Nt_F;wn@pU@Nj*N_rCX}l}7%xgh z=ybTr0ceDJIiZ5C4`<5`zTLU(=*DMQ|NG;YSHtT&Z{U+RX_;#VOBN{!ZTI~o6v^F< z5Tv?6H5{`2bSItilx7(|aSV=Ce_w!?TY=pgVVb|JB2z(Y z%Q{ZkNq2<2=kYpLgO(yIi<0;J>y>8S^eP?{0GsA5ofsl^$$Qm+F$~4fs4ymLE#_0! z9er8d#edeQ>zV{ z3fQ2i#7G6oHmFLg`=nPUXmP@1m1n?!ldw!v0DEH!5S9!p2}_d(!qQWKu=E@tESZFx zR&;!DNC&4v*uE?MHLw(HBqU3yMsMt#WLR(F0FI=75Evm9V<^FJh5{kZG|Cx&BL!^t z1nGj}Xl^dIS(}>k&+lP$}sVEcb_61@jkWve6@kIw&&qi2JJbMvqtzJz_od z2-O3x2EEus6UiSgu4PBmJQk?t3YYxa5INESXIHsuIID&H1j)OiX5M_ z%1)*nqHHbomf1C_P5bED$-9!;l+^XCH1YGOQ4)7(MK8}<(YmyvrKASs>ye#gPsK>O4J39M#fUfdQjD%?D@KoD8V<#1W*UYD zq>x;JVkC0e%P2fE^0(@0)FPx{602bp9wwu3Bd=@g)UZvOuu=Ga3+8Ovm32oyU5(lk zCg7w_B_mfiXg5s0;UdYuB)VH`B(epF^}_2_r6O8kFB@%zYFp!$QauUjfec~5YUm(z z8$|f_p_UyteH#67E0u)C>-glG=jHaXP^dOTp*j&7j_kIn3R(@N3gFF@s`#-Z4q@%q zj2v_3?rpeMnKLa7k400hHtGaMOGU|I)J(S}S)6}VOWU-eDwICkT!7)aShkFY2lNB% ziS1Tx?MjN#n^DH3n4q90RA`BhmYFcr7pc2)ckQZSxuRx1tr_n!pEJ|F+GT``Op0~C zJc~2#YFOqqacEk{c{a0tSk7;1j%FB>G%cnl+b@h6Z40BO<%%o9%dvAx4{Xz^+=D&m zvzbTgYUVL;MY|?;L0Hd;1z#Ik=UZ(s)q?p%XmVf?%k!|@Nw3n}W=zHOP3l~TT+2Qn z))js*5LwXr%cF1DsU3I{AGJ!thK_laS`}B@98Zl}nketT=AIWe740lTmDD#R1Xgb*ZF78UAe@3S>3W zx6C#po=J6RhQ87lnKq|B_e1ZJ?m+d6h;+ntig|gh~^Z z8>=*PdWtMJHsp{$VqOJlEH~Yo=&ohRSsgQe8U5qB%j+M^&))h6>h;%=RiQnu z?PZve3IUV9jQ+tJd+8rnXZ@p0hM55%94HH7GRzFn!KE{lS7MmqKX5;ee}sCx4zR)3VQo340ekMU3|diGyg8?j-05Zep;<0Hzm zc?y0MKHQa(o%Vct#->N{J`(xOy+NN9CNel$oWWfNuk=xB=8=3S<5Z6S(DI5$N9#Z8 zi1DaN>LYBM2IX4}SjN&aO3CLO16&7V zOdB$uMzwpOgv?7VY!t%HVHx)`ECXGO<4}IqIN#?F|G64^EfW@k&r; zOV7EA-6iswpv%gjfz?h1jX@2g6=pXU3!u`rSVZ?*7K?lsU)y4#gZGlf;sL@68DXgGr8VqI$=7luU0;M z`peySU*vP*D1AO*Mnh~T3>Ik<)# z)H=LG4wfwkMVTBFYnPRSO7l1Gnz(6YA_A0eVnvg-k|VQHMU4oAL0VLlnPq1Y*tk8Y z8x~HKV{l#wlqVAj!}F`lMK}LbP(?^alHbZK=j@_3a&Ksp%x=yJso&*n)y!MXs+mn? z+GIfI)|GSc4cyIq4=bwh1R{u@oP=VzyOGtbT4APy>ux+x;flNui}y^1d2H&RzQq~9 zJ{>s&s8P-U#kCkz46n6Vm7W=k)hq&5%0@<&4Fjg8IR*@Y^JqQk4ULQnD8agtDAQ{( z)C8!OH(SO?44MXopvSJY1gV1 z*=g4_RU?W;*=g58J_HQai?6eFQr2)`{32JClQXB1SP9g#oywl)z%rJx#z>MhlX~N5yb_ zTyIH|LmA_nR>)B=OFjk08C&tOx6Z8ixYex~q5tdTB9<1fJx4?qm}{jHYxAtOmN`FY zP^SE0d-)!<-OM^iZeE3l;q7S1))4`_kZsBxCEZBQk%%h8OALuBhGPDIqD^h>Wwb35 zy(p~}1WdTDX>WeA4R9?60OoA=q|_t~PZQMYzc76NTqLbqnuYsfEZCFuJRo2ZaS0xK zA~mvPfy=2Yo48oqqiduq&J&xv5^zbxmQ`2{LxUzsR9G>hl|8sshV3p?Ki`#1#?tNQ zy3)*OqI*#DwI5`k_~l2RrZc#$ArQ<^T25=a^?RZZA%X`s3j#J<+U5WYSh%HX9OPxj0JJ>iy9Q8?UxrP=u)=nDX?^ma` zlG*|VkHHIQZ-XAUiP_fDrElr*BYu%&@K~x}H)rpVVF}u_FllIXdhpuG3K~z2-JPx* z`{%=e;eCLaP)J!pXg&q}@>#}uQj;4$6v2})A5ig$4JUk}pjO*K^| zMo{olxP+FJCyG-)6aay)QnP7lg91wnc!fWR?ryb~JR^Ra1qQ=Lmz@8{bKAIQj3Zmg zJu_;SJfm3hjAF^7dRX$9<>K3!ouwg2eJBC<(I)(NUs`U!=dctIF-zu8$IhkkFI)%gjs-dh| z^9|ojr}m|Wt94k15NzG?Gjko(dw8o;2M03Cxv{hNR0ka`L$G%GaR+8xlUK2VB=#{D zLb8tqKs6Ole|`Ch%!^s^v$(Mw+H3uzC5)_7d#`_ZW3TlO^Br3l_a*z-i1p71$;{&1@!1^)+iAh{+nwD6hQ&F`5wG1FBjpvB0N^ zEl@m~OiODxAeEd(IfOS`(`+Rhh4tlVHIkLA+#bSHZrM=2nQV{vj^S*KDxAH zQDL5*>V0)Jl8uOOZ*UxD3UI&<&8IRHsaDvgTGu%U8^vwY12K%7F^`Rombb%9dHj~i zAr-eyUZLWgcHe9ix3CX};_T!)6=x=gRh%N{8O4p0qvE8anT3ysGYcOrXS)+Ud;@ng z3!lezLVc7qq#LynI+-neiuQ11F{UT7cHN`Xm~pZvZIh2M?LmVw?NOCXd&l^qTP9Sf zN^f2(+qx`v56_WLm`anKm0>DsS@v*MP3#cj@p_uzWZlb^;A>`WkmIz$p7}{`S@?L* zX0+wG32r8Uq05Zb=rU;gb_zwM2pRG4@7rGvv}XYiYu$g&~1W6 z=4KI$nVZF9C^^QnG=&U6Q@B1qg_%s)fEFR!wBV^+XDX$F?TO(Y7>obZ>JIEyJD105 zZR{6xP=4;uXpuFp^?%I|W(9-a>JmbdQm?Al*tqhOu)L zUSE=15UXezVnNZD#OdAOR)su}v|7=SbL7da948SvSxiq1+z z80yGq&a66uYcyuneT|N>FLaE3p<`$Q(J=tkSH@!0g~b`+YgZ5$XAjw zIsmnS1rVO&#CXy^2&GarbgLTuC4bw-WPjfnlSjK6lc{!B_UXD6%giW0&aVoUS=S|7BGX>xtZvYa-NB`V0qPY0Wn$&#EROSjd~cj%+!!i$}4VQAci+1=b3>h_e;&zP63KTC(%X zVknmIf*sG$wc{!jb)Pi4Grrh7REN@qDMhC$Vv^hjdJfr}=pfvzhyiu1lDHyem86hW za#Sj2q-B*vp#u5ejPY`_ZH=6HDfzl(jSO$GtdWDZH8N_sd1cs4zn#jLnf{f*9NNcx zcMF(kj+zw6wM3s~8(@j;d7hgm+;gB6wz0Wc5JB_Z}5zIDCw-m2%$2S`CsK~Cu!|5S|_p721OH^MZ4|LEV%o5>97yeWNecYEHHUi!41 z<{Vc6-Bvo9R(Mkwn>d0g=?-acLQ5Y}5VdVWnQS1bM2c+b6GAjUFbU~8e{VBV*p_k| z)ruZ&3o9N{<-GFJxXTZryo9?vY(hJH;#l%9XmEt+*Ts%*DZeIQ)Q^*w(@>;jC}wwW zn-Fj8rJ>+W37gOg8j4OT2@NH+9U6*TU)kLzv@NMsuxv4#D~lmcwKkR^WUq|{DTZci zdkitMRx!klWhnFwg%huZWoXS-hrHs*n}kyc)2Z{+{u=R_Q*A8+PAC;8v;>YBo-EB= z{A%wEmCq7PaT0NMK~vF_JFG>i9=By-eTrSG<`xY@KRcOoB%khSjs9ZlwJLFj)sBWD zb{27o(q3?<@bD}qD2iLK^QO_!h~&raotF-fBWd|e@yPQvizgz&T(c$IEt3&7T8HsS z<4E=0z#5D^BC;{vBr&&T!6a*A6Ok>wOBTh5$WHx%6EZ}7r&!r<%A?WkSv8-qMSW<6 z;p&@RW_Z3UxvtYCc5(WZV^HV>A$rENiM1lq?@sn*V^_lPT~#D<%0;ElwUjTr)oV|4 z)ZUlZ-hED|&X|d3NsU2-xqCuB0Q&s6`7rZ2Y}jxYCfl&pgGe~oqg^=G*xo(-D_>2 zlj!&=&Z5amS)yUtDTu?4v(D*l6Y#EFM`_4AX`_vZL~Lx+$XhhAPj*ZucP{EYs@((K z6?Hz4>J$_Qs-#{dN@6IcBvTN9&kGTCj`Vi$T?Tg`rkztDCeEpjV&QNLCHX8IY_1i< zbi9Lhpe&*CG2V| zIb6|^?V6+}_B#k0O0-SbP0jhK=axpYXEA}cppn`N-8*F7O!qcZlm|5t(pFyYnm4p{ zG#d1(>EqS~Ki)XDJ(MTW)XxYVOP^>|*718wE&u=7dlw*0uB*;7AK$C$t4CIMNh+z^ zc7C7BP|b8p?V#Oiu$bwr)iY#|+lz?RY-l62JIt=O+sjJ59SUuXv08Q`+E_4}LF@`f z3>rp+wO$Ftj2AQ@m=YK)1_1&L*hUxu3XsQIFkl8TE6o1>=iHl_-&a-rkOY2&)uGD# zGV{L9J+FJtx#xbw21{yfizEpyam$kh{1i&>Lv%R^sHo|c))7Hu%LKzj<1a`NmR*LP ziqp?qar*gmoc`Au=NVzO_}X%@j?<632<^CJkH7cM59Qe;V8vUG<}jEDC(D?JGV;{2 zZ))e{cbL>7HaECjYn~TH%~QC6HNcvXF4{?qJ4=Fu{6L8_N9fHrqBw;;y!#EGUUujE7c0dDw<}wogEi$LRDl+`9J6NlnLU+ioF+lZN1}JoPKo|+r5I&XGw=D(>Oq;Pc zP}o@qW4!;JrVx)nEO#?0Lcc+A~uh5$o(uUE=vV+*BT5^(jZf77b>U$^TOd{Im7 zOfyV}Fcj_lf@zrLPAXqq4Ge5GFt}!3TV2@5qNL^@M|s6w%3PMSN(n0JLL+r2eNPru zjvz$~kI^-#f%*-+E$b&8F9D`Dxzvo+oB zN*~oy-VxF`W$3JzP8Y_d6U`iD!23^MktD>1&+A8d`Wy74-1ql!+2Tvm?jTfK>7(8& z(bbokB~)kdL{sRsXHrO|Q|?QyJA*>X7uzYMSk8hev_c&~A-%UYhnC(xC~3wah;bWp zsCg&#(YYz1)8*cy7XyRexnvHKz zI>ZZeDV}$Lc9u~wyo{!xP~1iC8?{)|5sh{3{P4B;N8wv$#LIQ8NOXppJ*RPk+B#H< zAB$g$ph91nvT~3Ig5EBnfwa^ZHcguv!*Mxb3&h}2df&h$>NFH>=`=vZTHMy{*lmr| zmdNIK4C8DZ&RUv^mrr{bKQ9xPGGH5E(1uwl@Ab7d71e-ncOL_8#;pQ--JHtdlb)Q1 zR36hd0GVGT3(nx{x~$CKjJ9zpHmmZoQ!-h$T_>UnC4C4%A!0|732){r^)eO?8kezV zOr193To5^t(hXdC>hfIPV`Fk<8iAx3Yq_*=eyuquoa-|16OKR*WY^*0 z%gNE2>6#tmgnWl5&t#Di(-jV4)A@4p_h4qOx!jR6aXB%neaSn|z~%U2J1&P6zgc#R z%W0#$FT0H<>?{)myiD^!x!cf;TkhS-Ouo_sCIf)4nzz7hMF3A`tD9bJM}n@``jNHO z>j&zd+9=PH(HQQvX`{S_qRiVy`FR=0bVM(ZJRo&&yN&XG#(7){H(|7BxnBA$S_OU` zznU=G*?J+N7))DkUg26$*eDPCuo&dpW*}|kM9I=|F^-RYo)i@8MrGovh+4IwbS|K@ z4uQxg8KUB7mDw$t-CLXGr&f$DyRp{so5E>fTf&+7xC_jJHYb7A#7mbstPoZin*|&6 zX?53oVTG2_1^57@R?wTlM;QcY`hdeHY?j{++B$3A<|;sY5R3yvPBVAPNkCP~Ow6w- zQ0FutaN80xN(BRV4!Bj$GMWd=t8JK{mlWK@6{VUQvi8bF1&wMpkU~)(#Zxa0)OF1Y zYcv`wucc%PJ066InF*R6KG-rrOUazrFmDSk9=4NvnUeWn*f77nk{LJ5PcOAhb)`OP zZO1rTt#yoJZ_60R?Qk2dyoKAA4fbr)T%*X5Ko)E?uOiERgwelYpn$~NEap89U}C@3O3*SL>}RZPJ=_6SgS^pOJZhR;TXZGhP|wojJy>K(x6Oj4_*dkED~X+onV!{QVOFqWqghcsY0Zh zo2j@_%?bJVauQlv%|+Gx#xn^m$(?=4KRScZ;*0Hs7M?#BT2U=efFUQ=dE2PvNw5J57Pq%Du}Vav0<*W`p^r9HS?S~kEV$<@$y zOGepYm{RryWELv6)d_}!Z9)oiB3ZGQ3nq*;+VlCtNof<*%q(V;mPSmM6Wd>Cb1e2q zEljU~!n9KJt@yU^QQBk6%h}-pyW;qSdN4y|L)#neE-Kan((U~V)%|6rEI-%cJ2#(+ z?}&BmOaA*a@EyL`j_=^U;DistKN1w>{qc}!W}#dBL!BMFg1F$aOtcM`LP(N9OF9rX zL+M45`_z$?sUV4#q+19n&ua7kQ-9#|d%YV}?`e%Gt- zh2(MQ1x+|>QM_bHA3);WTrl$KJa$ZeI*%QPf5By|-s)Tz3j^M7qI500#rrQfkPT)} zev4Am71gRvRDokcO(K(m%I_n)qf6}cQEpNKD8xjW53sDanpEaYEHNb6JEWp>qr{MoEOmnx_h0Xf_GPL@&c9sXny>6^QmR<*5%(co zt-ACme-`DE8)KbS|N56D^W*%j>0YJ1E5J;A-C}U_;wSQavsGlCx-d*y3DhJe%4$r9 z>)p{l8WIOGGm7}-7~}9+&MA#!l&UnKW80ils!`jiq+#5t#vT8uy90n{@>Gmj$CrA# z$NI70+8%Q=VjHhuX^{e0Q2-iAEha%U@j0&qAMzV=zN^&=5d8}@!(|}JU^x02fTnxj znq0sgsBDMT_2WboJ_%u33eld%IO;jVEP*gfLLjAel`V3>gFy@nWpY_99TMxy9Y+FQ z35JvF^a!JPRl&*d%q^#AqG~%-R#n3-jd};Za08ozM&UFFC#3fMTHSJe^LVGD^G;JQ z;=)){bbDhC{094GIZ`3`AbDg5s7P6nqBn8(R4*!qvm;|*RZzLc$^4kN^k z%cB@ZXsz%ed9-LlMh^nQ9Gdcqi0;!_c_x(*au^{-_S z?O_p>D>8OVWT%(+>!lxqbJhHkP-YvzNopD3&kQ(4@SvH+Z#SWXUd25v^w#uThk|V^ z=Fvp_T&SlNK&RPh@NaHC0z)5YMYatn(7MnX6E9JKw6Pg&WvCS>1WfZO7So%i`7a3{7p#TcYql&PD$GBBr3?FO;fsVCR+( zs^?qAT3=c>5B-2J^9M$Qlm?53#P6oFF*HdY!>39RbaGKFWQz|o9ub*J!g^<bB$Iho3oeFoUWH^7bw>TLuJ;2$JK4Hkd*iA!- zm{s44qyEcgJV{c%01NsF$&?4KDzRc!9%pHJraA#qrM|9z!!Y}>VE@gC;`BVvEIB?a zg}Kx>hxu#+b8c&xb1#_lkzkJLF$g3Q6G?+#beJ!m7tC!>OM$LzF!w41bLxyRuj@T; zm@mq?zCz^&^Qoo+%x8V%MRunY>3dU0FFPF(^_D<^pgVV}2Qul(54N5>WKS?i#&5ie z%Q;KY^z!U<)>5GF<*37~t%u*=dSIHm4nvGzm@dzGiB1;Pf`DSW{{4i#O4&E1oZf^F z7EN&{wAMb-X^HyCmdo}ni*ZoSHfNsY3pn{%zQ6>1mM;+2XZZr;KFb#fz_WaTjpQs} zuy#1h7cj=Ne1WCnEMLGo&hkZ^ylv-2YpG{4(ctzZzl#YCA>Lcj@WmB20@z2ho~YSx zB>4J4xue=p@H*FzMHDJ`lsoohPp6mXkEh0OcdTVkr3kS_ts{2W-n|{w>H5IV9Ww3n zoZV-E)9f(sz>exArwDk_4p9()Kihf&d*{guttTv5dGcKA3DQ&MBVnv{EB`p%I+^_Rmre?`pbfrNv%9W#IR*4PA-2rnQ!(JMmy8~@~43n?9F4gQmI>tE8iyB&oj*e$} zvcGR-gV_uA>Gy2_*QZs> zQ+E3i-9BWuPjFjuy3U7neIuvP>biO`dqmf@gW1EnzUg50kgl&km_4ZLfy+6?mg`p^ z%LxtAsQ9-s)bsMOTmWFpk6{3cnSUv`v8}`&-Qky8)lhYR zev~ol&BN9W(cb4X_JzfXc`$G0fqvbe`}lq3r+KM5!Q{gvKb*smX0IoqJUZ41?swjX z>VeO8;Wna8ssfFXuO8tme(LryERO+Kya&*`VB{Zg*J<8kwlwsj7-sEQ3Y|zc9e|JG z6CR5|FkT$YKEgPJ6b3<%!XOAz2!cY259OLi)mp(cAMw1s%SM#SwnkQW~KinDeYECV3*APg^t2UggoEP#wo}LTxKEYQ3dBKhb zd70*Nd*ppRz-=ZbQ`$D14+L? zM&s`gOdiRp4+{!2`fx6D8jJ~|m++)rM?m~Lh?x6rKY_UNR&Nhc5IzA4{=|=MB-QVM zxR?Qp$J7QDj&;=nJBziNHZ$NUC^BYYWP;C-{e;>wyhnd<^gvXM^J-pcg;)TFDlk{p z#W2hp@8Sedt9Q67VP%q5Gw%SJX_*wCGQcIp z@8rYb|B$A(9i86zIcHgQhr($()qqLOZyRU3%Jis8W)P_jdI;IPe41W8q7K z1fK3^CWdtVJZrohR2IWy^x)RJt2+!fFv|Qk@QJxGD65X^b`=kGMtlYKmTt!_H4pp< zFA2sIVmcWJVH!d>dL1f~@8_8|;o)u>ZsagG@LV`nWw}MBMgIK1CElB`k>g)97oEa1(ml^ z3k$e;1}mxs@Q2|?%;#bMSI&*Q;8-8Y%)*k1Wgdo-9W^-EvvjQL-VQ_nOV7bFH1!In zW^NnkI?`-b%1%@`F2`=EIyql!|K$pf;*S<<_X>0|7#%cNeSS2ajhF+Wo;~hD2Z51N(!JNnQvDBcfBX$?Wwot=!sZQuSS;?HV!d!I( zox!RBMzj{Y1Sw307xLP=G{;Bv`KX!On-+(#+5J8@>~OG~pG%!5l`#q+6%pE5gBf=L zr91LsrY@d9y=zedYHUV`ims6hthB`9JAwC?GK>S~uCNPS6FR~VJpzeeYjn}<-L=Yz zm)|ryMOSdgQkLM03j3;T z=j#(il(1O?OGn*!>|isz%!c<1Y1)$sqU-`Xt07sk|HJdM=A!921wdds7()d}GhFxR`}{gHG< zj#xCD_AL!yeCB=3s^67-)9#ewXz^*_Mkz0&N+0$ryF^~SUL|%}lnb#L)TvXuE*^K@nkwvw9vcBU z<`B)2@UWvu-bB&8Dj`(N#o@MTxOCiS9#mEh>wB^4;rDmbVL&R|WC2I`95bR|oJ%W!#hQ?I>^s!^1txph3Jxo)+O=?i4sg2L(cR9kER< zA_!OM(5EIr(@@f=)Rcq}}J9zgDZe;k#-k}gMH(*jDM3+(~aVWggxv(R1j*dIRq zy*cY2kRrbwVq1O}OR8yJ=(-k6fWjODj3xyjyVd7OvXtJYpbPpmJLZ{x zGkEstdwdLQ6qxEaYZ{KkI)jr-mo?4IH9`LwnC7V<3?_iCTFsoe!UINSRiKYbp!0`{ zi9oXDG^4iVXz^#6i9nuH12g>nU?&>Do@`Et5?E>nW%Hqr(XJ{GwV}` zH|bM9m!ri_=u?h+u1{H9oUwX1yAVxO4BCnR^A7Q*Nw5+GqX=moWMM6Ur`mTNw87{4 z)wE!!?)_!JCmri4-8}RwLC2b7(wG|<*XOh0ha|%6_b799HIY37t-1O&XACfqcnfw* zr9a?3KE!9Ra{6CA@#lgJLs-Ysq9Ob`WlMbqT4^VWs@%<;#++1FaJSd)4so|?cL%uJ zEyP>aALJiITl`f%LSPt6iYulMGYnrbU2Z)$nZ%NvA)&(`6ZtVTs!XpNC%eFRkX&7Z zG>=s@zH9gmscbR8k5XLbuI}7fB_@?2DSe8d>YzGtNrq})0!z~)cnsg90dQvz)TU~( zW_hT&w69(lph|2bH16Q0Cr&-Xf1Kv@!26I}AI1nBtAu9xmtQ~b?lPt$%z$0wR18vG zU3QOmC_2?!y;rAA=eF)9uA9{SIXhepoH@&;m{m^zMH{MhxBjdu{3Bn;YnX^X$4sPbO#t2Atw7)0> zW7@KA<&qOAj9ANe)!Cs=CR!52`$iZ-{ZZlfEO$;utZf(4Q!8Vs53urdUn1?=H~^E+%u9p5#k33LA<~+vj#hhvc0eJierRTR z*-|lju*y2UZPD@OqM^vKDwB0eJS{K&7i)49T9hd(t^Nh8%gd7FtqFZb;8geVd!GlB zS|RU9U0WJ!%i6V3dj`#+D+wr!i?rGRIFQqY_s)yE&RlVzgi#CP!mx#DMM6Oip-TN)z0qSCE?B{^E%|Lgqt9DmFp^toQvWh^D*=0CPI}@;k1;K1T z_OQUePgupWacpj|lLd~A{>svoiewAzP?HFQq0Pa}G>`o0SVhJEg`|a*jAngGaDT|C zIqnrdPvE1okWorS*lLA`T}I|wb$8u7R+7%Rx4&iFuV&wMtlEG4>yw#kHoLQ8yG=EF z-F%|m=DfSrUeR|R|3UJ0f1Xy)C*Km^^{YPbUg(E1x~<=VZM?hpmy`M>_x0OuMK7uc zzq41r<-UF^vp`yHocf0PE%)`?ypjkz`RMO=>eu>Fzt1XV&_4Myzjayjo*(slGsHNESk z?J9xzRKjSb%j(C>AJ}P2fUUXPkC?JgrE~E65R#b70Tzc`ZW#Cc@r@9iOLcTVv!Du9 z*1$1D!YZ>*i$9BW11ufnQt=_F_e2ljZBpP-a5%yn_9%J=bF6lKhn6rD(5?_x-Ra6- znZgUS9YXOt<2f0?tY|Tw_kDPD0qsg*2|=Bds>!>sG*Af{2s8rdmdj1v*o{M(O(jWp zFZGjZo>9sQBp5|SD6E2k>R1Lt*$TqI-3kbL8?(JHMMrj;>x1E1dX8lnY15n*(JU5u zD4N4hDb=l`Dh;u&Ptqzw<5TI3&(XCph(>*qNseS9!r*~#^ zwXQTnzc>IMa}Q(*XQGt@E~GTsEOuEEGXk_K(K>AmU~60w*M+iLjgqYefE;D#(u6W( zeA;AP^&^`6KKzh&fOm@no=d%7zh$+fF1`CKtO%nWG6HiI_I;VFGMTF|askjL9U=|$ zpcv0K%ojc8iE#s!c8bJmYB39UC!98-Tv!_)`J zhN+^YGT?)I_`vO5?ZSvCtMeF$&4ku%H7p z#Y|lj>y`^>V%j&B$rP5gO<|OfDXb?`7zQAj!n%TkFmzTJ1ER_l)~!upsIHkzVcRrZ zZf+REqC7?0m5^AS>MEF&i6LxP1aM3jfyZSQhqq0?j%+HT0t8inG+SVz87TvXr!|Jt zh-3I)2dh%eJ~1h}Dg+7{PZ5YZZQV?)32wpMlt#WjH+`QQDi$N$u7neOyM(@%UM-E> zNOaCgR5nH-y+Qn&icdrZY>SFuVy_00Cm>Ez@?LTyQy%qOgG6d%VSqtz&%PvqJ8_i-_5aFG7V`pe9YZ@up#cL)Bmes}2C`3qd+FYP$xbn;z z0otf&ZZhB>N(|{<0Gi}@3warCfVGMascCEs>$ropU%Y02^it7~j@z5h77J6CD)u_d} zn)BvhztFJSoJdpH6K|H8z6Pdc%n7{NQjVGhg998TH>udn`P-Bzh_i^|%S-5cvw4&X zKbb-OXa)dx-jjhUXrgogRvl4==r0mIe$Oy3(6u>|%eNHos0 z*C3_tc388m@z5>n)f3OlV8N?(wps}#^rd+@>3sAR$n`LwbV8zV_bzA~hFmx3{?TiI z%Ro>*b8|1fmd%-qz_1n<#UE+mv_1F?Q8$6G>maN>piqQmk*MzbJ%I&yC?ZQ%%74!b zz~-w|L1LBhFV`?xZ9@V=6)-^2w0eMwsyAsWz|ypOQa`^&KW(BuQ~zY5h~D^p-mZm6 zv$Xmt{XEFeiGf0(4Xn0C%mw|@syR1X1}i>(j{6#iUeIeC3flgXYW<&hu}OU%3y#0sYbaHr$EJ2_^Y%cYT%dE4l5DopjiT51s$rjv||uw z443iHEU*b(q2=4fGX-sm(@8v7ZW*Iaj2{5kU8i`cWhgmi4@&M)jDkYngCC=F7#L)w(S!JhU~{y3>65f^T4D)S zDUKun1jjf2!}oW1m>B~kI@20HO$o=#pU-f^p+e6k}e zucl`1c6Pa8)YIZSt$Mdt|KK)C@nD|V1l%Q}s;M^%v0(kFJ=k%3)xV8xb*ik&6|G~u zQu5JZAay}_^eiLiX_r_R0}5a|OOh+t^8PFNI<1smjKmGXf&myW>H7Vp%zG#E(FcS&QimX@qyZrfu1gHMwF~j{I(y1 zpBV03S?p={_1+vAt}WU!q}CA4sUX&EF2A#twT0beSw`%oZ02O;Gel6Ma%HGZb7cg+ z1sd|xT^XUAJC!JjD+3g&OX`8+6Zn1MroqE`tGueGF~ z^zSJOP)w~+L5W?L<-)dAww(`J@hD@BnG}D%<9PQVd;`%0;{wx|W=)A*Izj+6OS}x; zXDHKqZ8l|@P1Qv_zq%B~uV(sePkyr>u0@U9TaY6SQhl@4$>KcfG)`E7;Y9iZ;|_*l zFG6Q5k(WOZj(5yjWM9!oA-EZjZ_%zzt=jm5SEcw(=yAQ%YS&Kj@ZV;zsduY}R_pz& z*5lGPYMO^#_%8&v#zl@-(jp|qD60dCcPL-aJ4RkNsCPzQH`*P> zF&&!4E_}9^;<}>sAe+(%b+pGxlp0F9?dzvGxjQ=>)5oItEkGJpt$r zTusM=N{l)D=`2g@fF!pRv6?hAN-aMk;sxP>51`4Ek{MT1E+E#-&d;h-q6avii4Y}E z@KXhCZJHKur$?+f57bO1Ba|lg$Z7{6OvO_UL@!i5@F@gdUi=gfn&w#qWm>d_VEUFF zcK?{oP9+dPWY|o?*Jw|2NjA#uO2|1eS%L>DZvxGxk)e53IH8iiRGk)Y_~U{96TaDn z4AFxmebHi=1^{PK5M50@IZUg^ep^#t;0Q%6mJ?K*d@o;jeLbN1yF`jqY}ci(SnTP# z7y_VO4CnY2l!oWyLyeW#ox+p$OKFpa>8iKqtvt)f^4NOuq;J@Nv}ykKmpB>huLMZs`7;Nn#O8HHAL9`wZszE zA(#?GXsuLb`Uj=Z_D~T`h|X~Ve9}+>7OMagR~=E7F-NrNh)KB#_9mLlSB*D2qhvu? z%V*W838LRNGkNvd0OH(d#$_x4I(*?PHQhx>svSX6k`fYnd6#Nh)sQ}-U|`jfoqv2)-<7a z+3$F;d)Kn_lLriYg&mB$-Wi3!;!!t#tE5u7Wc}Odh$YFIswA8mFl&{$z$iWjp!X#= zjm(gFBh^nGl2F%PrkpO+9mca{Wrb)?tXI~iTt1HCm#A+o`(~_~Ty7?MmCH?|dK~(B z<9s(B-@3Wnf|oPtdQ&qtD+kz9Y&e|pXc6d~3@9n9d}^w7JQMnEXPQgoiH9<{Qt&)w z@SF*-sz+sKjVqOIJf_vF{52cJjrBY<-;*7M=>J%tA?$Ob*UWP78uLy0ml8nt-oBb&|5FnSvnd6lwUkhy_Gt@~EM#c%5!l^hfJ{l}+ zv)VT4_><-0SnxehvpZ`$C>=IZq;foM)elHgb&F@re&lUT;+o+M$fAl2ea5ol3E)?8 zk~i6E0{Yc8KBOAwRU-^_s~V@UH`HZ^wH5JrRC@NKs%Js<&eXz-EZ79egW z$$*sxz(v_OfU<W3k)A?$c@ zMA|jDQRtOHa9@(JR<`oQ*l+v}gB(?laq)CgHPft(Kk{ML8^D(crZaGX$FoQOum7;q4u=d>GX%p z&>E6x8BvtkHS?sV7pL0&Nz`t+GV{XfKk~gvJynSa))*=kxw7f)Za%NWmBBpkr-?}Cy5ZK z^G*(X3Ol12s|^xSJ~k^agWN+*$l~R>B2OSrdrEayt4k^w92i{4)n*|Ll0O!FpG~|Y zDIyl&%-)IS#h%~;4Cf|zXcnAN4Tseiyb>zWqRkb9J0#*U+4K)9974OqlCqKQIc8&m zRj%LYLRX>s*oW6z9IYb9yjzl#m?97@2*(mL7B=|L3a56ra0)4^>0yDX6e)sYl+3_E zsNm`>oeN%W7JX|>D_g$G(ISMy&B{2?ChxAmyusxVQ_1B3bIWDF3|z`y%y9-F0f~k9 zwbD#3c;;c}Hpl4HZfs^6FtQ4PWl}}UK&kafNyYrtK?1Y<{z~gDfQ}!n7BBBTN#|}-wSZP}<)8f~)rX`lHh*|?&t1_P82r^JY-T?_^ z;U{CL5Bw^LY-lI9zm(xcnbZj zvb=mi-Qncg^duT#o}@>re>~$ZA&Id8{_}th80;k0#%w(TJf;Mro~6ZqFt)yzg$!J2 zjXJojVie~hoh^f^oux?}=HiGV+y5A(ZT(YcA}gGYJ?O>*Q)XNS>{zxVc z>d?zrmFXS6+HftJsR4uSa0hC#b%QHoLCNMg5=G2mmF%$iGA8C7*BZ#|6a8qP2#y+_ zGuxUpn{7o9u-D$^8)MjR76n{Z;KE#%J)E|Hm}i^GW?vxw%?+tnN%6}tZ^1fjLwDYa z1xDr|O|I%c*Y6e9VUeJQE6%xt8e_KNzK6}R2~c$9kpybN;vR&aHL=rS8Foh`kWEJ@ zOF_!T!xT8zh-r^cZHCIuHFCfxRzZr$st|zeL#nmKKrln+mKHsyQ9j#i5=B@F`qJX6 zyys{XGOO6ro*esTE$BJDY5E&(*V5Y@nV}(#4cSRQz%g|nUzf#y1Web{O(I%6Z5}#T zo>2IP30|l^;IYu(@V6V0p(Cw>r%S$KbzD&N9ucculb_J0@;*D2sMjoD4P)Y0ikp@Z zpXZV2z#q9T>k5^F1MglQvy25#f{nP4q~##|89H0xXiN=hPF z1C0ULHjRaOfTP-gEc}d}Mf$bO@VJP=g4V0&%QehF`ETJl7h-bFlqaF@}Fdn*6r8wl<<=hpPhs1v45BN8s~ec?%E7 zjs|RHh9bwwx-@fm5d{TWDc4jG4RAAMglP`rE&%42FVM*3LQQd(8 zG5FKSobMD3>zNT`VxRLFU_SIq^T9jWTV+BJy9oP4&0v@W-WvCb%5umDap54FC7~cG zWBRmmB%J=;4eh+hstw&d@Ei)$$xbr-qJYoiuN{0?q=L-S*uzl^*Sdxx)ZYNmgsc((bj~k}kektynaGNCXi;NqMSkeMuV&;PJwPNi4?Y47P(yh&{79-_K% zr^6$}?bMc>40t0t$~9keMT&?g+TumM!VrNo{$Clg+P7#SwHv~}9h&wE9+(n>h&G&% zJVD^n7dg90`!pH;=!A^S4y!ec3R-2r0&Uf;TqaU%kZjlO8gs1%%1jez|wnW z#555~N>dC@lAmt63{9%bs+&$L(=j#9nR(m2?pOyjUkJDPCb?8X$s#In#E139`$OhdI$?J%T62TNdbySmka zD`8sSb%Cvmt4Vu_Y@pz;y|c>0 z4AbzTg>2yRU%sX;%uH^*u>z#nfkWVbXC4y5r$9#GB(eZ+E<2X3!d55>CYszWyr8friedjIu){kACQ7d$wEr_2&w?=@ z`(~HiNxWYtKm2BJi?aHHPCrRl~&Uofnvzg=x(?6$Wt zQbOAp2NM~+z;3Pad}UV-YEwDu1;cU$xop>Pxw&CL&=oh^rmOommC*O@SNP@BV?N-y zrq)ER3&d@eGn?lAUy>OcaM`9+3))6o|8JH$E+6@%Ug`t^vh7j_B!g;FT6|feCYP1a zpxcUAfhV1D<&m2%+zL|vzRvKzjEF5xY?DT5lI0{;)$ZXY9_*(_ zrQ|}~D*^Jd0vn}#L|7t2PlvB682g@2!^F=k82jlz+z9JFTNS>*PhS=OB&+AJ0sR~e zWo_gl66@0=f)@v?fB-@dHx z0lwA>-Ee&n4EmuG_{C%;VdF(p$uXj_~icbg92=*ii zYhkk+&|w4<9Sw_ex1zBsQ;es%q+WStnOg{NK9^9jM?e<0OIQ$JUVRi|+AHOvWrmmt z6?*~h?`G6j6?7*o{Za|K`?kP=&(+v-@;^nO24hbEs<;BN6xH)!tr*lKl&6h7;F;Dh z25$>;y!l)v^r5=#^PkY4&B#xW-p)9U+{LBl^rzsulq8Y3ePPtCNfnGXstvN90s}MD zBJV^L@NpUJGereTa~x}RVNZ<5U!Je24YGTYcwDwv=`Jj6+3-SeW-13It{f@YinPod z6NeU|n22#lLfQHX6NUv_%1B(Y1maQ$=9)d117udpE>&r>lB?oyI;Z9!@PoF1@F7(( zHeZWJrgw}@B<_}5^{9IMGw|6zWjPx+?s$aevZ%cUxB|cpuY`|E#^FcT1s6V5F7@og zjv2X4rvh;1Qk68ctqt5@VezgG|7DiWHr&|wqh%K1Bf*=?oYvkxUA`R?9VnBoPA(R@ zAqIqz`P>asFoq*`^etk)#4v}0)>CINXjF$uiXB;bl=67&_5 zkjPSxn|u<`{0ew-HGZuQKYRxIypX~dmPT^3GAwyRWog+0&WRh%6UD(euR~-$oYkpP zC$yx}Qke)s_yRRVgg}7M9MCZv4x2j#9b1R>BXqDSXrjQB>rkY)pA!%S9g9}esolIg zh7pZOO)L;SSFnK&@d+WnJH0pP-~~lM=qu*Jk}u;vXV{9L^SG>j^wZg23!c=B5FTc2-UTM+uDQ6qsr}uMnsfIh9X8Wu8bG z&8H)KWq2~AgPc6?+jFpw-I)d0ryM?DA2C-Eo8wg(04DIy47=$_j(9}CB(X{)0PZ=W zO6V5`NI{#=M!7KxC=ahaK{xw|uTtEBEKoDD>|s1-yQ9v77RTb;mGqbh`zUX8n4#em zJN-3F_RBow^o)(~mZHEW#`176VP5G3VTk(aSR}u>az;Hj*8md~7xF6xJm3e^3Lb!iv}7P?iPQjsMI%9?7aax!W@!*=$yDD!iCDAneo>1x z3BME`s8K3cqrTCWv)&2wF+3fXvS}3_(1MU}n1!5TMeGpj*yNji4vorEe|VooV5&!rCJ4b_4E~ zX*q8bqf4PbE90&%yFqZIZ?QBWVTopoP+yQ3OE{Nh(+ZGe))MD5Xo^z?5KZ!p2dG-E zlgKK_0M!#!&Lavq<5#$7zY;D?YJsHqu&Is+W_Pj7o49B;poDDDBuB6zJk&}15+hjo zy0Vp%>VR1SxgzZ`M<#p0M+D>ya>5T1ffb2Z@EAa|)_^j@4; znIz3#ZYfWjjg$og;Qg|K+31|9vL_h!$Iu|jP|_v&zM zKqRpquEiMg6^Uq5xH1v~k5F8O)G^#nDa5TNMnc=ZIaKjTXbGXVO`St=vii(Mqg|t7 zy>u{aDfhgpgdjZk;)WuFpW@=Vy~Bf-i! z1~{CxDSZk&1tHZ^#l&M=C!o)Xh{}=OLg=(R3(SMijf{Y-p}9izL31cxXb#m0%?F0& zcTyfq0`|frUKEUv%QD0Rtd#0zaDqQ=EVtvRmIWZ_OX2vTK4H1nM$%WWZFxj3s#S7G z+L9+>rI-Bl;sMKN4a+T>2zM&;N$2sou?!NoZ~lq(X*N3v-cp}DrqVG%lP4t$_KCkq zg9eu{*;JV(HS|)%{pv>@y!N4Ep;Ppzqq7s#J{ZfTgJGy*1n`M?YC^d8zWZ~>KEHPq zw0i|0$Tbe@KMxq=o;AvE!`P7(HUe}aL5DOG7NRd~Xw9A}begq*3z|fTk)=ye=!~mq zG2>i?z-OUyF*+Njk%Cs%`Fyf3dZDGETrp@g4HL!ru_D^)X<~u9Mw; zyr8e-#JFE9aOxzm*TDg`KvzW^@>0G0=Np!l3wt_=U2duEJ8pf^hpH9aF=K(}^VA#jbT?{DDS%cd8nbja?Z!UT7|%4Uy0!Xf19d(eZ6L#`@(UgC))d8O z3MZNJty9QwKiVJ*M;oYsA8nxC_|XQs^P>%PC#%}30cQGW1EnvCfbmEw4~lwNQ`iJW zJrB@5DC&jGkND9x*B(Pb(Xi0q65oWjBiZqkkhe@*ux;(p??o5$6+FRTa0{1G{sMdd z&0N%)+zIyJh+nRyvL0g)gS^S^@p6r4iVtW5w&Vj48_#l48bs)n3e+3U0=YuI-dEkW zHw)gN^?pFXZ#}uL)X*4JDmFD{p!-We<>w@kM;8|e6O8E5+S57(($!WpFY5b=7Ll17 zj2!oKulf^wGcW1K#{jjtpJ%9sDZoGUp9gJRo#eWWP|%%WmSn@6vEg2SFf)sM#QvDNzK5sl`;GIjj}>EG z-^O%(BE0kLpY1#e<9+TmsE>eg<7U4}olGX664Mu(fLjQt_xx!DDl;vh>Pzpm=L~}g z+d!3nSu9D_Z3ZubrUu7jb!-o_bB2WAR=?|M|M+Fq^+sCf=3bgqNJ7!D+PqHe8DL_&3>fep^zL~=sC-Q*`(EdpQFB^R0EJDt$sj1 z=k=4hPOC@sbEkeX7isk$^m9c&&2|4<`gyT_GSsyCtbQuzn-&75`DmH`_+JPm=5RTi zd`_z0W#nrxObIlxG4Ws*(Yl)!(Gr+&GAWmgOA0|cyt!tw*v_%gK(R7_Q7;xBQTj5M z$Ny68DukJK6~g=+@6YHeyh{!)HKBxjuRK4;1_S<5aTVTtE|7foRY3B*QncLvl22Kk zqQ$2SGleUR!mBM(w0yWOX8y}=m}#OM<-fFG%X3Z90t$o_Ex+`Ik0r>CEp(E>AVtcg zmn9r;@h_fCxUzNIqY0k>t|z7H5d?F_XacLI(@90a6V(JNZmJPOpAJf()cM5|R4>s@ z*5~iT#V6hBwFoPC6?JCrMfxI~&W-yfr}Jm{{R*bDt|m-pQ_X8LolmJ-ukm!g@;bwG ze%~vmPFZPYTH8;h+@ZV2t#KjF2aQm+(^MC2jZ3l4cno)=#Um`(w1Z(M#g~f@^1+i~ z{;tx|=2Fsqqr2Y`VxEwpmT$PeQy#LkA{g9uFJdFoU2k|^m4}qIG=ueYx^l#zsziwA zUil;)^BlqHrU|%YG@?t&Cl>rIiSBp0)=U9UH)eRcZeA}F^YNXO9qkSnepklvZ73l` zrJG?uOdxCt2KKfk_!Vtew5i#0PO6ld>QsG;v96xeJZSF}A)oTOx4Mt=psi3Cvr_z$ zTbB@MngL^jri6|}@hH;Z?c|>W2+JBC_k5w?LFhga18WI^gMftV*}$xCN@>|7m$bDJI4WH9qnyW zfUmPLY)TCqJ0!#E1RL{x>Z4A>!#Cea_jHN!ASMQTl^6fs#sA0k_`2R_#LrZ(FriR~1u0GC%Bo4=wVnBQ0u|XG4a@m)p zhz~A_JeLRs3lB9jkIBUidudzuTcg!`ZQUnl2g@$2PlhsXU5?(NI@fe8xGuNKl~W7Q z7I&Rfiw&=Z$N~O^*Hq?5)EWZN*Ht( z-`BVMoY;EWL9^0Ss;q6*spbo+yI3b=S_%kN#%s@?W-D;Eg&SBuVDP+k9CFDB?EUqV z?|I*PdP<8TyC07G>wlBJ?+AFnz(Ps_8+VysLk=#$AxOk3f08(gh&{}a|Ik>naMsdG z(K-?$q9-JcV=io3`1Eb0jQnY^$Iv{0Fc!k4{Q+ZdlK>SI0P>#fR)ERi*0P&p zd%`GhuX7yNpxL7)`q}QA(JR3|4bZ!mLaTetJRxsrpI@6O34LDmj=q^YEF*8>f;U*d zW}EpyznS9~ArIwXegECyQhE2OQ|p7fPbqH*VB9pP#2-we5@||A=FRvUqPF?7T`yU+ zH9~2&rx1z-Z>t7VrfY2rD;4lt%iitEYfIsh?{ed>Hj-*oJ_7AU?rPJ6rh*I!Ag%V-o87wGYPFUNYXhPp7Z#|SqR$I?&#>IEbw<6dz`(d=CXVm2 z{pTW|PVrrssick?dkgXRi8cM)T}{(I!J1h!ir>Q*q;CQ~e z&<-V->9Y+3z-$i|_Wx}I z7G*}-VrJ&OopXiPHUlTdc3V&qTDUbR(X@t`xz7l#rE`PUj#mb)o!df7`OUY0mJ-&z zYTUYLJAhnpCfq`s8df{b46TdL4O*AHGHC7E7FxTvhSux6omYulI?wWhl9nT*d^V$N*%zA}VEc1JQbUa7I zO=ONwsGu=NV$Gee642{R9llCT&)eavT&fpi6S3&Cby0%Sj*jV>_$tX0lJQcN-9Etw z7ipKqGu!{WW134Y@`AUiz2&PDeiOghBK z1B<6)$1|kH^grkrH(Hh^Qjf}>ga`@hm;%P4k#L}DdfW79Fgh_%Np6Ce-l2t)9w0Ln z>P9X(g|(@dp^hzk%W69m(X0@XbH#1Q=6vKH0ae9QhBMI{9!nKjWP?W>qh6SA9)& zA7$+0lGqhjb9;}{oVS(GLsQ$5yTyb;Gf)bPfP~?{7&Y9<(Rv>aYu(~(pX<|D9qs0!HA?DNSEy^i8V{U zl@qM`Jy7+;ac&2<+b`}`Za;o}JkWts6u_5E$$`!V?EuF9C_~?6yA@lXng!2OZ1#4l z1@y|p>bRA<|Ig<3qZV@D7nIyYmRBDCV6{*sYjYS(fZy2(HiiH&YE_^%u(bo;K<|m&aR5osg6RNw1@3o*CkoZKEi-IB z)M#uI0hQ(_kSqCNpYyDqUEHC!A7>eEGmHLfxi2IIETYvirZE^l0*>7YdaZqqT-Xw* z4x`mm%pfboAo`wWkyvF8U(~FJtZN;wg9B^p!rIFMwSsjhd zf(MifCc&`r#n$QJoM%}vlv&lNBdnrNMI?;N>ibz;8&+1&{q=^{+O%0d;God?sLs%@Y9(O9NdP13#;4zXpC$E^I4bw(r!0Th$06A(&~f2 zr7GyJ7)15s@fT96v6^s;1JH7&PCPXKmqq$~RORNV1x;k)6RdxNl+=7ezl7Uk?Qw_p*de?lciS zPNWwhN%)p5FDj@9a7DdFEa_u=xHb-%5BIWYu~E@m8T^2!$c)p-m;rt=C1KRocPSV8 z-00fUt(VA=3C+M{sVNB348V31*&&fZCM6Oos6O`rkqm?&b%gl)N{rVDh4B1m?_nyX zj_@KBxaT|1RNy||T7i>9bA;f9z>+1ajvK_7+s<4CvEQt3&1 zFZ}lg&u4^|_@b%x@UcXL3MY>~#kf44KW9t&|4#3+!~TzCv_Z2oCONt93MOTm9c;O^ z$Fdx4}CkiqfP=a1$!RJMME`SW9PTk}^J@cG-WKs|pgGd2;npV4@m})`OfFXWq;Vi5t909lp0YqvlPzX0d-`NG~ z^NFnV83eI3gT$2FErMdrOduMex)R zV7O9Kyf?$&6+o(FlmyKTX(|JgekN!+eH{)t#^ywSehRD{;L#!He8{sS%ehF(q=V4e*L{-OLh{dBtiAW zX$xDsJYj0kAF22;Uw0}QT|4^V+Ey;6l4n+|qRx1~6vKPxxcR{Gow9gbV=z>{9 zKars&2h7N{qPvhSP-NK9nHH5W5LJXIbSN1A*b72GK(8b)QY|J9@Zk4Bt5rS|c}j5T zPP$gf6{B~Ge&vUH`s``X9*25@k1{SO6KjyArf!KDO4sA9bG+DdvAm#gMEtI3(bS8I zKKh!w?q!rx#unAfDAv@Ss^)TkcrNIHK$$=eATL9TA;$#ktLLcN2x0?S-DHJ{$OY^{ zru7XNwoRWVh?}CXWD+%(gvQRmB{k310ppSarp+925{8zgHs zipSzi0djWzlPx66B(SrBHH~C5ZJIO&70(;b+7k^0ypoB22o(FfVPvVF zJiv1#*@c-9Z6%IJ?Z0Xa7CAHSEDY0(&FZ~`|N4kzIFCuvN(JS)z)r!P*srV%3KEGA zWHIo~Os2S`)$=xm+i8+7^46CQiFOiM<|ga~y0g`z#w0wVCGMoP2L{1f%Q?j$-bBT( z(focbj|V=Z%C#XrNkhsovz6wu71UEeWV~ns>TM`8g)rry!OV^a96I>HalX(`Nx<4k zlmH;|WV4W9NVmB00Ur^`?wk?X0UB&gFtz&YQ)23`Zx=f!fWO=T+}hVk>jrB3MOHfp zxBXhvvIt%tAWim$z?`R5>{_F8lF-WdZ)?TzJ^7ac4Gmvg8hYkCT>0O6`Sx+%It>{^ z67(Ok_4;;1_Xuwz(Y;2b_JeGA(n8)v7d^n}C}whRD}9tSHpCd0j(nyPYO{t?Vra(u z%+?|k(#P&1q%w5$WX;)c|=TyGsnR4pbz;sj5+3hpqBJV`AVj% zT6GV>ZZr_8DoKGAs)7)ub&)zt>sPoR>acj}R@{@$v!*3S*Jkc%skbn`ikY1|_mpJu znU@}oh~A{3K2c9(EsA{Rw=3{;UEoYiHtIW;mtIb4SF&r~+l678ugXk(HGhzeYBn0E z=(|hMh8@4smFPU&-#O3lg%jBunn3aGS^Deg%IjVAwM&Ozwy=18u^{0I8<%2Jn))Mr z9O=PeG;X+EYEi0}fYZw8FuO|3W~HOfNu5`rlPC}1SoknovX;}!!^cJ|e9dOy3;6hg za<)FoaTJs`iHY)peF@7Kzrg@fjXez2&-Ywe|8`b_58lNeJKvK~cItF<@b;?lh z)d?8ef5bb&h%vhE^fNnm+Bo^Ocv(6pi0t%yU^^WQI|U!r#-wS3m&KUM?!1Ty9PMIY z3I|wXU`v|+i!qYq{I8%+@Zdt8U&t^vrp|aZJh(980XLiQ;NtbWr}5xIfpXv#yWh_6 zVgtP3-<{Pd3f!UiSM5x=#8D%J!{S-I#OEWU+uZrK0i8zy*01@}VpX}>^t(jw=Psr? zWw5eqOKU9d3jx;kPe1L`+`Y~VICs#iBMGKv0!7H2E~3Q(^MpD{v;Ba>^Vp0OmMUXk zLfSddj@Fj_-05BL62{1zU0QP@7clD|Ow3sf`9Xt9JS3*dMQ${TYCk!hzi@j(xln|1 zVVh7cEHA7Hg@PiKi%Vw32<2iYl#6RZxi}EY#m3J0a+*+P&rB$j?)T4&dKG~ zgc~F&CUF$r)-?N3t`NRWHepB<&n@B^CK9-TJv8FW<#4jeMwPq*D04X^e}nuA1E9o> z;{UlD1p7LZEoT_S7bm;*v$Q=g{hGtmvJUs57LwmuSA4Q@vO}``cxD;wX?r*~<&Br;CEo%UTZAl^Zwy+ioCS_W z+%;GfYuCgjv_*%7MqULagk4%$NM4o8`;v()g+{B(whC@_Te8Bi-j0!DrNl%mi!&`( zeGf?!2VO3hFH5@Po|qF=C=V@J)Fw~SsE^MWs6^(uTQgS`n96mg7bhMjBf_Fv@92gH5vLpp@IyxGIdcZd7ITC7N*M6vf zNvE289lzeHsj7+-?EcV~I+&b_4nhC?k|R#tXj*3yG$DPhwk+}8;P~hwABXUD>t>tc z0%_>MJ@jn43uMPs+w1KwsgNo`|(0-SIrYsVKrfNg`=W1GDD;AHI+URE*7xX(E4Qlj*Urp2t`M`)8Y*atYmGXMUEmG zc!o{z=nYcsB?}Z3UGG}F7^#3FCEvPnVs@If@xl1%{&7&=9C;#Yh^#>t8h}l-5JaBo z*frQ@ITW)ciMt|a7reuwteSQcXtyj({oPR4wG1-%c2fzZmzvT-J2Ysqin`=ucb#KN z;~ho0<58vRqf63Ni*iA(2g}7h$K@g|_6U&EVh>>~?ZkKi`bT6q;=y!6>4;?v9hPr^ zJ0Z~;;CIk2B9-~fUZoP(xb*Swm^5H_trORkPF#nfS86n_&0na$;oV{YN5rsiE_a)v zEDo{Tw4u%7g$_!>5#iWE$8gvKhz$KOeczNFPP5O2*c8G^Y2b)yF2iPujp*3 zKt^g`(b+_IUo1LX#LutjY__=hV%6DRlFl~x($m>OzrPSV+sapTwzKJMavgs~XKPtH z8vXoBUuTX1go&N47wv59n^j(%U|TT13y&u4Ynb$EI^=DY<^ftaD5Y)TAq%(J~ zY0LX!&=7WFul#ux@K4_p#tMHI8n~908=|ypafJqE?&+) z3SZ31%4#0%kO|5sg$}k%PdK2>^h8{muNzQfv=ceu#1f&NBI|!MJ#z9<#Th3@hN1?}4o)(_^DIo2nYn$c{C3k+(Sg>auxwJ-<4~=7 zR;wqqU#KHl%w$|e^&d5#TQeEg3jB1IMWto|KO`2;*t4mrrILxM-4QK5=Qgcaj3%a) zwRfBW9UVk31`MLZXQDgVH0m{-a_^hVGIRi&hI$)ajfU!H9UmbDY)J-0W?>O#)$N`Anb$Y0SK<6 zqqUO=A!j%b8t|-b=4Ibyuw}y^npCE@|iO(I+*055+^hnO}qZK=9_wJ^ED{nq|@IA9yO|3+5X8N&=Fgy_@y0wa)kIP z-npAk!<4B`ovcnt(3zt^J%#V6gEDwZso?$wk$&$jctUzOuHKv^%G=hfzD_CMV)nMt z8*P3^R%lqhu^c|C?0}XouqWGZXao*OBgjfseC3d05rQ?VA~j54RRif&I=a!A)4a$xKGij_nj}+*`iu#(aT=2|lzbKU}18_TDfJZYEj$s*VK~KE-bGFS8C($+v>mVqs zx!4gq{J%a~RbRD1Tf}`8q|IDD@8YX(Pif z>yvnoz1|mJvvae4y;t!m0*(S`33jT!Sim%X?d?}6 zqOAd}n|T3UOh5>qkX1kzt*Y2X;*n&qhtxnB4;?_MQ*b23i-XvxEjow6?IeuBhhj)T zF(azXC!aF*vZ1G}`hYBS;f3b3(kE4q17j0lq;Loo`GPHtM4x{Esf9)U**zBv2V&vW3j@m#kZt6 zLBkT01XPl&LcaWqrKVh{v>3Ui#kg4E{THIe*S}HdFGQ2@-$)>7iWi~>Adb*^&YDz~ zP+W3xWn7-FHNd5E33Uri*;Y+9N=uscDWXmmg8Qq200O zUgi#sr=SeuP;76xWY&jr*QEB!$*~spUFHkjBuP0DhKzyeeKbyz3OT8{YqC@<2@Dzi zmVckuiikzb2MYoV>0Rmy9q5$1-2c2wftsPClGAi!CPYDaS87#xsw;VZeqBi?xi|1U^g6yjuSYFo2$FVF|hrid|Mc)+vg=-jkO?kDaP^Q5FqH zkDaP^k=d_*Q|)5itV|4xd@`Cr5iXC7=c$&gpGQYS|IMlIvK;wL1vS{GWx%X;%>D=5 zSe{J8;SblfiVSi1*i~2zu+L1joRS=}L({j8!yi=SjT}@vEeg~k>rvn@W6?+){%#fI zh-ld$h*Fa_hvum`1G6~T*XTSJhhLj|r2A_DGHd1nMbSZ0+t~{+Z$uN3m5Y<5&f8i6 z5cyi6zy@T)k$$=C+5TK>FXCEFI_Ia>@05?EO7B|hA$IJruR$op^FTYU6ho(^)HAS4FD65oE$r0%jzE)4 zlmdkao-KFCMCYUMfm`Q@2s^jlF%Y;2U68&WakSmFumaw)Yb0Yn$F8ZvCL{Y0=^2?d z=o!xJya2uyxZsMo;sp(JT@ly3fU)>{Iv}jRz=S4SlT04Yw&dY# zIUD7nPGgmWsIS?Yg|Uh+wB+GzTOO*M%R{>}c{r>2D%eppTl@q?sjXSdv+ZP0E~Z~z zq8{d<`Iz^PAJ&A2>YYf7p#yGa^P%KVIS zw=XFTTTCq?;8v&EaHx&wePgdLDhumr<)4HfWQvglyz3%yC`q{m5p7p+DLtDM?+@|I z)0--r6c1MYqI7J^d7=~{qU7C2i^nbBg~p<+6G8+t((~OO*i3-eY2W-TRMdF%vjc#5 zs~ktb#>xOhVGA2T*iqtGdM#U+j!Q`JP^Kx549wj60UoL@PahJJl5()ZA8)iyBc}R8 znweUGO=YsurqzJ#>JLfZT%AcZXXw2GFQdMJjhz8ZZ{rDIx`PW~y2an0;Np4mZuJK@ z`{hPWzUcX2_AcOLdlie%XBgK~JN+Tmfg3f=sL||g?yF5~BYl}T!B}<`qpL)_8I^vI z#>w7Sj-Y7~Mt0b?#Ez3{_WF4Wm&pn4ce3{n{5rXC8;YzE7x=t7PNddyx5hgMq>xBd zWvQ#6J+M-6cG~;@se2bVyQ=c;f1iEMT+bw#KmvgT*)v56HJ8af87^iI5R4dtT-4f2 zGMPC^CYj76b7lfjgi)iV7F(=TX^TL;6k4&OwMzTa8Z3Q_|Kg>styH5gYV1o}YUx{S zX+?Rzzh|wr&pu}+7YOvsilztyNB5<~MfIY%{XtPU+zjllU_{+*WeB ztUa)Ud~m0NA zhTkJ>R6CqD!^qLU6{mVJcp{MDR5sMZ8W^2y7|w)>0l3__WEsK%Skq_7hNX=bb1>B}mdYP3NSCaO znP427AXeORn?Pf45Z1VcgKs%08F$AUZs=y+Un8aD>*i}Q!E{S=ZMcYAY@*aOiJY;$ zE2U)8;V#zJ1YO_l6dw_t$tSA=F?V@ZSd@V{%hHnMwfvZ04hSU zJ{9d#S{xRXA$PJBEncsG3UqYO660Cu>J;NLOULjQl3BX%qZ8gt;@TXYY7Y~fYJ2Ou z+%+X#r>5`pZ>PAj8vjpXHr=#vcKFQZsHqSan@S?<1-R<8od?L3Ylf*Z?a;A|I&|D$ zB+|TTKG$O;IzC^P7f~%q0*aR$fFN?AgvL1iGk+flT6sB|(nhTv^WknvI_zde9>Q;u z;3#r;*G&3QP)jjL6d3=6fy*7Wf8-uU+s<1@JmJh@C<15q&$@hu3uF zY~sk%ZqeVYXE#QNIXK0lPic$}b8xCfJ1tCZ9Ksyv zklQxUT0`Ao4(3|)+{WlI2d7!|X^qig4oMi(P0kGvgorKqr)7$%%We`7#-%|Y>Pg- zF}gMf+}!iuV-C>Rm2~$2kKJ9;n$6P{95Zn$Dr}sgvkp*sLzL34^uc=rZE{2@y-y!> zixz~QJGHV3t}1;Qy`1&o-F2;VIYe|kwrUGqTQ3l zT%tf0i$sM)jx6R91+rL7A&b5wM;3F50$J2i=pm6Ki@8LBEOO0smdKICT%tf0F&<=z z99hgIa%2%6S7Z?eCQL_CGO}3A$YKXhvP>G+pFLZfTIl3|8_1MuPEY_qA_)sT3+Pb_ z$;^%BGMY92(a`(=s(1W$09AQ!9S)Egy8C2EFGxynQQ{v8i~%SYazNdMPehkwaMa}d z&-HR}gK7uY*QLeXxB@nFCpd>lMevSYI4^O6fBs;CMus#W2ISSH?y|&{4vIPjrn##P z?y%SwbAt(^=YDF6-7 z7EG=jr>54yo_JUO!mQOZRes4em_Bgu#<9AMYRMJQofXi^QdJpEu8by?(R8dbnnD>1 za%C_JHgwIdlosoy7}}ICDzf<)L&t#>wV^w$e&||iL)U7Ba)8gwR9`8SV_cb!6B@df z(CW^t)i!h-n5t>PzJzA|Sl!m9f1BI(tbo?E&4!Mh%PND-=(2(x19s(HZ)KEnWdQRw zbnRA(%4kn7L=uAq7W|bph>9a)d(xcV{2>;)UA=UOHz?Xu9}Z{&C9+nKk)Ih(jGG~= zbQ9!CM@sTAG45qh!@CV-PJSfhMQyj6X>b6WG$CTZu=vXJEdkVoTa(VJ$( zA@bG`DFhSb`cpw}x-t#^crv;&<32B*GG_e!wL4D`*b1ykXhz9j#F<`!%w`W8<8Ow_6L zy02&YD56a<5wVBek0kKXb}2{s%zam1bd{TD1`ar|dEmx0XrXEIGI+(|A;4<_EHe>w zt>Y|)+ClxjVW{D$W{H^SBnjpz7U`dZka|Ic`cUxJlo)wxaxU?tR*uW(gKV3USyF*C zxhy?C3xEd_bg*dFOA_XiE%eEt3!Dvc)MSZI2BvRHPCaU}c|IBJ5+^VoHCd-m1{V=a z=i^sFZ4fx)Eqz);qFeA7?G`QyVk17N#l|)*pmsu0#883(T6v)3XMF9P`i?WQ0*_>) z3R_?a)5-sg&M$3ES6_m^3#2$`eusfvEcoPTPh;BEO>;)LAov~pC z*Z?Blkiy9@at$eMnlXzMj^E8y<>WIlYV8|1XhUSOp$sRYiACk=$l0WDoNlfRCx!vp z$;=Higv=eAn@b_C<|+n=tJK7N33?gBGcyGb3LMlsXlbO}IbF&f6h5eS0C5yM-E)qj zubGqSYqS&&9=wRfV0RcvGbCNm+?obRuR#OEIlC9yx)Gq!Y#Cj;3(T%WC<`0%o6(#x zp}*rXo<#xxg-s|>0z+OGiF89Gmyp1>>ayaG<#XEI%Ajf=c}HC&rVnz)A@aVuNXQM5 zm_A&w57r_9AKhlaK@^$r(9)n&n~`zf4+dsC6m&Rzpl94LsgS5HV%n_qQHAX0We`*P ztU?0Z6yYwtMV+<~;#7J^7UG(O^u8?Als2UgW})VkTPw2=X5{p67V`aiH0xK^87B!9 zaCi#BkXD>rqns63j9i0n~Ts^%najAu>EqVNg=u%kTm|3$tLpN?^o))<3jT%w$+PXAOT=kB^T z6w#cyHqePKG-I@aJ-$X^u^ixE=i1SdwPQvhDQE~$rl}cF-Hk>sizXZtyI8k6XWF$# zGNWx$=b5sLBB`r$kmXsj~^Q?3*>r1ZtpLN)EU4HM6Hw3cN9WJcgA=f=?xZ^jPHKMImu+K6&H z6YX=`{cNHca(ABKaYoc{=Yzoqwx;jjO@(H|^4v@2V1ncDk|y|aJ3bsCj1JiC892>& z!o*BbzxYW`=tZJp+yP;`#g_wFkjv0%6+v*oryvCmriljQ{zhszcyLFQzT1~oe&7U$ z6J1$0oPohRiQ!D&=_U}BU@rshKpMalcndIHXS>&dkoGou z|6bpFQF^%-p}D+?!Q&2sQs-fa6h00tQH#Wl4B;=*5E>ahvE)W#kDD~r8NN~t9KR7M zhfBLH<;O3zT}h=MIDXO@N-Bze{G@Fp)l>;e1t(xfyU$q1Z?nMMC^3_K2TwJpsIsIh zqvSa(IF_$%Z4{tHtU3V1;HFvnjF$AkqX52j}#||HM z&q!xIR%YVQRS%rG;-d4*Du?M zd*c0ax;2#ppXE03y2F9fj&b<`md4Yk3j4-jchbqH@WYwBzi4U&uEj3yqvezLf9|Gg zI(h4ZH)$RFB?sSWXp!iGMwDl#^h{9s^i`Bm80(Eru~75=?89vPF!?x@bnNGvchYpG zUbDnr-A;660*zb|E(b*%a*5+IDAceWYls`N!y;l^@i(U|BP1N4L^op#CkgD^#D!SD z(&s)aU@~M?5E@5uhaOLd+6zm;Hv>@V&G39CZ<<`A@kl2h5cco8*(U_EGHm$&TB%^@ zNqnYV4ejG&8of!xZw@)VzsML)J`C7}k^JRa5&152;6J088#N6h_kGk4V@rCU2n=Muy9qrp zBP9OSWK(ysJ5(ioMjWwO#}s-Z3q`4VXxn!sEU@6EhU4HHqje6D9Aab$3;X6X>=Fdz z`(*+F#7$0kKPtLKt)mk#P?Cz4p$1XeGEa!$;rvykaC&5sf=9JlC;s<^VW!L|>9|NT zX43TWBr|eC9woe3^C(zcncCpQ5#nGEMMy7A%RGhCNygmWMGE=@ceUDbhF`RH zFoMn|GAT#&^4}NYl4FN)uXVRQoW6^ckw{qQF5G&Hyy>Ci1LD5+x8IZYfY#@yr%LkF zmp9qb3doOuoe+ui!mYdTmG5hx>~6_&u zfx{MdBcfH?i+I9ygD)r8mkns&QA^%^Iiyve2iv5zQZchl8e5pjBg0Fc+Y+)S2+O zi;RI)i)mr3t6W@#O|^gEm9+C5FN{lP+7wb;8Zt^hiz3CY|MpDZ5&T9 zlfxlG;U}2k`PJfP*jECrd`T+#j_bd##liE7KVVPS)#3*K#joZ2b+w3Cz7&)HcXhQm zBJ<++<^R;xVq7@r!?U{uyuXjvIU}qA;7tAfQVhlqTr)#GC$@Zgra@iDo2u#Z6w_Jz z;BVVEf^m+MALM|bk(TxwiI{>okDt3|3|zK`{TB1B@qWE9FE>&2WT&5)$&%0>>X}T) z&=%M_mKysi&286=Cq`8 z_>`X8GZ{JhTx)ju+7o6ffA~B~{YcDCA=B)^%9H|yca!AW-Bcq@o~PKwIaGD)L?eQ+ z5wY110Cb*f3rddDkT{}#I8FR9*x25>LQjnUd>(xjc-q}IZ2GcIb__SzQP(k)x|_A* zP=+w`Phc*ZIhRrCZKKjdaXlaFNI$)d7DvopX5|YO8F4s7F|FEHxoB7VpH>&FhO@^! z{86#9vd6@32iOmZN9-Z7v&Qfi_}dl$F3|vHysVjLBo*podYH1(SL!|R&j9U-Hsp@q zI{Ah;;cHI%Y0645^=1um7AbE+y4T+{ipEEKsbnV%hvd4^)F;HbnZ;rZ%aj(nSP$uA zpP)?c{VcIXlC>qRs>)X!eFwY5at)CLc`qrQ1c`}D66B8l1=Pw4r3`rH1mU8 zi9~?Yn7Cuuz*1Tqhm-T>7gtmIzf^tftA7DCsgc&;tUkx*n~nk4qr&czR0yCx>1EO% z*Wg5*I+S$^I8mn*uTIfE8xY!V5Ji*_Q$3tm54)VY@~Dk(DDhb3#PSkD5QsE?>Fw4w z^ad%%DM+*a@!!=9lw6vEPzfJV^F(&YDL9kHrbjfQHvOREH0u1GoEVsE_1{AZvlI0_ z^zZ-i#G~)~)L*2w>#y&~xBl#%w|?cF-_oAH@@Woyx&=c9HO_KpVH7MUT+uF@J%|OuuVF}F~3_DK*JEo@=QRA4Xa-Jh{c#tPS*xwU`nW54!N||rOAp2W#acm zikv=<{jg#!XgOZ5)-O>81m(`1_EGvRLQePLI#>i9LljJlo~zsy9rT~D8Rag`Re%SI zH|~PM7|1=f!Zl_TX(#V#*E_UEC6Xd!+1 zjCPz=2F;+K>Gk`%V{+0I##CkkS2DrCLxdc4EpnqYr9oLXsCoc5fcG16Jt|OF`ry}? zV@BtuF!UN8qKf;+yUjdk-)T#c4l=H$C1I&)X}GB)&M<)uI(SUB6F|R%CgL=SjIkHZAPmO?%_??91klcQqA>Ws#n> zKP~Os#bWNZyyoVCYMKNIKEnD9aa-1wP_G@fdrt-LT(@T$H8Zk6Rb zP=2nd(8LlFM?qO^O0!lAN)2q*$M#P{mS0oC8A8Upx~N2JiW4Z9IKEE5rmX(DHKoeJ zno_LbwYH?Jug6_b<^z%~C`#0V3dPbe5T+(BYg@LUe1%$$ZiUxclVuai6*Pg1l86PB zMqP#UNkOOnqo-28TKN%}rAjbCo`(Hr+0O^uklhm&CCOTPWj-#XFB(A6jCq-Iv4kv-E z8*vgdZ0LunX4v3P9HcWt4ksBNu>q~aBU1)c`5knWKXy*s<|J9zAkL3-03ZIR!9Or| zC`!Nh+*>xY3li^80onB^kpq_KZsVNe6deUdVZ%ch)B+xAs^KA2$>bIuiX0vSgghQ< z$xx7{BGwQvInWtBzzkeV?NLUHLm8#w`k1M6*afA2lkD<5q~JG~wYUps;O?T$KE#j0 zBrAwVpb?~${UF0PR_SH)6)~Usz=GrABP3zqw&H0vyoN;G@~-rm;y%4>oR1S;aesFt z%YG4$8(LIIv2KH6#aAF1F;GT;xIu#%LTpCKvxe&v(`hw0L-C(k6~EifvH& z*r`=(qN2SpZ1Z$oIz<`|>*#i9&iE`F(;-*`rgnts&EJaV@F1I30xts|gq9Fw~`NEtZ{OX z%!bv51)2cxV4f6b3BK3z(?0KreKQeaOuRlNFb+-uYIcvQg7JMjU#zKTM#FUDk}o1I z5D<|2S*JnTbtMF<^)A>diqh7QOosdGSRjZhiG*(07ZuPA6xh&>xlI5But4fNq|~f& zj+Zs8W9%xdzk^N3yvR4w8ez?mLoa?ZBF2oYV`>cw;L9}!Ftr9ZIQ;{~0uSVU7hzzA zInZRVYy@PPW)T%V%>=b#p9@v0-*#+DbFJeUlMC*z@qX$!jz4s~xz=&af7WrcpfZSb zTsT573!<J6Upxsl^L1*Qczf@A#}} zgN!hhG&gkJ;_1#!8<2G+L+LAm>^PkRfOSS{iOnwt2u0a9b=oRUkB6yB@7n6BcRC1& z3FIFqWd8~78DkCbMwO*j*EkQR`_goFq zN5Mbp8qdF}`UfCm<_ewOuQywTs>o8NkML$RPf5R`fXJQ#dS)??De$O|(KAc-xB_4G zF?wdno>1VhkI^$r_LKrge2ku1vS$={(#PnTC7XPVz|%fP&n(%^ih0(@=$R!un2)(t z0ew;DZpjC3S3qABb6Y-ew*va2m^<=;dlk?Z#e5_mxL*N%QOte$zyk{Ci()>V4;)fJ zUlj9TKJbVF`l6VxDDbck=$XYlrof{m{D{XpoRuiNm4MZ!Yf`UY>8tfbVb53MG&_k6t7Vg8qq#t2$af(Rae>K*i|-^ z&}A)>6$Z*-A|X(Rj&TS>rbZ1W%=0@X2d(-jt)4ic-Dqiwf%@p= zjbf16IUmH18x>o;FO>)ncOm6mcR`9k7+Tv>O?{>=($Q*)54uNqHZSwwlVvA5OS}~P zz@cbh;H8?5J}?r|8u;8P17mAS6x&AL>-h8l=vw8cYH%lp$aH(w%g|LOmhNlCG7y={ zFB>VxBQtqnG`gaAz52{>rnBTU{8g=U!&r}oH)^hv^o-l_JinwwCDasxVfAJ$(E1P< zWut{;V67t7%^LITm`|H&m_W^MLti`=LS0DvRDpUP*dEOgBgE-5hJJ)y>iRq_`T@1r zVzwUEmBz4H5$dcHVgu7$8x8do&P799pH|Iq3ge8YrY3Bop|Ra$(pKb?o;oRloG1gA z2ybnG$JoG~dQpb&cG9wDf(UICqzChm4p{^y$S~i2!k~lG6aC?C^K$TQ+Bt&-z;xP4c!B9St zcxQ4|C8C`2BV*zk3W_&;O-~50zILlZ4Il-?sGB6s=`a%-XGjauGloZ`5Eq}cL*F#e z4ueQvsv5FH6eE>sT_V18e%(C3nbxSQpmJPsO3O@XT7@4CovB-f%A`-~+-0M{Dg>Z& z?T|!3)$|Wji*Fm%dVR2Kn|v9+E=!&t@?v>=gh?2)KW5|fHY`<(Bb2Me8|c9eeNt== z^BMLy%U5C{t>v+ZN0c^haMrfw^tMlVpKub$a9sX!0ka)7;m1Nv@%ngudM~wUn6Mx` z*P@+dPq|enQhtYvLxlQ>dqaBFTl$r^JGSd?|2a_;xU+5(mNfS{w8R5Ed`0H7l@& z|6^|=!UDj|TJmr5A&U&a1C+ZQQYQCCXYnZYMhm1gkuu9}y_f^iIbzM?vRw~`9bsWW z)vXq-6Nc1kcku5Q274Mzy96zn9Z3_-<%~ddhbp>xD?i<}|!i|XD_H!LdU$QIS3#M=Im zGZ}S?yWK7AZg!@Ckmu8~sQe@CA9ubhrF!Fm&9+1Q0z+wfz}3!7u2Bt$u;93qW;28KDm~1=rYragYklkQ^Zo$;bxxL|?8uHdILF{+XHtl;92xAy z30I;>vaol5)cL!Ou$CR3C~DCHETqTI zD}59e3a3S6g%xVU53$wo%Umq+3fTc46($>yHG<(ViiI#bhC@-@H3whvxa0p-7a+Dq zL8@(!o7Ri%^EU1T=I7*nfbcNRN@r!L%;Pu#4QJqJ`+GD4WD{tqd6`Ei{HtK2m_7sG zYm$o2qqAs0dJZ|Xwgr!RlZ)O$y$Kw(gkjONtxYJ8rF~{`y%}RZRiguKl!0i@rVdvXelu1GLbg0F=*-9{&ayj9e zz>VVZXp8PsfxU2`3-A&w&5WZ0kjcp#Ml8BOA8akOFVyKX;Y(-l4#fGc+C1&n;K5)S zZl^qJqAd%pZx|phX*P#IAl{IUmkc@?nnGa7(J(Esx&fZs}g^vVmr!hn&K(fd-etCNe7Ax^ayE_il9e#?)6? z@>TK-Rq{He%7TO@w;L9z+(?s7>eC{SKul%ndT=_59MN0c30P-9x@Q)=2pxC+lHZf- z9Ry5DGp2%*YgoOWsSuskNz#1ja2$nwVVEHel6cj*^m8}8Mg+BBmHR-P4-~V&6dnU( zqvjO7l_n2kWGIl7DiZruZAfVvx)$vsVY?lU(pvqVw6Ss%SP_pPG8EQF&?Du8q z4V!dP#ezs-8)co8NzR;A=5$4B0;Ncb0$;;XBI9<>E?_K_kMJzrjg`W^5Cs@2QoBWA zLyNdY%3*{2!qKQD3xY3KPkk{~0nOTIJ}gGSDN3zyrOC5p>euq68Q1A{dpc?$0ZzEz z;a?e-`M!V$sFfQciP7np5pNF7zg!Jxs3Lq9;5{edLhalwWZ=Jcubod9%N-!RRpi38 zw^aT@%=Tl@^CZI}wv@HWG=QM%Pbw3bg*@`qr4Lb8#HhrK2?9HN@41l+?|hwHz7`?EZ;>S4ruOO9ARGw@qv}-8QM7T+0d-o#Ro!FeE%$Z0t zGbpM}C?Spqp0s*&xS?n8A#|PH?ZSK_k+N_DjbdGx1K4#zGs9^*2XGod2-j-UQCzQ~ zHOCn-wMYhujje!|TbLXG&X9Kp$*GkcP`s5`0AM=PV5tW9eiVXIYc~1$p>!0vIZSRduv4l0WTnfL%bs0e)@ZXp&v)rE$Y| zT!{=Pv;lUYF$buQ&!;`0hS=}{0u4HZ4my_Jt^>UiUJb%H{Fk$|RWBM~@k_WUz^Awo z)3#|>BB`eqCvnFY$7`)PPG_^?v>MwqmlFBssHx19V|3~VT8qF&SgQD>CW~qCaDuZj zN^B&dSt>$xX%_QyDCY({v;$}IF0zE9_s$24(8m}c((--=r!LL#ob=nDHOS}PqamA1 z?WZD97lb4(KVL53fs^3^zEX~xvQ1$u7B}|O|DP0QE^IFNzqnK=6hk2YY*nB|94I@X zv7?Bl;k8U~vaoS%MvG*nw2Y9NcHxfKB>-Z%faGO+lT0jkuUo(Dup|k)?b<^KK51Go zenBgMbygC=%dv&Yhy(57>=lTH=8}a_674RfiO6YM!mq?vo<1}&?FSa30Z&Q?$ z`n7P*V*hE~*R$+vYr|JjH`^#umv+8= z?QBR34JPfJhOcMvtuVGDjrXTm3YqlHI=nYM4Pd9A>9h1|iCEb|lu?<6Q-*1QK?h8=D*b;5eud&+YWRg9b0&ZKq?Wkn zm-3;h@b<7^NyBLB>%VD=IXUM>V8t7-THu11IkZfh=fk03rQL;aC8(PXi1updx~P%TAuDG2jyG$OXR)uH z(d1_2aqSiLlcQ;JSyXC578FpqEFs|`NM1INAiji2`1rx3?V!$cj?8R^P-ViTHwH^C zQ`2cNW=0P=5Eo_I$;oamXaPu_ z{y0@5IvUp#rm>U!7wk%ZjaLaXJZNuvpLKg)(&QBRP3f-_;YOi{QAn&yx?@=VMg-!m zhbJeZl}wE~D@uPXPWqMj8R;zIt*$kw#4{Z(;<~j4IWTWR5~My&R#Q;Q4&A{A)y{Pn zEE?5h8^%na7YsUqem329BAg@u3GW|(|INwkUUmk?PeuqAJHV27zJhaCUizKGG)Yvk z_IfBSzqeEHsTz8DJ&G|isTZ`0fQzYx25mC?cT3M)f5`i zx;trupWY{6M=d!`Oh#*1lM>)qi6S{v35qc-2JMyAJO=mJH8Ty(LvF}7PswN&tqhrp zY8-Iy`$JKsF54i23!Kp->z49?v;Z2Ny(vr=YpA%bf$h0#&YMxjyMlHptE4)oQqGU*IS z3m1H10!FWfEJGTP`IAno>Iv`+>EzTN&JDh6-Vv!VZz7Z4$ zgR;RGbt)uMs=M+Z$Kj|nkOIq49aM=q1Z`nWEMU2SQFAC7B`bg_F)qW^tf35n603o3 z0>#!+{k<9nk;+nu{8A{An{1(-h&}I{dM$oyS$8MTB_E*Bhh4c8~=08 z-IN6FyOP$vTfY=d9wi>Jt+nsa!3&QT&zZI~;PYQwO6^CYy;CbdPeOu6K5_TUkCq~~ z6nEeD(f6E15<9STnvyuRnV~?O(F7Qj0WBJjv5t zOzFc&W9x*?DC|fy0&6@?oz3uU#4|i2M{O72M%H08?%=lOUB*n+&4N%wbPp9!jMVeo z>L&I>Eyh&~GYdYtR)tG4EWGUpVMJJ}t}tcW1+xu;z&nI$UDEnQs>2rgdnqp6DA30*MFe=9{q(h8^Nu8wah@a){BMbkGqnP`2;r7S7+MScJJ zsmC6=^Ugnd^jB}{{7n@hCn`Sw<+p$5>;H7m7k>WVBKMioZOJ?}`TE`VxiL8h=v!KCgJ?4P4#+ajtL=$@?z4 zxr?-Y@w=$>qMHvIkKMQUU9|Yrn-BK=(TCpt;a~b#X|k*gboBB2KYQ0_@A!f1!Fim1 zRJws0z84vQr?)_3<-O^pIxG?#>TueCD{} zqyp-VRd07GtC^l?gc~Z3lK2KVXR9pKkmb3?Rr7bgnu4n)DZ2ACD``}wJ=W@7>A6U+ z*bBP!;Z{@n7s{V$;`qw+m8nz`YQIE)0&EJ$>ar?0k6t=IFBL#WwPlbGad37uOPw>p zL1=71<@$rXN*Y<|+$XGa?QjS1ySk~Z9E@nt>zq|i_sivCidg^}$2EE&3Y3~A>0maD ztSGyYfRidiHd3~Tsc3;60)pEtHH<&qpxHEv9!7y8@@{*CAr26DS^VS9U&hHwWYY|9 zrS2A(HzSP4O52*Ynqw-&55|F&A@&{mop89n=(CZnL{-mm7UOx{Tz`~RCp@xSjfTu? zjMQ+^cDm4$lpU8K-oqFfm4}qd)DR=)f^@Jcy%FV0;OS(JY&ukEW@S)gKr=dqD=I|l z9{OC25Skn?$$knIFQzwB;i@reZ>M8-=c!w?zAI{Ip=4P$uH{XTuE)qzSqA|tYp`~^ zslkz&Xu!}6>zE2>nf93)>x;9YKt-(t{Ir{q734~BPH++fk*jcm`=8B#vCS~!kvdiz zB)~p*_;Q9CP8v$1cexRxZjQPN@p@{EHwa4HD_AqV0e*l;sSfm@ofK%U!vV&iMmeA@ z=7Cn)gOIEXa1zMI4q~ZU#h8~GOiwPAiUTb<9@!EzlRC%*GqT`Z4EqiH5DR=BrUn?7 z4xSNP6cxzcMep7B#!CIT(|W0YEusAQ^bpvYdI+&e5Tv4P_8?ZFK!!*~8kB-? z9F&&I>mnABj)E6GKwL^05Fn6g*CN-ALgwA%PPniINtBkgKXXi*yGilsLqf*P_sDouIfjqiQp&9hKET@N^1Ts@fSdNA{-J)n;rTr&B@U56s| zM=Z}wdIZQbAH3D|hEYE0`Is4c^MhiLl99?v^v5Uxpp@E+hcsE%q}*iYq9*Pb7WnXybuR`8PQ#820Imc=rUm_;C{44pprFn9ipaE}Kpqf{ z=qkOYQB-3vT;{)X@K>K+wPXsz`7AKD6PRKXKR(h+rN>I~(zeB#v~8OXq+4UF;acTl zQMw%1qQBKA>4nA7B^LG9XfTf2BE|nVIH+l(f)gtRKw;L(J)JPrLOp zuX`rL*R44-@-M7xxB(pAH7kKd5wAn0rtUUyCN#>-I`%+ib4$+9h?f1S@3!QbmO6Y}d3KfvoO{WsIyV`JY?*j$cF!TQ9u;{d#}`16pX zo-Df13(*P8GIphncY{}2TX~hXj)tF!RK#QcX48-snSfqkuZTp95nqr( zYZ;-yvT>2F);yIk+W-mDDAnkmZmzawwl9S*5Ode=%9hVTJ1z%EURF!D4i9bR%Ci|z z;aGRo@|`qDdt8E~wazF>T|m7|E0@qxM|;vq3$o(NSg{SaFjWP3&NHDvymHYEuSGDH zrm(b;`>+vA&}}v+ZM(&vfs&G0GAYX=gAS&XUk>gIx^*o@*C-IJpD*%<`TE>Vua#rG zp9PZTXF+gpmKVw{nawjX7e5up0=`vBfe*+9nsvmN=Jf9H<(XEt0)j%Hf}O^KL?g|m z8@L708n_kGx4CV)^tvdfbkZ15*K>l;8Iwv-aX+>|nd4^>q%#PDL6tv~3^~kRXUdKC z=>vxzl8{1|%utfW$(_&%FSIoU4l!?7)8UNGP@1FSxtguz}^Q!jjen7xKL;YtvAr~F8+ggL$fR$ zGS)$15OL(x0;35Vt7$Yy!n7uNPd7Pa3F0h)Ip~5u8WI#66VR%<5^$*TRaglvsaR(~ z%E6o3$|}%sqls0PvEj2#s*cr_h?<`~|CB^TZkHs0cHm%|ykd5q;~ z1IXUO0!K@pgS!`DG8qCyO~=&|%4(QTPCUA6!VI=?4fB!Qu9>jpW8h$i`DmK~ABB=J zTVlM{mYC9Ni9t;aUKjFE|I8AYK8djE}9Bk19D z0$PdtSFLSoLue<9PHmX{d}u@QIBjtCsSU0^wc*wB9GTkZP>1Ssn}^Vhy80ex5xPE? zj#HoOsp@kziv@8t%RKmMS#juP`e{1g?tLn`Jr@q)pzHUG*i?&VuPn2An6-ioho7l! zKV#2FYG!QU5{6(7VmqoW;~+Y_n~b6>AN&e<$w*=ni-sDF0b*qSA|P3u5{kTv)R3gT zn+g|W;{n49pharHrXn?xJnb?gQ-KK;gCdR2z)Y0707TIl&}WHtr8XFyiA86u-~yOR zbVi+36(A4RpRU#{(g`~~gDNGGb>ns`6b_|U8f_;?id2BVzKBd#HYh~>R#?m=Dmn2? zEl8L&xJEi;ewHrP%+KG_Af^T9PvV3_YCyrQ`??sQA9HL&>;5hkAqGb@P_ky1gfcDo zZflLLV|YQ0S|KTOf+AE9>lqR9Px;7;li$Le&b?lTb@gY=cC=HfymvLM|K$e8(*=@+D_vFc{jfGog6 zpq6&(6ctU5^7cr#1&C(x&0JH~*M8#-Vrnd}Se{tvDTSU98}+qIF<+OTuCN99N~47- zEVaYfp-P)C66kEHW|Z$RWpAQfhFeL|PO7O4rgk`+7{u}+BIO>bh`BN7EdN=I@hx1F zT4EWWYYLD^=C5m*1?Lw+LrZC!_^WQXrQMWj2`0N+luouJXBGi$;%^7-S!A5{IuI6tPT>U)NSStJ}9HwQvTozX&=M)U(~#vg{B)dNPRkxVb(iX zYK8FHbfbJnh)QnmZn+WLm*RMDz43-_Ufy*>cM1AKW|rqQ9~biEXi*u)h_jRjZ@?aw z6mPtN6^70)8>Eb{}a_569 zWVq32VoqhkIGj@DO0UFsN`taW{cZ)&3J{vSVMwdliNqPBEkzELGt01P$tlFdIB9H9 z>bT5s;P9H@L{%x;7*DB2=h2qSnjsv z3Mg6*no8RCi+92QE-8(>bDS(WC{wB`Bp13PWMQQjy6R(XdeujHFfl#+KKR##Q(0@1hobUt7RN_-S4OrB4US$nQW@*t zGdeLcUb%kn&{+TY(CElW|DHn?@(oAoUB!9p4dxumFm)o z>ey2H*FU^;pnq(~=+d#uj-l%K*ny?hv4N%5*d+s0S*b1=8eP14`?58I%a?E4*1v33 zPtUULORMVt;$79zk;T{bSNAOLS+Z)$a?3hcS-NL*aLHITidqYu(Y7dxekP8h89epZ zKR#aBvv)ihA5E$g+iWxRa6CZqcqui??_qV)cEFjJT15;B7IX+ps(DOiU&j7?Pf zhpUyW!h`<%#PBc^e~{w-<@{rnH!wOpT(K$MGBmP%)Mlyb=4wC?Qk~elclf}z{^9W()W3J{81462LMR6yw6Tp}2fq@(c7A0a?oTcms_q@`KadRV**jd>!%P`0 zCS#THiLsH&VA4O5RK~_e$C8N==9G3;28R!116rV*nf#WHO;pDRmaf~@)3a{X>dLCs zJh%04Ti(x<4X)X?efzSWb<0+-TDPvUVsQ1~>ZQX&+s68t?*3t*z-Erw9~#-AnR`6$ zj4r3l|D@3;Q})2I=wGN8-_~g9z$jq6w|`)F{|=VQz;(-(ty*Orsa#(fm>93n_C=-6=p52M z?txqF%4V=K7=`%vkY)wH04q7f6QSXZT8X=vXA{r&@NCY7LwtCKcw5>ACAB<{l2>q5 z!(mbM1m6U2Px^AFATHt>)0CQA8`^maMqRt}C@ad^9on;&w1RJrY_VrRYN6dBewcXm z*RP;0quXsXs=U-bZ80P^RNdm&(cqTtqhnhDQ`ZvrmF1qjgm{vW*R9c!i9K$0Rs+(m zt?b%cRavaqYFMn>`l}V8bl0$*Lwj$b%^KJD`@Y@9Q_%Sdo~QEsJkMD?|AMD*(RX-i zoqwOF@;$>-$S;g*Q?vU%i>Ky#t`DEhQ{{#+TuNADDv)+VqSPltjx+}NdYE{vpD*xK z{efDBb@e3Q1$PZJGh26|oKmZ+KjaJHP;RIvq(9pCkiRj$F^90>QpW&(ghCFpNp6`c=7wmk`=L`8mKF=CNVO%=eT%92t(uev&f5UnY z^@e&vIOJUm_247EOe5n6u@c?S{AbB-Do_~oR@nwa&uMuN+tuZ$j8@_(sL}l#2 zrs@tCy3`?V!hH@!Y!(A(ne4yRSV8w{)VzQA;*2ZU2vgv*T~(>>9UZAwJfiVms|}y4 zR(f^w_VC@%;>Lrf->;qq2J2n)eU1vA3 z`044!>hxuJoG@tBt8XFq#%%*+3j`Bhc4VY73^zMIy2W#`j$;<5J329Ls7X|^GA2p!kH7=FoqIqZG?%7-W-Y4!Fyfh>>*m2NW`w2h6y4Jh!sqljEY(8#|j}wkK zts(AoA18j|jE1-~ecXJW3mW3i@^LTYd3Hlw;^Vq_b~nWRgpWIi=gaxQQ4hnkZDmZ6 z4tjehMy?y{-@EX_pzaEuwB*4e%Rxx zfGxU!JfgFLl?(Y@-lNpbN38MDBO{3AF2!kFI%bey`&SI z-_28VFfp=w1hShYStPc1tdjKe8yR(>VB& zK(Gs?@~w52<6Ro--QPbpgs@5D8fx|ts(X>odm&G)xeyNZ4S68p7&lJgTD;V*?ewuji*Z)i33DRb@b;;gu8Hc2^FNaJ`RHd>_BdD&X;<0b=%4 zcMx9BFXX?NcP|DAPp)3+1D60mR}a0p5(eoK(rFFqcPT$){E7bI`m#3g-DiJw<$C{i z?fCY!SB#EtKu8?ijnI5$|5&v`Q;^ukqYgxoY~bj(p0%8X0~6ddaJT7DKaGPuk?m*?A7%R4fd4h~*Dv2D}D@Rg(2 zUA=Sc>YdQi#+F)o%3RM+;%G zNKK9pG|Z)_!pHXy3{>`x*TQ3HcqS0%YhU2mDPQy^I>n7oCr^bPHK&lHX@pK#0Te}7 zQeNoq>v+G4-_`uC;g^rQ*2le`=NtGnD2Sp%v`swT7kG+?K3Upv-D1=iW1!o`dxs~g zkdNg{dQ9YH*@<>MPCZ+xM{p+`lhdb6ugGyyb8j!pvbWdsNm>xS$@vLo_9jvE&Qo36 zf03tn-ax>%K)}e@KfV+C3EVDQzP7hl0L)8WvGpukT~r-!HE`XQiSeP~YHzOri6Ncd z-b*vZU&slIGG6KJ%^0H#Am*b3y}eE~(%XBrsYou8UZb~nbgyt%Z|`P%9wn*iH-vWu z-#^9gP5cyop>*n}$*VuD$)Dl(V$!L{=1fDU91n@WU8h#eqZMYw;g!vE9Ua-qQ~k}i z^=AqH9KS96gdD0nh6VwR9sSiUCe~e5LB+Otq<{Fj{sU+iK}6LFmTa{;0?{A46rJIL zX>}0~QY*JY{ixO|bzeQ1IRFOl-*c^_yPzm*$QG%C z`l%z}VUV9_*LHpvk4kxp_Smt?(ePr`B^al+QnOcWTG_)>iy z%%f;s!cVwlC%>cXtoBI|Vg;kCq7B`o-Aki?f@cW-GVkJ{LRh%R_|X&4gRMN>>A~I^ zJO1zWN1^LOlo`e^<-L)v=i~c`Z=~z__=}16vw2LqzKe7kAN_Xo3v@kS)(fTUum>6c zxrg`T(e-?tuO@w-cIM+Y5;v7vLdW?Y#!qw|@|=Z7c@HSe&~3H|0xNwK>@;xQn&rzp zimr#p=YittYMx#!txM7%N!P_qFR-2vUGTz>qa9-=eSz;Y^`HCF+soL(91M&zGRS8a z)EB*NXat=&Ht4n?~;kz!;6pcV#tRJZG?L>)_8It<94MUb=6&5r(T+VWi3kTi^{q$;}-yC^sIi^U9mMi z)r(y4#u4CWWPAt)XH#`Yed~NjH#vD*8lj05%j=U&+W{e`NOnwye=TG#H_3$6&4&K8=yR zq86j3A2w-WXxo6)9y><&UpBg*684XdS1`!!9Yw#7_NtEpt#u<)6j{=czk#eod&^FS zFSJDVRCkyOcc?aY{nD(9EK=}r|F+8To}nEwlZrj}pS`}^r5vvGW4utNt6guX%8x+> zq0x;7GJSZ%`nn|>lfmkEE%17JA2y>VX`Ih~a@zIyujF}mPd)!zKy!YJ%|IBG`n{<%A@gwMLseZ;wF4t|M(Us z%km;EuQA`mE$VVy_9~u|)GpxJ#4}LSKmk2*g=05@=!0f)i{4D08RR*6i3LjGoeXZJ zOlc#%KN~>8D1N-DY0oPySJ)fTt;gnR*Pp-gwfi?urZX55? zs_73VJsRhyx!KR}0KXtfzL|GvQE%Y)LM6$!l2?DK=SF@fKQA>8f`vaZjU*`}`_-d+ zBq`m*FZ6km_n@ya?T+jU2ws`v3WC3xGEKANjTc*_I~@k;Id>i>YBzn#r0)a{1gB||JVT=q}2aVu>Jxa_$2_3H6K z7S$*o7}48a?yTQ+8b`k0#&>DHJst_kqx<+S50s3N^)V0gT{Cv=NdLt6&e1XSse=>~ z9ro#MO;-k`G)>&VBy!O~lRAjLHj(ac$IirtuA21k?;nDe52F&t%VvD%5T6XzmLzG2 z>P;3US5*+DtGM6vCbEpodPS#MJ1*lX+;a_2t))#cFQK+j1@2A`0G3=4-l}-``0`x6 zn$l!RQkT5~J5?D=&duQR+=M2c8-VLv$`1uczeN4As(hTMtS>*$FW`%tdH)4|Cxb8E zO@95UkH5(8#l#nHJa-y=K^?d7Tfk4a;ywI+iJ!C;ntOe_mEU{${R+SL@pDWxx`oQn ze(|}%Tw1?K;OksML-@7Sw%))y%53j2sTL4BY+QeDum3V8`NiVKYAibzdD;-h{8xE@ zKfjY1^AC_;e;V`K`MsE9{^-K#$6VII(1%~={Wtij4|n9ge~|Y({r4A2f9@i`{?xa- z`MsEZyZ5|l`j$gfyU@}l(3Mf-wBY;ad<=(Kgcl_fRWM3#@22#PdvGDUDB){#(N8)a z=tXHKtl5>6Cr!|&_=zVBVU2e?zk%zfsu+Hg?_q8}#QTT&eT1K*n^-7#KjPc@e0Z~u zk}s6|TfE=HPvySQxxJUX`qSM0Hoq5T%%J$M6KC3(+2SZAKpW$~htK+le*Pmwb0e&y$>i7z6p0YY>qF^0Hy`abSce8xPWK6Cbth#_7Ic$C8 z(U|-kPjQF4dCugivh)|Qv-4tBp~=qvD!$0jpJ1CFyjadeV+jnYBzE~c2mRE!)ns4- z842$UtN)lO{T#cL*O&{*P<7jEnI^{w1N2Jp@hR+_uM_=W;q@%+;1&i6Z z`UFt(*3lPmJrGM#(^OxTq}ghxY}_bcH?OSzO&P-cLVjG36qkJT{?qbnV=Fu_xx z_z1s10KdR{qsP}Bq!Xe07*9=MAXLF4tikEZK1&JkpwIW`JR1pQhv$aF+C0Ej>oz!<0KP~5rMlWhlZS%VGVF~0L9Yg4T`(Gl7+Ks)C0n;oT(KMAz_Y1^@&C7+{>Tp_&J zN~jO#(}5FN_gS-Czd@DAeCPQQI=kme3nl54Nou-4$c>O|D6 z`se}Dzk>8NdR7~UCx~k&&e;59FP?~^Y9`|fOC_SVrFD+2UBENW(!!OROQON=J2M&eYDb6}vI$(zx#^(Mo7*Ni}bJ;DsbieMm*pS(Mu+pgs}RNImjMfZ|l zSo0G+n|b~|PccwoY|IZb3H3$MSBV!x^&OrX-}m$UHGX&SyNln4_3CdI>ZUuJ z4;+M~fU9{3F{9o^sNp+cgzv1p*BT;F3JJ~*XxQ093Tj)DTz_ zd6Kl{gao`xsH-O6rHB55*?4cB6FCac!kY6r!^YPT4niHHm-bzJ$)y`Ed-cZGT>jck zS8TrWbyr<|&9$$8!yA9t$yrUEM!%&dXnM?!xna@|BAgFIlQ4oM5#tZL**sk!f50>d|EvIlOj~kP+M| zaI?*C&ZxS5$6|p5nbg(K^Gtr7a2-DaGJgMMxpiu0T^uFrW&4JlIjm{Sldr?G4Dfod z>a-d{ZEMIcjw6KE@ve2Ugr6{n{@zF)t<8!IIo@!APl!42z&MY2-v>FtN4Jtze|{)Y zqMMzg7IfKgUBJb2CvFqYBdZo3#5KZpK1_^w2BF9-gY{v;O&KJjK=g z6;Dx;uk$>WXTHtJdPh}W&QobZAHw$w_%3RqK3&7RxF+AXXsgeoPVV(_-z7e9Qb&0I z9>0^}r2dZl`qNndZ+<6_higXJ!?Zas(mg@>d9Khn2fpRo@b`rO!T+v#?fI8n)tkIt zdzX?uvT}((XZN%@HNk2mS34JS9HuKoNI5W);MFtE#_cMc>w(b;ZQ(|{Ua2J=tL%Yx zk`l{W|KO73wGz2xJ>o0bO=275Js-HZ({v+Wh`TY~W@AK1o4ZczUq_C7(giDt=PIhQyFW@*n zir^&p(y-NKu>f!|I>MeLZO_S-aS3J2r;ekQk?|;m&2@sq)~cgdM426zLVI#$f6SNdIp$Yq9`!XOaJ=S6J1O)0T$%SZwExc=!jJm! zRUAvg`q_)UPRl@=P@U=#9i}|#K3*Ca+yhQ>KJ(8~&lc(tO%z@A?U5fM`cLqTniHBw z{P2cO(_w^suk!g`qITk7w$$&CfrH2~3c%qM9--|rCy{=HHdbiYsf@Ao8ym2lX(yY( zj`S?BBLB?yK-Zq)-BuLOf8iHs#{c2{B>UyKERK&^zHG@Fcfy8wR~kEX1MPhibzI4B z1wS*&W(UP2*X;y5vsecvK#`&n+t}ac)FK$Hecm^aPtvNuXNT}8Vw#SbnI`vyu)j(3 zFF~hv42@(5yTQ>G znbV^vANTKs!#H3EIZ=uHqy+EtUgP*k9B)J~qVO;ndehuY2E`# zg)TamP3&WO``P;9wVv{&U+hXpG5Nepx7NQkUp$@CphA$HFBJ95FApJpt2ycMB4VCw z6(-L0dTMVBX_GQHk^$r@)q#F=WK~Hj5X&XuJLkx3gX0N7X~)9*1e}7%to>*7X~|}r zSYr{r$qwzHZ5dp$LEg614fjDcVJ6_|b`A~fG^W@%Oi_Gmo|tFPmWshPq-X~hp&VSi zc8R5ty->U`b;Eb6XtZ3Vwwwn)BF#gd(xI`A^ggIic1~|KH$w{KqW9n2m6U(Mf z1mo^aozV`~>&yAgjncdCcql4=H$E0oyn@k_J~qAj;*A??W9HU3rCe}@qvoMxxkk<8 z_fqyKoSrsL-O>`hlAomW5WboB)w%FN-WT!fbM%Y(*=`(C>t=_&Ub40_FX5=S^wzr= z>)$No#(H`kmaW(*N@&{vZI<0YeS4u&ZoS@eZzcmaPsM(>YzyBh>ZN)UnL! zN)O#lOMj4W=@eEe6A_IpVA>Vy32aY{piW_7Nh;H-?@e&hxU$oZ@i@s*o{kSPmSKmE zH((pf-ia~xvs9Kk69I~o?c0a0r+c?j|Mm1tcC$11g|J3f^B=;u^3DwwhdxB_pFSa7 zW61eoa*9g{VYviq&Nd>aae{^RnK?PY3|5G^6%^ed?X{o~$y~-z3Y{2o8Q6(x2ehXn z|2V>8$h#vswyk>bb)B{mKGgM2>d|@&;n(vnjx~gTig(Rx2yfzjb}oD|?~)ut{1V>J zonGTD5(p3Gb zkN_Li{$%yyZFpOtFzMGej~ZFBk#z@GCQ-}P&Zg8@ZlGIxfp;jxOE3h-09cJodgva2 zZ`pBi1Y>Y9eb~oyjNclLaJ-j{51gLMIc3e}b7+P`7*WQKunA$U13^d#3!~@LD=b+* z#DB0MUg3oe@mhBw{fBtZmw!LuQ*-gZ$NRYrVd+{!{?G6(Xb53hXV1=sA8!c%eM49> zSw8&_8^R?(EFV9kA$(dx_zc2=($JpHhHy(m_{XHprx%Z(4@+m04}aH(|Es_;P}jrP zcG?!|_xt)o_;$h@_~pavbKwv0uJ(s`VZ(e_PSN@BT@B%%C%l4R$gi;Yl@Jzn?`;T+ z0|@c!c^72i-&y@6G%K zhsH%fA@^374i4`zOQbXlOIEuU`%j>v{wf{P;T_3#*k$Pn_sWQ$Ty&v{|H&&8_G@mD zs$eH7=_q+)r{Rcu5oEPCkCy#{TK4|yYuU5>ze|3>hSM%3)<8RoM7{TP(lrQsCv}R_ zeUqp1gyUMV9$9ZJGhKO>c;Sz2^j~fBG6P^fwEci_<2L`v&e74`{s2@55!zWxybMI= z{8XnMLT_4}m~#s$C>Ns^*+r@6X0nsOd*BwVRKJx=Gpsr7B&GfrK1Qyclubk|i}uw6j)6oj)xI0Vn=6nm#*N&+UP3JXkN;iY!+N2kQYxKHsxE zHCEy2VA`38dQl9XrAYqtcp3k>f#+~Tt;uZ?+Hu^FP^(E|j?Aj1uuI4n{1twtGvW~) zU)28ANTs^u3opMXU(!T%h#+}vvSR`vowQJX{ zqlxRNejP=xBilMYO~tG~DKBR>;4E8L>-Rr1Zd$W{%G_!keg=eeW-fd!;cmhl{0u}p zt&f{7EPyt#E=I6fg-9CpaS}+<^K)(v`*_yMU_+{(@NvEiB162(?@F&31q@2aWEO(x zHu9WCp5NgqTpm{B#Q65bYcriwo(SlmYFFkX(&dmIqx)W~s9a&hFj&Lb&gHxga9)x)-JQ!sQ{Of}jLZM1mlo0-2amY?U^N zleibiq`t+b)zLAL)cQ=+blTXc(YA>glSZ@?qcLrKjMmOHqok>(Q={}-rlvnSot4GhYr8{y=w_Cui5x2HCyZn6Y}z7*GQ-B|0O8v3>h5f2Kq?_wVCsQEBJXo3_}yT2I}%JActXz8$HXyM0G) zXnaQf&RqjP-@SL=o5xPPFPpR^e{6F3>^*z`@bND0_N0z0oqYStyCbIuX>jbg^o&Ub zvC0|MwRQFLo}Ay@(zdvx^O+UTzOZ`j?gNL9{Pz5z!^^r({-h;!6(clt!(~??lQf2d)n5;&!sZ)QaxV=uRRMd)cZ>6X+S8-LpU!nTR^r|Sa z2vsiRYCPiRMZ`A`Stpu%cXW1}^!L|RFE;muZH`R`dZrJ&(^JSZX|tTJR;U?lOwW;~ zj+wNO+sh1>*!oY=_i3i``tA56EAq=0D&p(c&}W#LDBQNCZMw3uSii5X5X+M)o=?;g zwFbqlzZ{=VUYcS}>Z?tbW&L6nD@{SmbBKrHcv-SN#!&oxX3t;rZzfbzmEvCewCWQ5 z_r)@z^~{@(HNk|x@IFOUNkehh87x{3qBS^AH zjwu&~Ngkev_Tv5c06i%Fg&(ko_z@XV-hB4CbsJs}H$1s+{bt{vE!LUU55CO}O>SP$ zdZTZ{#{Mn)-#T{u^x)YKzqom8M53b(9gP*0RLxk>w-G9Tb?o@yhv$ZF-jcp^_aejJ zTiQGN`giO+dv3^VpAai5uWD#&Zh_wfZ0O$)B&W|_y?JZcY%i~B@6h{xdE(@$iV0Y5?mZ_@ojx;k<@3sI?|wXZZm6neRzqV;>za+5-g^7!soxErxny@Zo0{)`^Jqk0 z`u#7iT9TJ_`TVUfym;vF>f!{L_5 zs_c;)c^0csvnlun$unhBk8C3P8&DO>dxGe@MKQ6GVqPG!SkH*vB|`Qbl44D<>g#FG zR<|kX$FHyuD*{h*Df-FOm74ykM`QX3)30iO-$|lMyg5<-jnF@0s;h{oa)GE2n!M5! zAoFRXqW8Ldsza%!`dazmZp}&a259_BI@cJ}_t@h1I0|OUP`iQZCyAF>&Hp!s|0kBW z8b`|^jEkpiqx(&@5Uw)-9+#Wp*%&|mhtGdMhe)+RYsCHn0AtK*?q2oXyG|&N1(1j& z_0pi!&)TE~V|Gai&S0_@Y)ihIy(=p-9L(<8b1fV1Ys(2dXv>uz1tYJHv_&4G>k*`; zMAOXIqX#Vu3q!7f!mw{)<=26M>azTWwZlsWX3y$MnX~i6z#M64VO__Cfja3*%3SH% z_4-3M7B+l&Go|tTUk4h4(w)X(w0gd@9FF4Uz$693g(^+qBpd1gAHW#Vu_)keGQ|`H zxhPU#xMEqPSY*0TFbV`zKwone`%%mwrvgw^?18LUg)pvB48DZ|m_PYtoijY9F5$2j$ zgs@`bRoDys5QQ8F${@RwK-i=p@OadX zQ_&9z#R`(i=U@cTmKz+gkX4Mr$$2ykWri{o4bmV10x5t>AS5w?@iv0Yh#LY49xRj4 zdnppxfZBqR{4|DTIwWwc#Sj}ocQPT1yMOJK=YTvPBX9$DCxYM+sOl`+@ ziKQqpijpxiZ6qfmG0&Pdw1E%PnkFC^X!{2~r7F`2U#p_LYo2^7|B`!>&>*j3Ej~8%Yv|*x z_sqrmde@C#s($n~JINpV_eL3;YQI&3>Q&`!ybHCj`bcNlTYYkGJ(*-bk}c#9yx}d) zdtdv;<0q1)KDY0G?cK*8xcB~~t8X2?{m;iAJn=x1=xf)0Jod)7JTNKzru*)FL(+&< z-|)c0C%o$5-uv%Ae)n7Mef@*?-%EXKZqeRR;f-&2@IHR|Umi$O)%3Ejd-Jh--%!09 zzUhJc9{Prt?LT_s-EVo|_=A7tJH3MX^Vuf6xgeXpDPsd@hcuYL2k`)qpO@#Y7Pf9Kuzz3$!z-@thPQR9P+Bx@#F z($wE3C~|rKQS~y0 zYpqZ)Yor z8}?@EkA}hEviWYBCQDh1e)C){Ffjoz%R3#`I=0EP!OW5tW43{4VtJC~YJ@6j)@ilb zlKitNXK8as+VA)EW6Fx8gKjf#WgS2>*O{Bk@-Af=W6K)zKYUgFG`&iHw0se|Y4hqF zSSAdI*7%nKD0=Ot$v|J*Y06WuqpvJ$sGWuY*-Kl^@TI$)_R_T1Sh(ie`J~Zmr0GI- z9p#3@>l<04(M}&q|3>yVvSywpi>+(&lWBSC)VZX0GAaM#zxt3pPyHd!_IuJ^>(~Rw z-gx{wv!wmN!w=l|W;V;ePJ0i&;Y}y*eZz?dwRe6zYZ_`M|9iIm!8e?E;P_v;_r3>& z#&3G?jc>U7K=MT1x%c(2f8%{B`;+%-j^>Pf8aab{NV8i-gGzZ9shO}d7}1` zt$qC76K_1u%elMnW~bhJ_XBUZKTmsi-~GA=?tSR)*WUZ42lA}@+f1WOdq0@{ar%Yy z^>54Gp1t{vC*JhY^w{yo)AyzSKL1;d*Yo|@Po?iqkNxxX*e|3%mi}b=FVbI6kNs5s z)A{eDpG@DMpUr0;lE=a%=F*; z(tn!K?C)pCKAauz!D&TgChB{AItw<{@(m2^7rIFo*(h>HJ^h zkL7fTfHvW3!#~bfy{7B;;>h-aoXq;)BZOnb-%-4Ld@o~1_ z$*)Vw;^;WrnG{*sIZ~v<^Lci#$o3?iLydz)viis=aG3v3oxCYe`f1O9?3Uxh{G1Md zJEz`I^*+O=mF)UaLyzTAs>jmEUJeIok+T<0oqAZck|He{!w;nWyjOiL@AJz9%UJiq>il1d3L9 zTJxYK14edm?SBOoM&%zTnrUNC(jRB~!0^(efff#TK=Id3o!R(L#1mUGBEITFt!tNO}ak z$ZtqqMwy$A>`9Vxc;fh|sRj>>Ix4?!)YZ4Wqq!pAm9LDquja3sjHKW16@y}-{9H2p zXN_yCKGQHZ@8N#+a3ei@<8%-EMt$|L7d)hg-J`b6!-rqAN4-8%Y?hr9MS6TRuQ{nz z#;ZkF#o?hrL(fGuK;xrDo5g5b4%TY{$7#7+VEgU>#S~!ky~svszuPP3&ldf&tHnD` zk9PE%)vB_=Vh7q@j!GkNmr5PBmV>cN+gcJjVgcDZ`gzW$J=WG)vnYe6;owP)*Ox$m z959cfc}wzXP2e->5vDtQ%gqVMU370wKE>N&Zh!WSp4)HApVqUpKRch&>wDgIE-Aai zCwX^6vWMz7MBsw+McbD`1G~5mgdpXQY}iN7ab&Nr;BH^R6_$+MQNyjU@{19%hFal` zmc3}QDOmPmIBE)%!?^UKG_^(p!fuO=ZiTIbehozhoQr};`8NX+#f7f0B-QL0%pmFY z8@=-J(=5!We2mBNhZ+#QiYWbnS`blUavAfysBx@Y?zJlcDz9dvr2_o=Ht;hqKb0LR z24RO5+eb@aIwY@5kAT8#k|Mo*&=RQ?-4mtoDzSnM(#b;&JHf&Olw(4t9xmDyx?MMh zU<)OMzWaE9y?c2q-ITBJ*l|<#0e%$O0eYVT`B$KvPPRmfTl@yvy*m{#(GJbaXDFJN zA5D*}WXTw&pskVbqSn|qL`ww0-nXloW{e`urbIK!?HZTCj{)j=g4*_T6 zDR&%)FctHB_4%w>Pj-E;d|GIDeGLu63b)FI37Kh$_zZwM>pA4Xs`YuWY7vlHgQs(t zHeC2gp$yNbY&DEC7mZ!{x%8&|i4?NP=MS1K<#(s!#4+MNq4>fLB2?)hCz%t)PD&VAYH_@6*t5&Sw&7&gW_K zWRa|7Lw1#+-r*wk9(cJ_p&nnZpH-r$mspuqVt2j7zF8#>)Jq(kRpPc-g4JRquN)(H zX`37#0IZel&JmDU$?h6AL9cX_!ACQs8g0EO8X^N4*s}6^y$3rSa0rqVqFPoqrhh2= z-hll!T=Uz`BclwmBC!kd2{;ci62X7x>&u4iRmSt`SyOpUoQg(#|EvTukuiXO#q_VaYZr7!+nqy6ootWTlJ;GwV8Z=}c4UhVr-MhvT?j|Flx)Amlbt^-x~kph!4~cCa`^}% zasmMc902zexKN4rT?RB>Bjfj0g|biS&&iuIS9cuFwZA9rv;VbKnUeNf;9>(Ufv#Fc z@dOZ&)X=twthJ5A8D#w++m|lWw|v`-<^>>=^);M_M;()YB-hWmbU0_yVc0yQPLStY zm6+5Rewzusl#jxDXxgNNyxfgc8|S6Yc8|BsV`dSLDbFWjqrYox^qx?EfSB%D!Czi4 zbsO$f;x-HrwP9f5{k~D#rL0+Pf+TTz6Q$$7-Ku$DL-Vz|E$M$Q%?CMfp=wuBS^0dJ zkM_|@_D}^8e%dQ3;PZ)5k_D3j%I7HUA0-exB;qd_gU3C_!vlC;L(41KJvHqpc3Na3 zEkyjP5lkx=fKtkZq#~4y?YV7c2GX z0W9LwYaD`gs5d82_mAtKPRjyxz~sZ|W?>w~9DruL5j55ja^Bk>K}2bp3L^y*ID;^w zRyEzVijC7gl#Tv2&0;pH#!hQnEbN5sdlFY~P4zZ~R$8ZT1I83bJD{IAIzhE%KT*zQ*|WE@Plu*K6!ZHt=?S3JZXSrC+QaR#^Ojr8V&H4+nnECP8aXSoD_ep3 z7d`FSygYDZSC;s9_L%5}fA3!f z@EtmflT}Omjtu|TV*b!zM==DF%@buuP}qSHM3imr_$X2~3bX0Y)6bqHbs(C8I5$H< zbguKh%sCg$_ z5cD34Z~LJyjY*cZEg^f+J;Vu0WPy0h*ghJ{#QGrKRU?u%wi}WM1hQ|RAoJ@SRQHb< zdfW!6O2q<;JS>;6$ss@u%EnQl$s8{Sl5ppOh&U(6ms6=! zw(d%{lOgjcKo1_*kLKV8d{`a_5k{IZ-*-dvc&tF|#H`T6RLD87Hk^rgOFY^V;gVu7 zW#dI(Z19qCBwC3s+mSzoZ8u{U-J-jTKG|-2QMDSfJg`mer_^yT@g)~Fw&-t8(wWKs zvdp%%I0=hGU0a+~L(<|@^1Bv?L27X_TbzNYA*8$7q%8F8aaTQSF}_sx~gbW z9}o^&Kq}O2m0y2^KUd43H_l`ZY!$5=k{#pbE$MDmTpk&?_asX~0FX>rkr<|^G&(EG z!*tE+&R0lY1JhKInyK5^L;#hf-%R4nAS=znJ(4^h>&Xbuf<}|p>F-0UH(PC+&eYw7emZVKNlTA|>6BE(v%|A-2r^w%e`>{h6Uo zX8m+{n~e>7ZMG{fko)n2RGOa#lVFR!Rv+9RoR!}zg+M@;22J7DdINMB8kj~YRfV;- ztc|W|4UN!-$<1g>cLN20!i9&@VA`&XYT@Ju%20HqCc3M`)*mNMTENb= zRdToa1?{KpC=iiFnq(u6GB#x!-KrfvTMEcHn+F=?SrNkPHSe?wNxfl zwOZRps~HwA^JdT~#daGJ2HWXhJ?h<{+aK z=!p0#t6{TPU?^oGQK#va*hHn(==L-{Nd;b;q5u`6fT`VMGX zETVs}!E{1~Th@H)_?S565w{#(u$35|`LtNC9Wx6WWGAO5B5<`*y~-WSrR3?YOv zl|j53Zj91kp}yFYfZ4K}4bi7JpF~Hfvw4xW5b#3h*?J*`%_88P2bv{Q@xTz+Umx=Q zf1$l&^M<{Jl@e9*iuJ|~{BflOp7K##4A&M-8N9(ZybTVt<#KMAPx<9*~ zkEg{(ow^!kM=_!Zb8eX;ysn4f*iTHC6&c8la*Dem&$ZSNa* zO~6Sq$W4w{ZesI05t=ZYpS6vp!z~s(_PS;7fb+{+M{}ztoX>7zGASR0wYKc71+xv( zleNky6dZsNWhJ|H)T7l62UcqpZYHgq`7c;AwVxo*Qg=m~w&RV5H|Gb&+b~|AHZNxJ z=ouKswlkw>Eo`r*z0r2+1e>g&gwfrsI@dsF)Yxb-k61Ak1Ay3OcDijaZZJ!p4_KOi zl*tZF&dI2AmhZc=*DwmE`f7~z6LauTGjZ)+Y|GJfq=m-4%6Jw7Mg*_1cYAoS zEtu~zxBeJB*5JcnIKk$)_GY%5vYzcd!k8Ik$1G2~vV8!o^QfRAwKx;FFt@w)VUagxFK&%Vt0|#4(8=wqU*zAy+vO%%Z^*j3GGs}gX2IPKb*ko`G+*gX z^fTnXf(KdzR7=8;9GYm!OFV*eb>VEWq-Yb1P$Kw5xXz15dC}=#Eoh-O=c3Evj1x1} zsdT(einA-B60=$bFL*fKs!Q3a29<%KeQ0o1(P!1nMrS54j9>VHz?fD*>(@J4zYb)f z_~N9v8J1b&P_?mcKO;4u#$j^(2gus=kf(T(qX3&biGL&BI~Co1D~^hsLBWEi#tW1=}$mmmEm#UT{gS-z~iqv)Pp z{bKrdn-=J=Wq(X&u9|3EX)76KTb2c9gyD;92~F7gShN97`UG4UXaG%oTzNA)f*Pj8|H)BfYQKTpJzExE;_4?zlMI1z8bmGDXTxe z?K@!42&KzXAO`rQOkjmaIuEWzO6&~cryNFb&FHs2~$` zONUhoL|E2ol>tpgm8lhM_}1Uj4+0Ghd?C_qWn?&QX9y7!>@7Lna5J3 z&^S%qB#?atxm#DqAYKd>pR$nmjX7^w6M6)eSn+y zZtL2Wxr~JYT!#i7v2I`S_2asp+4l1&<<6><<8z|l)u96~ zQu`|<-T&vWon1tz*n#676-h7^NCQ1^> z!K2jn5S&SM#A&y11Qk(cjY>rfV-1SpuJYemNP1}LzndP%V4J?*Hd+LG262|!`~e>7 zy?hsLnKB=K+RWqiLAZp-w2^D$AWyBcJG3m&!6$NW>_gq&;U@OzSsvS1?j%OVW^j1W z2TOP5uXa7+E<`5kypn?l8Mc8GM|gKM@Ah?to5cQORF8$<8u0!npCX8_E(z#YD`wn3 z2!b?Vfh`z|T9y1XnT;@NC9BPc-y~bD(V)!vZ$gzR1*a@Zl&T68dPt&^hr=|79w_wC zEF8c{pYI2%Le2`pm#ns#$PDRgJyA#@hh~*(n8_opDtLI2g)IcM3+Ugg z(BC_!0~8yxA_TO@R1C;s&%wMUyU0fCB3pL_VF&lrB0=C13Mf*+KT2<6k#XMz z5RDTJHi;{OW(hJ3ZjQlWZ;3Fou85oXWjEhQb7k|4=ZPj6StDRHG;S`AznBNPC~}Zy zmg`eki&&vQBP(H}sK^~C4eG&zJ`SQ#@NKd|7)~7MJP19cvuzf(HDlAr+cPLLA%~Wv z{HUhT3t>eUI0Z8yOwprBP+>I^fy^v3Sg;~Cnd2o6b&;VCh%<{=brtkaD7Ofq(qe8x zc?OO?GS8i>{f`zr+8Ve?xP!XJv!wh+ppJf#$cu10quJ zK-a?tBO}l<56%^Bw{u1ERdp2U)aS8HjJ8uO%6ryfu~CUx@aw>TN4^=`BJ2e^f#J$y zXIn(Qs*RE{Bt;)6F0ch$MrPhu7wmNVDx*@MLdI>%^O#lw^v(u31y}*H*EzwxXM~}W zy~UgR5pPZweKD?NMC*cK>;_AK88|GCa2;XCOzeBa2>Ttr#R5gYji6(#(4cdz_8az; zh=W}@a@}$iw`ax8yE80FE`OYV1YTq^LbM@Sl#+H(AOdG?hp%B}qks)eEU_aNhC(8> z#yt27J*rf6;~N%VdWy!%k0gXnSEeA$K4uCMHL$MYOl1)w$_3PvQm}?K;U0$S)t48j z+(rXSXD0PTsscami#}j}(JO5U!U>57D}Omrpn?TB@h)&|D0L`^xX8;B=sIzSJnRGz zwj3IkSw7UW0bo$F!sfU|wr?8=hmi z$F(IuVEImM?*(*bgPF6tr-&(b4CC9_%2TxA!{hm}%u@TbU;-pKpIwhDI=TiCl#8i3K})x9Swx413Uz&;cV{~>%+D5TShoEZpe)&jwE1%#++ z=$JEPLjVW)#mYx_EMGP%{{o$`?%uV=0ncOr^83eL^YG<@oZV3^r?77vI|9Ut&|1y) znyq!Y#+kb+8;v&pt%y+h?ksK0QfxB>LFlFg!o-<2NCLI?_w_)UOo22gs4w6YxZ+JX z@AcydBNj+w7RqoWNVo`|PXcMw{)LuDC0=`!+;wmtJPor~qUOstg{p{&OV{oFX1?{A z_-Rno1Y_6mCCO}};ln|t;Ui^wY*9QWrC2`z3+FmI-$^?5F9na%U6A4T0w$iEEVM`z z2iwB%BMrh{5+@x7Go2e(bW6RdhW$&yyy>PaFej}wmCa~M_&R|eB;DXugPz0&m!xck zaB^xzGlfQNyrQBW^-&XmM@QHx;A?^4h;D^dzmzsJU)C##;pd(L9xnjHFQEJ-VfcqH zAnU_4h6l^lMtE(Qd;tj`eyNu5;g^tSE@7Ac>Pupm=1FJ64f=lVg1HOXpn1~RaBogp zxjcLGgI|KZdGT$Ay?MnD@&lP{NRqV3MuPHi2?%+`=I{?{bNC0BHiwtMrfPADH6>}3 z*k1X&A7Bf0*+P=maC)cZAL>nO%S~miG#X+lQ>_GsH)-YaY^vuqs>{sqF22pMsea|k zQ^*FP^NA72l?3teSI#9oiHY*H{2sm&2ep+1aBiuR&Pk!3I<{O;AT2*>wzX7lk&WZ?{Xoe%_lvkh zCmFU(M?>5;io|Ttb3+cE>x;&!x;mBKgzBMm2Gw|U{HB+^)rLc+B|l7ltv)Q`0Bgv; z;YW`1gC^?gtZUQl*3I(M@}m?=yn}^cD5H=`(bX}5V#&IF=@N-3LX+pp&Y*Z>-?1tb7&|c|0U@ ze=O4|RFgn@YH~Ut!}5h!cdR%w#jYP1UuAKWI{>@lC6Tljp0EyZSHnN#8$O!lB~jLjTaY^HG9VlxR>((>>pn1$`&3}?|o+JO+7X>VI{ z319_u3{~UIa4?x6NRXNFSe`s^sw?bwySH2(8%Iov_=E&fcJ4)6hNeDS#XQ=0?zfmn z+xa^bj>thd1%%^BJ412`Q`hBci}l8nncVM(p)(ArY!xi?_EXc%+v==Z%8j-?h|p9B zg`yF&vWiB`>d}aHaBrWo8HKG-*^D{B6|n%WlF5||3}N*h1*~QYT&qTq-!T)JCJ3?V z$=cf5;0*F$!=)`X1^tquYpBS1o^hHrhW$0Q2cs~y%Lm;yhC z4nMn{6>It8E{>6{jJ(A}=g zyi0iBWUR8Y@eR-QBO?-JDhB>etJd=q^J!Ij$2U>WrqvX96gWwUUM_cTEkqBmL&B=M z**eDn#K7u#fOOahNyu9A`CG7?plczF>-WCQQpUKk)He`PcnoQjN1r{$qa#Bx>Bm2NY5MUevlnU_HX>Y(g#>j$Vok^w z6lg<(FnFC?_42V_gR4I2#$*4B6Fb-KB=RZCo1Tj8k^fi6qKQ)XPY&szI!&2p@w zBKvDB$D+n&cmMcHLSJoRe2C_UC#4J4%@0yQ|DkKK%4#?PDIcfJ?kKITR91I4LDX7u zy>+Uk%cHrT`x0ob7vE-B)Gu^vxel7>kMa0#7GuX~Q9dWs^e6j*5>l>*DgI9ZAeKCGRqL}+$oUb<^meuD5)wodMw zN17`qpcQA*Fb%UQVJt_D>{gmlQq8s`<)Q5zQeE!Uw;68x+ z`dKPFoXWH#Nv5agoW*FsmWGsuD+)UBNS&cg+5dbVS_rAV6$91zB^flJ3`iA53ILzQ zn`$`$` zh2L(DHH(Dhw234b9+F^q^buWnbnr+@pa5D(Fua&0!63SbfV1!oh@QHX1k;oR)2vG{ zcJgFN=>VoB7^MRcwG?RWc=jkoc1y|1YLN*hzeJFVttp{u8bO)_!8m5uOe09ElC`4^ zZfh}-N8!(4fpU!csRr}An~myXWga_TyrIm~beZR4SDvNiN9UVzC7Tttd`_N77a@WX z_TTDFdrKp%H3K^{KUKY%V1}JEb9tEA=QOO#Y=*t~HnqPHVgKeIq}g`2!#)lZT4I+$ z{j^`suSwlw^mYlwTQ2>A4>QvDEQ@d@<@bpCu&K0-mYfmYp*rkN0zG018&}Rr8wU+o zD*p})VyT|NXQ^0H2A{?)DMwMLx=ip9gR>MqeQj6e;Z2mA*Ao6%91-E^SlVn57N)N~ zA(O{=HlrQXQ~1Psq6TPfQCT?sT|rp@Bph|ubVhv{kE^8mPi05O#1#+kP&nR4vr#5U zeJTD^;Mr3ge5fD@=`{Q1)O(MJ{b@Uy`Dbf`u#&m*_dd{1eiw5ecTM9xN4;7v=PuuYuc*i=~s%ove zp+J@~t!{@+VZ8^_bl`U|5gNxd4QH2Wy62|po|&e*Rf0)uG#!YfC3gDSq9fCEJRUJ< zWp7p8ePbOLTY|~fEz&5%{mN#tE-Qw!W z8UJk6Hqu5-D#T0f6lN5j>mhry*&8J`(>2%xtlGkm>< z}bBYjW&ikO5 zsT71_JkRK0w1h&!OM{RSKont<2IFxhe%)N8zV|I;`%VRZ?$2Jy14?iQ4@||k@wng2O_W@2pao-40;pOwT1Be@^>*ps-0h^{^#+iQ0Xpix?W4c49{CqezCn*cS?xL2? zJbX}jtk88J+ngs>_$W!FoLs1(;k7c6TRJOI72#G_s2dE(?OuOB2@@lEsqP!Ft&F+2 zQ-0REtvY=c_aJBFZ8uIZXkWx2R?5FR z?^0uV3Urv5hpWi{uV=|E`gl$duRuLl^vwDTW$NG)P%b?Vv`c93Bfsb6Id~*?DrKT~ zpguuB-K8x;%%P#w&|YGzvzoe42xZVqhToGK;{gpsQ7CAHUnd#(HKHA?sj6>j=`_`<{;tTl8ZfSNVlObR zEK)RxkEz)--Eh2WOtUThJe6Orb!e~$u%bh)&8}TFP;n}dAsF4lge7RGMa8q0Z_`{! zXv!kqne-iJLv-S94uU8O%_a!B;)t z?re3Nqexh+(Xw##mL13{EL(WC+E5C$Ogaz4XVcT`duy8>O@{GA=nLU>ff0Y-@0(tE zGEsII+k0&jvHIqrxAz(kn?Arw4YBFL-3oZsuI3cRZncduf)#r)ure57gq3z?sKToC zSShR$Vr-0+l&I>j$I6w6l{&H2;(uZ1^Pp6dxi+I+Ac?4uV!}32%vKf0nO#q4pq=ln4(cP;1N`Q&|~=R zUNIggfwR>cAoCb|s443i_{?Eee*HvEjI)Lm2+-6uPR-giPTU{jDYO}v5^D2pU&x)o z0OW9)NBX^CZNA79v>MNoW6|v!wm=k1yEvWI)5PO4dJEm9@!7^Sd$9h)~F|uKP zN@IjnH%{=A$+)wD>-RQQFrCBH4_RrK|5W1Fg2XR? zvWIb3*Dq-nlEO$KGFdE!WHO#Dl(8|ojZEtWGy*5uXq^N+(>B674fiB|G-!H}XkgtU zkrGjX6t+mc=4is#bpQ;H*W~Tat(aH1LYrAI%8yn%J?ZmylU%*Q#@alf;is{UlFPX~| zwn$>8Bx{)xEvWc0#;_;(wbTw>S+%EAUuq1&wlO7Y)EP)6U*1rpE?+i_o^D5Ka^o82 zVb6zzTsdKYZQI$*ugzsVEYozlPfr;#E>zjz`R$El5Uz@|(ateBC}kSP&K z%n16u2{WTaRewD*`_qw`Ee6{_8z$DCVq!!A8WUS|Cbl?}i5+w%=6@A9cwwxpYO`Wx zM6?(IZ3k9{qHe5=Ed36ZD0`_BK__sS$Uqv3@#3dzP;4VhTL@*cSXN}3Y!k-XvN~(4 zTB-D3wdTa@pqkaC4EQeUR~m*!gFfJAxTWZ$q?46B!bNDQh*srFY){M*v{jiUs<~LY z&Cn|eamCu&HP&Xw0C&?7<55OE+CU?*VNIHVlA+AQ;W@0uT{S0)jGGE!aTP2?)wUYQ zoX;cB?u`b*2s99jWLP(l3Zg|5(4k*RO|$_ukB_$11~exMXOnIR(r(~haBz2BaGppM z6}TbwaarRstDVTjX#_6LqKS(GIdO4P(vO;O@~#BvaktLN3A-{*J|{jM5HTnKYNE!; z1zi&$c-^Iu8aMYw4s*beA{8dVWoKg2WNIp2bODi{z!K^Nv`O7NQ}Jju#B5Emd@?nZ zpN&(NL$bbpjmUcg7KOzl?aE9n8iqw*f$= ziWbpRSv9!N1C33J+Q1DO8|_OBgW8uyu-KQrm%mi4M=EHL*=T|@PyimjF+4!DK(i(D zwAaWy)I;WBjzQ)LaeFL1xQy&W%lHXW2LQ59tA@DV-ZRKh0dvn9=5pI9bw1-Vlp*f< z&<@r+10>cvc0LKUifxR|LPL?=qDo$wZ^#Jcl0>`MCW)#oiE3MrsL&~7up@2xes*|U z0iU<>zz=?a2TQxRXs@;;X0;Ks7P#2M#H>5`aa$0xI369vEGApG>n&1gB4!yzNyRt3 zs>CeAD7WjeWfv}ZBuNoC36x-IG#-xijDufFr zUJ^!y-;`0o?vdC~MXYb1uV|wJPK&P^6~OfivMaq{qr&7`mCIvP2$*}BjS5vv$VD3! zI$yCyg7 z*ohh9Eqo&ScK`=RVvZ{Pc8=N78XA}*<9@ZWkN8a;a1H~yIaujU9vzhQNk!X+ z78EgATF3P+{mILNWmCZ(M0?e$#mv#auAq)0G?tABM+yXZ=grhPK08lK1#7u!(R%!TS3qJhdP0%QgXu=dsxt?V7koucM+ z^@E%lcI?c&C^nqRi((7E`EYRiSZ}^Rrg1#L=`cr*YH$*cE;#;F0Qj_|LrX-xH2?@9 zsr5K}M~2y@^1_6~tTwaf)K62ct*!e3+iLx+*$dXe1n;q^L-iCZ3mVG1z(X#iYVm}| zk=k`FY^9>3m4%58x%^2hAD4Ux+1kd!&9m;zL>JccE3lMDQ@M->^3DvV1Su`>s43UY zz~Wp6Q*kbXVz3Lsp&;P%06}ps#Nz}XRLgx(0uAVF4H?-4cjPfp=YiB&l822uhm1rN zXKM}2*E12zXqeF1>GsqcZl0!|3T+VxgeC^FJ3yd?fn@|<=bVuP!ooaopcU=2WYV~U z4vlu2x5en)Ve((!#tPx8VaLf2aVrm;GY5E(F`MlT=*hNQTB_{5#bC87>5A0ZM3IE; zq3D=9c~!;4Fx2z4n3(PSHgVP%{N=2%Rj8ab2LJOhCT4r(tl93)nt&8)$YWyKz`$KE zqL-OsfZ#rJy2EVx@+)nn7VkFj({OW%8}PO(HTbaD4l>~|XKt1Nxz7t?W;(hK3zg49kEq+Y&>AVrC){(3>`>!Kia`2vyuG{F5z4n&@NsRSZp zs(dj6kq;iNu=3y*SShU9la!laB_%e&%JJpL%0KlLj+MQa3Ra@Hy_i_38yq6BykiTr z6k6>`Ua<*UQeqRdB<{kG8(uzQ`6s`^(X#(iK}*=+i;0%xORCWF&MnYVXtgJK)h1|3 ziA~Uw$l%M3mOH<~(Q@!oK}-1Hi;0%c)X?(PTcD-TYESYPH$h8EY=V|wd->7w>%PL# zlDr@w*^`Xt@b1jZi1GS*aR)VCZc6CcrxbjWX!qI-Y)_z=0bc+(>)pCYE|qM7^LNfcn*3==CV%%hF$m05yjl#&KSEYyEagHP z93{~tu3}Sw>QqNW3XXTm_8Gfnb}EX6FUAu9o0swKrXy3ZIUs20c)!7hqct)+Zv<(j zGc#XafOHjqNR=9xIk~?U%nVQWhEhNJAq>^@W3=C^z zh@Pxgbsk^@WigX;Q!($o5cAHlNyWUA{7?2(oGl_dO+S0+K+`B*RI4htu2m}8Lt9XD zQR6+ycWgq;bxTBgqvL#xtVT+$!gJ7 z^XMq^QBjbBP|SyDtAXn%gRP^jRAnmGN(sc2oCjsagPkO)qIGx zny+H5XnaPjRkw7drXiu7BD%HRkJOuk+`@li9FwK1;~E@`v+^(*cc>G`6HB|~?yWf$ z`vx_uI4f?OU7>Z42&zJpCXoZ}N_9gXs?O2RtCjf>WJMGEh_2$Xms`(y?5-jY8rJ@x zMYz&}LZap;)Rl6T@-*pJLaQ~d)H2qTHKD`ye4B(sb**85o)N~==~?>-jjs-$xSq>ESOPoSP9ZJ-cI<;SmgA#~6L}a@|UC~S4hI(cqRNrvzRn`zaGFV$N zTX&CxvbFa(C^bj6dKK?ZqLOSllc=PvhePmA4OQ;fpx2?W0S(PW`YgeX3fZuJCQ(US z_d~c=t)De0>8nzqAZiozK~YIygrbsoBp#JCS&m2-IPCssi2I0CtWxjjP^#u=d$j-y zZ1P1yb+)kzm@h15X}gwJD)zhu9nD8o5S>+Li|1=WNAp$Ck^LBgjx=-389bEX$)Fd5 zj7`Qh3qKd``~4EyHO@b)gULw8Dc=myzg!FS!lX0k&;;R}-*s@5v0 zfjw-7I#&ATgv^g!Nev(1SxF5vZc>Bu_ZY8hCQN=>D=l>3j%JlZ*|!FRln`q>iTB!0 zf^XFDwZXgM8?~Hrp^A=wb5Q^kv8xK*@&jZ9dr+mxHWD~2Ih@25*p{_6$Y5}->_fF` z_p5;Dyw%2hCemV+SGZ6x>%m7X8I@5+hGm)Ic#;{8Xk?{!$vq-gO#YRo@!YG5 zxwFI|%aW%A$i&bE#!Dk&yutjb-DI)tyzY*N7H=F(pxz=^^r=YwD50iddE#aR%=5${ zcRH-HGSfwg?Q+6FG+FG-owtY{26+t_8GOnKL#vAQ5U>nRfKZGzp1*ltvYD06ppyC}0^B{LuwC$RcJ zE%tN4;Tue?jJ7NG!{2{WGqn;)x{F#ewVuN|SyAQ%r_5pg0wuxU^4T&85rd;LAFi`7|A|PQ2_O}9#yV}(8RmWB`2MWV3sS<7Z`df2 z#{cw-nI-Mf8g+hjE9xxbx+nSW&8Ra)HlfbfMCyF`qME)2_Dm}MJkZk zRi@~Pm>6zOZX+rSdG;XR3Kzrzzr@k(0`_W-xCU45mA}cg)A0E6Q#=>+^C%j^tPEV2 zD=F2aOSF1fd8w@dceZ|g(UWRMs^w_rvg&A$J=5NL-12}=Twni)%eIDG^R}PM0(ilJ zMg%;4Pd>@_J;`UKc+%Q)l8Ab{IF>_Fcirp-OYW7QqxPbwbmtsim&%l-=Kcg-Le-wJ zkK}g^A}B55)2BuG^gGD2ow_8;eF-MXwge3mUU6SeYEJp?TUd(J%p$Y2qjG+$bXvg! z`PXJUmXTpCL=a1v#<6+{J@qH+S-2$KHYV_ZvEjmFp-L&8#GUzzRNXpUpij z_p^Q^72pp7`h+OGj{4YU^m)dtDT0z9wX44hG-XZ~FYRub$7$`Q{1X3Qr>HVCX0 z##VByeB<(5t>2Q zJAA`f+GBoVH^uk_+j^V>>gndy%9=q-yE5+KRm{Ui!3oxk8#88s7>rxZ{?b6SijfRC z)ETAYNh`EFxuhIO+x1#wX*?W>7+l=N@ zWD}YXZcKu#&tt#v8yfIJBv2<* zUhB{(RM3Xljs9{mBw#mxGs$Li zdy<{lGADI^H&-`QpWv=>dZ^wvNkQWlX%@zs@XI#r(uG1=9zU*R=hE1(&>oF8Fexmu zfl+a?&j<_^Wh$7H-D!}AbIqt|+zkGG6jJ#JJ~NE$U$tBF}T0)U!h^lthr zj*L4-rKiAvU7%AV#9M&GV1R*uB)#q!Xo)m!QOV#aQ2!qg_yB9bRRi`%fP;e(l{1d! ztgXsQ@|%-dB>1e=`UJH!Ando0*SMoysh#tSH*706+_@Pq-cXef+K#rnFc{ZAHcED3 zH*#F9TMW4*-1ed0$nkW|3gCc_1Wm9hpES(S(8-DpkxcwXj;GBE@PwRxAh^9>dm~37 zD*#A1^F|KTh)l#22`n$a^!LO(Q6oH0Y(;oPH})hyxf$W1$R>n`i&VH;#;>X2ZZx-z z_RU-Z6oFxXY0DDZw=A)3%Mx&kEyjV3e2Wrz&bBClM|X=7c)GSIf%9pL638uEl)!4V zMF~7)Ta-XN+oA+A;}#{@&0CZ}#@eC;vcwi8*qmFGVC!vB0_whb2{F*8B_LGvDR_{? z2Ow|~HIkwq2?kftKFuxb<@M$1>i)!~5~ja1S*Wg7e2fyqA8I63+3LlIuhhlrKV7?6 z{iiSOV)ZLFho7&_;pZ=H4!?foFMDksop0Oy<()*@a{0ggGHBJa8{@-uukY5I=9bsJ zT0^?NJltPiYbad!I%(+gT=@FTm*B$Ji*Hkc)6S&#$t=xJ;>F_0CMJLKf&zPqC z5d}4i?@J`+*YDHoboeuAL1I10pUV<5Bw`?B?8=7Rk0&p}+qp3({=cT+B*EgrLDuSy(C1l zM$+k|CYOEcT%cy$YGmOgyAm!({pE8B&u<%Wb-P=fjHk=fp~&38!ja67$r>pfJ}qnQ zIC-0D=kgG^rx@1dCU6(uW*~6Ca^)Aa%}rpbiP<%vzbdR}dHz>`T6;@5+Z)kZPBjvE z)ufTjvy{(iP?wokU3{BiDL;K>WbBT~*n;{e*o-`1H6>(!Q0mCV3E7vS<;y5#UvcmT zvNjFg&kGYT6}%VS@?`|?719vft|9*DuL4F+a`oqGAWGOZue;H zOoHS=L;~`BQrgvQ2`;Df1imFMBPlwsxQ^O++4z?0h#7c1ef?;_w~zhs&$nJt<|mjv z=jZVBj~JT{V}et6s>~K z!{K*h1GTrb+g9*m!UN5rK}FdW0N?OYmC>YtlAhNy9C~H~#k{U#&x^hkkGvq?hde1u zGNbG~Qh~$jmgx~&Yr{EnvuPdoBnhFbzRGk}z7srnxW_LoHO*NV9}9@1kr`kW-K;^3 za>6oltiJ9P;w{D;`=Ss+G$h%L-xYrKFxA6F>yX8J<|TnYn0Y28hu=YIjKl)3h0ic7 zo9wcd2~@A9&GidtUtkq(!(G|(O@OLZn!%`5_BHb&7?5O|c{-b6w|2jppNVAMi1FZF z;2}Np=o8_dQfD}ua11;fI8bK-wD3GQRq)7y6;vh{UNUM^7G&PXQ z%m$&z4WtlP40Qk*402G)x@Lsuyr_>+4R+(>vf+=)&#pDpS1;no6DHd^GER48iO)w9 z<-HopD@E7#j@wRL zV4v!FUF#^>FkC|Y`q^6}v^1uDRGj4Z&y@QmlRJHQznUdyOdOwDwVqJM`Q=s^8jk~` z-fCj859R5GM)SMIGfz(rz0MpBzEA5a9WGd#8w}dOckt-0JQ*#CTOSz318XsRzkzwx z@?mEeG6IFog`Sa9>W5yfB^!)SP+4!U7i;ih&<{ zEw-IGG-_A(0Ax}6QZuzM#+F-VgxYFDEmWA3Dce)i=O*bb zD{#1cj;$i+#`AiT5#TwVO2LC@8ZJKqhWp0D)y|^=fett2#qdm@h=&apQg9J^>hQ9! zoK+KXuyu&br86`{0c<-{rj~AhHd^QwYj4dlaIjb`)bVUJjGu5(H9==%&zn&lbJJ#q(Y^#M1#++*U~GkxQE_+4pP7S{qM| z(2orU9fG5BWcW@Ws>(V|=!O7-d}~L~KqtkP^62Ok)Swa_DwjUuMIh5vEUBo&E;gW! z<3e>dz`E^@VcXA)+8RdOdfJ#-d8?@1_cel?v0)n)#df-JQ?^g0$e4g;q z*!Eav{HQir_*_291&21t#Wc;v+52KUqCozIg@KzoWr~^EJ{9YbAir(4NV~7>u>5&L| zXj|lGQU&Q)gzQPv6Ge3ypM|zL9*s>D4;V8hLm8BhM0Fs#aDa;ybo4kNbCc#cWL#-F zwv5Lolyvcoq;8Yhx2<$((_mDws0O1-&gR^xG9A+3zohk$UQ;lmk|f+UY!-7$${<);3_>ttAXI|h z!U?FJL`u=Z;eFXbNoS&y7#}Ka5ea~;xzm&`D~oP9&Jndj(W)S=fN1&fHBN#MD`te^ zid>_r#`dMi)m_`Rm^x^pud^kCapGMMI>R1lEk9b)>ddl z*xK3>IzOtxOlC0g^B5(P9vs3sY8z`fZn_>U{^8q-{!I?8MO$R+xyZVur*YFPuaMC) zgtb(f-n7y3{l5z1y*Q)gr8f-mo~*@}X;{m-n$Pzfh<6FT_bcu+c<+zT@X0*$6Bmsk z6Q9gQxBQiWB2U&_>Q7#pOZ|7Q&K6JRfsM2Yb!|sB(%zG7Zkwk-TDQ$_!cE+~FXmad z&6nwDK}Pw6yjk?zkR=hD@~R{X8ReIFWdv7d6|y8Wj*NTRTdge;FGR~cA7q(tn4w?@ zGdh^_zq7J&({1xjv#Vn#h8@A;7sMHishPFfr1|aE?L%*0m65)4TJ2+{Z(OSnveF~I zYFHG|;Ry;Dd+>HC1VtXTR#Ex+UspVK_EnYj z>91uE7Ne%AZx%aT0oLIb!6x!RuxY8K-Q&)DmZaEl(eM&gaC^%=vAm=SYe-(0eMjKd zY7d|^UzR1S%ZU8DNQ$wvy7K60^rofN;?XncT}x+>)={T0S_5WPQRX2YyY0-%?5=3q zyD|lOMOKsYz!7xl@pcpnNsW6szFE-G5(}=5$h&i9G#{-so{}{RF%N|qFw~$YljM%! zjFIINUMU^7f7BEn8e0|$(*W*qVaLJo8WV0RaD>zry-`=DmhH3?Hi3YNH_Dbp37iaA z*teL$Xq%8e{)aqT%l(X49c(Y5W$sH<`mKNi5=WF{ipFcnPh@z}t1io`)1y%X0L>(&Ed(h!WF4NH|6(CgK$A9y5ekYb;!H) zVVMN%@<1(CgURC`008?qk~nR-Ys7`#N4I#zF`RaU{%rfKif zaG(Y57y@A-2KU^Q?FNrTZQ7*F9aVm2R`#}3ZKF{i;y zdQ$M7nFXtT8kJ`(01-7OSkts@H%$(QuGfU?pihgYlvGxBb@|b6azE}_zO1~X=$LM8 zW+PTzd-#+cz{4AT5I`CZ2T*v0~UPgFmo{$?G?l8oEP2EEBPLB6fh+tk_a6x7l3}?bp z{NglV&TRSJjbtO5q!N7`EhiGnBTS}qT1!B8D8N#4$%`PS)RP;w;Z9n$Oqmz z-Sg6>qFU*tZ=#+}t10ks@B#mDaDq3EirrtSEJF^fn~0oI!|W3>kg>ttOBv-&;tycGl@P)2yT*CBN0F*oCiyLaN0^YR zl8D46K_she1Umtomp2~OJ}tZ73QQ`ah6+`lMiy3+_nzA@Y$Wc=1!MYpc z@L=G+wAm}saWvX=B}D0i{u~@2Q>$WnirE(YlT?SPRhfnj^082(V|I<1Yf%%U;}xi1pbG$)5-I zzm*(eoOUah{c3ghBzKLPh&Yv*0|7>Mme}Q4#0la8YF!@mE)SRsId0#{#4Ep3Dxx5I zP@yxfU-=i~R&_NvY*Z5je9vlsBCVJrgbu5;pB8hMN#&<@*vBTfn~E9m#7-C6TNEof zoNzI%btcj(j>BTeLb+ZqM3a;9-n?+jg!9b(m3gd zuatEBL~RaFT-qG|*~J`1i|pT?u3&7KGayL(#=MrmOz4Ml2Bekc!Nm%8xUx1Rb93q3 zT!#H9FMs2g0^{mLDRz>i{FnU3^V@Wb|)gGdHGwaqm&U``Nw|H z*~55sMC_s2Oq=phcVCTMSAw z=#}gp6B`mmkXo-M!idnN(wK8*Bzr;}(PlM7qAWJ|%i@e^IIDKaXGE)Zv;-CK!g?D- zD@!D6X4GA)0XNWUh}p|Z?GhAAdg?>xE_<-`#kUz2^okJ|%gZQeaR{E|i(i(i_d9C@ z@|~APAm4Q{1oEJW+7^V-DB|+S=;J1Y(OPmL04YFr!!L-&iQ^v{5JM=MGLiu+e4@bH z&QUd9 zuuiJ1dYG0fr+Rov$(0{_Nf6p5xkp0sk%}V5@OYh51OARPLo8v{|URDCwF66Mx^qbcK_DmpS9v7X{wb# zlP0ZP9-8#jmw+Z+e4AHV{QJq8`1g~SDE{@c=E;U)4kppA2kK6>1Bck_NenrV{ipn1 z^L1GmKvc)pK1F6;KF$d@K05z(jWkO)``1hrX_%Meqw~EiiT_fI`3XS*<=eeawM%e7 zVq`4Dv?!-XUhY0j3uN>-&I3=+aXcOFDB|Hk1(l0K2^)eng-=eXf*ZtcjjhdAzZ0*l zwC>209@X%?`OG}EC@w##TPNH;_z*_0iG8p}D%@RC(Fo+zxruygF=ytdb8pskkVk?Y zur%paffpLhE}(k5h>NoPW949?%vpI8+)V*Ie9fu=VrHSSBSz<1C>`~Qo>MibfaY*y zQQOzgZtDlmlH)P4Y$+a*4X$xiJYmvJ4Ec&bdYDT|F;xZ7to4eTE7nWU+%y}f$st#4mVPs>tZpL^rBPF>vz8ch5(RTL7h;^7}} z@sq)E;|7Zuu4oY_iubKzRws^_hsJFpR9QYDpSy9|a>VF-*Dlst7KydT3A*xSmEW;efz=R|K=zxp|Dr=5gCpjO5j%yy2x_NYPi08!Tk`^N5Wk2TB2aa@VY6*E1|`p_)uhw#S<%qyQH`Dd^pakdm!9%c>2MdDx1U&f=cR=z79AZ+ZChlaAKbIcq1P>GYb_?N3wWK#0)AMMI7_DTd3VsS!6y;X zHTYzP^+*)NeQU;eGyekkzq;NY->jlpKYRL|CnvAhoTNmlf?e17595nT0~z#R4#VH< z#UP94t00R&n}jqm1Z{)-Pt$Bb#i!C^$gT%aEyiLEv08KDL;=W7Z42Krr3Y9v-239O zy~Lm40T!9c{l+At{DWq20ypd&wStS&A&z6^uc&;u&_UHCy+Fi83dJypdjj#XpJ0Y- zf_lw=J8|#dqo50&>{aZAyXc<=4`S3sEz+Z1|JBb_+&Q6h7B!F#|FZntFQ?C2DmS;W z7+tW+h!40+{8j~0Fe8SDGrDMbYK9y)bJ1c?X-7@bVh7YU;#M>~>gFN=9&7>YWJ8wU z9T==&csqxH<0)(c0z~hsfWAn-YDph#`!Ke}unr;S0*8>rTy(4Tn9#tr>(RV`^>8W` zVC$fKVT%J)YLPdJy4>`rc2q?zaPg~0EyN=cPP+nT z3zCU)c=dU38;T6w#NEQYJUNsY9l;a)fua*CTRRmSu)Q8}OOS$U8olE{xbj{3X>*f$ zY-68)1njb-WC%0sLh-E|I)gc>GmmKztG!cO>mGjDr-S=U-+sz1EMmiLg8fn3!~#m# zCUThN;{98!rbnp|I3Ez;tRcW5HFo=C&F=8kzs;LJ$m+wGLi6DCp5!k~%D&pm-X(b< z#;YsYr5&1&Fq*90rXllaqqiiIF~Xv?Z%!)jMC5J00(g-LU@wPn!DFIjgn>iWKNYOJ z1nPR=T)?H$B{cY`hxIDd!VnALDoCA%XkAIbh@3T=>;kZkK(MP;M4eW$oh}DUproB3 z3X9!Cq}Z{%%lQd8RNok7atGAU05?&6;5BPPHb8VdsY{?I0p1RolQnk=TXQEn#Ddt%_G`Ll6sY#e3vY@4+ z09Hy~u}> z8y_Vhrc&~jjba*Myvw-Qcu;X%^&CeLM^y|)efN7Sx72or54gmr_Kg?Nd1bomoQE+nRfQ*k+0}6?2VC!pPpni+C)+7#T7#G2YG(CO5a6|HEfyJMzn3uU_ z4k8!>wOjq*C3&@k?|a8r)zeBOcH7XeunU# zq|brW$@bB9nUdewCX(Mco!Fis60J`}C7EnCHkIV)q4m#l?%|=Ck>j z3-+Fee@niyqls3zSzL{^V?%ny(d|0DiWJi{;I%TA;okve@sq^tDhp@7!-g}=o;|0{ zcdo|vGKM`7&DV5f$aYaJht2D{#xo>83c2K59Q?EiL!UvsI&pk7AEz!Jaz6K2ek%8A zK9l=A840PWuC6e&e3sNyc}z5Q)rdPmqwrptuq3>jdh8*_nd-zEh67I7iwT_@?9a}L zt_}B-e3&P}!IrZMItQEdaUzyarKtLd3W6p|Q3ZWGzyoxUBD-8HlA;P)`4mOU=Z(*~ z{_uR@bFM%boqF6;RGDf=N=GVyj?+5B^Z9t$2yZ<_6>pGWJ>Qy?@F8?F9!506R7+8H z)g(pL)k;wXB0(ZaQH2EsqFvz=vUu%lFd6iXnDvx$;9@Ys^a5uX8}7i_*ebFV@=|dj zrSeksVYnT5?*KMDFWEFd1TL5i<~gbsO$Ju_+@LVjfH35p185z>q!D3~a$&;$Fg)JE zRk|eT(xFvMUosDKqSW*~1H6dRsSWZ~{nLeP!B5*v3_-ybBb;)pF$<`*dP;vxy_+0I z%npYCJmxk=-dfe^gEuUGunDb|Yprd8$J!>l;k21KEO6Me+IN0KZrGPCB~9SfHP{^` zin3pH1SHBgtzedDTQNUr`K{W@lanimVH(22h>1BC786@{lV{ZduzTF2Q8!&iLGZ3< z&p{aSCXFTE$hU8-i(-2crJ|&>-7bPEvjrzBP82zGMep}{(v#V(PsZiPSym*8ZrPEM zU($5MIT^)PPa*Mwn~jDOBLlfB41k`y;v0{QhIv?2P;s3&*XE_fxgn`T4QiyV0Bi*A zkXxON8rH7H1Z(Ll+Txb1)tdAb-sWN23=PFKD@agi$sVWHtyifL>eT9xLe5f>s&QYi zkUjwOk1Y{nJ?ETXU=JxtR%B83p<6|*)eUy~{)Wja_Cd%vRYL@FGCZor;t7{ojjd}X zwC^cVWvpL|N zubX*A6b2KbK!+^9I|>yQ2Urpbk-eEhr1s%+kMPF`=&BnFTjX+}ohl-xoK2GWEDtLQ;3H-?+_z_b&`1G-L- zbqkXp>{}*3vZ)9ckqBk-L$t#^7~EMt5OYz=>=y(=A*GxB{?GZWeX=R<{)CAev#<)x?l~&$xS&y#57`Sw5;LwG5QO%F>ay^-%vK%W zb=hq(@c+R3XRiA~L{cHBuel`;-vER&yh;}W&w;~}$DOPWZlwsqB@wT=Gv+*>iDcxC zn!=S~g)5^u86N-}Om8-xfmc%q3cs%qRK~`&&aD4Z$u`ZwlBYeNIVP-vTcRQ-yd-VL zF5=pTE_`imwVzj~O66@bUD3NKKLFgJmypn zIpHYebDUa0$J~Ykq(zQF`FA;w#wxQ-# z9rcuH!7E&i;b3`nG%E(x(A4CmxjKCmFe*tCft#pDB?*040F``kT_|NHTc3^3r>3zw z*p;HlTJi`zdl^Pr0MDU2NmqOoYu?f58?6wRwcwpe{aAle=O(73TDpc1MkWD}HH+>^ z?T$$d5+8M5Mp$a=^NU%Qx&`MT>Cnj7rT4xoEX9je_Q_;m?_98b2#2f&CX5AMo+6CxIKF8gWKaMW`baA`W_CBD4XBO25}}?iU3a zh|Ziw1_fSjiVW14Mg|Ynd;!St$@QBFR5fxpy_r^On~4Q-Qk6{Yq>j;GWn+#zNlp1J zMXrzqX2f>a;!eaHur`&H16j0Pw_8`=g);l9UALO4%w)@{_314a2WeXlLM6&Dz2z{1 z-juVq4Y^og`r}1NFKJ_%StE?bwyxJ;$Tl3?a%7$}b;jRSJMG^#vWD-pikEOrVhy+= z6FavCtTuLbP&`4Pt#(MJOBdHbAhaeMpE=J8dm#oZV-u*@$$} zxtiXm<-a0kvdI=}mh*0Ku0%dqY}l>3!K(ZMk(*8c*`FcUS=2rkIm@A1)oQSE+=&mIWQeoPbs+Zz#J{LTeDLb_bO8y=!=AuWF=!r)DlZ>;N{$Lz_9n$$W3jtRXy{ zu2HeYN5|Rq6XEq>CwgFFHxPX*i|>#IsYUY!h+vu((mC=#;i78tqD#o9dk>izcqHCAN=xJHOt~PQ6}= zi1lDfbE2A^I#d;E8fT|+!yaE7o}D^{!Z2e0M%#m3=O@|z>s)v9{|^4&$^Y7;eUAU< z`TsgbSFKh7wacL_8|I1G4s5ua2Bykz6e9y!qaVxR&gUC~J=9r(9W%}bol5VDRu*Up zA{z+w;(eZRlhdb=ITKTuW7vva=PeMf6sttqXBnaChc7}N9iB)t6VYh*gA1m1e%zW^ zU!}XpdZB9Na<(%T1t|5$L*+E(D=gOatMB#?&RD!&o(;kLY;|=JaLv>cuAXnGW>12; zd(#>%9PgdL>Uak#Pg?wDwT+j#na#g^Q)Ah8RzB>Zj6>^sS3)h{#z>mPu51IHX>BD| zK8tX3zQW)o-#jO5qo%DfHErtX&7(y8?6sP1(lo%KX&fTm5VqS9;1>OteYagVfspjh z`{;3)K=&=$G`$9d`kKLI?_Ui=w@4kuqYPOFjw-c|#>Ci5&(epi0e9BgVp|Ig!0)ZuCfp^M{LISoX(ohqJf!i)bKRzcv)lhz_ zSbZH$7GT#F3^D9H%&-miKtt!ttwj-Q`Z|zyONkm0`ddCqE+v9G;6>T|-%#^?H4nhZ z@z{`(G#~4!XR>c4tWf%Xpy6Dl& zwdsT*G-R1Qk*6?)eaWnyRAiQ{3F*xTCZIWksU!Z{!3Cr@uSkXTc$gf?X~U45r9?YL zaRCoJdo@aJrmiPM4xYNH4T5FP+^b-j@~yO#hrchnXWi5fIa1QQ$2Vw8_pPOhu{FOz zYR#ss&9W|+=`l0I7<@**OO*#UgdjCD<0>aE(wym(jAJr+G|o140^;)B0jJLj zqr6@Xeck*fOhDJ?kEzn+%=qMx;H2dOHup8S+B|iur4Y8l4U}5%1fF7-*3k|5lmdtZ zbG1`w$n4;BSCm(Dm+^GI3+0v>)|5@5P>km&=^nF#1t`gP+1-*pU*xC&E(1Of#zqqvU zfg(MrMZ6pdf@;LVN29;I$2&r0{Fj)MpfN;W0o$~fRM95=+Q zaTVhsvSkcbiW1Zk?qm45t1&Uh4((*8TMgXn=9IQ;PNx>{(bk4=zb-A3JRye?p$BTs zr}i|L4nj(a6pc9!T@Z^@ZTWPBqSa<+Bw(PZr_!5cD`QZ1)DY zi=bLL29HgNz@7-;9BdethR>TF9T5ChP|Z$y)Ts^hprSEBzr~kYPCD@*7~=lSCcpX! zrvjaH>x^z1L>Am=QxABucn`)n+aZGF+kr;9ARp;=TVllp&*T(!I4JlUgH5LNI;gvLnY*0L!ckaw5&jF)&*{ zR$-PCiaAyR#+CD4^qyt{xIQ#Uizl^42|A#rR=^7xWVeEr2H_+?7?ieyMa`Ad6W#>~ zmk$Dj{h33!dIp3oj)4otAl%U|lP$PNge*QTw}mS|B{pVQVD=*3knHo|Y^3+HAPyvB z?6q?le7uyzIhlpZnUY36tUI`ebqBZn1Yn=^cT;-Jnb59z+iH#ksBI{K59^DG zA{OQut9pGtyiPd>hKiwFiz_L(G~qLb#|>PXv<`W0>PnK&)0?P$q4zDq^7r4C-t@o@ zrPo}7Me%ve66NTTKyo?!^pkT4y^pe7Y+Mx1;BgwM$Xi}z2O(KsZ?D3g?w=>mlHPfWguk7V#NNh*F@e!Iijn>|^hOc@S zT@H;%r*E(;>&SZzG-6l6wY~8Ky~Vq<+q)E5$TfB;j^tXq6uLIGan}~TYYX1B$mOoG zYjGssY1cv*I~#ZL`@D*u9`B!TG{aOCS8pq`EGYL z^rE+Mmw&*!oH%qN4_?#dIFf7c^1N2DMd2EGVkGQ{$`OC!WJQR?=K33VeaX9igLl2; z?)q6d;p2#|c?dWHS2$TB_PrJC$q~EgxEg{p&~I3W={Fn~={LQ2Lu#Lwm{$Rfp=$E3pGzXYG&cu@E8hmm3k>GN?AziSnrtz{rd zuK~4f!y7T7O$kYxt@c!>+v^Wd+f~VeOeC8ecU!Xv=Rs}ZBDeK$*G2-~NabeM1FCWp zGD*%Pf^DpK+NEy-l9d&HK^2;-{<@7SGXYfx2xmlT+Q`(;&sQ&m~e0rh#k z^09_Vmi_AO5?%y?Dl7Z%RM|iSm8w*U(4bJP5ej8x-Cfe01C^GQU6QlErOIqo%Uac7 zjqocg>+F(>97w;c>?ZcvZ-C#bRh7Pva%;tS*D&@Lhjn0tx;Oa%G$fM z-YGDtva)ZevT0Q&>tP+t)+k|RWvyLW{uel3S=m1=C*W#S$+EKME^)$ltfaPR9Xqdh zQ59`fuK;GPSH}ZhCb@7Ohi_nyWe>ik4|nQAEudRBoHe|)>_M{2GJEUVb-rbw<@Y7E z8+Bl$;(4J{(Wz1;&X$H}$Z_df?sbl_t~JCr97y+a!B4wnLoyYfGju6~(r#9p=VYYC=WQFH9R2FfE`Lt`T6}Ih zT&MY4{5ct)svq}QeBLpyM84?H7yLP%&G_6?q4MwZ=hypl9MSQ)#V*qP`~5lL1J#dT zH9jYDtSQx2UHK3AOSl;H5{D?qm$dCk2!n3({*Y4r!v|7ZyPe|2v6SlHGCzEpzf%j& z(gGu!R95^-4oPLR?o)EfWUvI+VGNddy1eCc$&tzo$#aW5OY?pCdpM?9Yso{k(-8wz z?c6JtI3bi~~z0!_sK((CJ zD+lv}T25E5)E2ZKNKfgN1Nkzw++X&VLt?9T?&F1bpi1+X{%{Nmj?thM3fo zF~e6L9O}|yJYPufK^PWMx`jmQ#Xf*S$chh-L90)zzpX z;GcNLJ`CWc#&0EM8vc{q-bDYmzq=uP+y*|1@mP%JKPnpe^lmwxaKy`Xb^}i=sKaj< zC%t_OQyl_8dh#}Y+BbwbrosaPLvuX3al)@3LOr+UgGs;s zAT&u5T*KCAN56jgAb6d%e!J;G9aJ#yCm{{__2=XPn{&Uu!euwgS?~UQMCUEwRjtQ+ z`RQMGZvmldPj2F;Kk3~9Ce@z2ouB@se+wv7d&2Um@ML%kL|l6!|FM6whMYHE+7Jlb zkVVt%Zf)V4(Raie;Q%`~$a_h-3ne)e143G^DNhW~%6&=DfoDKAud>WFb@yk@`(1N= zqV&xu_%q`@@f^Py+Dw;()swlVYE0hm86o;6Urgqj*1D$;L)IxM>0MS;7j1{j=Sr{l zcP*_O5AR`#Ip5<|;67vt$V%Q-uN6X+c!Jl~0}J)cd5g4^a5W-blffFZ_JM0Eud`_1 z9M6%5Yro5b&7AgP7{?smubnB)7n4y1CE8Pkn2^EMIuB6eA=3UxIAlrlLxoG4%vyG) zHE1@H!M-GUAa4+}GS@OUbMh`*REQr0%%DMT6fd*V!LINDE_8oHNHIM6X2Pk?c_aHT z^~J>Vjvv$wNNHfK02Mcx$EftGPCSpXr!+L51TNsuJoZ#Qn_m-qqCWSIt77V!kIbM! zfF`?N?ajv?6Ns%nx45K>lUq5O!~$fzy;KhCpEr}X_T6g`Bh~gMfY9Kz{+qS1TmME0 zN7b=}581SVdb@jLyLw~)MsFOdzp=d08;9c?>b30-9NO`|9~mVo_JdTDQ7Tm;L<&Pr z2%B{~Ai`dJpp4@LRKo%yW-ASm!tz0wEq~^-RXu}e6DJkVZX3@oci%60HvPGCqoI5x z4n;k_d!sjw*55d>(Hkf0Z`?oeh67|ZiEj*M8r(j48m%1*wKe!!IG{7L7*A^30P@0W zq9fT;5u5UUSF;buW(LTu52&2m;m2UwAGK^3eocL>c;CHzMZt8Da@20q)y0V?WYzeG z<*Qb(^ZR(>9lE@KIBBQO6b=3EYnEz``%J2A}v( z+1PQ)*3W}leMDrxz=pVo%m4Dp%S_Hu?#Oz$o6D(BslawUIFNpXf>-U0JGsMbxP!~@ zTfq_TFb8hu^3SZ`HZM3_7A$jzC3G_vzC6UmzufNy`^tj7+_5lkiOWB-susN<=ki(W z&H{IIc%I91_Qo7{gy}LaPguc_JNC3GS51S0_AhTU^A%NhG(}sb331mNZz1`ueexI^ zTTwAvM6zYnXb71PVPPmKWW_War;cbo)x3qr$sl4H+sFkrm>Rl-;A^%<;_qowbtSpb zr}s2h5tOL8{o*`z_lU1v2K-&X-&F}II{kvc$#`0ob&E%-VjA=q@9^JC$Hv=oMfP)M zIiJZ^Sq+QQF`gTRkXPPC(NXWZ3a$_MqwExV-nERs0cr{b^6Q z<(MgUccuo-ixvP|z-Kr!f&8b_QrIlUzb+H|R z-`X1AXals?#`!_!L7&cz*wg1->HKI!_j6R?h5Y*LOU)GcEv4s^TMUq7NbSgXy$kMr z{d+YYGDe!WabZico4v0WlJUZOLDp`*u#%sCFSahjl2SIl&IY%S-vfCp^AQ%-a!#VL z0G!&)u#co>z<+e}X}dd5_YAAhbT!lDnhBDm#HnW|$1?%^X4UA2o+Q~m~3c9cI*OD&~|Pp3J7f#!~mmBhl$Jwda#K8&=j zqRwdG!F}kUl5$f0Y~a+!9MO{ti6&_ehPI|>DScQe++5El<84%$F)$a8vRHPPwn{Hw zkh<0rtaC1Kq9KjrW$5NTTPemby6uQ5h{Qx4kc8@wnsvm@Jyn%j2S~|%VGv^I-Qp7X z(Jjs;Mi#UwC^K>V1(O(s(pMTJIdz3e`d#7CY9d5prVOC=t@X*i=rO^$z1z!qtL*jl zj~Fl+nvGi>IxJ&V!{`3Cvb+2^Sz$g~b8b2h`dUXC@Wy@NbBRc&!oUI|#cLscAntJ( zEy-CF8DI0kf~#Smclyu_$TqYvNQUNv)Cl9yFr=Y68yz>S;SUqL!%CHqM{yiC_H}XL zS1&iR|5}-MUAUmEwEiBzxxx{`_>-2>r&x%f>yrsvhH$-<*ramDPJq#m7-P zp!Rr}?|i>hCFl13SE+Na&-1szeZ}+VUWe!7;xwKQ_nZ>Ln=`II?&|(^_`ZB#IC}a@ zCB(7Q*TU1)QXZ^8HOPc#N}0gqjMdmPl}sRK+hu}rU9ta4A`Dz29Aec`9KDEdpGySD zenKL^ktuMA5RieHosb9f5=j%%0A}Lv25HcBX1N#`lF-<158$oJkgcN`Ia92kGcFy( zle;)0{Fjo&yI6SRLCLgFMFNZ^yntld30ju&p{t!EV6$evpYXfW$c)&i$YF6j?|pgy zG{jD4S|jyD^v#ckw@-%i!0)t2nQ;VfmdSv1iHRQai`Y2rU8I%UoqHg%BS<5K!Ac^) zB89<8B2?E>7^q;};u_!M(l z3PiBqI-!DGpky-30z`{zD0&J}L~)?+r=8cHh*I%nV0G3LUXh- zI5e>ck2A6OxMC8Fgd}Yj1c!q}wbI*T>5;N@t$;*XeoX;+e1S+zCfD=@NvJ6^qEQi&4gu;!G9C%t47Ncc0#uiXf~dXP%XujZ zklbYB1NrqJ%Of?IKAf~ouXt1hrIs|+F%V(8E2$-N zffK)pl4_etstJpP^mZ|-ExKTsfDU~nP?KyZ!-UmZeW}tYt|Y{F$*5Caye%l5L9?96 zw;UTo?2R$#1tpJry1%||u=EfOC^Q&BT_y2zZJ~H=k7rZ&6^eRJl8KNLTZ;FoXAYq% zwKR>Ei?Z%fOHD3i|0Qp?pA@T zu6Y)#sJhmrRTJq>iodo%{m&d*6}q{B9KlYa^dG(-xi@q%tVM_w&pY zO8=fFOjJv_2AFs@u8iPl*(Al?W7+@5tF$QNFb(RZQo4I|x2HkTK~|t08?)S^L3g>d z#+D^H+|q1>F872Wq&dqi{ef6dWm|7CGY3*r(c$%NKBuNGYcZ*Y6H{l4&Ln1 z#{(%A1$X;SZ1cXQP%XD~yVtfnSWB zKg?(L6$vJd)4(ookIi5V5d`aGMO&yF;{7bBf zx5S#J#a}S8@JRV*a#_JrqGM1IJl;RaMDpTkcIGe!2Hu1hS4&3$B;}a5oM}R<>ABTm>OgZ`7Ycg$Gu(&py4yc>>HL$y`0;kzX zfKlZ-0Y*SmK+U-zz=m9aN*Ra6O>rFt11^ynS2HV_#^O)Y0LLt5tSf^2Xb~WIk|-0d zJoh_rB&zIV7l8@l&ev3>%i4>lQ3(Z-n0QYpnQE-s^(#;lfe53fhKDumJzm1>s72-@D{fi zZIPdajbvDVRG!n7F2{dNIvIl;*`=TyYy9?(S{jvL%&Pg{k(ldp_atKOW$uZ!NFtGz zSiJa;^f1p;bXFxj*>g^!D5i?G5<_ksw@9bCoq|_+v-qj6UuL-`CAXnZE6^>0syoas zi5A^M1Uq z8YF1}elH|qoL$Drr8UCV@S4pk?5V<681_vK77U4hz041?sdc0+9eP%E&9Y#C zAWIv`{OhnRyG2}z?QUY<)zBQ@a>+(BaU{4hXCV#R`*WHI0~i#4R&Q^ZcW94&04CZ~ zrV8y1Z4NXmn;;48bNK^QxOg=rt+k>3Y-OXhgxmJovQMMnJ<#!b9qX0_4 zPSGP~pS&mCp+1MQ{Fs>{l%ZdT*0D|I=|0E-nGJbl1Q^K-TTB$e_h6>78-?Qh0%Jvw zED=7IJqc5^0BF?}s^Wwt%+UTq6N5ywl@KHKatdpeYaBF}Na%@m4k zqvAznvlK1ZfvqDi5@OpwqlLFg(X$&{I$n^zWWVI-=~t%5WqEn{jm~%j_RcyJ1iwf( zH%mku+$|BaiWEnwm^CS}z_oM-OoS<~%2kcdG7{#x?SkY*J^_}|3_MWVO}Q~}1+5i} zQ<{*>cOs3<3KDiE*e+6Q?m|g2^+0OYXm$lwfX-v8*pYE}_h>;SK`!R}4sp60XwuC6 z(Ty~jTf~zgE#x=cFYEdaLXO)X!vlHa{rBUzxc&~euBEoky3Cw);V*wDQvw;H-Dq|R ziT%`9jTy^PO9oE2cz9I>a#cdpS9qG8Rg6JeV$fZ3{V?T52wo187sz+PUeY)%m{zlw z$`CC;k?Ue?Zlg@zp%#z=ZEN-tPO0$s$(8lF;5fla;+>zR}8F>Pjr#&P!%50i0kjS;1<;1GAUN5sWliok0g z_@?7*(+Qh((Nb8O#?c*v8Mb{JKbpufzyWU~6!xgssLl8XDjpy~2*}fV(f0$3Vmo!ch9@ja6O2V18ZKU39*-Kq<2}#YMbWOyq8CM0( zU@uwVKw;F%Ua}sUy+rNzcw0xkt-C!)eAjrV+e=+j%+2c@CYHejdx?!9#0df{A4DguO)28Mel5^}$|}%N;fs_{_EOUgp8)Bay<{OIG)ZHKyk)K&u@pP{ zYv7;BRDz}CVSXeUcz?a&8{VrXl3NJtQL65rw9E6~P)raGNiG?h@A~QiT z<GY(BQiiz-nz^N8%=0c;I?J>fEgfr}j>~xk zMw!ch5G)ZmB4C(c?3!ufQh`lmV6UKZE`p+dI;bQi1u-MSTEa8dU+vI5w+ zi1TKny1QkK6~GY_bU9c7iS)o4tY{%v0gO{t02kctQ7gy3kn?j=EALKfZ*lGz)a6ONnjAK%#}j&WP>Rv3!yT7(dNr(Pon9SUK(7|Uy>PTBZ;jmfa@38hy3YtGQn!T*M{n)xw~HlV7D*Q!Krj3rqeh zy?RScuinDUmPx;+F&`3Q!&B8`yU5WusaG>!u2)lM;G7fS($&`MHh67XewUf4Ob91 zadx1r;vzuR`Hq|&Z_LFJ*_TcIgd<}E_O;%TF~PnJJ%Y(5C&rn;zWyC@V!*!o6<>Hw z_LYi#y{;2u5SQbwd{)`Uk5P_uXVRT^Z~44U+x1i)1NeMEd2C@$1VGU zmaR(Zo1&Y-b=W{pZ8d^5m^XZRfO%RQp&ex;;{i5%@%__HeCs706iSdpfZCFg0y9!x zUicdfZ$%p;U9`=M5{^eLehyw%ig!fkr}*tYEC%!~67&5BN+j-!ZN`h=6mJD6iUz#} z?aMQzi`H=)F@=hL1CS7jK!V`_+N#A2TWv7|t_&cfk9nybSGrsqytG0L4;{X9OJ#`b z$k6SibIxk4Q$g;ad${uk(WslhHJkPxXetT*eERQe61;1&{aW(av_H}O#*d3E~n6)=B@o|qT4>f#`w~3?`>_l=s(r6?0<+^+k!7JC~ z3%c_Ad0lalt%AnNHc_+Vfh`Lt$of;kul$u84+>p9*E$u3u_)s&v8F&*4h_JTZC7++43oq^i%P!Q*zp!&;}H9}He z5pGR|f*>%T0IFjen1q~IM)t3jku!AE@~)o1b2#m3IoZkaR`s+Ay{o5G%QG_6i!MBX zIay6eUZUgo!4789v<;8V^h9~jc++94%4cR{Msv`5`#2rMQS=-GQXTZ?VrhIV^>(Of z%D3O)okq-AE{d;dd0L2slKzygr#>Y`@JZdGnP1k`*R_ycY(EcG_s8pt2A%q7Kdhmjsj~9`Fj?)@JmZ; zgUpq)Mc#)=uN~2(4#LIx1G`Lsuq{W`D+xY@KviH|>Qu$z_()YmJeOck<22wR9ILcy za`rto4ZC4;h+qo3@D;3j6f^3#&^mXq2rt0hlX{^^yke(qoY zufKQkMa7)fj>05lU~(vqEV`IAzU?b6KzAHQGNiis+=m4=`|}}N%>JDLPw|uhJmUQ< zRaZl)Z%-c$m{L9&wuUX%O5&On<7IZhc@V zG3{#!T~Fdr4bzv1EHMFDP@bq+>njaY`h;_WN+FQ zb*&NmBzfIX3jf`QxS)-tb!{wJ4!eD6Ia7E{?9Kh_-rQfkY5TvmM(n)gb%z72;C-~Q zyza~898o12~c9xg3q+R?08!mqk zqHMGB9~U}t)R1+`21U_v!;ve(Uj!B8EZvS{sYe}rey9oPT%q$@__qMv!l4fN6p{q?apBNhM};=>5g9Fqx3(A92VbJV-Bc?kSyoS_SECZM4Pj_*S-3D?N!_3j%~AJE8#R| z_uiaX_bD1t*^2Ew2XCVl0$T`H@nV9GbnpIkAF>{={P0F64RjF&AdxD-@&Gw=7L`28 z1TJksH) zX#!H#z!Wd2Hc>*PGl&*z6@=`Zw5-`|++At?vg6)+IO4P3<(P0A`Yy=z2tU~oSTC8HZBL*dGPr-K4J0IpQ z#<*L!<|?3A>!1V~cYr&ZY7#kAIln>Y8K8DycTZ&)6U1eFdBk=QBj}B7IJ=`p;8op~ z^e4yNM_6oKfFLXB9lK}JMuJ{51V(ez z5MHCp*mJg}Hii?4q;ENpr;!{ETDA+SwPm;c-`hczOF6M$Utx9Qx-!S98NF*jY67a1xn-K6pGyra~=kf4eoBV&10s2L9n{Ul@)^!RrC?bGFewH0Ln$j z70h#VuSEEoXTOvNB0~*g>lEMi$rT`k2mq|@&!TiN&OB`%rNbudFxem?si|EwR~4bT zdK59m3p;L0(vaOlJY&?SCKQ1wS&}BjExC-Sb5`mV#j4as6bspv$nC!LMJQ52KI->G%w(p2+AR=6t@8O9)GgycZ?dLbjUc82iqRXK+Ql4dpaYP69)kg6)`|{;Uo}wbU1qGPNU$Cdyf$D%E2f=#wLe9u z8X$0FBP}YC)3R6buPM31bfvHL(wXx7!8SP92I{uS0YQ{0*Gq+v?7k7W_z;E%|2yt- zu7RebWA=a#Z-GL?5e(XBkJ$B=2D$8mEd(G8{Vunw0GMr4(li-9^D?YSZVIG2^*ku%jdQa{Z!O*@X zY@$gNBcV7bW58H*4H?JOb=$)v(PFjlk+3Txb&WadnDk9xqH zo9=k3M2#e5ofL`fji!E#HBB?Z1cshFCSb*ANo=N~MNkJ65Hz4sp#YcT(*7|k0}2f8 zjrX7ci(^0~zJvqWSGQPqfPiggWLN=^HDvV~@`uI7kRV;wj(`$D@_8v-PUfLz9QPWl z(x6u|)H(1*n*!><8@BRLo=dCvyWjjf-)ww9C*H^#VdoA~dcS9vQaN>>7O?*Oe3)BQAQ}^M-8?s@$Zj|q8%%YWPuYn`f&piM!k9)=hJcznSY&YdHBWLMCz6ig$woDboFQ6YnZ)t&T z=UmRy+9glZn6$qajI34cGd}jkge`Y`e8z@l9-~=^f-Mu1n=S<3TGoV#!kK2emR(NK zaM6Tvd4+bB5|5dbCurc>fKvecK;vqd_lLv?X3pfRtwWQZY)>qi-tSZb2{i`4mS6?d zkkC2100{D#nhTRTIfgsZk>&^Stnr4BudUUi6pEGPA1In9M|70LZEY^p;+f+dH3;X5 zZo6nyNT=Ga8tD=NTL=WlsE}^faqg*v9l_RhA19gU2P*L)z%IZg20+8mPaFc)|2+_M zQvBn;^Ub#!`6THw2YlOsQNHqk*_;pL6NVz1Vn~5}SnqIcBQc#~qmg_E6VWLrqPuP) zI)6bEaZx+YZ9Ea^c}~|%f-oC-7bc+#9wo&C|3z`*$KWln4Z|KlBz6^1Cz(JUBaN%& zS53zmp^niI7m~RdDH$oh6Uy9!w!hNLH)ea!>o^Oo%zg-Q$ymSUy zj8h+g*lG>?Cjl=4Rzm!y*l%ZX;oAt<4@%Sw|95S5x>Et#;F-*WO9=DnnCY2I6B(cPr0l*YaEf!7>_ z9q#ekuXJ?w?$wTS>RMiIYqNH5ybdcn%-4(YSSdl^YFjtSk%yTw-N&YM&*mBfLo^&j{HJ3Y z27^Aj9^GQykg~nF)8?pE7eGShRl7Uz=ru61TfIWCGR(wlynl_8%q4m4o zF-@2MxGJKsP2TvDmtS*=%9)8RzScYqezSK~Jis|bF;&ixae`T9XeKZM9iTCsp1~x5 zS(qQby^`DsyZAQ$&3?i!KYlOi%#6Y2ZhFX0cKpaE282?n!o@JB5m+1Wm3g#k-dr&5 zAdcvp^9Db!?ZGQ1kVdNq-aV2Fq0R*0P1G#yyv%~4%DodknjVIZZj2n0-3WbPTLm#H z>x7mMO?Kqr@HEb2>ZxgoHkg@sGrO0bT~wmLx_-mFq+{ryzW~XS%8ak?S0r3}V_y^=`|DGGb1X#wR3e3A zS!=aHz23;hB)(1JNbU7=WjU!Kwep84uhkP!??UaJ?A~%<>tCGcK3yU|K&Nmp+NIc! zz4hky>lI@LP{&eI8Y?2c`CBdaOu!lAr*!kK!Xr*y% zlL!$I7(QPi@R>DeSvd`wFmfiz5P+{aCSA3#>UK zf>OC(2#3PLlY({EoCGbZe2s6%>%V1a{*^^WX~#DqR`sLMCT0@3QbJJOC z$BX1g)oom9w%>61r3x%^N{Kwv#eeg%tv2r{|APE5mGY;Xz0gE6mNP4yHz6eRTU1*4 zP*@;*j6WV1F+G>#EpXS2$s);kSC)%wzdBS^?@Rq1oM}dIllSmF3~sIC&VHK^G!O*v zKpMK&WiO!DbK=rhk=wV5sX?7z{sbnGLbq~ zl?9;8jDiCw?BvmpH^xs0Do*l~UY(!3@E_QBgM^>JzVWPQfBaqI+&^1#?(bniDH?~! zf<6VEJLI!JX}U~YCq)T{zA?0aZ87@onRL3;TBf7cBLARVra^1rC)`Nv2Yo{9N6(G@ za1$AV3F_*2608<3&fOLddV#(OCy-lq@`5QHG8cPdsv&+*4Cr z>>Z-xQe3>jpt$IPDK6#5Dlo+*RudGLX$AQD@a|~S|w~2Aq{LST?m_}9U!W?SJ3eRqDOWDg`V39 z6x>9Jx&{@(a6lB-y7a);`_>>j`EB^-c+nO_NX!)@U45G0bhbZ`}fSppxhvF)&fZO^p5-(>D5$!<&ynTNS;N9ab;N2Cx zZTo?_5Njlqhpkw_o4p$ZZ!!Qh<;4G}jrilIE-(OgmdO5kqUc}dANbDr&Ehk9N;)a; zPQIWSB!3!csOe$$2X@SeZAh#w9W;Ly3DTwo^n>6en-WVnSt&dJAV?(6y2TCJ9bxye zn;PsND|MVN-oZ)k&G#fM(N~|fVvNT_a`ny`+xJkqLx`y?> zolyk9wJM?lQsTEk&$fNzh%Z;eVV^na*$hV~|HR=WHXQ93BVj9~uYpm?2~or8@zije z*e#Ld61Nr9%~Rnvs*kvZo}=B^t~L?3IpmH~;kII*C2qgow}#u3-&$Tso*plH!fk0= zJ>j;hAB8qa0xbSixb52s**o5F`LUTfdSJL+eyjq+ZAyrFMKcFbHv?{Kp(m!C^KJbY zrH<4sz|&HQmxQJj_{1t$!YUi>xpGL_kdk8U`F<|X|AN+|?DK-$FY^$pQl!~DM(t^W zlxdxPvnjn0VjD_lWW?NNxcs@yN#}3#RBD&|zFUSIpjGiIZ4?Ko<9)}9$A6Lgv*#{1 zvhys3lWbu-iA_<*HlfrmiJ}DNi?m(#otQu!D~+hrTZ=j(Fp@Kv67kYVU>zlE$^28b zm8}s7j8!zj^6Qrb))9eq0)eF>Fl8|iY3sJun`7>-YDcD>wb;| zT`!I)81c!{F$IN{z(v9e>_nkW&m&{EC~eHlRI!gAi6*qIDsVbbz=*7Je9%hE;E%ik zAT`{WJaYG=W*$D<)65j-QA*U>kGC)RL)f3c;vp);YkBU_; z+2_IfXIf->K&$8Fi#1|p-ie1X$54}O9?5^m%=W?+d6B#33Y(zTQvRQjA+L!9vmJSZ zOmS{&S@%G2PxCJ2do_e~aj}1-_w+Eu7KVTjh498W^h{T4Dbc-dHj5(6V)S zRvZQlpRh)b@G`r(ed#O%h3nY9K3__x#u_>lS8plNl&AZu-`31h`CHZH^m!#2s9)rl zBp99^e7U_|hO!1IF_g!7bwwq|AK1+nzr z)Pu=9ta(AClWZo9rbOdYb!mjwBx$sX7sL}w2mkGsv|nPdb~P6aWWkVvT$+PY`tp|M z0k@7Iqvzai;>1SJt<1sK`_?eHa)9ewcVV}Jf+tUsDR|x~ZclmtRtqV=yI9+#2nUGb>^9WCkLYf_|qTqbX2ZhxEA2Fe|YwtEDBY#nrG;Tll;F zpU5pEbM@oVZUo(B$3RQ!uJ{*rOjSVW@wi7f^I`=-QeW zEX||%mwJJ1dk{KnUqI|q!?*PU)(5+Vu6==-=7mrHIxmPWScABx3H6M{g)zHZmM&Bq z@B~V~sTS<$IGz{<3Gle6H^CDzTVb~uxx5N#ZvO2WJTXS?-vmyl#C+p)YIGFZ)YhP% z(YT!1**lo~C8~7Fct@v(D*Bk(YN$drrICx`+;FWxTCSP85nasG)zVBHU9xedW5Wq; z*S)rWb;mvDgt9#=tiTA(NM@!G6<=7S<5|##LIkNhMz^I^hfcquK++8;kDRciB7>_A zFF=86XWvLv@f>=jVWAnvkrOVG7t9rM?E;9fOqY!F~ZFnBe7Xa+pHC|R^x;$ z!VH{H`y9GIm~9OLC$uu-gtm*e4ufLs#tFL!YJv~I=c)}~=&X?k!*`}Me65u8h)gjL zhHstd@Q8z$=Y%<0r>Z5MYe)iV!5bI!#x!qeW#^hVMBZufWxXM?(*n*lZzvBaEiUT~ zHY>}%FiH3rGCcjdp6=v(t>c{dUf5^0AP$>gW0Amww#B-CNgsgbMi!h-UJOQmStdX< zc5sZyjX@B*B`d2HtSmbVl}}1H21c^1tSPZ9B7dHoO<+-0)|9L)eWA1#a>zDqIbYu} zLF<+b!cF?RZ~Yf=3sWXH`$U$_n$bbZQGMPJB1hJLLfFG}?af-bYyBtEj-=Ob_Q{F$ zpCCL<)!poq)eWXfo;xYdn|%X%tOEcZk(M$%Hv8uM2H!~Ix3dyAnVO61ztI=Zm`)6F zvOE8#dW!8KIjHL?+Djij#fY`CVwWsRrR!Yyy&{y8d)xFLyc7{i?01Q5H}sVp10|;t6ywCB3v* zI&O}JH`W>>+^jJv+p!g22aR8YUU|q75g0@aEIWu8D>D(J#e7sCbY;O{K z3Ci}Lm4PswMNry{nkWQh@||c=^^}oo)S_@83XeM>WkisRI&-B($$L|#jC8&u6$&1O zG+)f8qLXxi60G>!xa8Ui)1DvZ;!aX=bv}?h;If1SnnDZKmeNQgsk>h^|0wgdU@k7H z@0vYU!RxXp7ij{PEA!c0q;LA<;!Ch4MZw`ZRs0Tn#7=r#Pq$+B%J*;#6jcy&DrI#Q z3QHp>xA;bk{TyfA60?MrOhoEi#!$LCIGv~1Ckpob%A;S6JKi;^sQ5C!sYkv=zBwjG zm0@zMuNmuWZBSqF^7G&PyHf}3+t#rGn3Fp5lD6(ZIYJ(ycZ6X#j!l6o}4#e3K?^NM;}dBr|a7>iHoqE;HmYreM)8 z3rGrWC}g{!a)%G)51Xt6woQeij%y|%@5xk}GVi>+-S~iw7jWShF5;YL$|}O!W?v9v z6vvS6G;Rd9K-{52iW9Ha<8omYPoaU??v!PaZc<)+rNq&2Y!Q%R-)bDGe}wjCUb@g2 zB$T2fBc44ZX+P{`y#?!pyCMQbOK69A(9rBFTu<}^5o#;fH4NJif=B>&993>P?%c@H z?}MT(grm*Wz4q7avV9zFMM)Q1o2i;06s+cQAt22RR(SPMc(V~r1$I-qtPCwP*| z;Uu6+XY+m?9=E+B!bVmKqxPLxb#9Ju$prD>54&mC5$`3`EZ-gj`+VF1cD%IA5^;I- zc*X)SENeV^gem3GYs#aC0;If;R=`$%Ok{qL9U>1N8oRtmTHg#9JH?CtJ)@WKau1%q zs+3`ERq!wLf;O9V4_^HR1&|R2J$i${DFX;ZPR$pNV}g-NGZ(pH)=+?16P)=$GY4}i ztpW(_kzVGGyvDa?)=Yk@ifHe6F%ts_GaCdDif?H=Gi3~cJ-eU>ToK{pYl|TWr9lNY z4+Jq4R4=nf><2@JO$mi3qt?N`VfKYL6H#kJkPx+IR}4QP#?gj|vH5*^W?E{t!&JFP zh2P9-@Tka+Q~Zj*HU9yaA~r$2Qcl5EYi-Kv)iy~@IaHc;hYDZFq0&{@8W)N?RKOrP zRE&=h0G)KG!2jgT-K^n!eZzpDDTm4?U7d8OI0)$M4+sCdjw{Z91KLpe^M-l7xJXNBGFJ#ch;56dJKKgf6w@BJvn%G%fIC37OEN2_R+_?mfsyJ+ zt}fanS6zI}Afz~4J`@^r*pYTwZ000q?92N!YvV`kMA-E-2{$#mL|01uV^`Djrx^06 zILpNnU@E%!i~uRRFf`PGgv}Z|1kv`ScOOh|2h4^L2cbm6zS|*2gC9B{u=!L?j>~upW)k^cnYZUjKx8W4$%7N`~Yg4&T zIX=2eZ`K}W+RDm07=)#KRQyI~_X0;1#zkQzcxXV7Zr(;I$fiL?-en4rwV|4ot{DZ8 z#ggn`yy6+n@Iq~dE!ctFwydJi6&W>t7#QhFkcV=I#$l*2o@g|DiSb z&4lDOZ%pO{eQ2Q9*~Uhd%#-4VJ$ig*DzS|eFq)F$*B$~M-RxpZ%lJ9p>X-NlpKNIn zXj1&odb&kFAzk+3(a#od2>$E>V#E{Rs@%xD9XMGn$5-#qVk+0hK{pMgK4skkxrX z1()=P%p<+AK^woFvQ>)XRG1HpWt)d)Z9e`6(*We79w(RVs9_k6kM`Rzyhbs5?-&mI zQIPte_+S46yWiaqyb>Zpd4p%Ij~U8mKc;Q^QtDz8*W%;JkHL&pb8-5&zS_uso*Yha z=^Xb327zL0yjW1t@$69nC(vQeUMW}Iq5s`D@^`&QgZFKK6FytdYofOl|F15}nu~Ms zD--j5RiyEYks^LQ-aOn|%PTIm1~bfNab8H)hE~H1a2^@H#!UXQch)x;N3g`Bb$^M>FN^SM%ABR17;8N1% zA$9hKtk{&_skr6a0_Q1N&B-V&8YA!c$oLNtOq2A+SwHPONTepAps+CCvz*A6V>wouM&aaX3;HoB*5x05}{iSJ?;6Xc@G|4g+K)#H#TgfR>0gHqwh? zQzNW$kQ1trd+*DEE#U!eGf+rPm7;V|X}avGj$~B|pzY%97aX8$VIhFF9iTXR9H8ob zo9r!}2SHWwt4GVPID)+P70!j5X^GVMLtH`~cBcae_fZ#xaefp5)%>(kIuT@7HUH0q zhTp*aUlUl)z_o;D*9Mk{%CFu$uzaly;$4YW=o-=>8(xX9@-4beyBDF4tM{|0QG3#T zzPL#fU)%0ORv`gPX+DM+3g*k9srkk|q-EGG*~Ckg_dBNq@AvIoatnm&xxBQOf9b2- z9rh1`6CCHb-eb~f*R{93$Fe_dqW#(~`_h+;YNE14Pk%Hx)>t&?c@hr`VN*O#&(bciY=sf`xMVC!sAH!LyQ?-j5fjMq zG@HP;$K1hELhDWGpODuJfh&|QXkigu7F(c3aTX!X6TnJ4QDWG^#B!d<&DG>sWdoKT zu>NH?AK*nR!r}7N1QRY^F$gXJLC_!DNDu_F+$b%d!{E5v9YHC~&`e-Ah z%}@o+P8IzhV`CJN2CkIeNQ-iPV^;3syov`5O5S1>574${kwtq3h;xjN>sQj9j3DJfxcp#lGZ zXmY|hqS@ibQp}l}JXk_C#M|=j#@l$JbsrVt-Au_ts4)^bhIpc75bq8{H!#8wjk32n z>2fC`KEidcBOhmiuR%UGq@hb7U)+-=2;oCD*N zSkY=Ix}TDl?YsN9PNqagUZdv1X zE`bJL0tQk~rj%Sb-U2W=Q-n)vw1cO)qE}+W`AT8W(-ha(;*(Dj@%>fn5eD#aq8t5^aqYGjl9S&^1!l>1| z+2XlyH$!9%_tiL2Y_B6PPR9GFTUy#aEv7<}twMX#3hi+cxI%lzP;{HIck{>P3X^kZ zI^QN&(6qK+))Hf7AH)2AotCi5<}xrrpHxvjYA(K}r=5HbVK(`KYRvQjN6&;<5(?(D z;xk$}$SB-BVrvGoF=wUh<9IW1e(}$Y!&8unSfkSlB~6D=k`@fp!Rc}ZB!`C!TYgo;O6_DFGwr&^(k?rJGg^~ z9O2@p+1>61w{iLXPwI`s+(A+jEPj$5Hh~JT2|~es?$Go0aiOZcT>Q%=FIX%Ka_&Gg znHYY6-Mkmbbos1xM~pLu>-uJ@T?h){Gtom7T%xLQJ4zv7+Li~VSa6Z!W{4=sW=lT zbkp({>uhqOgo$xu=r*uvy*C!K5%z9upgLdk-WcRktGc1W4t94KF znM9yDD=`K^E254-o#z5U;))lfGNc*!FBd(p=KO*I8hZ!_ZJEBnCjLo2hqky29GNqq zpgGwnXp|0czR6H+?-FBaE5)6^k}4|X@GBK+!G%oeu~HbE1z9g`{w~X?#?)ZbBfU!w z^L2hlcz~m{8byQA$F4fK#Z<(im}Zg#L<^7<3!y=1`yoNi*DT2AiGJV~XJd!(1B+8R z%*==C0rChMCXbuS5a9>WPUf^oIEa9Q&ba6eZ3`h5<`B@T0R#R72+mt6fS7=RRwWoD z)&k*joT_&5H17m3e1qEnhv&EzAT|TSlbU6qa2ZqZTETF|b_|R&ZG4`|Cd?4#I$-Ol z3uDnyI_MbU#Q7G1#!!E>RkoJ)13(ULk%SEhti23OWO?MYlshCT?34VtZM0i5VtEm*Hhp4mrzdi9T7eHs?8ggfn%P^wRTaZXE!PcpJpE5_Mh!#MdZ#>qvDlZ!J> zZYsvvcgERw#@TnqX)W}{G5?j$B{h!OuW?K}9N2_Db=?e;u_idw*EuGaeQ0bh^!t-S z-##rlCOmQokAx4faZJuR+8c9BD!fBy26MugH)b4jrY7`<`8Ma6I+$BWOU$~C#Yw6% zaBXf~Rs(hnJK=%NmA0IK9r$nbj1Ci6{>G}3&QktH?bG%{{@bVaG-S~UVR`31odRz+ zW!O=?=**{MtB#`HR8xPJg;FQHE5^IDy^K!lQ}<}zIHBPdYPMmNPVN=6|EOQIQhN6z zI=)*f4Jf>3_fs4CQl;wo0YRq6EQ>{7PF7lqrNYp!5GmL7xx@uF+#6>~tu6C_Ev4U( zrQlEwr=y3y=s6-hJZrB2RctZ4u8O_Zb%U;S17pUnAeb*$`vpNioW03L(qBnJFHz5w zu^}~WFJ#JP3AxE-(NE3{`vEP=3MkbT%oed)h+Mny6sOLh1uSy!c}=!0kxZP5D*#`D zod)=&^mcFOHgD%JNJn$a<83B$2d=50bZ)I-;I5R8!4}mVGc^E>XdCcfHnulqU$STu* z(tNvVw1v*>?!~#thk$1$qG4$dgNMRp`|p8+AbTj#nM}{>2jPNebmjL`@u3b?L(^hE z7Bi#WNG6{3>gmgkcQkBc)uecZA4?6gAcWBf&!UlioC>6bjM45W70s}XfdmnH&>Ve5 z56ZZp2a#(dWn7jlY!K&^eyJwe__JJ5TMUy`hNwqdb4^Rwt+I=hNtH*4mhWAn4A2!X zRAr$T+JzDVZWrfy1?4t=5=6HtYf`}^`dr#WkW#Ju2h3@v`~iOwcKZ`}<81sP#&QvVl48DZt< zr0mg7Q$w0pILLXaR4T;W0qk)C}GWfmht$}B{yO0hhy zL7By7XINXX+?|CE2Ci0b3MR=l09L|DdJjbaW^&tXFN+%_o1Qo+3)X>?bGYGBG6_l_ zd8?caiZkQ^7e7O>hhjS#;+JLd{PC!*qGe&Gl)``wMTeM(XlN~boL04G>w(+V9_l1F z&~t#mP1Rj~EXC5jWu2IzTCK{MSt8c(858?M4HdFM0JeRPtcLP82+In!>Nhy6T{p_- zpslii%HLqFl7s!X__kGU9@)^M2=Y5@2cNJg6<_<;(AjoBFePXESvH8;8FX3smsgS> zpJuF#)|}7JH|}%_2>TZ4)WV%++aN9RNH3+UW&q;oq#$a%JD1>RFifuBkiEbaN#1kq zhbeEt9KrWsKJXNIuX<(g?=+5q)-n=kcji0yKuF_UMn3Z_tZz8hljxI1*oQB9Hk zeYxbywK^yWR!}lS#Jm-h+z{zz1tmKqoxuu9e%LNfTR~)q=G_ykT~&kU*^;U$<{7n* zb5_91p+EsgUOwAS*;%mS*QhM8S(~WEF+xUC9hDmCU|y!;V#?ws>VLje;N_Z0pMwiu zur;R7vR*zqThFI-f~ht=Nn-y(da!v8OVz`BeP?cPoOW@kBXi;<8;mnGbNRf`6;r#Y z{p<+DW;l1)$S(S!yh6!zxo-e+dMq?H+>53-I1aO7r zwojs#KCWLNsPJ48u%5Qe$M`}G>55g3U5E(d`t@lmd8I}V0WnW2LIJY8!1TSs-BSAK z06gM)aqxzZo#E>XL^P!Ik!Mf|lO6-gq=F@R&v%3m;>k{tVYc!#2((1vNjW2>8aAtM z^Vzbp!gf3^E(N3lN_Ap7jo<2`+)5=FFYsbAIm;KB<@1bn!lrr(gs=kHRG0Mwo9dFT z{Jt0;u3{Km;74)VW{2rk{zAKW1x^C$hM!C6!_CnQy?|9T@M{B)LBVdAH-2#XAc)(l z?79Kt8uw-U%SK~Q#4Y)N#IPAVs{~?{)?^q0ILV%(Eg3DN9Qd|mImu~Yx?eXRioP3Y zxTuIs?8T1%LV+}z3Q!92KfoEV$IUD%+$K+&1+(FU1_WSh zqaO<>!sL%}J;&w^fgzTxHQ?RZPKoL44(ON;M^V}doEKw3eLqXzMSjKO5Xdn5YkV?Y zXU9p8Ko7k8VjqoMTD^>@^ zQ;b{pmqC3Sdwwu|NM$T;6WCdo_s@~PzvdsRquTuattuNjS#+LnK^%vI&UidCd)B@g0ScvIwxdH)fI@)Xm zpy6?4k7v_NATc!7Ik6y((V5lzRF;kA;aS@%p2a@zoZ`xN#D(X|Rp2xahRql35K!NwB;X zq!%nt6~H~_xr2G_`}c-MeZsmg>L}O#FP2q3-!^NaC^aS%}ph4 zSe%0uiASIXj!Pa{oTpSYieNXTU9A{>UjZQEFnE)?<9wz6Atncv4SuXjF7_hM!qo$h zzECTB#uU!;wUVc-cA?=V3HrEQ6MFx8#uq0+LL5IWn~vx zn*pDa`T<>b*orz4VqiibcNrBg?O{ZkT)UN6JH(rS*!Z+fyv*Ar6#%WWV4n&AR9QfH z%~$T~b&^1M%wWpLgghu=z-5U@A5UnlZWC9nmyUp3si8ZexszTCtmsvm4`0Mje_o%jtnUN`^409W}*pn&u?2myD1# zT}EoJuu+77an1OxNZ2HP%Z38K*PsyIDSV0II5?5zt6Jn0LyM}z^hE6&8ePO`i3kt# z{^sEnlU*ViSkXL|{Z}?sP4jqS=9Rj+iZ7+k>bQNP+zm?)&hbDvxRgFLQGT`^%O6A~ z3wA)ecnGW0+IgsaeqPT@50$D!a}HJZt50Dxl;1K<(h+PWJ{azohU(nwRh#grTY;xM zdD#??%FG72#q*&MGqaWB0p6gQ!u2gr!uWtl70i-Hy&ywk>i z2(i9m&!X)u5JCV`rQkGvXmwXT8Ne41W)Z{QuGP1~oeM;ucqq@cKc|q4#KdGXJL(zF%J-hB9 z-Qu}8r>ke?Js674Rz+uYi`sNrSL!^at5>iZie43;_ac)NScWDcJVnnW1VttdJW0>w z2%~sjA3kUOGx>o(6$Fimdg7k4D93Zbx`af=GugM%Y*3#2#n$&v&*pPD-gb}_CkInV z>N?XOAzzl#(|r%Ap6Yv2*D7SMAU7Fba@@c!%yILOuGo@2MD01Ylu((-+ThK7&5dGZ7eCn)%ZKRr8QjFFsDp|l{ z^%RrNL)IObnSBW<7_@Lkc68jTvR-vk4`yh$csUver0cMS@jZ%9u>4R~5!rJD*q!!g zO`6LyVZz?x?O@etq@;j5QN9(*N8gBQs)h0)xU5v^F?~u01n;@1#KWNQ2py4jjz_U6 zrB-Y6U?GuFuq}(Cz?2GP-NJU8QKCZKveSV0T@n{d2@GWFnRKkK=pHESH>l|D=y;36 zLm47ntz{n#3NmxyLc0zNG@?0KTr#r)8=3>r`CT%uIrU^)#kXi@AMBLNemjqTU|v0@ zgi~NF;AH37(`{hmAu6dX7^5{^ijP@vVNNkVE9Ln%U(N%iK8rtH=E@mZLquBW6(bvS z>KO>f`Gbhv3<}48(FM5?@@80p{CINv$d4zF5Sn?q8Xt;Ud6;^Eftv)&MmXg&T@_Zzh`jx$>H?^I3UiIFnApV(bk4&sE0ezMJSa3S&C~)O@=7Xm`U>6rHBuan z4)rzjW5Tx51V968%btJ(m0BPakKbr$)Xqz=-={iJ`@-Q}DsDKj%kt+Y%Hw zM-TJyxuW;DxsFY)<997FL!#Yu3;qHa5VfXZob5})U?$h*Y6p2T=&r>@2ai z+yP-~N~K=p)3;2^bKt2B!@X)0bCSOg_eDBUTXeVlLv)0)Qq@Txw2pu-?A9Sx2%-^w zrUyY=G#n9;3BXsWF*1GGiQ(H!d&%$$!*qveFI>6^KvQrepfLdXI9F>}DH7)8TBTFNsKoD_51lRDDC7Red&ac$a(#O?ZO!kU*m!W_tC1I&?@ zUq;Z*mHja_bz|(2daTCZhIHt8;G*D(*BNm(AMOw4G^rX6D(J#g!~YA*o3W zwki=S$m=*EF={a&>3Ujak1{ZsjKiloRvP(|PQ;b2qRzg)#Ti)2AG~SE9XvMzKn*s) z1=Nz%i6ESiHv)JmZ!{~CH=0|?8_lV|jl9vshNvFsTW{edyz=teMQLP`iRmO=&ciNp zal~+;N1osfl)Mz=&*`RqF=bISh*4`gR?T8!`b!xk+l8tSt(Mzw@`ib&3`tazH^K8K z5gaQG)-#f5Y=^hmx3XhQ5>3jWRYbKg-6BSEYp!DUMj2GCDnRk8#11m35sh|h@FlDR4ZKyIdzrw6vzfPw&3Ksi8^)=kprTJadD?KI;(G+4ONm(t zs@2LSr?RF=hied2;xs4J%i$jNhN+X*S7JEo11XHm4@xIi372e?^WHTHuJ0L}Sn6%a z48W)QpzS+9V$U!|f>~&<@c$1CD${KNG|(#9TQGa^?$pycS5Bc4E8>Sb5?M=wsbMdm zm#eg2*|x=t{NB@O9Bk-0+bld^|NUI~gO*|M$W7Ce(SF!+-pts1#71|=*+^vx^8!y* zmghggT6tbqGGLzHG5!5YB9x9!L{HkMHgX+O2qknqf2dS(lsGJmZq}6=q4Nd~8e^5; zGq?d@5DTbKvjhuksuL~>g@bA`I|=~HWrAVUl_xZs$%F_=xU(H%yDY=ba95!7_7H{2 zOCyv99h2v!b;A}MNAj@C@y}rtE1HHxLr(SWH~JiE#@s!K<4k#AB#g@mr<_f0SV3&z zMmqw6?S42=`BU~H^Ui6<=z-`w9OWqyZ^?C;eUP*1FN}&!+~DU*y$fe`+Cy3Asv1Y1 zDp1aa{&Bb@FI)e%DCL)=_RngMhmvZ*q~^)-4nMgRwT;D!bh9Tr)gqZQ`7U*ZMciS% zY^b+&Q==g~Z?nf&tK9&*aTW+ZySX!8gf=uob2&D`^4H1$x#qb~wUt@8w>^Zyy`_g!4u*jf1 z+jOg7G!LS1S;(&=4Q~te^JC6rW#yEYU&37st$asJEQiOBw@72kz6PpIs6fvk=Svkx z2~SdiF6)X4REC>ma+^kg{yN%TPK84jUz<-x#-g~mZ&F;ku;Z5LLuH}HcdU5unQ{%o zj^ZpoJhsO6Z^jKdjJ9?{tpef2*Q+l&#c%T?usd66Y70(V_?TEl6k8=9?hyJRjs5xW zl#TU^KjTLTWN+Ew{-xVV!~OfOZtkoda7QaJ#$fo#r4;>yOmGF%C9iLb7W^> zwLq*ZpQ7kIv#h-Wc4#?B=AUhsd%4TPBeLciy2!ICpO}@j1Pjb-Mk=e{Z2*cq`Ch>h zD}sQA2biFuAJ(-4*`H}ag6-nT4#$V*Z0sV<2rq*9T^_}ofOiP31RAvVntecF*X-L{uYZHEa8ZXitB?D&XZTlDA=pD zC>hq(lv!1@cUn;?%NvWnxU0ynzL zEoOmevq7Dn5{S#eHQ)HaL_XD+EQF*Wso|rRvamKiVBGcmx-q{#{93qW`lkGbT*?(I zm2VO#Fjd&NvUJHa3)+>{;9T%Mn96udmC|nc z5B=d(X=hZF?Nw#HTV6bdu^DVZCPoGs1Pmas63Z}vf<@LFCL1r9tZ{_bCSnoZ2~mL( z1W||rVpqib`99D4o*%dG?dg#vLkOBupL5=O&inIupWn~(!tcS|G}JPete~crK|{zJ zHMI=tK?-VW8L>I=NZ;_I{=dMq;DB&^3&ey(DRj z=c`>XmYwZuy1ifuuz5nJkVRwD5LL!oGHj#LbU&zyp&x*|&Etc=J1r7lS21jAn<2$T zijZ)P1@flkB}L|oR&4}~{6#57xiUh8hz65#o&LS@&m>cX=9TkML=Z#*CW=+Oj3(p3 z%7?eeOGh|#*W%A7(z$QAw{F88WV0_n7~DU2fwutbxJ_h9GaVq;^Nd2z=X7PmO^DYw z|J!oO;l+k%t4+UB`rJ~#f)JvAa_*D`e;q7`{?_%+V zs+z}bRMOjal0s4rtoroT@VLd6gRgA{(-2yA{T7Ni$vHG4sYix>A^NfajY>mO!m}1f zV2uRl1RD`Ehi>C(6>w2Zh&&0W{^QZhBg0)@|49l@Eb6@#8Y8sjQ%4hJp%zg1W zUypaiRq>U7<#W3WpW6Ww2>lyWKDT(CHhgZ0bgcQ@N*b7u*-s9^Awa-IgPOmsECJ|m zD{tG>PEpSC4dHe3_m_oMND8xV3tXP$82neU+lJNbvgJ_Pw6Kk{=mbQYx9zG>(11Sy z4uhL*aJt2c5sy+P8Kj76*S&3Ve>K1$Ux=u{Q7&MrO@AUwK|VB1trD!EA5em`P`{b^ zH9`I?o_qj2^T&YJb(ET}EO^^m{j}>1LUydiNG8xKiTkoz%?{UfZ(Gu#1#esKBsjZ7 zF+d~=c5`6aBnLQ*0ODrqgPk$r^-BC~EenN3v_SzXKUmYV!}b()FI)8Nl+?X!-QHXG zvUO{3-OCnE+%V+~FI!QG>-Iv_>@~d*YhJd}-oJWYwhSiBb0Ql*gLgZwATlwx2&SX< zj-i|K3+1w5Qft3&^R#`k;c5H7R-U##FX&95KmCDm+R#U;d+nU-%(4$PF@M0yoKZQ~ z89ytB+}nq*rzdQ!Qbht~6;Y8NsQFptugoJC28Bvs8$|2gz^!0MHkcZ>A>Kfo2yRw$ zJ#xQJ(|2i(M{enlyNcc{!=A@(`bzub)?;)Si8C@Wz4W4S`idSa!Yxg`UnT~Wa176Pb4m~ zUQUo%mCzek?gTG6)5x+-5jHY04bcVVVJm>ngo5A(BmcUue1I=Xs*Ca|bic_5b;~qf z(DnTLFR!yFKfe5^pdW>W3GxX>K4oV3%a`Bq?kDsiJ1#U;^(B;x~eM` z;Or7B5Id-%&sRlH=@u1}amemBX&f>|aKtgWq4Cj-Lb0a7Z&JuXap(%kD?VxcGaMnQ zU^Peu7LOPFCZFyWYx0VM{3CkStpwtAMT@|I7F%XKuke6`b9^V*>>&~tw@X8jP2oIR zsT*R|D|NRj6`~FCNwz4OzCs2ixEW)ULzopzhOx9|v_+FR&kDucQjk6{EBLQ0Op;wdwfOB+x;$Vw%?#!4Wh75a2C`lAGn(WJ8Htb^pa z3mle7PM=|lu9Bn&-Sq|Ewz4Xi_*hkvua5rI>U*qjX`xj0Rcz)i^W6~>*iiax&3t@#L*}TA`>>alao-je6_qiEB9BZ*B#$(+lPkZ*TJz**z0s4F`q1l+ z8n}`~6)RI3*+Y2n*AHGNP$FcAzXaMCA2>l`lW6F!U|6hieW?82-5Jcnc~oj_s0o7j z8Ngqe{#f!fx?WZCNp8{i>h@FI-e_ptnd?fG0#t+8fojtoD~2Z^|I!OjTKLL00yTY{ z$3^M!anz||#&^G}t|FI79?WPwdUPa^Yy8~!2zK3~q})KOo~k<%u+gqbs{jO3Gk}aV z`RF$kB=P4D41tveB4$K(>>47#T0!W#K{giGSC3s^jku^39_CQE85Py$Whe_S%p)Ue zkbDhso+bV-h&RZ5=>c$4f6DbDRkwZHmlsMFZDu!+^nzd_9ixwt~7OCVknGJ3>e_T zcBLw4`4~(LJ4c2)Opk;C%eJ`A#jK90DOd}+Um6!+Tmfo{8du;Gg6jZpxU#(D2;6zw zCUJ)I+*RX=>eKYJF%+-Fc@APL7w+qHoYNX#ef1sZqHBO_Mp)qMb)%bYxGT;thL}CK zDIOK{>NjK;90fyP{|)0pS3kH*kE%poLZ@9o14bC0miv_Zcx z9m`@1_yg{;=w?s3Mc21Ou#d1&MAHCA$zNztc4r^4{jZ5O7ry;!t#aYpZ_7;H)dY2J z$;yG;H<4(?qL|fhd|3E;LuN)LV6sF?C*5=EluU{8s>Al^K6XCK4Ya*egxh~L4pdty zm;@hC&+~S6zmMj?AUvFy4`h>l9#k z_9^R)d2(Nb*vlMq9s-uH2X}jLvnXe9#y6G8M4E%15sk-jhEu-WkN{`0H2UL2@|lwC zoR)C1^&T|V`RPe=aB?H-@buk|GFDI?GY6Uvrf69KqnoWgwVyn^F4pf}>n#%26(vc9fGto4SMNfLj3k z5xHm_+aBq%s;T}gh;v+n}u$^rRC(xo^4+Nlkx)&VfN-GAl z;DZF|_vI)@0`A}_$3(aXoHSk0TaL+8vUZ&UA^yR0E;Fs@QQ6mBI4d0J6p$Kblc3HP z?38gb3R>)&rkhgY78LQ>9sOvMn?p{X8UrVHK(bZ}e~e{^xDNo}axd6~%RS?p^wnt$ zJU0njg$jXv00Vgs`eQ73)*AgtM*m15tQD|tq#Nj?xwCp)Cbjb_>;MM7lpLb^kjPD7 zwX7>%CbMSFfVmJ*ncws`nO81b`GvoUDWzYWSKeKng2VdbrTI^|(82b==I(+>nX??kRI>AUTNb2ubHQHvF6zfR5RcC7D^<_vhj<6W4YS@?x(#}7 zeYcsCiGph18k@7@HSS@GC}b}ZDl|+F@SQ?Tl~5&2g}yzhIXKPcrW@;A=!H%RrWd4u zl~RcWr6TV-6%Un$O;ek5;>d}Qf2YqTOXlJ4KG!mmHXFG|jpS5Bf9|%LJ=3VwOmi~7 zdCh8rDaYB<+mPR=W)8B>^+7SWTrVWJw1E=MQ=bKEXfmul78 zhDo#bEZ>q(qMaXRQMvYvS)zFQgI8LkACpsE9KE`wnYqa;)(lirqM5j;XjCB<55(X` zNy&VbWtyAzBQ=}}RJ)X6Y}S>)X2Evl$VdQgM4@WU*euF5RZ3WF9g31vsXLH+t)WS& zNrl#>Bc&eDddS>oNZo8L5tTz>Mqh&FyU&IWnsHY@z9DLIl;4;i9{nFUCp7e(*CY2h zLO#I!902>-p;0=GFFD*QwV#eX(%S%b_kUf(WidLFMo-jLa#@sxLemZZ*VVfJtGwCp z4TZa{`M>Th7S0r(s9aw67C%=#Y=|awb1t~07FYpdt9ad>aA(_^|LeZG|7#Zj#5R1_ z@awDI1!q>|HdcguRJfAhoVrxKKtqR>(@9xC!G!omhfnag{f4|Z<^Q^eCiYASwHUcX7c;CsQfEzlqDm&&tkln-?7S%O=}2L20K` zG?nIM6TFrUZ{-d%z1*%3N3LHDria*aWyj-c;L&^n8p+aMX6-`y_D=CQ55XIm=?=1k zbsH1^CMPQhqhg6@amxXY%73g|O77w!e__kfzb1cS^9Wum@D~nc(O-B?{=&%K;mhNE ziJmdk%60{9>L(PDp)C3fuSrvhw9cv_P;$7&A zu(FkqsLcE_05|P~Jkn?$I3V0h^Rm>;*kHDHAC~E*R&YozhS4**8*lcwqrm~{&iT`o z<1skggiwXHldnw7$CAfHC{SO)4|pc4c)Zll4?yNgJ^;(XAP(`!TyI$EI-OrP#3B~V zos&)1lL~{%8z^YnQ_+EpKjkxYN8Ui?GmHRWXER7rH~r}LJmyJx>-?7khRng+SS-ee zbv?I;EXoycUEy(p?Z@JDiNF^g*WD$Kc$Mp*(ZMMUE>|cC^zgqeG4AsmpLZ9rw?|bp zBKGzOvAg?nRBi>$Ej>e|7wtZW3=p_=>$)WWoFa5VQ5DNv8jX&F2r9gi@IYnI-$He4 zz*y8-Q%etI*7h)WmUYM15ZW3BtAH(TA41h?^l~s#k1vu*pq6dKyo@o=U4RZ*3IKtF zYSpCK@Zw^rz!%GhCG}r0`{8D)u_K``b?k@`r1?~-V@ClD zP!q8u3?CxeYl0n@9Xkf@6*Y0W^Fh9jV;qeJHKHOaVu72yYXzX-2KEpt6=pF!d9D|& zmuN8JJX@|5&!X`lzuztcJ}6Z$g!uNsim=O*Ahw+yw1FF)4g#2o**5XWe7EH~oZ=j7q-89znv5?qu$nv+ z%ojSkzhnH6&x1wAg}}eaPHXhh5yG@1KtV8u+v$-nNH%aUk>_;_TlAc+=ijd_`>bwZ zWv=S#ULwzgqNjCrFOkpd7G~lpUENFMGok3yRnez(%QRlml{!DEt5@)3D0-qQx~yCF z0p7dJQ=8 z13XwrN{~OHUosq)PYP%$^PEboQ(TJb#59(j3)WB3qv9O#U1o|tMXb`%2L_|dt1o%V||lPm0Xl+G|8HV zXh?=Vp;Q44b=Lyls#n9**IWzSkSzK3&(n~sNtQ7~D^as$Fm@Cdp6Nr&V9~1yio)xQ zNqf1h`J9MJnWJMsa~zHrs7ru`cUC~rlN!;YUzbPkuw#~NjtuAnRr6$u2J&TzOz+jn zP+$P~6D^{Qv@^`^3$pK*=o{MUnfJj;tAhDZw;Qq2+&u- z4EP8<>M1}c@4kzf753w=Y?xt3^WH}Z{!0@&DP znT(S{0qozh3^!fmQ#xBKyF{6Gd(Agl4J!P}buNl83LEAHgKYeo5#Itvc#0y+WN96F znx_gQT;-|4KF{%Ff}L@;>_LmWpeZ?e%6HC{{SJUI;3X}@UabQqY-a18OrH@$!{+j-S}d9 z4R=&K-**H2n<0E{1wehWS453_@pX941*ALrmDEKBKb;+sVIR+AttYcV$@@n}0nOXh zpm|%LAukXM_;uwsu)j@t0qtk0ekt|=TCnWXk>|^2ir?X-AShTQ`ZM+C&sPtMy=H6e ztvK#czSp=SBFwyYTtL1)Uz$={S!M>%WI!`SVjszX6RA94>JM{qNhBvk8!6%_1(HNg zq50U0%0bx`PI5mY7DIx`NZ_Ls01b&`$vc47tQO0@EIH_9MsTdv(y8&w#f#-|;P@Bv zy~kQ495^@$Vfiqo8H@TI2qDFv@h0Z2oO}Z9aiy#*n8drv04`;Ev%CA9Gd8}UONXn3^S>o!t4Pm2>92XBj;pSsvXVLS)?P_Z5w9ukA9;(zmfL(Asi}!zNu{8|id8D8P@WH61asBnAs!j>hLySqHk1f9 z3?kU7goc`GYL(^Sxl~PAL{d#PW#LMZmaYP9rCh-La2|M|!9!|5J@AzfzOEB@?iO_x zFC)uXwrg=d3J04)fc<=1eEL^c@#&sMM<*VF1P17Gxaj!w>vS&=d*N1YF%n-&g(TIH zC`m2JvRES~`0xU+j+@zn|Fxtn*0wiUg)7Mz7KAU(q5iXEe!42TpROr-m`j#l*pFY) zrb49PCy}i3)a+GYchyaUt05XnK6|nb1T3*?#$@x`gvkW6uUc+mNxnuOv>8l;3!}Zt zk80+vTu(UdyMiIxV@la>t1_pW=ZaUQ06_3ZDSul$VXbC#h1Ld9c-9LA@acf^!=oQI z05Krp`7|Ml?*&<#a5m6!k$ivxKXh3`ekq*PQmX2giig6l-o_ny>PIXt=>!)( ztKNhk)Otz92tH+!Ec3s`YqBMYv}9B93oAL5N1N8HjG6m6a{J*Fu{d2&}1S*%U3mW{~Q<3OfHxFzr}%G zV9MUEo*d1U%Y~1~tKD(#ZZEqg(L&LKZ$Ycu9%E$H8R9M65t0Y!gS-^7Z#l>vir#NM zNCxLa_oLTNi=X_^uO9y9B7MM4q7YImTH^y+&b`e0q5Gu)+pC(GTD-jW<_AR5#FnW- zWmGyddQT4B?b0PKg9#^MeqByx8>pz$QERZ7trn?@Wvy!hKNl$3AtO$9w zxUgqdVW_+cEvVk{MAs`!K0j_o@Lv(y6aNvm!-^(d{73mrf5d-;XWBizjfyrFJOz4aK7O_s|SSOfvYVWaPjq~nk;e@jQQf(f(A1tA4UaQ*BfIK7} zmR%g$3`h3Mc)bM|xSsY)Q@ni&nYqNO5}|QVjLpL8c}LYm2||~kgTztK{XUF4G%LEr;WGk5Plqe z@(}Dg?t^@K?2|#nF&IJEl>y-lrG9DaxF*$0Bd!TxK2q%uODIEqN3!D%c(vVTP}tLw z15dEFV)ciHnc7@IkW?s88!E{CE+HqFW)98LWuO@!3I?;$r&Ieu>FJEM&WZsCsPkIb z;!<(x zTup$)j##Jgo^m&7ec2m(VI)w(^ao!j?46!14t<;Oe!dqn2ILr2v<)20Cy~zkrWHU5 zV!{~cwHl8H>QI{wK8xG6oIJs^|0_0}-h(a5U!!ve>_yGNN4TV( z;0~t}WMwzu6?;qZSZouH6grmy^1?w4?oVNoF;cc>F>}e76W-1gKVC_}GV&KcTz~#> z^Z@XRAM=~A$*MXB=YHd%aTZ{6|oahC1PN7 z(!hw3#jzl*vQrvk33>_;5NFzHmOe@MgR@OmJW-8>j(yqVAeEiQ!8&TK>`5$59Ebc_ zcQuYpjpJxz9B6)|L}45P0><&nRoAoPpH>gA&Ny(Vu8qU8{LLCiM4npG1VKfstuO8F z!~`goAY;4|7iNUjh9b-2tPvWag@9ix`q+lxjoGQ0S$|w_U z5|u^L?389zh|U97{~RomQPF2PRjQD3)Usxr_8DV1^H!0A!u(KcTRh;_nfGvHjq&fo zAQkg&N7ld=oSn4&_&>`l8jPLwSwxHz3JUcFMTAut6%kdXK@l;{!6Z=;QND>HLTUyH z1`yYng$dQW$lP+NfS92Zys6R&-bB*I51?mXDK2sueOO-I*qO||tdx3~K16@h2D#n< zSg?Xp?pcr)0yV*NviT_pK9fx3sw3du3QAEwI-p&U)&8{#1)dO;BUBMO9IT1vMJBD9 z`iXIM+$qTXir9jW*!tmCjctp*?^?LYS~=K@?aYpKT%ms*5$o=m<#IAoD1%=hqz#`*nqix>38K*vQ7bNeH0mE zSu6m-Y^ycS`F~6&FSE*B@LX3q7P+SK4G=lmTf7|Z_SNG}onI#I0PBTX1#`Tr`Yr_ zQ0i=5LX0vqMOSi%Nq@O;XIH*vZ}!V6E?2EhPSjHQxr8hAy_*X?c^65<_~`Ba<9&X) z*E)cBD{0HVdXtsFC*FcIsB^IRbJAp+Zo#ZtERdb;rHObfLEFalaWZ2dKk9IAQ0E|ziDvsKF8wiK&Anr2VZnUxaFKh9I{)ul6W$&TgXF(=wPx z4wY*A0a;3!4rFOh0$Fk;x|hqIkLQ{7`PNK;1~hr-5^HA4(PVT^kyCr~eI$;y!7f({ zY@WMJ8<#fy<3d1@APNx_bm`qeSjAII-GG6AOjjiHM|HJrJo;niP`cn{E~Q?{AO_!j z_J>yHpf|xsG>8n$rG<=3=u&ck&wwe5Trvu5pIYP+qNv8K$R)a<_#Ae$BA4h$Gjhp3 zY#TW0hz8Sy+}XDAzCDiUfoepX>ANvogmk}mAUx2YcS{>(cWh=KyR9#C;tP9^kK%5H zUK}i)gN-#WYvz03M&NE3!}_MQxTN}~w7{hLrWCs8lQRBG7AFf(%DDgnhqy2u1ZxQd zm<}H=(W4azIL;7&1Ct7s9y^4p3Z7xfbjPKtMS!GeD&NapsrW(B1If8MRX{+Xo*1GB zxeKQ+fy=Lg%R9W-DM-vy!{z-FmoGPPIf~}bC#7BkAnOQ@-pU2*_B~VsE`J*r$L05O z$6@pVmv;=8pGWmT@zcVWXohre*p&6^6rYI*y;FQTBJ_@Qs}(};6i@Of*f50N5#oL~ zpK`fhbs0jx&kHWAP7pe94}~?j?+B$|(lZ}C9Ih9+QUc-7-n5?{uoBe%w?F_oGOBm9 zrczmTgw{8O>Fg6J-=BuQ>H17S>tLFTiQ{!0oX(4^N5Ibm7ZaA~s^TSd%b1+`=m=ULPKPha0JbX3Iz=_(dTsTql;U)~0**&=f3&goK zyVEn;fe?hJb%jiPUOQ8hWQa-B$>s#2W1t3D8h{A|WvT@3IjK7tZ|F*E*6PE6SLhZ> zMI%zSsYv<-RF_km+0=ppF!_m0nTiW-hIG43v2eCeIM|i|x&Y8V%c}l(>7gcnA+0V( z5#ID=<>6HMf-;ry5@olA7vz4&04`O!%#9HNEj#@QyH^t; z;fQD3xBd*v7|CP{=3k$3)t-URNWNo}YoND}lmXKQjf zH12N=$2lBr$OVwz=Ku8L2rOdQOon`(3H8-{NQf|!VDbZ-2HY8uzw{a;yb61+WC^pa zwQ*j6e87fV%e0680-{HJ5fKIA7~2A25`_g{rFbS;F;Pf^k(o$gG%*?FEek2AW+87a~iJ?`yTJ1G2s=GYl00U4otY=mpVKfnyJIHVVgQUn~t^y&q8!mCw^KJ zH6H7-0YF$Q^iy|S!0^tMC(chttkrXV8vfa0#8AvAjiP+k&_0@iM%dLn*jO0TRMtXM zl%7#aCRDD?(3B?$9wA>8&cNjD%AH?CAykhwu{ad1mN#GrtHdYuIL4undXYGkFT;pV z|ANI&&n-TrCGn18>Zpi6vn5Eo8D0gdl9_aKjO9mgdQ{8ab<}7rXEiv+J+&)~y zv*r)K_=_J~yro4QTA3B$$o1ThhDU27-95c%FyNR*N1oIP9ll zaPW0FG;45P(Ygkuf<_|9ll;1gLwU@fb`VF=aWaPJo1L_UQ-W;{nc z{IgU1hw?$A5_Zns(p;`AF4rE7YENxcuj+DXvBrt3Ju}pvCK#mVHq)wUH(3Jt2%_MW zeHXoE@#Mc19LS1{yMep|ewrVSg4i=7?HhI{kl4&oBEix@JNS*b)sI-39!@lyuJZHK zRsPI%R0#~Lo#GiPDe!KjIaX#BEjCJr%uz-XVKQ@=L9(>L`Nx;C5FS94;WwCgsIREqIa`%e=TrM|X$fFyqE(bYi zx}{DS$g7*dsthl3n$;arLeK9IePMA_hGc2Z-UB(ILn2g$i#k2j9WLs~#WMcf+Gd^9_Au^CnlGZ~sg>HfhUAVHN$c_vIY?nGMQ7Zgr`5bkqT{02#lwCF zpBS>b!XT0=K)=EnnusYI9|fAX>paI;$6>SFe5pLyVKsSrqzt`#_!WlUJ!A)M6F#q#?}Gt+R)Xoqa!lD= z*+sr2gM(&Nw7_3K)1%hKi?NG~!h4D;2Yo539PFl(581Z6iYh-K)O09LV@Mi+Dbre= zbJ!RYGu;3zAqi*IvhXS_Sr!Jtn@nX+Is4c4bp>dHo(9PL^YiP~t^pHUs zpqalE;la$>CcYIBNdas%B=t})o>_UZH*JhJlNrEO3U3lspbt%BypkL^`m5(SutqPW z4U&g&DkLdyA}5O5;%GK1oB4*-FxwMkXCH#yb(^zEv87m#noa~ViJ9-G(QO^oA%=ZU zhxb(--q+7>%nzSG%?B0Ca!WLh3?4xN;L(x_?tL0**H0ApsL2fyY%)El3i*3Ak-5h# zfo9o9H89i5_yU4g@G>6aX~|2Ub4<#?&ur?DfrMB;=Q<}iFq~B zx4Bs!hk_AY_3ZR*sDWH^o0Yt6h2tbkF@i;HH+(zs&Uh-yMMYp%u`pE}EL3-6wA&9p41Doz-qve& zdv@|ROV%?dc^ex|`OlC$OafVx++l&Pmb}fR2>bFlFTqlo1hFQ9XTpgkZwqCJ9~Mt* z$=h&jq1vtQh4H!ycec(Bgou+e&BJh!6?HNt!LPHEx8aSVUZDhybt)7##?oFpc^mpI zKsnrS?KHp115ze~Yb2ehSdR5wQnA&t zwV7kUhLyVCWET*?knMhx>ze%o{0V&Tx`c)U{3)Li9S%q#>3p%yY6PU?12V(`1c~^Z z9|(7zbW@z&Ym}#LA(CEl&CDUHpq6-c@(vWW;A9jJdUd)8b(r$4B#ybvg{h;M!A<67 z4hL6fA-B#0o;n-1k?KGjw0QAC#IE#}Bwo++91y7#n#HsA=V!_X=f_?F+Xvx`9A?Br zJ8_o?=`kw=%wHobjOT@rF0`H%#=C?JIxP>BQm6}QK^{Q1j`D!Svmg(!r5ZCODmzO= zi@;_Kb0v`>o>jsDxWu%uVWYBwI+;f*KyFJ2ffp%x_~}UI-2uyM%6{#m4?}d8&T!Fj zoDUd7rzFD<+>?){MxgKmg?euKkEMO;KY9CI##nPkE@l0oFAuMEM4o*NhdRpmDGss@BpC z&PH*$isyd9O4$#}`OEADTUZtrvuV0P2%*BDr?YrIP=3@7YDab>}WJyBI>8NmxT`k8=6|8nCt}&1>P6Yzbc^&M67bzR~w&l;E|390gtI*fWL|!r0dD z$2(>u8DUu$GRneobJNwIQ3wE$ywo1OKd~}JfAE|6!Q2mXh&5Q5+{g|ic8CMe&5SAA zFjnT6EZ@JxYU!TWIBd!&yJ{6-=ebS)h^6Br>!(E9cF`gUzu+tqcqIJn0UVy&qVg6L zuTus%S~Mp;Os4iob4#=+Mlr83)SDh_nPp=kNwf9>j9Utm1vSDcF}M&ZWjn&r8B$H# zNdu4~-KQe*;oeLb;odw2!#(ar!lyVFV&fL`W-Pd3P33k313~w~Ndv%(rwk|usaQsx zGywQ8DhuMZd0UP1)<>ee+QLDUb=J&inWL93^)D*|)_qo&5sENZC!^;QrgBY^8TxYc z`^Q=3_sW<~E(ATFq(fXz=yQcjN=w4cJta8f5iGk73oBF3vUKQ&Y3cZx;^!`2X%#v5 zhb`^Ca{FL-T~@SQu#PTE_j{X^=2Uqqw!~2iv2!` zq|4oaEMp8otCIBjO`k~zCub`vyc^XI7v=cpa*tei$^`g0N28$DhOM+aLpP!<%V9vX zDt=vaz>Qpud`m02QHU(hJ%Gx$WjG1Z^a@aryfgY`R3PRUDaEsnz4|g@s5>R7NBAu* zzL1de$0)&LvRW?-u|YNU2EDr80ASUoK`5^24f@K1^vkFUg3+~K{8FViQ1SvcC>P~s z$Mrh4N|4DqYu?lwEZ6l0tIX!A^aiyP%2&MuG3h&pPfBl4Sx?o_Ix*Z_MwoY`rwDoj z976VDb8PAj#Ey{$q|ro3uZ3y?JhKNhwogqEC}#FIf*%zBkNpkRlJ1a$Ls^uAS7d)P z5tl$S*#TE12b+AWur)Wxt;h@)%Ay>+B6YDz$tznQ1PWXZCi9r&;1!dDm7KSW(Hu3m zvJsg0jF+s~?2d%vmM+>zf_p2$iU*D|(6nqLh8`&L*uT=GgDc2jjpZ#|>s=5v>3Z;l z@tc@B9o|RSphZi@@IDJjPe9{{sr(kg`-T!zo$l1a`;?~1Y@)(+Gs63Zm9T0KB*RKr zHUAN9-oO-@`$!ZS%ymQu!N(sJJ#V(2f$c;$LyWOGkxaZd#*jiX@!oi%>%+bASl3HR z*XgVr>HjuMoxPAnbu5I`hYG24Wg@Z&q!wU;=wc|0+kZ*}%n(B+(N~GkX1U;VZE+i0_gyGh6o+>6~l`h!ol>%6dN~jmE>Fgx62uR2g*=?ai(H;y_#Uya5 zRcPxo)xuH!bXm@^*m2`g{z^tYuXjz8&|KS!CM^xa#s6Pu*J_l5s^+p9GroZKYm_s~ zoGp0bH{P@WO?>j9KTyvYps7<8Niu<7nVPF#AN~ z*I0zQE~NnZOMGf#zFNz`LG*rr8XUF&O=dyNYy-gNna66ghn)m|4Ki7(1CYFMeW}zk z#g&2Bwr;<8^8K)?w}Jg`^K@Xq#uHc3OW04zW99=+*i=6T4G7aKlAf06IGLt-h zM1J$wXRSI@5MI^&C;w%1YT0kBt&dtP_I@$q`wQ}|2vUsM*e~v3e@JZRJ|+9vmK4Fh zL+9M3WWN~O{mNydBJ(KOFNN-Y@h>Ve!}I=p{}G(qVTHRnY^^wlmXvetyd`zBY4uu6 zt}FFg;!I4Z*Am}i4ks;hnBYTXD=LS@*)LvLE(P}ce!aP0u|g`ckN2yZ{qnbU#{(MO zuQv7v)}OAah^}R~(KQfXOG6ILG1AZl257zqEse{&s=hN4pFcXKE?vx6#r_Lvn!YFb zb|fGIbn#RZ{*hm;(9j(Os7WUMPP99e;^UTo<+P_c_yNs9mdAF*x= zqvx^|vleV^@DOInc2)5=&Z$?zxtWx@R6VO=ws6_wwCb^NC|_cJvmUp+J6g|r=OyIG zzm7kidBy;WcF12eK@pHMbzMg1aInBKXjPRUbKV!DZC~hp9m3Fmcwf3w&bXaxCkbzn z02HQ7gQ%dqul*}~Cu<|&bWv*qUlm5W$e~WGjY=2tE*dr)sjtnV6^FI4^A{G2D_Wb> z*9IxBwl=$}*w$uSz2iZUo)_rgg7{fFIC>twjGVI^iwZ`?CK^R8J&q~ipnhP<@c_zq|Rg}@|cP!Yb7HsrK1wdq)qm;ob zr!Esi60C1*xkYlPZztQoRYkOSw&;E{oi$y<=)1g88Jg5)o}DRPy2Q-tgslVqjyGI> zoP2BeIBk3kM5HkKgwKX*e*DGO8|l7;Ov_5iWVC%t%BkMMFAdI#P#yigzy%9lx7uOt zW3ADcm?L;1pK%Wg=t$$E37L=pFMtltv(@BvW>20?oxIl&_0ti)2~@m3=>$ComIbJW z;ux}mcntctRCFHT_N*O9`O4a3jPsh)+{bokWU^%J&fu%6~BcpE`^f|JRY75#dj+)n8|{U?FSXMZ=x#UGb&rJ_~Et?;y|bh*N2jQiKvQmpkPLf99LDE z6$N+UW39pH-(=F)dvX|y-nY4!CUB5<-`FDQZo%mp`ohir@MCit&bK!V1z5n>X5JSH zH<;=w%Yemk{^;=ioBBi_z{4|bGq@+?!;EFdwpX!bwBl@;GoS(Si;=8zQl@1W1G-#i zK&7mAVv{4v#qN)Mrm5I;`*Xg~IRecu^uC<}#+PC&`J)%$HAYWTM2w2gXk4$Lfn&&y zq)^Ww^ytW1AeychMjZR@3*kH8@S8Df}$>%cHW90@%X25+$uxRK;yKwTte z$mu(0{K--lku@e|o@F_jWOmT80;$M6XjT9MsgCj+fmHW!$(64r)$a;5eD?blKy%s) z;CoblQXC;Nn4(%?-V}NILs{U8j*eC0T!#!N@H*ISvrL+hK~ z*t&t&Xmi8cB$rc;;+{ho!;FV5BOD4qupvr_40%FJhzv7c!&PcO8%>BsY|c304>sc- zy}>Am4`@JSY5_U@AM2*wo#vE;K6B@Ep*C0bIdxXAW6*t+Wf6FQ@9n6^Ams1}-I0)k zbRk@#-%ZHj24U8O9Pm4(m5{UGLe90mH6f?@ttv7)XZ)V>HWLuiGH6iCqp9I{T z-?MiDk&GW3k<;Ud@mOe`{jYE~&tNHoGF1o% z(Dr)V9rCe8*Xbe;g1Hgz`-{QZaa%fE_4vBmt~Gtu7GY+)VgyO1X${6yc#3Fo$p?ZR zBp)R2Ah}qXNj^sUC6`k(KWeZNQkXZznO86xV!6ZjA$Lkm8={;j5F?B}Be-5s4qnBk zuDp%PePEK$R}MvRi14e5A{bW_MKG>_B1E(dMKp<4KoP&1B-wia{2cswIA=uLzPEEZI#7lj%qNp?VbVUVd{I#c*15Ee9* z%sbC;eF=ZcXYj8i%JLZ`4RnN;wQ4L~d@j9MGr$AQ)JHl=QVm6W>-zqI+!xO-AL_2O zlFrIvy0W~&e@hGc%YOs@&+r3F@cZ2Q_kZ|{AN#34{8yj&-Ifx>S<%0~`p>@aPk!yU zFF)V`W413LrVS?LoWK4>mQ*ZYw(a%!zm4RNtWiTlo()b2tZ~vvf(Bt&@mi5J| zzWD9f+uLb4DgJfYjZU+Tk-lIbCB<*4(nV`ShN9muzYx&X=5SSCXcdbe(HHCG7yqIB zVxjrPn!Z@p7w`Lta@LJk_^LY-w}mHQ{?yNH`d&IW;dU-UF#u zrGN$oA6IpIM?ag;4Uev)Oa%>GL?r?$sRVAKJa zjk>KtYEOy_KXpa=dhG-|NhK*h{gaevR-vkmk8H!y^>U&w>f3DeGdoSRB#Zh)H%9gA zJB_Myc6q7Au=Jmesd!F3>&$?YayS}x6^!zh>mSk!YU0Zo(tn&gBq**gm9LXV=EJHj z0gO-a^KnI{7tOFBke3vX>6N}FLQ`J@V_PCy*K!rjr?OnKC-r4}=Ow#-==>LR2kk@d zw2pa=6X0T-8{vu~yeVmKO$T<}CjUE`+jf5b9QCm1(iPB1PR4 zMZG?9Ec0gheS;#qkQA%TTJrEqO9~&KBZZI8a1NTsGE*=rWzxaOa+yl@MKq2wvj7kv zx?hzlv!VTdAD3r8CYkwdULYZwr#HiPh{d@jy|>N<6ku5K<2{|Ng!15TTe4n|j}|wT zUA1`fhgp}Sqs#4~p+7HtR)w!up$Uozpn7-o8_GoFk|U4fpgc_APaEE)u?KvGLO>D+ z=Kkd+b2VM;beG^jk>3>6oD|ReUm6VA7nDIGr{F*H$i{+qSFVkt-0>!k#r!0d0Fn=U znEvQ%#RRnnxEGi8y*ORpm&*FuyR8p$Q`Yz3=coF2j_zD%|DaT5eUDDp_ulKTPr^~0 zzfVrr_Z?+@yB;rCDl0xkMWE};Mj5l>|J38U9*yYZG4P#K%w`G;BSs8upcdh=FT^S0 z6b&t*-t;NbF$CL|5Lt+qMspSuz|4v(R9U=EtwWI#Wj0eoPyR-1D8S0~kF}3jrl3hg z*i7#0(k}4_#UfDZdNI?2+$KZv@w~1V!;svj06y0kU5?HQU>`Oa?&)kZrG8B70B*T7y`#tY~V{e(eNJxyIc9JvZ@r?jvdO!7> zk7GwR&cHBvFXE5}XA8ig7@jS%Z`OFbwp0w1?w11z|+ z;>;=Zr5w>UXU?!30c-7dI<~gk{=~9`Gv7(hoz_Cbbx z%2J2e^|B;LX5u~iHh_bCTw0_5*-A_+7^=m>sx$9ks zoYilp2mqwwZ^~1|dX)}l)aTBxs+fUb-*Tt<7GmY--D=N|+u%mg8S(exuzuovk3c9% zoNRoq)H=`!R>CGjU@1j;^Je@1r?oev%)%9J)wR~(6(hX zM^Y+Hx?@~ZAWB9)T=|JW&JA=#iwk?Go`Sa739>jq9C9fTC^Q00_N1#>fW_oktBWqF zIImqvdOhDNImJuGAEH(g1c~I1e$)3oQ~A*QSl4Xy+Z31v**P+z;Ju$#311x-uRv3D zLT>w}D>_Nnc{(8^!new`UA_2!dtq4}^MZZ{^@2JNdDl>wEDg*|Ce(1!t35FW1J8L| zNLR2czJ)(04K~bGnoV{D4fv8&A=0gyHi>GMOcf&f0FLu9Mb9%fK6=R#n3TncPtoip zjzL;d%e6d@5^G_6k8qxh1I#_E8G2)y* zmR_XAQ+_$h<eC$`V8uE(_lOzTOCp}MM;h+kVrdrBc^oHth zrdqLnc0%O!*<$_M%&ySQ`)n3y$x_i8i|STE6c%9wP6!c3Y2F1nERA6V#sf5|UHm8% zVMHn_-;-fyVrPJSoL$})VYJAi8Z4C&Mr2=bQzVWliymP_Ry^IC@Ez_g!YJGmVZ=^! zh?h-FTTGygo)=K0db-D{R66>Ol;fP^YVIdefVQW)*`MyFO-<+_wS>4R`dTDBX2qVf z^tDLiz2f2HeTt1P-W$F1_u0Io4_LC@wvkp5<@JcCl~9*n5yce{x02o-ZecvSB3d*q z9^+!?kQBhYd0zfjI~i!T@i&qSp!DCEixNe!(RpoEJXiFfa5m=Ter7@Z@)&i$beJrF zZqQj8Z(@p0&1R}_HkB!yjq5r6YU$=e*wQu#!}m!LCi@EzZZT}( z-XJX88-#^>AWVF!C5SKxv$POR2m>UDtP`N&1{WY~aT|o;3)kETHZ^l0tW$$9yAKd% z_W{D}K0ui61B59B<^lj8mnRo+(V+^sGBDrH!1eEEp%M^30QFbcGTaP?!{yRF>qpR#Q@Pf^zegA8f@d zqKYzonW#Nv9tMz)mC1|VBf!H8a1|4vi|8-%y;Mm&ibcREYmFV}7x_w&zus8T%uXm+ zET7ENC_Z6_P)_UH#Mwx+0G+=BRytGUWIFm)0yvoqCEzwrJ(JhbIAJC*GMZ-xZyrB0 zBITsMAlBEW0HRD+M&ut)$4jc2x}&NrO^mx!p6KpY%Q6e-Wj&E+0BoO=WEpwL1~2|U z$xVd_y%IkylOmR0yF+RSq{cZUF&8Wx#hF;%FhsLVA}rJjs3NOnYB!!et7U2r)|%%m z{y}XqAxG@YCu1It8><6TaDvucdd-|$1(vL0mZb&@2-g(UfQ5=};mSqug}b+S=&>sj zE^L~MD|&e8r(uyUwOjqSCFy%$$5NY2gY#|rgM`^B^#`f8fMxEa`?eWESAniGt|jor z)ow}sHvxW9Tt+W|A?9+se>qJ$fg3A*pyX5bpp>TK#;8}^7V(36@oAWF}+w3ibs8PN^%UH;(mYF+qv=W$6pD;k!e5r9C z{U2Q@tz*nsld03nRsXaoK+oCbL8&|L^#>9Qsaxtzxn4c|Gc3hQ@ljobJWy3$=6>|E z?ZKe=<`um%YP|VWcoVZ_z0Rw8vse5(U9^tW`Lr}a)QK&#{^lR(mEp`c*{FI`icacPw0KcYXO6f~)PI!@3)CtMLDS~x%S;(v69r|1xZ0YY$*4P@`W6I+j8_}^m6n?KO`j;4qBoXXddL~3qVnu9DOAhI_a3%aK5c!y)P|O|1(Ls z=b6xIho`qOa4h28REFbLmN2%Ycv&;i+sSlXyr5Uy%OY69-%omRvyF=yZ!@#n3bvwXoZ0Ohk zyw_$ge?br=+s3@T{7iUZ^n>+PoUsi51@7e!cG8}+`d47}m!`He#{#ytQu&E367WsX zBWxxt1KJexL)7tYfgRuoEoqox9Z48@A&G{9J1h|!94*=2bof@Z%_L(~d1K-$I7|a& zW~(wQP?5OnC3!sV+0qf4q*;PxBc5^3M|oR^xs7{L;H}ENpQhHTj~9>7O!#a?KR-xA z`ffE}8~6L{UCz7E!r{rEFN2fJtw9I$4A4tCXWQdxC_RuFdm7_DFn`zr>mBN$tiet9{O!T5?g7U5?8z~e}jj_moiqxUykb1A` zb7zM>E5IKo)T*;fQsFLg;Fa-~)>+Xax-ME|x?M9uERlUcuSj#eq~jO)ix7zi1!t}b zke2Msza_S%=YL%HLNXDUq&L}X&z@mv->umtx(=?)_e!%*VlIxA@H;}g_vo(WW+)Tx zfTMh$so@1__-JZA53AznUUHOaDIZQiGs}ll>S-PUe^HW`&1jr@tWQk62j64tGBs~* zhFa#GIWWl5hSIEZ(eSUB>i_ZJ&{{?ji1M=>`hz$*SZzUVO~8n@K0`vj;w-2tgvlR_ z#pZ%yO+fcuX@+p*Ucw6`hKs;#3l+$x<1QqUnxVv~hXh(0p$TUL-sM~Xn(HVl&FO4_ zNcL3#&Z?`Pno42}py)de?q#;fp@yaL?60$y^`=J5OaFf;c@nppXzFT!{nJ^s+gJvo zbhTZuTfz*RH6+pYM7iM01)|pmp#}rn;`yJKWk>*QoS5tNU*k3}JTa@ytKXCkou5^t zjt8-`LzJcth87Em7+OUW$rR-O^w@~}W+uhdVsjEx%lXI7)czwHEM#&)ejojP^b&kl zakZk4F=~JVoCIhsIZk(_w+Yb`@}th%3IM!;S?bvRqcZ1#*PyEm%XP7OcSy zvt~I58nr{j*DG3UZK20lC_d}0{ej6-_o0@c(YKLkQEg8`*yNpL48m;ojjcCxfpFag zX)=}-PT_O<9t~Pxb8G!wgk^X}zl!z1KkR#r0Shk(_qhbKNp;9mZyr6H4Q>#-h`m2k z%5COP+t|dZd&!w4Pxd%RztikB-BGX2kajPfdas-ic#sQ?W0b;*FjNsg0GrTxduu(J(CWRzo;SOVA@k78Sdlvxt+$--d60(0Eq9gNdzDS znKhu$9PX;_?a&bBF^JLk0aiAFHjnpCV%X4-729b7amv;NBBE*nnXgTkZ*M!xcfNu` z6LAeEejK5M87n2xrbJ>}bfgg3$69w15vRUv`WoIbB#OWl#F}G3qE_LiDm)FhH&x-6 zHRVuV5|e7iv#>)@+}|h7Q)b1e@NT$)*dJfK`hY2qnGS5K5YeUfXHn z3&jt9lpb|QY}2-=gk`I+e5j%hahn1UZ7CPpLAgK}1{gMPOSv$Va)B)=}U3ac06oFq%zhx%P3{C*2&DY zG%j5T>y*;~>tv;izVK?NtoiX+Gg*gb)y%rgsrmS&OCCAD;Q+30=;c zu6ySX&o<>}HNrOQdkSxp?KR^yHLvEk?_4ugcF#<&1r11QnpfpH39C~Z9T_t$#^==4 z;cgb=d##C?i^1&e4w0$dYpn(YoUs}t+M72(w1Kk*2=!to3p)?Q$)H-BDv`X{ct?|R zNus0ZT_7^MCh49Qp;vC)in#_&DZI}JFn@1Td~A(qp42wJcRSG}zHe8$>$DAp9 z&IowP2)Xae>SQ7{|Fln42aS z_@WvevNcN8ZX7BUa0f5^*-~Sx z#M&Zns0u@nukI|WiMg}*Q0zCe==$~D4ZrNSv*aI9H4=?(J1e1g*RwcP%`07uscPmf zhKnNCUJM`9r8qZEDXKx;!KoNKtSQm74q*$$Puje^`a45S%w5x0x--gt`|uxE-{m5R z^X>Jl=~Ojy*Yplzmv@*&qKo4!enLGNy!x}KCSLVfEc@-VSZ*-z3k0qXMC8z)j~IxY zj>G@wwh*uW@YTfi5C0B=%y;NF@!PMQeqo^k5&leF>N_2!KGPw+GN}*zI>8aQc+v^u z&UDIjED)VjOb$fnBvuXCmhn>hq(0Y%fLCd5h+)U&985oAEm{*Lq#Pq029+L<*qtTf zz%WU~(eLCzh83wqoHC)(1mcH?({`2KwZ1hGr}?dFrMJhfD@0G1c~@u?~Vl%1(-#IVC0%Uzn)-aBWJZOF{7=2bj23 zzfT}y>VY~9C&WZryx7m@N%qmx8Pd<%yYG^c7?%r7JY0}%uV<)Vw(Fu1<+m5ww4g?z+eigL zYhAig)C<8O+djA9M$IN${#6*R_0l0|Nr|3O=WTNSsyh zoAC`1XW+R;oSW;cT$u1+wUk`g#hUAEX5qNb3)AZ?dQVPAR!mECOAzI5~by5k>Z(#!*wETJ-`p8}~}U zcceY~m84Qk1)wHU4z5=smARpP0q+D;wJWF@k0>RI#QHjz$OS}?n-jSyadULsC#tSv zbKNt42MX<%H^HzA)2w#wi@S8R7nE5n4*6a~J%`6;HpoNB+miHTt<{B=uI-8S3bT%B z&&(ZaL9x4*p|0vD{1|O+ObF?fTRgn=V6qhIA5Azlg;wQ{&=;57!7+&UwbXL-8On#J zW1dMJ?FN-Cdzlo(op>a}ij~Rl=Pt1ZXoxKi**=$Zb8a6QOxdg2F>)bljt3_k3?ys} zMyFVQc{p3MAOoTm+*8Kdq`;H4se3X&;o5c=?}{r>5P<%0j+NQ4{$s+tGs62PX8(D+ zD0{vtDP}XhZ$iugE*0Q-bA3x$EiKQ?^;*z+4eINqxnY~&ZWrcr;Oo_8y_CB}-IwRo z^n7wK3uVpuG{31i^Lc5P^XU?n;6oCWvQH2}%zR41(tNVOQ?D!mrgT5Pp$>z-oAV8+ zoi*S0@$R!&&G4eG%{VJCV#aL-$8G4N++Y$2r22sQUL70riJcs{q!g?c)sInb^ox)Y zmI`nt;RAIZ$C0}<^YdJ01h5wGo^zVDOoN)*%vX}#ZD!g%Xf?Wy(3lxf8e=oQbN82sJ?OR|d$aF6NRYtXD6$sG7$BkCE z_v4~-t)03ztAmHv~Ar9Drj})9oF(JW1F#y>AXHMlwls^JV_4LocI4>>R^Cl z@{Ex#Y#*rs0!@;axiM0?9jQxWXsCB;P|mt~Nj#_g?&Pkah>Ur|uBwk8%o@0ye9PFX zz}=a83EmLB9H?j_IkfbHw%4Xd%fCocwz3Mb zQv&g^v%mnznrpzWDmMSKsd@pA6J++&`q&`=q>Pi!FDY`Fw-Y(n-_0c+0$>GNP|8n& zR6OI~o8dsz#nBh+5CFP%6n%!}2hdv1K`zu=a~3wJzq^HM~YOP zC-G29RV8|-;7KbexjGaWh8ZstG;k!ln2o>-pt$Jkj+f zV^{mdr3KYq27$%O9!8Rt0=4-04_`q}=i%W6OCHuQK1uWan2LZ6huY^z_V!!TCoE{; ze4_e~WET=|?_AO!zg`WJ>5$(FXR?8oHd`nw?aA zISX!G)Wc!O0GG|t9-qIrPrk~@kWJxcO0TSU=aTV_dhy-k!@9g{ys66r3TI) ztg{Fw%tfSDeujI$c+RH!M4;?8)9KM$v#X3ni!RxD{oved!(7gdvU#%_h*K#gh zs>RnI;O6kTb>Z-*x#nCyuj^mCC4EZem$NhD8{p1lLw*Y0WIt8yryLP*vOr?L;=HyI za2eLi)@(mJ$)d}+NtmgLrnv<%y93?Q4O?rHmTxFNpf90lawXm`+_^CNW)_^&NV|Mv z+C8+Y#rJvxn*aU9XOS}Z7b~_^>AIcR`G(d|QPH1C^r_D1yCJ7tGQ1DCBP4oATPtib zy?%oXR~Xb{Cp6x!ltem~Nm3yS0D<7y35q^8fAJ-9hor?r-iPV$AQzX;v()3_{QHP? z|8N_AYC*XRH5@xzQhUD3ly!@9Sg>KAN8g-xkG0OXn=@9Qz1`ePy>*UE809Ph9Sfr` z;we@y*Q|HRt0=GD?`mt#GzHzf`-ay0n6Ud}Peh+I=H=zAy`YT0WNla(E{`bQ>2rPs zf3#tU!Nr;_Qk;lEAyn}V$^Dvl6c)-kG4d53X%(zO@5$hh>StcY`-B}4Qx$ZyBCV(( z3s6`&*4n(CLG1Gi_BpU=#S#?y_OF@6jt`Cq%=pF^R5!k!oKG;ow#s@oYP6MAjl-~X zD+PdZKIM2r)G+6`3PBsBe}@49;ibn~IdwP!83#f_o-%%BCj^f|vf;Iq>6n+tlO89e z3Y3lHj9cN&z}Suh@g{E!?hh-n-Ozl`HqABLxafTfZArVlF#38mdV;7}3|q%(+jbJL zu&smM;c@_ZZ@jFG{42$YGvmAhL;M)bOQMwl5G%!_ARU7>s(+LSSM^|4?LOErDC^ka zeB}+Tzd;pmH0#djfp?Dgs*@)GA-a4LjKtHaanE{QcDU@|^Z@b}gKUqN89l4Fx9C2Q zx86BE7+y=lbceH7#+JqNTHTLr1#gJBCf5Cpx!q4*dG{0RKABHq_YZ{bmrxO*M!R%H zE4)&iOV5nnHm5f>eVR-h3n?w1{)uh+X^|73Y)3f!4m>n!LD`i6srdaSFnqjh7M}3R>2YK zr0<@%`RSykMGnwZcJimxNo4iJ+n7>b{apA4v}?C9sdgN|nEs8ND)uZP{$?8hkp%_eJlYqiE}B|gm9Mp_u-u6(;J zX@4LPp=6?&!I6GNUX9ffF*IP39I;Y7u8h*H349WmM7|G?rjwg*&5$N?)oSH=elybZ z929VZ^bXcfBS^qt*v=Vf8_sXVZC3IFatmGI2*CV6vGMoB>aFCxTQF{| zMdfp@|*M5ef+#)KcF(gZW#6gl-|MnZ{-bm zyp#Eg^5-4r=|Iu_dv9!g6R)Fq2WdWI(0DoU1!BbZ@f-QsO+|meci>BK@wV$xviaeD37Yy8YpO`YmY^%Ki-2>gp=~p?M#rdhIhSFEB!hiU8$JC)^xyVi_qX@ zf~A$Tp*L2h4Zhq1hK~y?L)(x~526*Y6uO*IepXYnNMVngQi0lo83jhjszSD2(-M>4 zq?I3}riGZiUZ-@~(#165)~#y9t=sc8pfz;aepG4<@AEeJdVPeied6Bt79#_!efeJT z_xntm;)0%Vz(vuIVXd^W(M*`=^Ahp+5`ivSwnrfnWDryUoYnaPA`8lg_T=WRwYLnH zdFfMtQMY&q-RI+;U!?0A4yM7sbmU_-yZ{hBiG8|6Z-`dPFJDO#PUJyfyVa-qtLR3&?4K~kTDLUkiepnKv?2IzUD&9nllf= zs-@6Umz8;aJV#`)eQi6vQC}&tKvIlf8Afi%7ZriR)*oP}a&brD+2|idH&h}yvoOr! z&w*#Le0D<@!@fr6Om9YUob3_cg<9J2T|U}@X&f!T3{M8L6HG}x0jL4U19kRa~c>YLJj4hqhfgvfa zeNY>7TjfA#&Rg~7PS8}@Dy9lrWWudQs4DEvuw)bYXmtCqqmNfX-5SmqL^*C{w$gBL zHNKOBnFV}!cR*#s`bF|g1-0`L+6*<3e>cTT2>UgjQ_3J!($g#Dy6M%%x^?O-W&$?S z={xnsTK4snUPfOQ4~bP0KdC7?M%f#h3v*nPa;$ZfCD7b};nYP|qU99{fm%f$R7FeI zTM-jHZ}qxXFB2A458COhZ2%Y`MN7x*3t-~XmEbxsw!B)x0ZS;PKBqZ`p@G4Mg$WIi zI^C*mvExF?4KU@~91s<{&jHyIRD16n_e9adY>~n#k1JpkCng~*0Yr@@fJtCjfl08D z!X(%dz$Dljz$CB;w-1MMdonDp)*>EHB=_XWox_{K<0v+mo}5D!PcW=oEgh4g^P&6* z-^5R_3#?zx5e%oeSb)h;g!p(q+yYxO2~al?{BNLwOSa7+_>BEhjo`1@oJDMk1TmCr z1%Dr_v691lc!aOSO5%93RucR*C-?z*YVslY42azH68D%4$*Ejg;$Ij0gRkjVn6~6! zZFjqRp5;#)}?%t^kooCQt)GJ75|bM|FSIprAOPBllyTg z*6BM_>IPg@sDf6Vw_)-kZ?hJDG$W&pVh|L7 zv)iy*)dt5Os6}h4)<&EhBTgD6YAscwg)h;8{ zX|mE}m#bJIIjbRxkT5*V<~LAQDF|%EPHK%RhzSf2%M;~&gAC-`_le;#&gpt8f(6{Z zqshWNb(QNVq&^p5ZB1X2xkwGg&~9U<4o7BckaGa@Df*7mWi2RO@OzVf zW#Bo`24bJy#1oVV93s|=pxrGyu8^;T_GC~oQ%rMYrj$i^NadCGL>SRDNk1iMTNuID zFbgn=jJRYHsR1U@z}A>Vo}Eebk=9flkz*`}K3vdV4HI!EPw+s4Lh719gL|{(aqbOu zjR`^~oe!OR3(KsY!@U7%07{d;kY-~|>W&tegMDM_4h1~O^AO`#xcU-I3f*e}gh(XI9~>BC9a0vkF6J6^sQYagnnMLuVCy9GZf!9IFrw8!!QebxTqo z$#kX45UB?d@4zbXM*01ARR%fL-2N)#zEl})ScSIZRbv&}aI9iiI=*c?MeM^2R>AFs za<%!|hC1W+;n!&1#ql*chO*L$y%;t8)mEBQQsvO+|Rn$`Sky&97k51mS3K zF|MF3ulxxN$LLmh``lI1`C*oRyFPxisn+xYT8icyI^8QUD0sEuzKS#2A#z%EIEyg>HMSd#_wPOsYn%nY7@`}0O_ma85w>Gx2p;q3^w&rpg zHiFCDka#Y44YMtdfV`PkBk<76jWAC)xE6vHkOiz&C(;RpvVb9@I%)vnh#LqUkF=V~ zYP8zuKSit5RZ~cKU3UzL^l>gu+*|DX^eQYENv0BChnu(BZvoY{@fs|CREUjpZ4;ep zAG>9f&5vJ@eWWX;0w)`f21Gfx=ggaOd)maKE|@!SczX!l#W%Ns0<&9c7U^tFGt-hP zh@yCE<*t^xzm;KR1QEstX93RmW`1V{kaej)0sC=jSx5B)-aP=`R+itKYt|0R*(s8z z(k8H}4JTPY=0h`wMQKmbNZ3J#B13QE2}*S@7a;bek|a_;`MCckYX0`t;;n>3wJW;B zEJnH{tvmU**}9x=2pMlT=!B{cQvL-6ya7^1Cpu0i0t&F2AQa4Li4;l(L3>Vh z^0&?)Sj{DaUn55j5i96usuWI>e5$^kVPa4i86h7 zNr()aHgxJDM8c~k<~jPA(#i8i`Tcf6MnYC6WXlk;OAs=-uxAmC!*^w&56e!-mgf;N zz1Y;o-##2`dPTliUb(V^Mnx0Ls!H+|F{dJAYzGGc7j7~TM`{NxbLN(zNXpgT4I*S` zm-}fF|I2VAbE>vP%6eoN)LEI+#J?fm`dRvTaalOyu}_Sq@z(jMdB@W}e7&I~L`Z5| zQ@2}K!cicfo*ajD=ED<^6}7@3!9U)3qy;3kdmzUTbr8p<{^?uv-*|FM|4oh3e-A-a zHdzd>CK!sFbD9&VIw7lS!Z4_XJQ(hyrUtr&m{5dEZk^_MT@}q~iRLsXs-^(%FcxEO zO}!uju2<_cMT)Ylrt!A9k#d)&kNVtfQVHukZ>AM&V7yD1Y3V6V+t{3Di;!qeb1vOH z5**1=g!^rtJIu4%PBf>Y0%$z#U{h0QY(x8#hzDT(rQ*$`;zf)%6)&boNgl{<(&lDc zc&u;oguG_j+{}=-nQvM8i#2Vo5D(K-nQuv)fIN^D7+~Sm-7&!8DlSHC?sAFemmSZC zy`qZTd|Pgw63w$RRwaKQoUZu1ReVvQ9!EJoU>eKMgK1De9j1knd3DDnE|rf&HE}O@ zP@GH*@rrPB5E?q=5~Zs;bjq|6bjr5M=VW!J3|+EqCv?ej3k`<*QXzkk)iQy=1&I}#TXmbP#{66cNb z`|U`abd-+7rMP?wB)-TP7kxXKG=lq!^`TTE#6C2ok%mWTIIgT#mQ&3uRcSH+;VE#Q z#Wa~(lh`d&Yc57|6EI^(4Vm;1)R{qz7mc$aD<}Abgh9MIhM#sdr)eQdHE1+#hI|!Z z3E1AnrrPrwEd+Ygv6fuC8>>nAh!RYFoGmrw#aVXF0 z3&ag#hNhSFn`zQ&69KVUJQ0ZzZ9EZ)QE5S*+k~*-qW97cc&S{g=6?c{xCq}vAOMa8 z`TKKDhCDer1}}Sld=y4mXUy!&k9~9;oh##bf*o!gYfiR|PuqRp!?cKX4SgoY(Db}v z=3>o&a?qb0AqxHGIG++J`9U6UTuzM-h98nG^F6v&N2+nej@a6mS}$~D8h++=1PaU@V1P-3R*md+Uj3d>Z=CsM>Ibvd>i@fX z5iMTqKx}8Ke(zpcjrbqFlg}WRlbGLeu@9fpMt^)%e~!^ml#$s0reLv%&T<>xfP^hj z8s|Abz{5auDz&yGWpOX7`KtSj=EqKt2Ll2MjDG=(JLjj}Rg;rIn_7K(^W1#J|la z9*3p+LJmk@Y7-k5P)t?;Dlt)3WpHdmYS-KIc78bvKC}p+|37>0A8glk)p?$K&b{~D z_wId9_vt-J&z9nxd!vM>SR!J^kwoGKomaM_6rO1(sVR@;>2X}D9{&-r zLPS~tLj;(hDoms5c8?9QyA5q9g*H78aDxbLBA66orZONJ52c0xF5;dxHKsD3?^=8B zbMAdVwIUuDmMbQf<-RaHNXr$&uytEiY~#LAMJ!iLx4-}uiO8Y#RDjl#3d6A=26-ji zLPJ6%#VkZGMuTq3Ad(tBm?fV1XW|(sP80-)_6bl4L?$+34vzo2!r-)5)3PYjB{+hV zvyaO~vk^HUli4UE^1=Hgd#Qa;=)HhJjrZ!#5*?aiL(5$j%2D?)Vnebt>bNDdG~zeW z5+$nU<>2YHueCmjIkEStvqy8AhAZE&MT@CFETUPC7>iGfj<{f8p@AJt(V$v%$YZhf zqJ=lo_Zt^2NKjw2C>l6p;c~ufXDpVpjfKl>Shy^?^=WA<>(i7F=d+20N=x*p)hMaP zv@Ep11Ytv}H<_ZMLNXf{B_);FV#E+BDQ^pAlE%sujP{N|BYSL$1fPxYyvjb+nvMVF zSkJai4RHP!%A3dfWK8)a1W0sEH9>2&&pPhDPy*Jp1rB_@FZ%#W!z>2v(;Hr z&YI$oyF05D07nv2b-+s#}QxDa_b0!liD|@!vYV(d5aHG z?HvATK*2GCL?9EY7tSMunJk3MIABT2>vm#Ao%mMXtM{*2C*&)q6N>7f6N zIy(`#f$Y@N&^YZ49xaX+-AkqqwbzN=PVbk)c((cs92ASOS%+{0zb|`)r{dUH>StxQ zVe=y=d>xTB$TvD+9*0HQD4H|fu9Z@bvcx>roLSApJm)sPnP%xEtUT#Vg8qAXR!3+U z^cA7ONEPTJu+sw;)KS_Ax88iybr9?8ZQ8JHb6nOzJO;LaM!O;+Gx^et0uJqT93p(c zaY(xevJw0h$^oCsos4r4nZs@ZEyOM2gN;u+Bo4O1U{a%b(}9e3$EIH=4FOQ6AtF#~ z8d?mOMmui`$SD|SfO2URJ6pZlNmKqbc!O=Ng9Q~JFa>|vVc@{!jDk@3>9vke`l}rP zv%p;MNHUnM7Z0MxSkGUut=HYy^C-oVDem1-r!me1Yx84E9dn%NG$@56&)0;|JC2Y% zjS|J@s!AwD$Oa+70o~eaWONwVv2J#4MV)VGD@!&pQCne6!1&QtW~J06ZN<`rpNZPa zQZlY8;1u6Z;QpFnv=tjL8gt|cv*Im5zb9JuUH$m}Qk874Ed6Kky^bNE12A80QYfx>6-p^*bZQ{4vq18KEs473dlNU%YjUaAzj{rB^&P4 zEIBcHmQ!1FaC;tjUGAf`qxL3>M*nz*bCU*H;2@U4yv#MxW9hdEr9g zGJ7?D3@3F^UU~jF&%L5M%C<)V^YqF3otxM44@omNGg8f@8+vF>zmZ7W7Qo*A!2Asm zsaeC9WG|0`Ye{^EbE8FlLkd$y*#RYG)Cq$wqm+H4?B&M-<)Ks_lWLY!$Bn9|RL4Wv zw{D|)@<#f8qw2}3JUBg3JzJ=r>)6a^_GiE*Snc6QGePxC4wu*uTNF+zoZKZlxjvjw zK9!sWU4LU3PpUa7pUiBqlIwg15B{AAR`QvskOsP-w?Q%egbZ70>r!FC08&0}pG&eD z$Nl+jDV*%=G!uN-88cl2UPa5d+Zn!Bt!Puoj5O1RwR`%LxqdWgvtmrCyJqTr%~bGs z!;~Gqmjg32MPfGz^VCmkk_a1~N;{>%MCmqF`vTH4o2q>keFK(G_po-R>vh7{_3^+h zrPu9D<%D0z$`Crm&QDV&e0kjfGDg#xU^gf7<5SAM8|~&dTP(;EXdc+jV-AJX!8OwM z9OT<*Oa;C&rV10o%qc!tb&r+`{K!o$Hscm$G`x)tbMT4V*$}}Z(NtQCVleSVr45xf zv&xZGJe~>?4mHkWnW25X;_A-k^FBWp@jgs)E4KxWO{PqB`ntA~>csF{#;jz|VIL73 z(K!x2q20l>g}%4RG}>$GMsxba$qS#H)JQU6ZrcbN_ZG9xi56j~5$~*NaUR2&h;Xzm zd+Na_s+PB%_Q3O6LTEhrp*BYtRwqlcJZ_H~SRM~b;2G4Cp>f***$hP`h3QnFFhvgs zw?VaUib~=vNl^h;W@K%g3A@r|6@;|3C*7=#hQ9SoX-SY~isAF(F|gJG?#QZa>!0TK z_E1&W-aaFBV}r9f)B)JAK2p7-g<27Sk^R<6L>Fs4FbNx35trJI%`)@p6Bz?%YGdF` z(-?TOeF%U9@liUaj$3z{UeXnEMCqCgIcb~kj5dOQ z1gNqQJV}9Ey_*6f-(3{wzIRe!$Rky@_L1L4VWCUt<+9Jstj)4X|X--HF>u)Z)SWs@gSX1 zY~ExzS6Yp%AZI-=py~D}2%zgWHOz^@rZyuhC<4D%{nhWVCg{z0GAhe)VNg;`qC!#I z)TEdk%BpP?8{SCYZ&YmX<}?%=uwQmHg(rJdm#v{KAVA?A>Puo2u`f}%N$N~w_{~x= z8WW+)GDInE6#JSfnx=YA)Spxwx@fX0MEhJVd}@;-Z2=$(R&eZsIiRl4-T@ej1udIa zGao27Ws8}y*FxZGsUWNqsMOKrm+DfOQ1t>fwArYwpy^Tjo#UNST8dVtOie`{8cRhf zq`1*13uN*r*&Wtc<2MUA^Yrqg_b5B+U8BR|^sy6bZ9n}d?e*TG4XY zO;y}InvWG)2j*v~ck8~R5!tzQ0G|LWRb~-4cZtMR*`ig#G-_K@zfWC8q24^yR_rB{sKmb2 zfBx=uj|aCG!#VIq)H7DN;vkXdWPW;=Ml{dzhl+^&>rGr5L}P zM)Od!9b^_&E+(N7T`Buw3m>{Ok%^G@Q0W$ktE>V3X=*)EhCRog!LiYj5+L1KSCx^ zO4Ot?D$$`nPJu@C5CwkE(-dq3;{XwX#A5F0NQk*F*7}OMx9~pr2EI*j^x}l>Wb+Zt zg@%^r(X)z)n0t%GylCb^Ecsh0PgWD!lRzOls}*;FGaG;}()}lRzo2GH0Ql1qEgiC$ z)KWM=%E(pB?lHbPsq7d7nskhZ+Lx!c-Yay32fuq@zqEPl{G({|cd9Xo9XWpu5_h6s ziVkeF=_5BJhR>wA6S+@{f)Fww1FUM@MDD15=Ib~G)1@|;t<4%>+ETxo4cPN$13?y9 z&?oFh4Omho3}D^>Gk+`%A8Vn4Dm1jP;egBLh68a*ZK*6+MC&EraA2Ug$lim$$EUXW z5MzNluIN_ZUSOk@7>#Y|7x>`Kl&-8>kB*s_navRXTGU`CsI3K~Y)gF&Y`I~oi^PP8 z3!$xPF|h}tF+-dopZbqxFDMdAY*^onWo4o84N_rU4Y+E4;SrH{xDU!XOkwR)L0?o{+6OPHm?=C zQCCnWZ^H*ivnO0Py^{!xz^kk?^D`RcHri>@2N!&cfQ`rW)Z1K7J>hBxRGmhlQO@_Q zVpCN`>I#4#{tqIR<2bT&9NDoS@iQZK@d|NhAjX+lN%c%qq_It@b^y&B!+?0v^hl}* z_PGuEqwnCq1HDBb!FL0~Y^OtDK1Hzmf11ZllNLn<6suMM{^XoD0taZh)V>JRYoFJ= zn9vw42h@bd$WDc%G0IcDB@V<QDcF{6=u5dsKF*qQF*a8S`&hF)oIr}IDb9N6(`oMH`?Rx>EH!8*q z2hxgqu`yB{=sX0Il2Ot6;CeBUEd~+8tvPq22U<`?LsN>saf%6C*a;PtX8 zWgpr`G2xAE6cZ%BD<<+^=y1I=$*>lDIj)qL*`e!7Nq2)%V!J*}0hrk9k509zk1*Af z6p-5bfC6$&Yb6wrmxSO!WCaBzlg&vDnPuV=$YT-&`6dksv9a0F5RmZ~#Gy-d)DEhh z@C-&f19iF;*R-&AiSd?AGh3(&_1xky3mJ(Dol{88ZQkAQqM>B4aK2Sk0#tdPD<>WW zIq?d9(Gn!Cm3rEWZ{l!a(hs&E3yr)kVKYJdX}X_4lfKWu37>+I`mW|!fT4Od_TS?~ z5Khc@f-xn&=oYRp$cAX0VQ?%NVsNnr!>iTjK8d+S8Hf!k(pL`T`>n+ZDA>3s2d%pZ z8qDq5sW>40M4I{}Vh~fsd$V`a-pw)ixu_1L;AgDcY||*dCEGtbh|Q!tbXF#@W|j|8 zh_n+o2q399S%Qc+*%E{}W8zPV__L4z?~U2zrWY-{;uqRme~_S6(9YR1%s7BafywNe zT;l}Bl3ziI#ExESoW&qX4=h6rvauuiIEv~ko-3^uX)m?3q9g{{c8=I{br`-J;HHY4 z9pNVa2Cb8H#9p-ZpS%t`5<5AR{WsgNBi`7C9icBdJJOZ{v7?Kyqd5jTCwx;cU`KOd zjWlp}G}yq7qRPpO6DuOpB3gv9O!|fmwnWvCQdJu`(p>auR~{;xC54vSr*?1iGaeEtixtI<<2=!;)dle^r3?{#4)LtcS!(dnwsxANk?Q0h|MV5AP7m`#_ zt4hWb?F%+sB`KnIanETN_d?jkjXxh-53WqO*KaP4|cav(>X4 z!!n>w?BbrYUEFgMySV4dxdVJ9mW1paq(H-gv!p;Xs>t20iHH(!XLhVg{x)}UTg7P? z_uQttxVOS>SV04~Ei32sra7UA?c$zc_zRYyj=eI@fER^K)gzvuaxp34kA`2J?cc#J z3)}zD4H+Zg>zKS#Y4WU39c3M90JK zJ}r6ahNd3NM9PGThB3Xs~=9lH!);*qR3+I#>Yq*)f#r(OLvwxv8>nR7W_ZD^=6V5q0k zQ1zi#V47;o4289C%fVvssp^P-jd#@2K=xyCtim<~T95+I(^nGY;zy9!B=lPSwIOb6 z+m&ba6d2wkHYCP{Dx66v&1$7IYbd2?pbTjL2*9ALYiE;1VW63=?WA&o;WRsum)pji zaz=1Qx7Su3wp{@&G|__;@NSG9T56ZH=Tpd<*5;_5+_u3eDv@+LtFAHIHqBbon(-wQ z5SUpw_Eja&0tfB6G9;ozhH(nmaBO10Fj`ykM3{vu#QugV|HkQ;*BT7s-s><35%{6( zf82&a@WwU_0((|ZN8ycUMzX+PMZ0tsv2K*}-!bq@9H${*Uoq}4H-(^DTy7C`-V*8R zZXFn}6*9_Y901RsFOdl35kH_n;8jj1Q{Oeq1?QpZqi3iB4`fn_K%pLp(9)JE&>-<5 zP5p(|xTV?&s@8HNtZfL+<9U=vt&m!opz6juO#1L+GDU%6-X>?n#wI|B&@uLgr!i(oPv{kLkW;x?0}AdYeK-fwfjAUQX2J{1ABWr9#v-yl9Vi|W>JEj= z@b)w*KFKl#bC3l4$QGDR&QkT$7lw#pzn?(>h+V?j&KkSQ0{11pFl!%YHo0hxr_Lno zD&3h3Y0WbU*|sH?e!IRHjI167()AjAbgezQSqNfIheBbb-74~wwXS;$W~y)2SpCdG z0*lnY8J$^JyuW23YQxbS>(j7Wg?w53m4!rlS7P42u${C+s}X+Ikt@&EiMECp+j$*F z7sfG~W&plyade?Z4LziBw;X;Eij#*k!bWV}|MU{A6$O!^b z4B!^8^OKHrL;_ZO1jKK?k6H8zQG}L(Bt$nffVK|4KikC>TF{C@lV;*X3`HA_JCIak z9L+hxEP^nk4Zm+xaDQI0Up!FiHbWvNmlePHfU6lLrEHv4kj>5uMlf&%zp-MY{Fd>onSyY9OHkJ-7*S5zI*E16VTQx8IKe|; zepD+w73RmsvkXozc>cr28*_YZYoV*yyL}@;Bq~K~^XNcIg-I(^VHph{;#3L}&vC-* zL6v80w!>)bwMIC}WS8b*GECW%V~0KxJ4`1u7=Eyvjvp5g*iO~LT|;@cMJ8%hH{Xug zFk#DL1nOuRKs6d=3Y&srx6Fo#*6cu5HcV8N(DNASPG#m0b?#zuR6L4Dszeoq1~e70 zs-QEmPI_bV{rTYq5_%P z)uw=BPtxlFoVJLg;KX+~po4yjN-n)^#ENC|P4Q?EbTF;Qv$$?Q*@LwL1_?FB1~*3@ zOONQB*r#$9s|IZ$N$D-qGi}J5uS0rJ+rnZxwt=1{9I4f;Lcz>9Y2_NU1+m9Ya4Z(+Cz-?nrU@ot`Vyhn?XXJ7rj^vu`|wDes(0SupQCLhb;z zX}&L0WyrDPGB7tW_34-d6PmqQ^YC$OF+zX?Tp`j-HPy$!_jtnh+AGFM9|2|?rkzl< zesu*%Rr{(MU}5r^bA0JGqY=*1i_GI^TAR9gz9ki9Q40==1I5bdpwT6lL#D1P-H+>4 zjMKa%OE+6@1A|#~#cs}PuVXkkmt~Ww=a_KVg9W7_ndV%C%{j_>6#@!%MqMq{TkC3@ z)r(FT>*af6TXXW{t+>5tdAcdXZtWnBho;Y{|8hS}l9aDwf_}ml3o>v>RWc23s1O9d z2c+5$lZYr&kC1amBE0p_Gulrp{G zFt0Ouz8;ucLOrF|Gcxxo1as<)Fi-WqVVEyC%rOLsqf9jwU_S37A0mQLc+cmKUZ(w? z=Kyo5zX-3M{FecqLz$&}GUKENrXaKN!5^$GY6Morg;0gPz!$zWS=-qcH-l5#OFBD^ zc6=pl+BORSF*b?z>%0Nmz0Mm1OI+s-n8#U(K3BK8iH7Ve%Y;Ep@R9ha+DSX3`p&llnBKInDX>>B~I%4MPdRUI$S zhZm^^Gc)^ohyQ0$F0)Ojk=<-r%W}SE&v;l^>lu5c~^0^uoJy{0zO&#CjzFlEctW$$NN zr`pe2`LC;=Bp#{$*B?eK{YP~Xqr>o@w#pSJx)sql6%>)AS486m?m*+#EdxS);1D-1 z{Vvl1fcv`x*H>>|ZVN&BT4-~gVqW%DJ;O7kU_ScQS8y`*Q6E(!wvK-Fiak*Di(4@I zwLP=tPmFmpTu4^bjyL=br1^4~=uk6Vc}68&c}gW+d6KfC#q*SFsPkurNAq)f#;KR*1=7;Oz3rVxbpO)l z1gvwqqmx{0iqrE;x zqYm2M+;@;s8rgrE>!pt&60sL8eC&1}4w0(7^%!q)tILa>WLxqcpf3tW{sLDhZo&4% z+Xu%P=*7k1gkjv2vNbRz2;``4K!+@N3ZFZVvv%xm2 zVVjq46I9<>zAZw`<}}|DqHhP7AoF*$edm_BSKSX*U>4aQd3F$9y#>yw*9 zZ@<1P_t$65OwFMB)tJIS(%3qOpBGFX>rfv;k{P|wk(mdM3en3RoDdN6Jxu6a$EW)E zsm*>p#)mRtXVoA7;Cfd5K8TBXYWQPng9^tgweZVht=ig*36BXwB%-j_Z0@w$GQ7tu zcd<`GNWMqb_8I^1QX$?XyYTRN_1_g6tp=;t;GWe{p26^|XP@Hc{L`V{{-5Wq z;^APY%MoS_|gIsGV35`|gWLGj`DuhhTGFqg}!6Q)-mMg-4D0E3#cnp@UIcn4;1%~ zSKOb#NUyaBv!HxQaTb(cZjl3+@ikoBLfVnfrmtkCV=g;vu#) zP~fZE! zD`F3g-$;28e%rX$iM{vXx7SIiuwzCg(i27Trxw;msPN%HsA9uLsSmsrNsYJxk$=r&=F$9Q;UOXdhCn_`Z4Ij{q&zX|4eSlxm-MqcMIg+Ip!;%avR$jB`X z=9oz%SI68!4Y1GnK-}^p0rIDvS)Z&YpmbJ=eQA`YI1xgk>a1>dFo|>Q- zqMG(E7p*z*i1O69gZiokH(G;M;3y0Da^-yD7^Ndbtarp`IxwFhrjiaI9rbKc%H_WC ztdni2kBDk=49cMsZxR%U3XfRyf`jNpnd*%@_eynxX6Q6ltb86|~=B*70D zmd!lT6Gx8ffB~(gAKNU8C`{EGEW+IUgMfuN2~1Dnp#pSVU*IMiYpsaR9v?Bqnx`PZ zb^z{je)wsYIDb*J=EF?3c|*V%6Sgt@ew25T+x9+2IJ&7sAXkSxT_q8TCLIvQ4TNpy|vM%5ZwX zB+AG&B#b7i#gPY;siaj4B|w=<2PEP9ybqMYniZ}INa@9EkXb=7ddGzFjF5%x`Eomf zEQ-1XSx7)7WSN&zcWSKUVLrN2&M%OK^ymRulp2;qtr14HT_-c_Vbh9G&kaaR15?=!GW^_&6>?kdu%WE z#>Mc*+nSX8xMt{5OH)%kJ+deCf06TwV!})NM2Gv>k?lgA>k7n7w+kvd~~BF{!(#)_GN7U_Kb zNcF6vY6~KaX{=LT@gcygou-&$ZHdgr135GOAXVM6(?_>(e@?Q<#)?xDfbdCDf*7StI5$8A}zVY zz(3)mtwdVlGx33{mKO~f2#Sd-Ie(ElVXOrv##7^9t?Jv4VDF)cU-&sOHTYdid+jRn zy8w|2^WRH)yCo)J*}HWO53$VMEhV85o7Ai5j1`UwUBV{TF2aHF_UQKbDdVav4Rr^B zW4E;OS(T6DfWq$)9v$Ne72ZO@)5EYmK3nzIOD`ZGE>`Hmdidx$N*=+LaD?cJb*F)K z_`MQQU=OMeV95vC&}hq0Fd*6)9Mqbmmo1P59B^4CWZ-S*&0S_8HQ^k!*CtQ5N4wpjAR(p&p?LgorD%k zu^_Zq8bur=`a@4j#VlHhYoGwaDRG9{8kDFQ(nN`LT6THS7e#MuTZFeDM|!0_JZ z0!kL(B5!rX2MZ9U7UW8+9EpRVt-fT)S8_#Czy{LaW(Xx5J7HHPSI2pajZYEZu}ejK z$9vSo_g6uG=^r)1-^!=p{Xq&x_kht4@BnPTp8{;Z*RlN`fBB>rcUk)omv*mNEzkxR z$4?n~II6R)?Db(fY=N0!^Gw9_-dI{26C%3UfawF%+P>J!`)v5}#aF`hf#bSjt(hrw zacS&^_Z_mC&ab#FXtx;tl~lr8D*dZrjT%7H275K%d2dIkp% zNwvf+)3c=>y(WS>Vvm0b$KxgG?y6ukXH*vm4tiv#SA*cPQKy!DMs!UTeh#AR8_~@| zbTXW7Ci}J|x-HjyZ%pNdbUskHixJ(VCeOym2(doXIZ1EJ zlk~Q&_=DQeWhM836JB#d%4?P_8Uxj(%nHxJUCBs<-4C^qGU;c|uOmgd zAv=Wxs~JM7YYiJ03LV0u@c`zGkgFf4W^ANTj`0;7RIX)4f!g3JrSp|%|HknZG!4xI z5>ztL1ZhZzm{~oL&DRJa0s@WILM7^EHH85*#$`(!c)d`2~T}FW_j6Tc}dYW0!2?7 z&kp|(($WHj11yF=pF<(6gG%gJBA~)$qcm1)>oQsRqK;~!# zkhvCa`>p!w2equak?Z~DYL|Y%qSDmDprazd4k)Y`lv1Ae(2_aPkFmhy;bH7Pc-C90 z27{t4At8P~(5KlL4uG9ObdKOs0&Qt{bOGcn{WpE4FA{^W>ObO*o$PCwD+PbwVi!ij zC~Y~$iaZRDRfcOjFa|*tfSRb}q863CX{GRqUOtyZ;F$aFo3%nblaY&22P0bxdZ>nWCt5x^TTWr6_K>Uc>alOriXy^%~Y8 zDT)+SYt2$apT|_^5+?I}RZ*2U@a&Rdd6y6eSXS1&sv4SRVC_v2Zy=-~I#&o7vdm z7ut7<_!m+MilFaY_4v<#)SR#?f8_8y5{AzL!JukVd-XJLV0ihF=5Kc}iP2U`X!!6C z3K@HCkCZGWT4}f?7aIcI0ACN=EVzBQ0|GN0X3V$=mRRl8Cay83-7u)K{T}wt%)Y<1 zj~3`M)2A*YLbV+M^et!KpJ6Gj`j8J_NDH=2Nn12rZfIEVA3wD}%f%=-q44X@DAJ<$ zZxEvZ9ewpEyhKtuvz)0Jg^R$?cQ#`b^J0A&`sM~;g$YRUP%qUsb z43UP$%^!Z4>ex?q_7RwaOFspdnZ$$XH*`o7ThbxbfD&s{obYyTa}j%dJX_7%!3cy@ zBKDEY4fzBiyDbNeUj|MyDk0$p5{8=yM!1RuBXUN95mB~LFiM|BaEej8jC-A^`1rE5dPYNznaB9cl*6L+?F-4N{a$5d|BDDa#dHfa%E8w@9bx?tJX1+eHK=B;TyVjX}?P@`&w9o1T4&-hxO1&<71gL{coBfMNY2G@f; z>$RnvqV$1F(=qK;lnPcGrOHSErt@O3mCL`AZdTF0(+$fa_LGIz zun2G%?&j2;h3Zr{)zu%-P+c80#D=D6-8`Mpy8Jz&!30#aN2h9s=I?d#4$y?)EqJzM%@plpbmcE8R+5YKUMKC3I%(g7 zk869OphXe5mkwkQ*5_vQCWB6^x6DG3YkDl1>O=JDq zw5%t_g@KZ;gTL?~sDskZm$!f%ex-A_bOk5cNSCZPj%wu$zT{YpVOvCiDtTmPpD1UF zxf|m>4VXhR-qVa21Q=kl+^D=H3?Y}QaZ8LlvjX=U7_`w+DgFDD;QZ5P;Wx8mA-XLIN*i+7|FBKk~c!s7sQXZt>pcV0n zI8=N1RfMT##MHdO*tNarAT2YbAAE=9dV`(#C03y|lR6!Xh~O>6pkCfL+|7(~@liA{ zxl0~Wlxqi6=1*;&?a0gD5zBzcgmWFUU^P_h4n)jTm}Yzf?q8fZT9gid+%f)hAdyb^ z`2n7m_f`K?_F?kF2`Q1XED-313}r6cY;MFUQWt>)g2&Mxl2DIB!)B^dhtoaeq5h_O zpsMcry~Cwh9dz{uK5tog0TAqsGy0r^3f^Y|&gI|f|C26@%wpPcWA^gw@1h4l@sTDL zqI8m0l`Hwq)u66pgxhm3kySPh9xi*{#YCU$Lnf)_ZKT<;CF9%KgJ zm)%JTS3dz^!!B;4Kps;UXiId0w4!luxT9V<`8w9|O?Eixi;Eb7dSUTYVpNT%Lhvh@ z;ZTF;!^(-}u6=Q!Yn^qR=~6{-iMrXlNBkT&V6GBU)4spg}l44yvDz&_F3ZGROuP_5r1 z|1_VnRw<_IM`M446^tz?@exo4J&&sj3Ix?2mPQp6YlCugIDBDm+TvF)88Hblrf|)0 zB5BtVDU@7PO!41O#307BRiHpxEpLoL6aw(Z7J9WgGSRDJ2;$u={+guTTri{Sq4>HL z#Pn(wxYDbGe#{y(Mj$f9(yJe!D3!{;Emm+ph3nO5;Cg_Pu0q;5r1DYjm}^^))jD+# zzJe0ahAJtf&up(#Pb`-clqZ(V;O539v!JBV!`*7;{+fVdETkyFROJvzC%ls!A0tmw z_#m@v3xu(`d@SV8)bh4bl~!dTlu%UV6$yLqQc$5l_6nVVh3S$_D?|_4B^z3Zy|YW@ zdBTgy3j`Umy4fNC5pA3Uw6wNB>oHp46I0E*P1Srh-JqA(O1mlLFpNMmn*=9{&~5bL z73R;J%x5H$h)oP?iDeM7#lO}jQuGCZu+}hGISn;Ix@l~pI$x&PMC!6HWEu<6l!{Fh z2db$`Bvdc?H^e7e3`zfUbNPZ>1Fynb6&(Vhgf;09CBq172ET~}+M}$1gs$)oB9TdD zppqpV8~&BXeGK-91LDTnDb~L1YQI$f`ag46@*}|`buKEbWRh_ck68hE9V%AD%v9nc zA;`^I|B^~9psX>h+3MGSWStcL+z{+0n0F;%<@13D0(K!-*J5DRPq;~ZCR5;fMA|X6 z@Q8LzQl4w!HFE0=Fz7M1nGeET#YRx_Eo9S%k4U%SvnKGtv%+EsMXcush_>>!gooG-(T zxPW#A0@Lx12tgCB1hNXMV{%0WSi@$I7|oOLdBTrMM@@7=_WeVjrre zd8W!vaGFC33Lxf2uxN8;C5ul%mWU!$m2O4aY9&vym3Fs!jJt(&_c(XMboUf@JHs8e zSXsv4AZ}LY4#ZHm?l~%y=7#hWtrTlG7kC62wg_NNH!SQI(+%8XDc!(5x{3-7tU(Ks zdILWoM-K5w>qgi2``l?Q9JGHvQ=$nuFZ~UrChIC{lfTSOsMdN+Hw(jm4l)cZr-A;+ z67Fna73UHjVl)6O#=CraZO)xB?M^dvY`n+J-eNj7^Crse3kzAbH?xwLnwX|c;OLH^ zsK%o8HjUA5S=nL_*10!1;LQu}$Hr7g;E1G2iuYM+-9Pp@~_V z9dC%+&zPl{iW#$boKFZP3)&pmdPEDh|0?3KcKD~PX=mr({vfZ8H zp3#jeJ~G;);^b%vYzZ4<>*@8YlH+j{@B_PR>|c{r9(Kpc?Na3hBDmeMjP=@qP8HXsetFL{n_?Y-4lX9!%xh{_Bb!LP+4u1Ii#>{3;;j>mI0G`}2UZL}C z4XokE=4W-VKM!}nBxNK?RB+uv{HE;ZLQPV?w4acE5l0I7{#c}u~%)~YW09M1rYOIDOM!_k>Gp8!`z*b5=&!Y!5|-##G0l<$YuB4ifWynZZN-m&*{$&}3L( znVDSxo?$qt!bD2U8K8l|krR$RcVSOfUj5!ihl6RhQYHz)lZaQqtM@NJ_(< znii=3#F)G?=8P`)xg7*<5f;BUh#6<)Zebf{5+Q3=63%{@VviiAnUa&PB6|>a96u)& zPv{c3vn}^oYFj^aK=dM^OOApxe5+{|l9~Q!o);{p-*6Q1WSYec3^-^OxTd?7A=mVT zre<;CXz>8Qp~BUQ1(M73YN^Z40xz`01C{D{^fvFPDVnjfB}gev3n-Kn3`b$5QFfPX z&uymx$Rf`WK8j|CfOZAIz{X6PuC~AVsqX?&I}n6vW(FZ{mKgJ%aw$MyCwIHco#F0H z0<2R5%v74gL4&dB>1xR?&*7L+21W8rYs|5kjwLp(H_01Rn2V;ue1D#IJf}^G9AUYK9Z~Uj(5J%wF`ccr6;S3B;wyWQEJb@H zVT3i8spC63`Ruus~)?Luh8W#Y@SJ0*3+3dCEnt!xhkz zHULGP&;`(Ux7~3vG+?OzTm1*SXrEeG&Sz%%*J@{-+1X;YtD7D>9$M8`e_@@q*zox_ zihIa3E?%8g`TMfAGK;pV|EO2yc;)ta#YFzVzYVwZGm~F*^aYtlTP*mhKmDbj{ap70 zoS`~VDY^06I+qpuo@yDYU4hfg!`?1IgKcH;=0tb3+qZT*-2SY-&@IF_@kLKxu-0f* zPwJI0+YhUHN$qy5U0c|-s^8K_d-RbY)2NpK zNIT$2K09WUj3wU5f2EnV>9=e-HZo0r8?u*po2UdiZ~nW9hiKx~_{2j}`oe7r80-G5 z|I@9Oxe_1N)LTk|=m#T9f6L6(Ad}pi4BPoCHyl&rPxsePQ5_^rAQrDkE`yMyFh9*T ziS#6PQj$UjhpOwL1YF_si}h>FYylthbdwZ?{a<}kT^__PBOzl$gv-UJ2kWOezrQg9 zxs9x50>TR7l!7fs40y2vThdxhDi(U3Zh9uc92`@#(f`RdHZ052rDYj;x`2L|oF4iu zA8D^W1u?@aWY?k?5P(6k!op3;o<&n&X=y(Q17wo$E1|8(APIZqJtbKi?Z5$@i{USn zI~KD{EM_$415}243Er7 z4fEwkDM&rAx3FboiiYuuv@b#RAep5AfuBl65ClEz3`Xqr(x(ULWV3qvh6xVU)5Qf( z-AQ`Mj;EKz=Sk{L&1|)x;|EyQ4}Hi3mv>ZKi@aRzD@U*O$PAq#&!mjY1>Yj%RH;F* zDCM$CN!Im$Bgds`sFK!XHLAcsg(|RGvt6oCMgs~GNvKfhxs-RQC;=h*h7c$Ob7emu z#Nj4Fu&(A4tSb>AG|x>85kef+sld6$gmDY$$cn?f?Xv+Nz-Q*IHy*6z{{YU}2E2nO z6zh;@>|$lcgz*9pdS~D_Y(g!Z-xM{!VU8J@mX>x!^8biAWt$WvMjXuW>wu?e&cO3Z zf~NwUrbzG2!;>I_8lK0S@D$Pb(kTMeNlq)L28kW_q&X81)l~fTg(zfd82bOTS~H5O zX~0vfeehUR3EIgWL?H_(g?4083>|Bgd4oH}+)^0F$_zmPD33tU$X+5)#Y8sE&IF!D zfNGuO7#W`kX&uCdtxz7n3%)bT3<;8DX>SG8H~h3^bWkY~eceH^H}`41D|Xz_&T;01Ea|FEz76Q98Udt5h2_tP zy!=%rg=gj~GhY6{MqZ9rOkABcqdCuEhhJVa1rcpa0J=I3ZLno&t55FbJWA-K#kiaRGG%83{ zIHk7dg&xW;n|@2Uoy3lo9B|36{r^YP7M$X`#v5Xr5<(lvy4NIY5NUYMDcdi%Chq@K zv}PkyW6`Pkki?R_uUDMLu6)mixSZ{=Xv5HWV;Rz?U~{<&wuW!`jQLiSAARnK!nJY@ zVnf6gIb5kVLt&bi#fdt37slWUrvk0v@z@y-9T`_8>AwuAB{Z5;df#h;_q5T z6pcK_)^W>YY@a?L`wuFM-@Z_+-eX7lV?WFW>Mt??Y zMt?J!Q$VAI6NMH|0v=M9LJKDfEu1LW+D#K^!$zC_wUHs(Fixj1jSX$sC&Umh5}way zlDq~3(}sc3zhUpY~FsB*FXK7H_3d{vBGjPPj6}@E;M`tqZXhI==zgLTxc%X zJBgR7u_j2lNJWT|K$#WpSL%BsU}(hc#*EkP(VA@Usjvm)1zVn|rK!^_^U#fM2# zpzH9Jn<%W~fUik<=`>*-$8WwJ%ShLja|Un{!UTX5EER+*0mVcST^HJjQo5j?O0M=l zvnhA^%v<6v&P)JYL{J#TCd}m+4~4p$PZgXX&6G2jMjl`=?M*Nj(9Gs1OrYkT2Ow5_ zpc%ajmf?AT!|!z-U~zLkfc?ag@qy<7rbDNl*~L7-#$doaG&MKQ8lQ1&gR`0GJ&FhA z0gim;Yu^wl-w^THCL-RBz>H$GmI^_{o9>&$1Wpu*c$_&~iTIVKi2wAYh~K;;wH$29 z_t)EzEih_QzMG^0{USB{+=9C4fni5Oz8kxM%Lejyc5%4AH+IorC&n(y^t+HtIbL1f zvy~4>)Z-KaylkxFN)j|$z5dk;8i=zNG{u6w)VOIlt47(cG^K}tMj#2+E&wCpaa+pP! z1W;P}YoVYOP+1 zk)Nto{t=(yZzrfDb&C$;Ws-)NO!4ZKb=iLNV*;Y_-m9g9sMnb-J7inH1I>6ts1xDxk#*K`SV5aI$-d)yVc3Jm{%l?VGqw(ycAi96-&rI5{qLN*tQ-i^G^20SGp zP_zdtC5s^uLk(tat(sUOFY6Eb75sk(^9m(Kk#5@{<(J|-vu|;Bsa!@Z|%-#5}41V$&5#EV6C0tee09*ia~pcRNauHsIHk4#0{pQ#@7Dia2We$p+kn7QOZ?ghjw-=C$8dnS7F%MPP@HUJLPVfdsCT$mR z1-F{*;1$P+1MEND#yenS!ujg1{0i&QSOto;b`pUAiXXDE5eK+E7|+^rN3vpmEmy`~ z(Fwt8tR%vEN@N1AuL{?N@(U_fL;#{M^RlybC;)eUE&K4e%fe)ED1)@w{@4w_#HCKo zV8|*?%!H_FcsDQMUMKh}xPxTr5LLF=g+DBJtbL7tJ3dKsou|v0r`O6)ogLW$JO0jC z=x8|B)mRtS3O|WC`vBMN4}A<*@xof?!}GcAo2+Y?w61{$jU(B9cpVcU^IuO;u&UXy zRxo0q7cdLbBm7Pf?P_trmBM?Y#SQ8tCP|ru@sK(hu{)N@SSv;g;;-^SH-@#=<}u*e ze9+*4>JUXz2g_(tqzF@%R<{o^y+q$m%&0RHLje(~j&JS%c0b?a;h>70??k&+Zj&Dp z%MQkS6t<^WEf&umSj1?BVqMG5o<1pKDfkIw z-5_!v8am%{R5o;j2F|rLXweKS8iIq1>X~-RPhAL9Vd@caL*t zO>x&%uwWb!f#Q#Vt<;&HBP>CPYwM-+ZBsSvb@rgd@bIp9ecX1^l}uq;ygH_3__1=q zB}+JdLyn0Wmm-7$Z}=MRabvgzUpmT~?*%b9ETF6sDxo1q>k zE;K-W4gcvPzcWV>g4N4B+o|sx&tB!3j!L@Jcy>m!&9n9TnX13Y>|O=_EO9NS2)vV< ziu*@oNW$7>{l3ifUi0+h%s7wYjscdq+*zEy5T?4uU5#olbC*y|lYLpS0W^D+)av8} zpT{pFWBiqZVfzFRe^pU>1Yc>+fV<&o0Jr5jHFTCHVQ);&8`Xq49WpUWnlTrG2L*PU zE%wG2zR&|EJamXC`bz@$aOf8%7gEg6ZqT;m5W>Bm7Ol3O z+}!=XcIprt;8#tp>xOZ=+%u(hWr7X+!(MC=7VT=6G#{x~ratGI$C5iwy&+x0nl>F# zLy?Z_T`?{awJs`^3B){CIK&K$Vy--~PaTN1RUDS;+@5wb*!+zt1?Ik_%J1b$RbDlF z=@&X^%UuieFPh6(6Hq~2o^y5C#5-7(i@Wpt(A8$;>fsI}YT)q@q-BZ=Lfric5dLE= zD3|hLYrHW0a~*~dMreEentOA=RPeuDv9Dzazk#MMfrot6dAvQ0D*K{MQGxx_lK`+JdFZe`lTYxK~ zu5mh==$^QgVBTv4rW8U({D`VqowqaR=_|5`E+eC)60zoj9Z3uYy`S)gyk#jH0I$ED z2E!?Jxj4&#{HfeOdoq`bw6Qy;Y)~!TiP{F;L2ofB(bU{5-urI6r3qgPTuEPYPwChln-&~ALdZbTj=_Zy}I zd(f!#RayxlOi~ZAUf9R*_FxfwK!U+N|B_ZpTfrZ!$-|$M2Eck1srberD#zf&U^WbQ zx@Q~vzF~A5#y<_A2B0^N(=waN6tU&Bp&?I9EBbN6E4&dcP`#UIBi+#^_jN$@Xa0-) z9oRxF+~cBa&BHTVjj{C2hM#9SBcyBj)j{lxe)TGPG3yl>eNC_2H@rbQ%7Y`FF3sat zTjO_Bx$D|bf(r^wNy}yCk_QRF2%$4vxL{a`K6pSiJf4q6Dlg_3UR;0tCfz@pvu%^| zyeSyEH#4Ke?g)+1=~B`HYwdz1EuhX)D*>~OaI=4G z#>Ca(lEd(FYn;2PX>hczSr=_l#s^>0W-dw&iXN+cflXb}k1VV%suwg(KsxrO0UTzq z`twHtPRV;BGXclIi&;qE9ohXOISWAU&*k3M+1%SYle2-0=dXo;n^yr7mQ0kjXvmb! zmd$hwSo<#b(+W*$#h@(n@8o4JNONChqaIvRxtz2y+xKAWP%Si9Tq0WK$Vy{+td`EB z1-^)UwapindZjzOTA-A+4`r)v2i3N$%lh*$OGNa_=5%pwdq(`PJ~~kSzZv^t%Pz^n zEkK`k<(*+ikBom`Ygvfky59_&Zu3v03G#Xt=Bq?%@uCQGY7E_|ORB z#-U6pqQbIahdVq*{ZP(?=L2mv;?)sLnZHzT!tY_BHVOx5kJ9(rN7Sy^67x~II0i?q z*FbgNJ7f*X`P?1;w`%bgyhN;JmHR)YshaNFbk${tv^#84Qo6;_+Y>;KGY2{pg_THF z$iS;s+SOIi3;4Vz`&Mq=uVm`g@HD(at=`HqkUl7t6?Z!KKwY{1VDR0Ldz4-*3enj1 zyz{})+d{X)dEzn(x2vzhuCsA>9YE2oxDZMVDGDc zn`Sb0gZ|BG*Om3J^Wf+vy?-k?{b>r!2-)uwCUo9Nho{iMW^?NfTW+9Ruyt(O;Z#?- zn+|JQ)y;64dyQ~mSRFInZ#%Q*J-k&@DrlJn`xZB7Z=BhL-vfMc7^_Z~yB-|vifuWl zIF2sDOtXV&Nd%_aS8ks-0=oeNj&N&K7O)^u?0BX+D5ChZBRvoQGW)>%pj?y_WwcuE zwDMiruotKpF&e8?GVJQCe;Md|69H8zgcKQncMVwdukU(0#@}fQMU{|vAdBestFYTNP)8==tG$f z$%Q+S zJ&{(4O6cds%zJkG_Y?h9t^DKnWz1*!u5#DYXDyYs*H$KixMQ!U)?O{&rZ?^cP{N~! zaMcDv*Bd9OgA4$-QQV|lJmjpiNoap_Qq;_Lq_u` zF+oZ>yI@wPDxa|Gb|tsh40_faYQroV#3IT>rV|-Dw^LK&^|!@}BVq;ztT^9IJafF# z8HCpB=$^Hv9I@FUd-}nIfm5i)Sy=t*ikQ#72J;EXx1d9Q@V6P(ae9mn{#j6NkO9Rm zoei|$X9LwR*OZwpqa-E7KIA2Zwx?3CB@k5OVu+?;oz)n)zm?bk3aQ8xx1cvr90o8H z2R(byD&)o8eu#~t#34bhx0ssGbq=B9Q2z9T6!dYG0vz8@K@ORcg4`ziC~)wtP%J7j z%TP&8h7@4XfWq=&fDc-f4Mh!3p0?{%E>7W+yKR+MWhjnIt9UKO%i_BB)3S5jVU33~ zbPeBRL?P~$U^hN1u$Hc-*gn`8YR&sXH}A4=8Ss7BwS!UZIX{o;ODtklB8?;t+WJ-_RdSXf9Z4U zynZ!&b|sYfg!Iw*;yycn*jE1BV<{Q_c0neJqB@()aB!hWLsrMm7e`s?^W4z#2<9Ce zahcZCTE#y=uvgf=9D~MWvP&B_46=l@-A+IauRp|ZK7ZbP+&XB#!%W)s@8I`1W6EVS zNEpFQslDaqOx+(IdwfN-EKS)vWLeS}s~?gzXr%EmV6z6HCUASTwg#DYYymAYqQNA= z4zs0fVlg`1FZa{Ccb5CZfF^L~D+Wo>AyxE>Jpp6Vlh^FYxyF;T7E*wPF^(b3h)0E6 ze;%=qFg3+jM2}ZPP{jjB^Otn_Zg7aHF5jWq(xj8FFHGY3pAu?(nYXH!eo~iT(&f5c zzMyZh**~w6^hWC{k%-T!921PAav#AsD)Hbwqw>Jf;z^aGBbe5?%<#3VriG#M zms>_wVrV#wZ3IR^jKC;}5uDL;M(}Y827rfM{Xb1X2V^d!xX3$^x(sRF6m@}In^Bj> z=F|n6rm2IvFb8g=u9i_3d1u_iO~!>xA)ySmCae})F`+5NxHbt&@T2||Dq0iN9 za!+`Bg}YHnW*}pxkQKyc+3RX*6CaIXNsvlpRtgl;Xc|vMdPXYo9r2CRAb{o#(0;uc z7eJRvc#r+d4O7Y&)K~NYj@gX+|>I%VlI?1bg*exwq<^t~`^<)C_9+8&fDl zE}(#1hMyNqlmsOUOd5TgCop!}-(V3wZ@EJXS*ths^%x&IRsQi0u4mQni!hJbA){8I zk>;1cItA%VuPmhEj3rI3QpVGH#DlO=vj!7if*-xewa{ZV$JE`^xubx>f*Di^c4VIadkwno8;aYa|7hBb%PtvKI>G--XF2dc07uyyGf&OegjQvupRDj>B00zTL z1<-bIJuh%s=tU`WarGMFvpUK%I92uRQ{0??I@H_$VxG5sU*>T#YnuW=5@lkebkb#^ zlP)3kpwBt*hitR^1hUgkx`gj&t;c`R6Vl5Um|C@g$ z0DVCKMHFlf&@bxOj)Qap;(s$h`a)}~1Zf~s=hQ+w%ZnEF@mBR^1H>i?!7Kw8hP&2* zEL(f!cc1>;AO6Yz@$5_4hX^J|DzvKK*N5Frl7d<0G}Cektwcsu*K8(++a?90%B@p< z{poh2A-!9#Rb&PKavRb5FNTgm9JrL@9Y%wR7Ob1BMkgMoL9b>ZhZ~W+KHlF|MV5aJ zd8VD9zn`Y{=x?XHQQ#3tMsX=yIbp7ehR>UWzZsUKT43oMrGdI^O z=GvXPR+i7rT9&}Cs(;E7Xmj_~Uk-QpJSMt?4XiB#>%>EwJ1n=Y>a+T8hbR>$-kftw zN4TI@{)Jvy)GITSuUJw;%rr!+s4t!dQMbROFLXPNNS15R5-0wgUa{PYoykfq$DuMM zRxj`hf|FX>ldo7(LxaKZ#D=uwBO7D9ou=o3fMAIeMekCVq_(vL> zXheC?aT3N`1N$eR4?j+ibVvAp0;UUkXsH%Ish%!brI1j*&47raVG2GxbDmj$d%c(Nq^+u zF}#p1GZzE?Y%W5*3ae>QzL^@`!J5L6udt6%v1Kkwe5G@ZKpli&LM zKcA7w$nO5bAN|@_*aq}=GAcakMxSsXm_%q8cF{`uk2D^rpU=K-%w77yD2#thrnRms(wnfcvjK2 zyb2^V{gwDpKH0RP^0Y|6>~7ypK*P91Q{-QyPKL8Bl27wcp|0q}vU`4EJDGq2Gn3`| zXM&;DVYHKu+^WAy<4Rz^~*f|y32zvUT-XUfii{)quEG3o8~r2 zqEE}>pr6#Ep3+Y?=wlaO$0(;KN7J4r=S$ZaP~S!)jm%ZD$sV&Ev7Er3G_vMIhEct! zi88vl-l(qW&FjqFwxhc4G@)ZMFjq2bXm2%`$w4Qzxt`za4d}_YI-sv^IZZHTTL$z^ zZPuv5u+nP4Mdy~IG%Ih<6!&Ik>!qc^^Bgvk}_l z^lXEZSH3_uB?1T#c%v(ySM}{%!O1_{ehM|77E3uzM5CY5ldk?+==L86iPu`$gimfcek=BF}H|orzaD2Bw9{(8KH}b^{zg1&EU0&<-_~l`f>erq6H?R!U-oRFd(Pj%@ns<-xCPcj5-f7>c>j#iRqhT%7zm61f0*cV{51OFtksN z7x!nAD_7g_yHJF4_mP8qHXftY3Iu6YzeBmv0|Ux0nWYBNAGx| ze8<|Ze@N;H7;?W{)LG&L=PXwL7d|@k;w&nA;5j||>}U1ptS+$xpHcY(_UPmOU0mT9zmwt*tf~|K;5LfK zt#uCZP_J*L_)~l17*_;}+(Pji_TVsA7|wxciuPZ$jq%#L5rDp^C zy&-pt5FkB}w?!BdA3!TY3#{n|cXH|MtZe#jER`8YcJ4(vJqeM`Mr~&F{Om;LgUOlw zdfZiHXCLpPSDNh66Xj@a_z(9gG(2CA^9wtMi}}uC8S31nEw^nIN`y?IgrOb5 z_MF0Ue*JrF`gI9LoKbo9Q+o88oyLlTQ{`*+)+^!B%PRkaJ^G3+L5gcC|HvM_6dqlz zAAMPuB>s6(C7AIgm0rP>@aTp5(PdqN9nY)$O{;S~JbF&$4_W^%>5@@AtMbeC)-$>U zN1jsooIQFH_J`LS!jso-1P@@gW?8k)R{#1BU%25r<_~bSdjEK!U62Rr!#M`HgxFw- z%WjvV6tCfG*&|OIX8MxiC45zi<+!Snfjx=CK_1V?RdOnL8z<#OU2}Gm5-lCcAJZMX zt#Q@y6rXJ<@z+?5I=P#Q@8=Fr?!91=r}Iwiw}G5Zdj*(*3e7S_#y*H;ZFYiC zmjQ}4S1(sOEmdJMeur~)oRvelcKAb@Y#j!_tSB-$X9mL`=1vjq79hbDoH7fp+$Fqo zG_)*tAa%?Hm@iu-!)&};gJIlLE~_|6u8L(+FB~oI^{bVmc*d9ET1wvo`1x`5F5tgx zE=5vEFipWZ2Sk|I#JwzwlqNd;4x~-a#rJ`<$vMBL=l8nXnXCK55H!K`-x9GhS~aoU zOu0(+06tbo1Ixms^nezY!Oif1P?cE?0k1YwH|0;yX)(EbXZ6x8>P@DrV+o*SJ-Ba# znMSblpShCO;;!>$PuNOm7ad({q<6GX^(BQFg}zyS@1;ggUyFHN!VMN*P~wbZ@_H`e zFa`yPU?5_XX$Q4?jGL@2E81c%r0*$0!~A#pWrQU&JuFwso+T^eD@ezZl{q;uizNOQ z9j5*Z@oi-GnaMt3ZBFz%Q800hrIx;$?-w zb*h&^?0+NwIms+XnTr^uYQ0yE=}vWy1LPWn1;a7IIx{O=An^`0Z}RgcV(7(tsuzA} zJ*yN8c!_3yOwCXs=eBmL$5JSh^GH$-RZkXiLadjM;u1cC#F5AOBG*^>o-I%X=;9~I z5+2K0S+feCS|dJO^>R*3gP$5N>ryZva!w!MsP$Kbz=47o9sA`tV^&~T z&0pz(M57Gug^{=p6Chs~-$FQ!aVYBbZ<9ZODIyuBtFY;!&X;?}B&>F-UA^Cf391&+ zweJ#i&yfxxFL%+a(7{f*OKi9}!_xyr$<7s%(X%e2_o>(ihcUS|bh)K1Q-5nDw!+^4 za*ERIaG+oQ9LOk1Ye@M#2umbME^aPB3(ShnkaQH57_yxqiP63MAnCb>@Ij*roJ5QfNpx*}P(2t$;(Tg$V{- zwTP3_v*XU6xw;KhH)^3{yC*wV)*ahjBfWKOx76&=5p`_0wCvci-FBsp!RX(5$EX4< z=@O}05aeMxiE18xx^b*10~z?RQ46b*1-ehfs^&qFx+H*6q%INhiqs{MoCJo2%n%cz zNOdAi6hH&MdS2j#>Xn~g=hHT98Ege=Ar2PIn;~XtAI0C_Tg{cTM9rNGY_U9=pP3a3 z!B_gm>(9VnO<~;oW%=w(W6wz6G%bOrFJ|4Zo=d@QgcchfJku)sqWkAn_7CLG8l#_K z*yKeDjC#Nwvk>lLW=z@9c1xG;mAlu(M9vTbNP0WdSapmRK(Ql_b>^O72(sp4D%SF2U$X=Bvn<4=4Q)l@9uJk1KV#sjpz^qrv} z;#5nVP*vZ<=XjJPEV`Qg2ofm{b0)=MD&((A$e#=PK0JtJ#UR1;_$gY8$~X1e8bWkv zsH)LE0~#JC=srNeK+`T~#g$1ns;p46<@|ls!ynihm4q?v5AJ2T$3$wu!(nfGhpaFF z9_JWI2HZ$utg1XU-m4}L3u6@LH+s9LhrP)}0Wzjrmin!Wz9K%wS)#%u>+D|PkflW1 zEBM-hxv1D`kY%fs-WGU*7K}!7qxISJnQ0=Sxa>r|hFjDNWjwjAz(x)hC3f9{8?XJ#7~F_5Ck2(!bHz$M>g(J+mY!d1Jg=mj zn+{@ZTXSJL!@Z`Vn+~F%qn7??fzIG+Fd-qXfWs*w31CVv^u5$m0EH=sgNAZAgtB?K z48NvOK%_|mSQMCQI?3M}RS_to3Sm1D{$o3-z-vUVQ|GwN>`POF%gW566*pR>6vELS z#O?9>#w$o$r4T*aF>aEVaEinC@uwskqn+SdALLrDNJ*Mip);E)j#>U)*C{~@pzr$G zO483(q~&O76?hd1R_*FAO+cV(Z1~S|tGUWQ2>({)u4JkHh!)WBx#res;|;-9JZ zJ*jqN@awIe7r|ckG{Gq8i+5~FQ=&K0lqk@Y^5a#|mBdf?ifC6Tz`A7$%!orc(HD7& zS;htNUK7Nap5RfgD9HvV zp#bcT*_Qe2H1DF9lbP?k%);XIJh1cG`AN%RTdxAsv9ZgJ5wKs<96G<07hAScvdG3i z+4AL_7R!?h-xux4Cd*!}Rn&Pcd#`Z4%KE|S{#t9SsIz>O6{g2=au&BtuvmZ=n0~S+ z>=i!RFb_}#T@z!HZDkNMn#Up0x2=Z6@?~mBkxZm7=}hb)gyZcBQ1kn>sJhtIU}0`` zwHgp>Uchpp%W@pXtyMXinwIZzJLH_+x`N3|Yjb20t1qzBY)ZB;9jvtf;)$a$7bje%TCYDSqcvlH#|glB2l0)0%U< z$5Fzv`IBK_w64x^x1xY4tvauQXtF*jZ;ZM(6W^I(GxK%BCZSQ z;(fndxScS-nbLF9ihJ|^O!{4+Ya8Ad*@gG<%jq=k1%T!=F}Xoc8W$(o+i%+HN!_wQ zg}xwodBAccK0uY&zBZ|(p*CD{bIvv&taY2%59!9c6hr2iLY@f6*i+f^JAec7NTS;gPt*lT zrU#4A1Uw7{bjr*o?j)1iNmn0OaLj*zIp|bZj8vTqjZNPRyho&ZS)_`j3T)LoLuiSSYZDtkU{D>;v=GL^(=E|aEedX zs7XE^mFC-_Ul=!$0WJ$lqV1!FqjrOiNtlnO-zgXYwJU8TEr3!vvRyVd!BvknJS#x^r8n(xcZh3LcN z5onqg*M(+a6e>6C;7;`vs5B2Mtz#zKZQsbWVyL=>iE$>G7|m*p2_l&ocbnBYm>7`{ z;iM1jz$eI4{RueRL)vb*Tc$Mhv0#|H1Kos!1RffVWidVt%cgh$7*X7bwzu01iE@d- z;>Kp#*lp1oJxwi-OsMU)?Xfy|U5{XV`jA--Kd#>AHj&+aN5XtgDnF!0qVAOsKtL=X?VWg}c>>=>s>J|UDFz%ft|HIdi|Z>+dD z1>@f>#SYt`&z9K)m*9Hs;y916fMEc#Q$K8M`{L}jFxdqO*6~>_eO9|Zt1~{U%&`PL zmcL}Z+%12u*#<*b_qbiqMX*gT_B~tG#z$Ca&@c8l8rY1>eT{%UquJeKmrS&Lrvv)s zs`G9c_iAh2ZnziqM#uJUb^4+i^T>+m7)xc~GN(^b&u%ScNNrROgE23{Vrr@h0V;3Y z%$P@2LphC!&bV*9PsY4VO`0)J21kr}(r{2I_BqDxlNFC8G+WNA-YHA}f&RfP8;;9{ z5O7@UK~yJAFUDJD66S*ykMv>xAA4^DWXE;gclPUkpYz_#ya5Kp;DchnCrBRHz;aZE zNQ9!+=vj&%C2CFCtQ6zYZee#>6$)UfNG^-Ts<=eZf@NBwWK@OD(vjjIHdBISv4X0l zV`ZJqCnuL z(`7IwMrbe|;7wZAvggqqoC9kax-zIN$hbelPz=vtcEPg~rPy!BnP7h@LtN}s6SFgi zg@dUGmFaEM+Yn=M0zu-b{!xsP@$`n|UhYqD@Vv2evRufJmFmoSlrJ}Dizje<8o?yc zPDBhA0a)llnGmylXR_~;6q7^;9MF;1>9PDoD=(!&o=u|PY)fW_U5 zjjGng^s9|%alcS|F8y#UJ@JV$uZIMi^b^o-i=~6{pUPO3I$g8Ps%*=ZIZlRO!fDGA zDJ{NouwwC@;S;SI@dBk3m{Cdr3^1~%!yy46x5IH37#;m5_mol!%!vQOeQk|F%zGf+ z@EWG9EKE2&$m76=t$!=@V zLa+F7hP1b2(^dSkl3-lUJ>-f|BP|I`0`20Ns&@Kj4HDuPR)IBmoeUVd)0w|?!ibnG znGMVU))bk*Od`fosXNH#CZR*h++Yi`t)Qw}XVcp$hqq~*>;Sna@gA_8e-);AqoiP=qulXIEJ1I(o>tzRrGnB>IrzK!2veL< z2udcf+N{gNd44nV@bi=A;ZqfQM$}(3>x!$`i<_>R+&yobzMM{aaK+$qo7@44rA?=q z8}~UG(lMVl@z5V~%3}!N*N};4`Cuc~U>O(B=Ep{;%%nCLgMe-p$Kb1|cLsR2DLdIB z0sqR(jGKsqjz#fzP}Kz+a5#F-tOK@y&NanaU($e4jR#zydAOl;D5Cg6SfrDS(UI5n z#L_=Yo`agn8WFT(T#YH zdklp(%!%MxnGLl{>%p_s?Hv)bFZo}vF>0VLbOr`kH(>{d9lXoAD`Wew8AH1}Ad*oD zsY%~YTq?%2iM<;oFa*&O0b3-M8&rnF2kYy-d1M((lG|B-AI)wVCwoR$=viP-#2aCE zz@^REaJgyBO9V8^h9l)5#WU4PDnw#<&4UENY4BxEv5`R3_Gr^fKz~NKj3Nm^<@M`d$?^Z&62HHZYx06J&K8gQa<8 zchv{zPVv+R-ln%oC>#hDMo4)KT&fD&-PmkXf);6j>5X9qFTHD%F>6s^=lNY+sP0ZKbmNY^vrL(z{_Zxv++ytmpsO%MSRv+-nUl?i4g;o zb2+)T+gfIenlOg#XIjgIfC{g*(~Ye-vlK{z#=ngc+hqTjOJ=;=Ppa95q$qR8tYPUU zC)G@xRb#p>MMvShn%z3DMrkBDq*bmDG-u4o@w}Q)_fIi4OOe05pYPUrHQThT)sI52 z?&s(V8$HquRWH!1@Oxe-LGWl75{pj0pk@xHna<+taN^>~1}n zEU{cDa9}iVZBDb}PzN9+_aM*l{LpBxXwLez*M>;E%*8fDPZ(USETJ{lQV9{&1?3fN z)kSm(o*Yc(5DC=(Q9C=LDP;IfJEEjnKcYllC>>EUL}YbzgnqJHmk_K>VLD;%Ah@x9 z+p=-e=TPatXsQPXs-05ebzV=Mp`tivc@MS+Lk(jO^ERkh35{AAj>P3)mimOvd+%hl zQ0bWepO{#Hu|z&{K?&hEw5VPk&|F=a9HhXN)hrG`$T(C(1S+eJH`$=FHMNBLb+pMw zlPw6UI|DLFO-?r1-f>{qxdwD|3I0#B2ecAwrendp10@&$G0mrNi|7c3#8YKZ+OpX- zIJQBvj>%%15&E%Rrr*y#5RTsiPQ*ztxM9|cv+y{xaAooi0p&++V5}8{1kK99T%}L8ky;=-)$HOBepuw->SNP#DN~ZGdw!tz`xdkf0*^eY|cAzV${_1 zf{z_862^Y3#(os%6~nftauDm~rj)SHyc%|1rXaqBSG9#WK#7!VSGKxgl)#q0IueNi zWQW0fX`QX03Bzw1Cak0fr3R}oJ|QHTFgTvmhA4 zxjw2E%N|XnVviB{u|W7XEekXzoLF}ICKuL;ZRfSP6~$|mOJcjWi!8Xweb2f}Vox;| zDLA%&!r~u^50xD5JCZaP>o;B&*WP+Jq)Yf&^ygy#Y}VPIE=s7Kb}@Y#uPg%7Ve{t! z!)eL7eb%$QdW?j&Y=;Ve4@H{;kM^erbS#8z=P4fgFe(S~R!}(<%)<}Xg=_ZI2}A7% z1xPA~`Gfm4l|$VMDhCV~e?~Oksd+)2%|xzp^a}!6_EFn6{`m^ebM8u&qwgw*dh9BP z?p)>QS1L!pQaNn9Sfz5HFb$Q;(T^%e@k*<-#|0lOzC0XhsNuz9L^--& zwlX4fSE(rkFk;8bK=jfEg`RSuWtJTWw1rn&tRmt zjx@-u_s!Yzn`mh;yOwS7H#1i3pxG~CM5)DmhR#_zOYs3s!bq@#6+wqYv}~KUWod{lWg_5o4N}W&Y>J^*|kDjO=0RzjHLQrYUmU1RMQZ|y1E#`L0c(L9PnArkuqcSdc6WeD|pO$53sc`qLeLx)GEKY&wg! zaRk=H{Q>l~vNCpa82`mgMGvrAD8MJZnLDTqh81}Z1$8yV6ATx{GY<(}x>!Omvd{A+ zzp#twtJ}@)fjlTCCKCutRLPV&ro)U0u=cC;AWe;7P>une%3TZ8O4Y(Cp`v-2Cc+UqL6~6L@d7wH z$TG<9Gfl}uhMoKcS0gNEe{fBiUx z-<=bd*&zaZ6p{6Weu71Lx@QdJ&k~W%0}whOaxhvbcxYIZVG4@mv2A;2ngkkom_nOR z6#XGvsKOLbY80k`Q#*z!a61vEfGbc^S38C&C{%=*@&x5XD`@-1!#LC_HW{v9X>EJM zpRd1@2Ev9g7J?ny8;(9OzkTp~sHM z?*8GuSfti?3*A>}u?_AkbhiOZ?`cFbF{sMN#tJ2P2!UpWyUJszh`<$NJkGajJ80Zv zcy7`$zT$$JM8ypq<3STE)h*?J2)Z*WqTxeMu5W*u zE-ar7GJ9RBIj4X)$~bnoRI|b}&D=Ut%^3^o`wqnAGws(vUdA$IOIM9u?9w$T4z($N zV8Ok`X+&bqZ+rr|#t)BeEjRKUdvRcs$)2mzlZvEas&PD$V^BZj57Zt&cG*PZe-D<| zGwoZkdp)$;$ozT-lWU;@gvuONkfUx0UUjN2PDL={HOUeeSnvT_>0t*iPW=}B;-DQd zJr$^ZF6o9x2XZQ25^uxKLYh7v7S~4UpF|G((?ifs$ud1S7=M05=2bbzczI>=*0&_P zyy*pRdY%iIr?Ys|2h>1dwCW;Toh@+!VvcA=k3UX$3)AF#VsPpL51q5B{meLP?nMlz zJL0TFoXUYBYRnC`V5imOB@sXC8SewMN-~fHA=cKDTq0nwm?ccfn@3Fc9qHs6V4xmx zw9f1E68Di$ia+}>V0}G5>QM}g5vY?rRXuP*P;gY0&x@+ajnJc^DX3f(_-F zqY;qPS`{%Dn}9{IZyNxKQX`fCu~8TFixxJt2_#Lx#+t~qE^_ULwM>%Rsy$drPve;+ zv1aQ$xq(y~12y(ZXj|*p@IxlAYA+0(yi-za(Dw}NNRmWV8Tk1N+~Ln@EiVE3OQxFe zpT|knPBT*oIaKP57$DdqZP08e$P`ioH6dqUgi`v%-R0_1#q;H^^2PMomObYEb8J_O zGJ)hZw%7~VwT+Em)iyS@EV&tkwxD@bFg$+NdE0=5mv5GZZWLf#ZD?EY;9H=}v-$CM zIm&`|g(L9BY0h^4;-?appLRPKKslWcgoUK!+W{yrqaf*1bb+r@ky1f=K89H-U$&5E z6?v+RD8U#roA0r^B}|kMg;~jQ|0K<4jljrw%3T>APo339Ijb|*nz1@-``~8FeQ>i< zvo^1j*Q`g$z}gxcI(;?kLh+UsGqG6~EIDb|Lyn+9VILR&Pf=%d46PwIBQ1V*R1wxNv z(uF;qbOC6AHn6~T(=MnphJi}pcf#W2zpacb>+IqnTSHi(1Z0b}JI$LA0*jY``UE#$ zk35~XAhQ?2Lk;DxLe2)daY0&l$rpI_T*h z&T|j@$sTH>qAEGB+Q4@i`hnueu2j|ZnSreT2;5_@>;x>Zdb zQsquTwXRDsvi#K2FL{)1UGAUYGO}5Ppzp3R8zLy7P8qb7s-4J&G#`YzK-+td>t$hH-&gJ zxHM6#V_W$1nCd_$#O$jr^tN?rc&5-hL}#-r1XC$w!KP*n zo0K!w8m#nnYtXRCYBPOZyEb$cxpJv5G zbhg94N+NpLD3cBUx9?LC9aD`HOOwD{K7VC>`TRnV&y~-iMlGZGE*2`Ks(ALpD@h@? zt^5U`xKVbK&ud}gmd{-3tZ!E^byf_}_BJs0LW_-a^c0mV zp6L0ESQXp#r91h?{1{)FcPLS%mDH}NF$p};A_K{hg%KEPvz8M@`dcP3n4v zEt6J4D7+{@@w`s<4nwiIU11jq$Aa?)6U^lh!!Rne5qnT>D>vf?U*y#nvYlT}r^+HS z<6MsPTs}Y#;X&jd%-!Yo%B<-~sFE7-c1UGFYJ_gnvk~@w@kxmmXJLaLUWn>+_ce)f z_dd&TEw#H6kcwRxc^c11bHa~)7mSe0orwQfCU6mv`Y)VWz^M(CAl<)^qfnn{(#W@EVmI~CRDM6!JL~I6`+vS<1*s6m60)I^)SDj6d=mG0z{Ve zpaAVI6`j`Nxv_eSpy**2HhOO67xTa57^r}=I|ObSa##~rp7sY2YXuL@c1xq51~ z*Hoe1r7E;ri|=A<=R=5~HuFg-3LRUe6wwSP$K7>L9w+p9bsQ=|gn2&Iteuh95PN$iyP{E0R#xo$t1>5E@2C zklI#Zmc>|3BOEA1a0=`zLfnJ+qPV+}Z;7=aQsfqBUW^W%`Q- z8Zj^fv$e@`LAG5>c%cTv*pw%PDoaX55;RSB+jU@4qDlvr9|&xRHaWJN1FMGp?GpRF zbJ}$(uh(@3d9{82_=@G`JFWKw!H)*T;)slCqXc#CP;-jE69L;fX zbH*3NkSw9y6%e20HzICXfM$W?jp_)R64pZ?s!o*<<;Rf(I5Sr~>juoT?8X2^ zYnZjQKYbWfUl7s0(L`TvZq_JFAm+!d@#$^l)9q$&R*Vyea$revUM=~`nh2GP^C0YN z$=n}o3VmT#Uk7%?4hVHDY$?p6_2^Co&gd??U-6c7g3N@LOZ$<=xC>O8jNGsZN_||- z$OL7J5y?XYWLrj~~rHWn$3t$Y2z0qZb-j#xD%P_n~v+bq#qec98>rhwhvD64AKw4t9rxt!N7P=qzfq(fYh<#fIJR3GI**LNd$}qEaQm4thYtk z@!GPX%<-aklNx6w_l7^?jp`H@wVC&h6(9M`iVkg7^o@Pv4VQ%*?+As{iNe&D!r|bs zp_*TMnFwZ56aYzMa{xnJ4r7d*pO(%7YYsyjXTz^#PUyOotA?-#Nk~u>oWe#0$aR6Q zPH@9z-W}t62Lu8h5~P5qr>#7}pIreDKez+WKqq2@U@;ti&IsiEcs`gLAkLWamANW) z>XvD7<;O?cq4uib(pzJMG}c?MF}bOXhHe*zY`2w-g?0D^b4MA0geKuHQn?P5vz4;oD`lPwt>ZlF;yk0x zn)9ry>Nr|TVF|D{g<$%?3xmtFWRj4mP7I4KQy@CetcX3e92&&e0wNC6$4wqV8N@fs_pDtGWmB%ks*ol*_KIOPemHZe~1>Bf1pVh)CX zPo|0U4Fec=FE#){WH|)Wu|+@`a^p^LWynP#-^^YAklgh)A5$_jK#ZB!Db1_Vb?-T! zz_rvxV6MHEYD&YwuCZB^#w(K>+0k=j<)V~AjWrcF7{jzlQ{a%x3Jj@L4T(g%3<-mH z(B9Eo={I}iv4nFETa_xy4vjnXMy7CdT&MdYb%cX@^jZ^zP<&`4xzy|luEeIphn3(& zL${ z#W)l=a5iPfSH-GX7h)7#OqF&oVmNijVl+*O?v>hxds-2-%^R5)^IW1)DP7`iH5!eC7QdSL~~bHqF2?P3&rioo(*b8>a~+`E~0imgrJj; zNzmm7+Wj;HeIiLEz0p*2nN*^62Axe8ai*?BBXwMq5>8zsD6(kD#0}1Fk>Z6GSv(U!n zl;GhEyIXMqac@>iFn^_4CBx5f&^gIede-(0 zKpQITpH&pFrQ!tqvg~o-#;oP?B)dA2JbJ6;3ZpOQ8q2A4;Mw98ByFXc%xZH+hA%I; zYR=xti0BTSZ=LF}YG|9_tYwMT2I0~|Fe^pUj+HEpl}rkc*m6{<>`V%e!WlDR;5sG{ z5IjUj>3g0jfF~eU)d@@ZDO0VTC4mUXNtQ05N{VE1IWw!UsDuPs-nf^k73!sL=cFKb zs7?&R4J8tv6uv||w#U7|RM@X=|QlGLbe9;Pwm zW0o&HwSWnPoSk=-kw78|obX=3sQ`2O) ziE1Fb0(c5~nI_XKo`NJoqlZtTO$bOyRArRX+Ef{4RJv`-#1=~&`I8;7DlWY_hO5@F z9juo#0<&DdR3y=b&1+`h?dH{T+LIGMuqRJl69d|G3XfIZv{L2DEE%E&qR zg-L9sUyexxZSHW-+=i|q~-U(ynrysp8tau8^P&bn{M0xOgp>zI(ZxZ6i(0(9p z7LEUvhiShcMX=Ng^idH5m5w+GF_w;CSgm(vPzm@7pEk|BrEHFt{8E-Ir&O2}Bpxfi zHgoZ~3rg!yTDU3{tXqq#?Rs1-N8Nc`EjJUEEMk0R$)bxMSKC!w?H_#xG{(R)#G|1C z6@fDoJ&z9LR2)qMW~c8~rU5MZm1&?W(?GW}4e&CU2CQk)T&wAMF0A1YS4#sm(*Qf1 z>T$K*rh(r%1w7wibWBu1RY4SbHPe7Hjluq$oo2%-MgX*pr9qrP*|#UPCeUvJlu<%G7gF z0P58J9UkM#M|^4@J*uUlHRIV}gY~zzX4*zSGa)t6^ zQS8Rv9|(^)l1=@uhy=E5Cv-N+GVE| zbfC$QUZ(?ur_|_x?euyLb{v@W=UC!4%Zk<@2Qagz+VKqXhubbXi6fb_4>H5OgaUI^ z66?8EbXp}J#e?634_lytpQ5%g8u-y`C3Y~MJ*kG-s-Oo%psp#DgLc38W*;qnIo z?FZ0vO#XP}pVBz)idS3yplQh;G%fi<8wgM~prv%OMoW98{Gly9^l*}vPRJh?@Ku*T ztcX4BxpqR`#HK+UxslFh7%?e-%oQKSbRxgwoQ}N{C7shwX1$lPT^9t|wBq_i+72V|2N$ujr&kt}i!6yLJ7lPHN=(QiDu_ zT+cU2|jm$P0PvfAJRiKsC<-q zzMQUPqZB3u0EvIG+k zU9J;%b?iJUmrQC9c-c;z+9L&r{x~Z-3l)pKoioZ7yE|tTE=Iu_3t)f{ZfHKd$Akyt z23?*gthVRk#SQ?gtUZ9ygbGrMD^rHjhx?vF%NGD@Kd4nGQ~nOml(9p+U9q4$OusI^ z{Md?=v>tV7&#|8p7R`jpzjC@Fl)0(uP$svEy!jO{-2!+ zqQ=){>^MN3rKs@=b9>REhD1!E+N7wVoEdeTykLhG7h^%#-{Wj@#8rVBVB71{<_ig4{o{G!@US zFiTz9@s*%b)k@G7;TQBlix2kNQmKDHcmN;#u|8<$4K0=Gt(J;eGFf$Dso-_WBvbO& zjdVou@(DzPo_3VU&d8WO#Y3XC!lYzcD_K}8s2)~AYo)2R0xl>UA#_{5E(|$Fit?t` zN}{wfDxoEpX{~I~aK5%-R#&EFy+MhkH6`>tRGg{$?KDo+5eU^*Gi4yVhgnsg{_ z)MVxV1Zbir1fKv^l`5$Tv@7?BP!lbIco%Iitw+YTJTkUbMaE()=ELX`ts-O9teh)V zWb7toS4GBJm#Gz^alGhyWGu<|%HY<}X5Knh{H2V!iWX92EZ-a(PZSQ3v8|$tj8$R2 ztVPCBO^A$@l{p93hW|26EzG|rsB|1okS}reU={Z8O(TeA7jBMi+pdL#+EWZFkjXNR zs)Dy8DZe50m84?ZWy8kOu~lH(P=~5^lBB6xt^1~^Z!=I|NUZ`*nxei9r@mmpTI$;< zsjo_CJQi%SLBo^O*Ts6o>9%b{AD+;j3pBc9_%AZ<4ggZW z^GuWk81F--=CU~4m9xO_86}u<_S4p4^l0# zr`k@2c$kI2UxtX>9lyn`>?tk4&u`%!HZFG@~5MzwWUJ_ zG@Q{8$gi~GuCcQ~9>?$S204#$5SoD(NTiFh zd2IKJwmar&`WpT9p{64H!(kCNzfy|kAS*K03>Lgjd%_I>L*Cfv=LK7y! zmfTEKOg&QN@{_sMV$^q5Fq$fU%5WteXs-r`RWL!E8^L#`-tr#1Tqu(&7kVakNCT;# zTtH!#Q&rokT5TA|X!;GR_7FxnxFNf_eEON@vVl+qY0%3+C(J;^JR~V=NbyGeVZ-k5 z-Kyg7DA=P$!LX0nk;jJ!%(Dh|1pJy#cjH>1pxV>! z96G8q88B=yxoHOc>OF~=!xyQ8O@mbZ{DNq8ha6fVs8W6RJ|egc&~s%SYMCGyif=gQ z`quE=F|$73OtjUcO2>)_S9Lfw^?A=3x^?BHpQ0epE4I%54 z<61fH&#STi#WlvvZ;6f8=CrBEm~A3X^uQrzTzdgaU<#)qLU#Lu1EiUcWX$-RNDeJx z{?SZ;g$^hC6(_aFnx6)&JD3$~lOr(c<5yGhez#$nUjAY_Ch@@q(JD5@ncQg>rB1$2 zvI=l2*Q5~)G0WGhfWfF=G+&*KuLYpu6^QU(2Oe;L!)~`1Ej|Eo1UpqM{2%%U&=Q#A5Z*)<;vOV#`pKTc9=g1!Cj!s$;8Wimv;f`ofN(~KsFyV-n1*O_Xb&-y+#2JoG_g^{2V~AQi0$f$UI|C_3bP&?x>u zjCwOsuvUdo*Q!8zHNHRs0^BG?V>Cs7(9aXvPb5?C%adg_xPq!6>wREW#vdMV3Z=cK zY-%ET9yhxbeVj>r?iicuIh*PgpGSUf%*fr>h(UPS1x-^NyV;6nDK)R zdqESr=CrUtaC#?yM5-GT^1PImMGsaDT-Gr$EB$ox8uPckExH36l!V z{iR`!iT<|X<-A#NH<%GVfn=|O@lwq#5`+9H2`)5W7m}iVL(S@Cs|__q%GkHvB(#Xj zkaoFfiw~DB6rrzeX072L*z5U9vFzo#VF3kzW*fugr26FAmsX?O8&j^V~hUGUCB>bI2qIzeLkd!@c8YDP& z29e%Y1nD4&pM<&DMjf5SV{^!^9L*uZTQDEdH4#GzE3-u)cTClHy=SVh>X?a-p$A4y zHt40$M;;D~YlcqmPoKbxgPte0*DjtcISLeenfyW0P4}SZ5B5efy)Ec9W33r$c_UAzC!B5loXm zMx7w0%&PL*5rB#GGal`NB$^4MD`o}t6*b4^5ss7V*k?{quhPDS#ky7&z6HHH5=kNE z1b+Ll4;V7_DvgS=b&V<%^|EOWgnnI(#od z9-XCiBzfe^dv!?QjyMF7v<*4{tLgcmHg1*X)T(W6kxCj`l@^7JGXUV$VtUVr#^tzm zdQTxZ6s$p~18S!$rvnmRs!#`8w>F0WUFum-#b6)?{D$pdmW@SG*JX9KlhkAkk#e*W zglTH;g_&~}$Sbd8N}rUor%xwlkDND}V68;H%V9uBzFfx9Av_LKpSRG6G(`; z&?Zh`#EyK59t&~fL{2f0B4ryi=KzxhVDnZ3vW8YmWEHSMRBIK)EfJPhcNp*Weq9ff zi8DZpgx#ZmgeiEO8M!j~ybbG*(rTpVQ=fttgqn;MB?LTq+cb#?#Q8;`nT|E;$AQSR zd-=4^FYciZ5v#MHbJEzygu-zhmmShHI0aCeMo)3&hq*xH*+8&N=JrK?vDf#$x1dk; zDwTs?)K!jcyaSbj%7OW*r=S%6)>RJMR^TefInFjLRgP`0as-m6icmSU#Ecu*)pOSS})oyalI3jJB{pKBl6TD_ z!V?t&PY=SAQSe$6(zF_+!+} zbUN~zm_fKiY2TEIv9ktXWv#?5rhfl zU8xy{!wK=&Y)HMqs}Y7kHwb5?Avg(`CqpQtg05f?cDG4<6Rv5=wN#s%-Ii7DA=U_K z0+yoZM4Z#*hcs4UEE(FYTuGyuQlLVJjke+G;$=vV8F#7c<(hFfR3*|LS|u&amC4`Y z*IP;h(Uf{1E<%4~@8#FE2qx-Q)tg+#KtvLy^q&giNLJKfq1CrlN17Ma5qhAG%&psz za$b;;N@>M9G$;9}>X5}~+n}e-YW{Z}+|YD^d#aQbR)ZT#7$G07Pzy`MW10wEL*plN zjud_%2ON>3W=C_`5#S>8^wgyMGX>h*Fg+#1ph>ZoF(Ou_#pr^wK{u8BL(OwkBFVLs ze^kl!qKR22!7XjT5`>?aJ>;Fblms0HT-7nyujLhqh|v>nxm|^72K(3J`yc?5o6By!A&{hmOq;`fy7)%T2x^(6UN$4> z3GMKLuN&u`alXD0jUeJ#OOrZnb{(E_=f4`Y$CYWoxdbf0X1g&wz_oz)vWQKa5L(Gi zltTz*j6n#k99Ik&VbqY$gi(G=7_H&1*Z0zdQJwn!)av`1%VCDQ7eYN>mHb6LFG;Ay zht0v5^v#4?87G4wDm5cjxH;^ zq$oJdCQ=w*l;zh-VH|{0x#v^t&e1(T!&qlrw=`)C&GHi6^I#N(E>0dRy=A2_N5?71 z3_$7@6PGv<)g1IQQ65v}H90K0)O$frOC*o+NhOaxD5W2njEyv~|F~k!!8x;@OjgzC zu2!$nnHu|G-AT^|)(M#`HsS(Rzs6AkhYW}_StH57XziWlj|l$l${Khr+jF=a#%09i zP$fI+=hAe?x=h#QX{wd|yWWv0`>HM+uI-2o-20Wd4Sv)US(>Q~R5VpLP=z|gpR7r_ z{H=4KhPulBUUfXW{7H{yq97)PCSpw47H%!}zzRAq1c*Xp7KH zP*KJ<-Gfi(FbtX@(b}6<5I|MTg8-5N&e#CVfJCIA7ZTNi0MtblC2a;0V^dNDIwz<@ z><+-J*BViiPikVC8mPoHgS2~W4NoL8$2!zBW1;wlXrON;Z?1y^9tB`%;86go4&RhM zHzBt$amTt-iaQt49pp1>&DX~yjt4m5zOtzda1xI89Dg*?)?yV7AXM8N02othEv~;J zZJux&Nml9>Y1vK{=gfPw6Kpe?fGqPFnH`srI zJji(rrTu57j7+eXAu>VG0i&%VnlRE4A`>Dtw#bBy8wdF#mb1D@E-+!tqQ)4RP}Zkr zkjLh9MGnKAC2=A!2}LIKCLZaLh}yGp7u_)Ds?Stz9{ zORlhGu!1V`U_*F)Bv#At0FtsuY9Picu1SkQFu&qxhmMzgCReRTra@ni%DKO)8@nfkT%lMk&^4 zLWugFh;qF05~3WSRSHqc7F3N}Nk$Lwa1svzd(ZJs9Q~X8C(F%<(&kK7=LLP-T4-HVg^khCbkN_-$KY0>hS2VC=eN{cA-Bv3_xA zbNaacxGK((FUs<3MF&!FhB(I{HayEVoF>*6OA{>FU#u@^y|eDrom~?|^Ip?I`D|Bx zL&S#uud<%f-oi>W-4`3hH3`mV+eP?>Q9QLN3k%h{f*hD&8hjKyMglXk{w+Q5&$LW3v znzDRSxntCKHK(0W{kk)Tz!HICnv70nc#0oR46+uA(r0i8_d!4qwbwX{%E6%_LQol^ z4{!nsHtxwm>sJKL+Y}ej>JM@(2@!=#{ZLc)=Hv~u_e00tlqAbb@8@>^u^;9(fB(so z%iZ^nc=@Je-{_6~{0;dVPxeRq2(F;3<`TWpQk7VQrMtzYVMVKSX?ZPI`>Z?%RhXRh zMxxW25}aD?wpyYZY4mDxUHKJ4g=e-$DDRUei~d>Mg+(E=Ys|whe1M`i5i_mpc}Kf@7?B2(EcZR<%3~4nX!Wrg z;$fqrKN0b$D=E(LX;OT`5f6(2em(W=F+)7gTfhNC@U@<+KOkO!v?@Y(XKj_BFIRA* zKR`d#guPZMdALH!!&{)FQ0idvw>CjZzSsmMFZ=GJ(!BxxALE4|7f>=O(G7NSptY+%OsL{5JPd zV(uT$ip0#yoHkKaNiR#eByKq=oJ=P5+O_Q@N+8~`UE|qee0-*#HsXI72IX0!sCaG2 z7pEAMru+U(7$Xf;C5*WT$rQO}@tn~;HYLMwpNsKCY<>u(7nGOaP5k=dGKdIPEXfRM zO@XO+Yh)dn(nayiSZKZR=zy732vO%A++ksC>YvIIVBFG`C=089)J4cMU@^Q}U@;yP zMs@?y$iY#Jtwl`)VRu3(EMsgE6Imr60xCqYA~y05CFAGphGf@%`!Sc zr7qAZ2C-QSCN|h8T99~^mJdUq zY_m9TsN=HQ`5Mcdvmr&6X=7KQEQcPgmetN1%S5TrwlEJ%nRAvImYrY&%cSq+IxJbH zWOh}_-xpR_{G3&MUdj(=2Bu}uiwOuw;2YpHZ|XQLX`W9vo#GNbaA$F^JxPQXdu&G( zQzOPaPVSZ~lh4@73E{dn%Y^9~#t^1!%ZV^u)^nV#(xIUQjTRO%rvOyMTbri2d{&_k zbJ}r4dOH_u<^)XAyczKloN!INMxw4#QAJtzMv=Xe3ZIk~H4%X-Dts`xX%i~W7iIai zn)iI9;(wExKs3$?dyIOR3N+3W9bk84T7KwnjP~CLM*A?!uaeQe+5)q+^%|%Ah7Oy& z0>8>9VT{5@y1ui`SnsTcxKCOeR8#6keLUQ%)bX^FON;Ja+JpZRNS zwBH$F^6Dig__mGqq=lnJzkAgS?$Tz193${o|4s`3RBmD9yCLCKS%~%+9iX7YC&m7ro~?)18gHf1Go;$^1uaiEixfLLU&nAk zx`hVJoq!cAx2Mt|*>J64n=!6UUgU^yFzax!XF`dz7w zUlu8|?OWxPVc?1BNZxjj#Of(G9=k+?RyQRL{58_*I0OiwVrGEm-nIp07G*t{{GClG zGhb{%nTcR?+uV20gCWp<&w4OO@=j{M;=jHJ17-cSG#8(*;pEXRa8fvRF!`T0!AZW@ z1Sc)YqLLu8`O~C@6CKi7u=u()X#v}v#Trbzv@pGyv|thg1vZixrer#{2yBh4tg)0B zv>9H!jl&XccLfJ^*zSsMlo*@>!O&?$lEZQ~+PAzgdV}~~xA;?r!q(;DKc>f^N!{XQ zek;b5p~#4hi53S?mV=uT32Tk{p2hg4v@=-EW@p&1^LHxFLhH1w?)W@ zb*VM{!LmCqPju(&p*tXgy2CGZ=MBpX>JH=0NdqW8p?qbbOKhvKE`8m)L<_WQUE*`K z7X=@NX@U>eT`+$^V01+$6M4-zt^=@T9PgDe4t9p5k!lLogdLfIBGSzTtGE@G@ZtLv zqM&1`7BuiNXNV71&E<60B^*tI&zgXbkOOzWCLzr=4C<=%C0${na11gTUz5BD9%`!^ zCfRQOhO4vZ)$wm?|71t|Cz%PsjGkO-E$U|RJE|z7BH#x+lQ&DQV@Eg%NkeR0uE2Q=RTAw?W6wMr*1hA$EIaV>1oP{4c}inZAnKBup=C@7L-*!>s$ zDo(bJku1@v)pAO#7z_NzM4j_(R>YQ;kj#o`X%#0RqBD`eS(MQl@5Qbt-y7ZcGO>EZo0niA>upyu$6L8CCI&Ua3>n*Eov#_-jT$jl4Xi;X__lbcMW}(-m@bEf=WK zVJ>f!c3?Gsm2z*T%Ja}+Qxu>H=WCl_r+HT?3dXP$Yt#(~ocJbKYT8e!unE?-`Wt3W zyP^vG+gW&@~ZkwS$eB6R0gRG(K>64l!QiR zZ7!wz3<)`j^HgdfI{%CQ4cISiGRU+5$S!%|k08hHU#Zh2{C%V#adD#aT4^KXb!X;W z8@Xc($xo8o!Q|bWNPc{=iR8zjh2L#$L?Hg2)ke1cRnbOJGG9w=#12mlIC<9=I4PVu znB2VyPV&VjIEnPq);Z4cQ1%o>#CW6zFKT)%SiKgPE8K&=5 zmc#q20V^wFcE2L>hLW<|Ixah$*buTLa$2@OShi#zmPYX>YgrUe#uGM|w-Yy*C<(n) zs`R?l>Uy8mrG%XtIilGXUm#X(@dYZ)7GFTvxA=m9nJvD+lDEYdh_qXL0khoV3s~V6 zUm%=p@dZ(sTYLdZZt(?pwfPrXVk<2n(kd3I>>q(e?gWv_kmQ&o_2f^-lO`@JPRl@t zY#&ddIJG*XYWaW@JD%2Q>0HlShF6KX^Z7i-wl>ML;VYP5&o-3+S}c5CCV2k7$T>ci z02<+R-cr&9+@m-e7y+qP%?i~JX@mP`_#d)-p5$<~{p$0@Lsr-G6HW68N7bp;vj__o zxoRI;FNuQ1avW2=(niNtj(yHRAV4uK^@6&Q?iiBt<^!NPrlEWeQRO_j55K8fLkDv^GQGh%}uQ?57!I$NNEF<&9OXcy_3nBsr z?mz^rTk{1#h!50d0fDu_X)NSF0q(DZu(>&xvTY#R!CL@O7` z<}gYkqMgvuKmpUzd$~7EODizh0zAoALM6cZ5Yk!1C9T|?;nT-e7_4irE|BP zPT6U}m*>07!YmL=6GReziH-v$#wX4bYCcYeU($9pnoA_arV!^*-}B`+_>@+_VTy`&}@I6~cVERK3n6<@P{ zz0Kjj%VjD{7aCJr~mjT(MFe67SGl~`C)LM@%ZT@!UW$5WR;_(n|UF-W7BiOA$x z?nMLaw7PyFjwVt9`?qRiW%?AhfH!Rb$c7x6MO|R@xWVYT5gPl7qL0S;?KD5b{{XRg zGBf-1oVkZO12cAteKso|Im7UNh;}sA75zBN(iom@CjH_YaJk}Y-od$xCqBWCQ;&yt z{XIH$uTk`VlpfLU@SCQmB*VYV`u+d8(Rje70Dg8{h?o}l-#yL>yz)#`b~opG=Z#}3 znHI{w)+m19*xUDryA8jQNl5*-pZru({5QobTs-anL%(4U&T+8^{Xc0p+7HA-tID>< zEw$EGYfWpdt=2lRwGOSREsn2f-b8y=F7+{R1`cBwlk&d^2NgZ@t-tqnehu@CgJ!8x z*PHf;Kj$4$q(*Tfy@}=A;0(f>?$OP0Fu(hw_mBn#B?pv(sO1neJ7K`uBJBF@lZti^kpe z6e(F!7+{V(th079ezIs(0n3Vti-tYn-SEF;(g)RLYMOmJhb^J}u?b>zWmdW&;uT7h zj;VOY`&;%b1tPJkcQ8D4ooIn(?9rM^@LXp6Z{8M-K%d8t%kFz;L-$EB$Qt)iy!UR# z)i>pZP3gg1q$2{*O}Wwo&}HzHIWP@e;8mB=X{OJOv(uW5o;H z4WDQ#2uqAZJiq_RZaVA7+Mef}Y($3Q=fC(V?d;r*jT^>TmiO}f6a{Pqd2i1cy15{ngZLxQAGX^C z?rya^%;_Hhh%Af|J5h;;iyaZ)x>LkX{ot4r@dS<<;xwKS2TqOJnR*73ZVex9vP$8e zshoq(MnDDJwo=hDKtO>O+?le>Ag4nT{v@N4#eI>1YxpJg&Ui3hs@YHl&#VfaS?J>| z9$60#w=fKb4LHOhd{EC+BW2Kn%FWaQcbaCfTD2~JHTNYVXZn{9#w~EHQ?%|qHf}Sq z%tN0Et-#UNF}$t&fCymWh+KiCuVvLAwexH=13ai&ux>`xYseEcuWPyFSJ_@|-m?Ly zc=Go(q1qnA1(&uid%(GDJ{%XgGlc3=S?LntR{HIS*6O!}BY&g2g{y&CSJGR` zpZG>mASr*sZ-iVogmS2o455}uztudFw?`R}Cyp60k)PnJaF8!tt|-wDIJ6w^7Smhp z(>5Os?qnkWHS(r{B^Z(52SB zByU!iQmNhhl3C`aSn|1Hq1nx+8%~or1FQo*>Es*^E)FcXa~Dv$33o3V&YnQA8xaD^ z#SI%20>c+1Y(wIkf%fN!Yuy|hov;gB6FNcH|@}j$on%)4m$E{ zpT1d$^q|AcYAC~pgkp#fHjKYhj>2++`6!SGd=yjy-iWdQ9^pO2L=D9|8WOyq8%h%u zzR9ei{`&-=0EX1T&~j0K5)7$>p=DqY%hmCBqXta{bYtM4TVN%5^O|JAx*_x}8;>2V zhL_s#{%xbt66au+pzx`91;z~7F(59;b;e1?t)g-7SS;2!FcJ@p=^cBF%&?9d#jk$u zTY0zHu1z}Tgq!~$_}TE_cmaC`?Kx{F-iZN50)9x8@$TXpFm~hjuUZzVg&ck`kzhH zW_fjYMSY+@hqG*POKPcnP)m{yy<6+(_>pejyY{F+$_%;R|(BtCJGlYcXh-0nuhhg zoi+ZCT8(}{sy0g>)-(K&lz$vE_@YD*#mc9vl};$az2ljZjW_aXEE7t8-X9Ghb$FwT z`8$t|IJd5@hEQYkU;-6AKGSNXoR5qfNSuge1{()?b%z_iXxPujF~Tkgkyo?>_Zc)R z-osnE@g9CU4EJy$KuSHDS}2Rirbrm4NRyYHO7O2^OXMtdNTl#sc+PqNxdZ+YS&Ukr z!LMlnA<&sN5p^S5>WzGgbyuAI(lfu1q5pss*?law`8!dmCW!!}FDKw%D$L6QQH zt>T;C`WE5B$VFZHL=I5Eh3cglw~oVwjT&|6dwdLO6qw34iyDsDI)fW9E_9mS4bF#( zu1TK6Q)mL{s@1Hm3O$X=sz4qUL+1|_6OkxEO<8nI9UXp9YZ-gPvZl*!AvLFj1uuu?)7tTN1bt(YKa>8Al{l8X{VpKfJ#TDCTK4Y}x zU!`eUuJ^ip_3cn$ChFqksi%K;b9oB(CVA>VW=OFU@|5GA%Tq8uEpreJ$}U9HD(08y zzu7SS97|iz1tKNu-ar;~0n*T0)*l{L;B)zEHDf5w(_fRZ9{oLTUgnRP#n{(^ByKld?cOeddT2^!PY z)^p=YsO$_08UDDIA48+T#!cg75BLs}t7|OH;|1N=(|>D2wiw_?DJ}yHqD5j{8C2G% zFsde^6PKhvQdNvn(<6BF-=LvzXAjh-YO-c|sJXPSE)P)cjvFi;2RA+O)zkl98W}zC zK4jL1F-*rQp;`WAZy&ez7|{`CKrS*W2C1&kTlZkTZLI38-mB9lb6a;4mrY9goE|B< zPJgr&2yYQkw4qve%g>6Tf8>h1h6(#~?6iv@n;Mir-r{tq#K&wBWY?A_qNMZu(`loL zfFuAMLVs3Rf}Q@xZw>-=$mG=MRDh>LCd|INo;~@7=scXSz5q>N{aAlIbC868!oZ>}(A54tFSSjyHSzRMmmrhhi{VD6tPNIkOA1i+8 zWvj9!={}W@009&sMpmIkBv&p62Xoz~wd8t*}Gds+gEqmCHgX zrYEU&2?NJ{R2^YO&1qzKDsO-;jd`}93CT(2o0-e zFI3HD)2!P$JW}h-d~$pM$8-YdOYPDp7kx+aK{dJ3ceK>lLu^)vv-B6CrB!@3A>*!o zJoQ2lTwZRctq0Qgx~}V+c;*$cLQf^LGX-T4>{}#V)SDY@W`TMm%c90o zk?f*PsIFEALmNQVG?V;Mcy#yJ@VDT)kQCzWY)Z7ZPqw}`?p8i9QZi~#5q4YQVv8~^ zVYikokV2fgQB1vO+$pB+JYFo_b4}7KrqTzBo*v(%lgVWdoVv?i(Ik(*n7qTEH}KEB zC%)?x7+{K*I-!hi%Xi=#?@s;uqODWo_n?d3Kk}6qvg!lkt(#hfox`+&XU4CO5aS;GDxF2bwiisImx-!5a24`?UD$vR#Uz?mISoMxy=#2*HIE zIw61o>aagMB2=f!Yhz1B5Dp7r)ty!`tv%M1!!$sEV=^Xx9GIx0!!cQ#mhvR32}EfI z(Nbb3@3e*>pDH0^fkwc(jf>9VAxGG*pk>*&&L*mTi zz}+GUdKG#pBGQAZX=~Gb(A=D88u2 zi~tEsYn?W_kTotA3xVidiBvMY0Ff9Afyu==gi&f^c*VC6a@hT3u@Hh@#osQfVvB`X zQ}3un|1Lm`6xWf0zD!>x;}vne3s_Cysq>>jdL;hSgCSe}45MXog3`%^h5JNZl|c@0 zun9w*6-_}e#e}6&VHF@ex0y0CZn3MY{)RQjWjiq+yub%;{i+v+Nm;dr zjtzgWUadOWQZo!D*u~(CX`%Qisg=xz%VhG%Fg9{^95r(4GFdC1fl+8jMk>QtS~rYQ zLWZ%n3}cvvWEg7+4#LqX;S8uM!&nQ?bZ&+*q}Wu3u?-r|*EWm|PmZUJN{F#Wo))?a zDy1R`8x;W@tBXM8(n4FdH|W2&KahyrEe7^|wv@cb$k7~K-+bt`$rMjkGBPEhOeW|h;7Q1>Y ztks**+Q9J}N8S2Ly>4=)V&BJfo#SJY%~>WAjD>NfhP8HGwM^kOEK_)mFVpgkt*$}T z6^J#c(-m9a zk#YhMwJEvlY)VAlWVtEkT!-suompOq?s#hWl`K7?)zYo70UPviWL$Khjm^Br6O92h zz!QtNfyR~SezlVDFZ)WGRKTIY!feG zkB_FXHy8`K->`%u<1-J^X?qhs3hYGm5Zln=rHx?HN&ML6VkL8MJ^r zXiVb0Lh$RxSsadb3JZq;`9h@m0Y^piZAS}?2@uN{Vg&riaZ2DlpQQQMiL4x6OID0n zUnZi6N&w1?%^PAw{~hD(Ee%50a4Npoo~(&DU-BMu zbk}@V^83hV)!N!)WqvBm55adOEJxKOLZWDBqcE->-KUm7$M0=>Xn5Wgtit`UFHt== ze;!?fi)qe-->SjX&^_E?%KlLLt(Y0acUB?m`U5t07wM;fVd;30UzU$bBQ%&RB}rCW zK&F_Cy@}gT6PjhhC~S^6-v0CECNIx5`=3l@QkU`7oCwI-3F=qyj57rg3~ZXkKnD1% zn8wh3(;oT!GJJmE6&fV22mz;2{OOmO+bb021ZpR6z2a;@k(6#p6Emj+YEbdS|1HY~ z{ajAnO|CEZ0*jQ9MF)fY6;hoN63V(uA^|Do??Fk3t_J)Jnu5)nyYSs?&io37(ya79 zk%qM~_za8JfUxBtEZwFo7u#W1JoP663+qQ=Trz7u&I`ci>Z~BKkMV0up2K8c9TKc! z0R#LcHjRpkH)twA;YRVF^z#Sx(aRQqT z6aEX$e&vYzNao>i&tdBEm3^X_woCmEhVDQRLr!GDVoIasOOz%B#}qJSI5v3CajbII?IP1()dq4E<0@6Q#jRG_7}xI{YG_2}_I^Wbymz#+!>*K9Aw)mslBU z+&a(}8KF91OM8`nS9Svki3NG!v4JP4qw`XVH8EPdS|Aw@SltTVbE*M1&fBthNNm;u z36?``21QK4lMQjmJJPQ+vwENz@^jqLK=gucgY93+y zSwUtH^B`aYf~e)$EFJ}{?r_DgEt867U29XyL-CS;ehQ$!+szJ;b_v=L7y0Cj#%P5b zq5n198_gq(GR>&~Aw!QPixeOIV`@1gDgmh!(a{itLma>2uQYimGNGCs^*(VvqTX+& zxaXXy&@%Hb4;D78MhL<7$va^Y#XLUIl+9PbAKX`*Z(!h)8r~?{_Z2^KH>G&MiQYuw z7=>H)W+oOaKeY$j?khTX7Z_XJhl!X)w0(W4FYyT50K<-jXbFYDktiEABXH->5aoIsz+p zz5h-=P%Gu#8E0nLQxj=fUFdhtwipoC@SB<8Cv{QBmm5^VTu9&Y=q+=VW0Mr+w|Gz$ zdy<)kgl6H06y7L8ETaakRMc9so?Mgcp#V~6VS$X9g8SqGr~6!`uJOUDL+x}+JcRfXu+{TloXehq9InthiRv7~T=R%MDvsj`}fLDbni zfm@X|?QXIxBlc1@bF%muBB)XMHPoj0H3DU7@jbge%&!s3xtEEO_%%SGvZNkpj$<9c z=?8S7c`ylCYE6C6l5PbrlLzvcslzn5;AKL>tEu*rUM58cifmOPC^7AljyVo?(h(t* z2ie`ti@(`)ygLoufcrq25Q>>*O^IFDT%u_n;BoLivogKcGC4M7LRA;>2ZfX-SHF9sEAT-GL)y6n8>^5tA;}CE41!kULT{ia#IrQTL;ds;RM)nnb)Z#Eh zGMngb;hi-Bnhn3sdR%5>EGyC<9sAfNU2y}r%Zz}0k|ZfH^eMw&Lt zKqWUAp-vhaHAr3tbK#%l0ijv33y~chMT#poG@gWC zz*%%eOH)s7mf|^>zC^8-Bwsm1Mad5!Beh)QSN$y_ND6XMU=)tUE|kS!0QF*c%de$0 zG#`Izti~*LWKAhGd_qRtv=~C@jPzMq)9_8nz-r4 zC@qpv!=x92Z#CDbr7$oTcRpaycH{xyP*zo*P+t>Dt*C|wx#xWCO3f7`LNKK&RS0f3 zV6zB;#zf5mDV(-n2>QmZnp#;#W)PSoZfC~Wt0*(q8jm`mMCU8{v+C3Y(Qlg>w#|LP zXD0KRaUKivEw4#1`)EyLRd%GnJE}HC z@X@uAaw#E?igiotL>{MclXV5+AP_8RWwo6cw&MbmDqhXc>N^#CQ#fP|o1usM08dGm z^hh#&I5ViMw@myUGfgaNLLao>!AOb50lVeZ ze(V*V-my6fo}5uDeyiMdnRxxpbi_{2Syf5M_&8;iIl~zKIeB4+ZY>)s zXV!WvJn6L&moOYk$WwT8sfuziB<6h|dG}}&$yNQM}xLoi&Y4Gf= z9+h_T@yRF%fo zq|KA!!lB;_!cb^JnEPF<+2Lqb>W-z-PU{IJr+DaDdQ<>0e8w_r&*js0oy{AMlOS~P z_-NivHF8W8hYxMlGEPoeo1InbKv2>lqlQ)QQkrg;Q}}d^A|trnH^X z@h8oInCPCLBsgU|D;+ixq!c$_d{!`Q4gZtb&o;yvkVO?4`iy186TmrcRJ%(9`js_4 zry8eKBb0Z&8dqU&s4LS78@dE%J^N$TGoyMoLB}wO1|K+kgt(a`16CRUXJy6!%3|&k zeJ=u!lmk?-N4<`)511=shu#eO%h_m_|A!i?o~R#&z=p8n*%6cpY83FmAb5~mQpm#k zn%MgbUu2M@;yErBgFoNw##;jpTS$R1v25!vcMl&-imdnX6jopGN~lDOHdhSpuojQ;rvJXcBeX{(DIM8fWHu~V<@${*^fp8v`_Qwe zD~im!6(`7;V~(K;8~kZ4oV_)if{SW;P%xDPM^KEM88`$eA+^!D;O|E1TVz_<6qb)> zSvcG*jKkXG-L;rExEy9Gx#)ldE=w|D=@7gg4Kc++x(7wZ;!*MOBp&l8GSC7#! z>L+FNMT&-=dDzxXtQbK}FeG`n#DL+MS|xTdA%F`mk--!*YN(+p7%+(_dchPETwZ7# zFv0VNei&VhCLTE-eF#r@_Q@Mt4yZSrkQTj&YWKV#6&dJ!jm7^vC9$%YTAeRQF zMb-{_r;(P?0pt#i+N~krY3;PY#G2A1rVT5QKGJ+FBF!puVD1zs1PJq9ULfD4H{^0i z3RT|HVqmr6yu!AGO`Bzj$GMS6AqT7j9~etyjdSs9jP$C<(N+& zF-{5d?Ys$b=8hwOBoha9=w+-+>jT9@^l+18}lY%7F-vsY}sF^276QNYgvT$rDE53Loes;eJDfw29il7+H6)x>&G9i(+v8I|5u~LP?g6qZBD;hDejz%G~iaqVfv2WIbP8>>;+coqyM`mb9V?%b*4<=0A$DL&X zAOX|$beV`2Pn(6#_v8%PiGcK@g1yi|=x_Mjj>yo`N`t5CeZ@*CC||*G7+%{ZKcP)D z#I{q3kQViNtdwG?WyI%sBs%a%t_!P2ael~CmkG_X z_bP#k?H!e|O!k{`CDTyb6-wln`5F?F@d%8C+F~lu^q54qpf+GS5 z(r6+y==kPH!R{#&3&n*%CZ6TKH{$4j$;R+5bFBFo-UW$#0b}^#Ebhj_;K)qWMzm~y zbtyo>jE2Jz_&j$8&UC5lXuwuxC~}`HN;8Ki5!>haH~@_7kM^E~DAj}i?`cY2>JN7L z4|!C$@O&K1mg02TKdLKGAclb&nNv=2v7RwOCiWSh0p>$@nh)NEz;OE_@%^J_Fie6V zjr&JsIpjkZm~Lz(6ohndzJc#?y2>sLf=hMr%qLNp9>gd6WdWb(UO)J-NCj`iU&A@u z*L`8|`T4ANS|cm7{iAcJFDPh;1M_icro1zF9 z4fo)qCCx@#AE~4%o&FIDuy{WD1&F(nAvRjQYm@Am+9YdM@7g4*ExjzStCKXv@=r3S zVWTy}w>@)ft?ir1!CyDn%JfagOjg%+WAm2CqO38D^;&L87vI=@l+}dMq{JM%*f@C$67<1N}T~p5Y*Y2nv zubnW0;I_wQpBAaS@4(nvsQu~bO8#_n&&$@o4b}it$5GLA&;J|AoJz3((%#dn!O+B( z?jdjscRD;m+)i!D$$&SawI9^1xgwv4C)(mgy}}TIGyb$8tCeNV^?^U~j8ma(-?Ufo zz?2X~yWxc72?CeC$k|PT2Nlo(KZf0==JbDROh#t=)f#SitukPNqG80=(Nc;HlI{BK zCBIdV94BdY{GHX#W2`b*6A(ASU#;sQJI1HwK+2{#ggq?WFqh9QoyjY3T!yZ3%aO~% zD5Y1Dq{budDeRwNdoQJl@TD}x;3WCQQJ0}fb(w$UW=L0v*UajGP3y6 zM{wBz6@~$5dBYNy@S+=>MM+pLaZ$>xC6^ zRQ{`%KY5xlGtqyR(J{QjJ-3LW%xewD&#qyrH(DA8o0MrBwt+_z&YK;WV!#0wdL?=U z-6W!=nyWS#(xHPTFuCpRYR;7~t?$~v*2UGh4NNvr@Ymj1<)~u{ozj9%vCMhFLW8DI zTWyy;BVSFD#|Dn08=k8khn%Xckx%EngK(QBxgyKphLkt5dRkmOM zbTeQ{@GeBZ#VgQDY4@f?V(s923_n@*U4JY_Mla!%FIp9ieK?Arey<9!Mv?+BQ9zC? z6vHmP0r^04pe1C!c%{wZgoNn*`8J1V9uh)PAmefEErpXzd|S#^VJj2`6OC^lo>SNp zhGXpC1a^3*z(na41fqOUiOjmV`|~8Z!u#q ziC6!#?dAmtd&SxfU;@cLQhD-osdn>r=q+Z@NK#DO2#MD;3J*-r{3~(58c&cjT9&8s zZ7QG;D7!_Jek$~aBNz%$9xVZu2~rn*DF?`klb---F5{a|5HE6CHxHm^o94+wnXiJm z+`hBgE>~^RxW{W#>t_^JCD~L@KV0k!n|)!PTP3D^R}s*BwQyT$_Ej&T^m#J)<6JZJ zYU@1rTo?#m)m)geY4Bcg_Ev_s7Rttefl*LY{|ws4Ml?hqGbn^5Kgu|3>{517xQFaI zeKQdgq6arBT9+hK<@DF47Dg!}C)~wEt4GC?x=4o3O#3?Yg_@)Uvz%NzI2+7C=#y{( ztosc}21gGlr%zT53^RPPP2?um*%$+M#=tP+_aj0J zQ6gHnQSbi3bmO2e7}nF@wl*}jn;RPWLK_-;W0}4T2EfOajb3dkXT4xpt{@kxS+U__ zdBcF9EpE2T7yFidq4Mrm_>I(KKH#~g)=vQj?2g9QYQ$I zRhK#-8B~+f;v*6@xvYc+-A2R;JPCfY`pP3m9D^yNIP{-y_1~WnvBeQI(kM-`EMa9$ zw5*XS2}ZVPo7tC2qUfYQfYbiut~-78edWRG_k4!!SILqT!6!bgE3KOZ+*e?67U`BK z)UUFYr~+0Rk#6M0#$Eav~{fB)H)xAIXBSht>jp8%< zGvIf9l0+164W(VF)20tmg)Rfp@j(wR5O&g%y3=C|Wn|+anv%r4JYzC;=xVpx!1_tr zVAMR+AFWlmJ4BRJDo;Vt5*vZ`ubbs4xVYAkHi)eTzW^kuQmiE`>Pc-E=py`FDGGJ@ zW3hACRNGXgjRCG^GH$na1>b97drK-(iFfzKOxl>wA#w%XOn6&@4)EDX(H zYFiUD30lP{bj&6J#2cFgUTPBXi7*K&rM&Vonc=S*2Q+s9Pp-khJhDr5c_Gdl)qaIp zDWW6Q#!JM;GB_u0y-MVe)5JEB65YZF@gl2$_EvDFICFqz! z)Q!+Vxfg7}l1CX#R1$IoN#G`g0~Dvo?I_N90~xK z2CM$B0NDVkS*=(7pG8?Rl&-{POOw1j!z+{~SBhpuGfdbKxTWQn?UqJROpoddwIVrP zMb8r3z@sejv@++yc^s7l3xG9ez#>A-@_#UGKuIKu1eStecjghI?isvH63)yjKWzQW z&<7@)XhcblngClHO%OjIQ!6v1mh6rki-3Mw@&|X3RzK5fXih&fLwptNhd&77&e-xN zH&B8>UZMs&$rwd)3(ifKZ3InXz=6eSy8vTTHbAh;}Vf2XQNX zft_>*^5Qgl%N=Pr)ziL~cj{-!YgIcH64h`+5^6!-5U)GY(yM|C$cVdq1f2G2z+rAi zz|khAao{M!=!_!7jOPsms&$;%rCY5NQbwa4i^g6Vo}@Tv!}G42W@fb!Y5?{rtp?af z@I%Dr_^Z9RWB6wlmUJkO7$RVtSS1nw_YCe``h_Jx(5BchH%0+p!hMGK`{E=i_D~6!ZtCM9ES<>O2>Gt zsGp8S@|!89)H7w^z<)WzkL|^t|(8b}mTr{Tds zXS5oTh!biHx8nhM(DNECw88{Xl4}Mp0}?|Q)i{~2t7o!7IHO@e=I0xRARb0Awb}^q z6dNYn2-?Ne#0WaVUHaC*-KhrdD!wG*Zad&^kruNyG5Q(k&qCSO&khh=Qh9xk+yR;` zV(vgmO!pZd(4r^UhokCIfb0? zO#iSV(GM0)C~ zmqnw5+bPGd)x=0>+jnUxFaRwf)V8d1E~4=Xh~%_=ORSd;hTWT<^blX*V}Ev9A$kw+ zi!gJwvSLKd`Xy!Qk_wyOtFhqc7eQnPxNx3<6Yp`I@(z!I4@ zWu+o+pI!T~Rb-$3!Cb|q%bue|PiufFF77a=1`r`yk}^BobSOTU@uJK#enhgGmqK@ ztdw)2ca%R(EVuJw49lS}#l?pDgymivyB58+`60EaR>>i0OP(5$UUFO7=K;&74a?1~ zk6(lNr1KcRSq6#QkN%1EX*OF4ZVR70rqVG%lP4t$_KD$Fg9euf(5W&_YUrhi`wJg+ zaG!;ag-+3 z?nWn=A~vTHDhXp4V4X4}tv>x}+SypAWBAU$L>Jr_p*9S7pMKs zCjDuy2On+?1#IbjMbiJ3H)ZRO_d-6?^*mZHu`Ux;evCh407$MiI?|&|kI*N0RON3M zimw+h3Bo})Gvzv0g$A1RbtWA+=kdv`)B>tc?T9D@03rX$Ft2|01Ll|?ZmfPLTx}Tf z(&kl>!7;ms%XF@jNL03stELi=(*%0MqQD56B&=3a$&bncH;N9 z^>X-Bwe&MjN^3d$ktailH)baeY=hx!;}9WEXwWzGjeKLK0fffC8ga69@$>07Vl>kt zmd>C8TEFyai(VOdlTJcorBF6mXrV4du8dG9pDeVkE|k}WT9bw5>q6*6p{Dj^p-pw6 zc3r45S!jD*s8bi}P8Qlsp>JX$(u!mvjLkvKN-KMGv3CzU#}JNVsHY+u~W)6I(m?lv!?E!<5p z?w6Kc>E6A#;Fn7;ue+PJPMqMg-bvZKc|cVQx~AL-8rjV?U(@#GCr_L>aT)m1W9_3v zfts$?Xu5nR+trl4o|=4ZvpL%ad-e77QT( z(2l=M=0IU7Q|L_-xESX^J4dIgt&^|g9Bi}K+a_PfInc(qsoIp=YZ$EOOR6U{x?_;5d1*}s&P~Sy9>>;6k4|1s_JNa9as-8PTJ?H zqaEwm(Wrx2Fwk|pmadIb3T?#`RoOWQ=sHc%Z5{`mEY1ORJ*yO><6LES=!=u?+CkTi zy&lxPHqgmJ1?X^|T%0J2)T(&L`EU-p>AHemHD#ci@;Wf3u`TFabxg%NT8%ouc>~?F z)uKA4tFL1vh6*hF>kEi_2f9udo$BOILg)%_s7`Z*M0@G6$R@DQi-Ju25X~xs3_fu! z<7RysM=Crm<1XaeNBMR~we(Z*TejPgvk;OL!eU9CkyQ+%q|>hmz1VQDWssXm9Dli#_jz1VX9v?i!fLyM#Baf}}088fK>6?g53Ew;xzY!em^^LPx ze0g7dDFzeQ^&4Ssb6J|Oe($oSFy)6YN&n~)-p-Y_rFdxJe$9=H#*4{t6BQ8|W9xlE zlAUxQZZg~mL<1*u*y?Z5nVXtQSl%bCHU=6GCcy?(B(kf?pmy@#Jc;#)2eKZ`@Ze8* zp*W=Hn0|{x;yUD8tgs}J={<|dH~Bmx{FrB(2R5I|xsWpbHNI+34QMNT z<)Mtrp!3WHHP)Ysphl-!XSpHaud*>q^v|WhT(oYS#Vw9fJ5j>dXHwLrubIUuj+mS%;Y&2BsGS>U*HgkZ-9|rr z83tw-bJxs@nY)_XC?TyzDGAwoBjroj3kuL)~O!RousZ%yLv`6dugFIyi74}ThRgWB9Osagj2{1IjIspdiH(oXk zk8jN9B|fZ@iiM&9WxEpy@N3gTIrHrg54GZ-LEr&K;7^l!YNrG@9ug9^{9$5`g7Abn zEa@;viBhgOJ+M?C@_!Bo%-^n=&V}kkI#o-5ep*y{@BbH^*D8jQqDqJK+1J{+Toa9$ z9KN-|DnTJ-;6ZX+zul+mHhzdgdE4SyDKA;vcx8tFxy9+b%9%yZPyYP6Z=n-&3cws% zikca{nhmd5F3mQJO6?napQ``FA;4i7SXaW_?FatdocPny;ASL6TdQRs;-~*x93ntC z2(GaFl>9eChwU+-((oKLgQ-@cA|`~(Ub+6j)w&>Ok$yPu=maxjC!VfD&4egs56q_d zeqce+J^Ccsql($3azinD*PX@e;FkoY{f87LeW2XPHRW`$b^`%?8_PMM zQshU9`EtGBLm7DK0kjm_pV2HXQG}Ww9zv^Y=!m(BA^Bz(sO4rppTjxECQr2hCGW}J zrkHy>qbaLiw8Kh7d70;*LUXLn`~|4KwK|I@)>Q85zL$6~tX>8`>_K#>=SHD&8ky%$ zQJ5B}W^tG-JFbU3WkwKnALBT@Ap}5&Aa0Qs4-XN|(YJ%byN8EUIVhwci7wgz!0Hx> znIO1Rz#+^?KMF2Qs=MBK5VBM`i_JA64dwVy<-|%Fk>eVbX(hRiqk+C?zkkQ?*lAXav)jm-?IdYRg1(Q&(cJIv(wEFvE3`D7g zm`m3%wcO0ar#ei*6atR&w(RgoS`+O;0(+%v)c9$3( z_NN#fnDC)i|JN?bwjQ4e8=dD&NHe+<%1PKdaX?&I;uQ%&ATbnk21K5%PX5(t$?x() zRmmi6Z9gUX z?2?l4a7$X%Qkw%wHqV%}BU#z*P(*ke9>Lpr#7^YVBSe7Z#M?P~guI|04nE^i>UFW< zsL*ZhxAfC)TYf9i!xw|H7=1x9?n1ZW3t*ul3*}eEB0VMOX4TgY(6+1n)}B`34m&?oio1`8y~`0f0b##YM#~O5EYK9k2=%+SZQp z&)=83_2qpj?|Ef8%t6;T+)Ukj^k!dZV~G-PEXv}dZ+Vn*?88zM-U-^Ef7XLrX--?m zy9HxJ8o^?Bo+w)q*oXOy+49e*=!v)QPhPMmd|mA=i{BJ+{ z66cSebD<_=P!9Ez zlnhKocB+ViHIQQ$-aPBW{584Zpf-7y!s<41RCQRt4JTeLG`+IG;{5T`}8 z8cM=bl%;T~p92axvZB=~CtEMY2i1ek2YgoD-+XXiyg49ClBT_)V+XcZ7$FX9XM2X& z`vJJ~ba7#kE|u_z+h_?o9O^-lq06Px<))>vO{1;hsGE+sZX`NgLEAei&)a=W)Mq?E#1m45pmz`I7rw-NPK$*x-_ue& zvHwmBn`|4;OBwqdU{M{Rp2M#r#EO@c3zzyi$?T2)W357fGt+AT(yVgq3d4(%`9W6(2g84gr{89cLaW$4lTFE)BArEX`V8^#V>d08rC69CmM=fe@8-@Xx3te8gkx5bUG>C}8xVOUgR1@SVMrNuUD0 zPz5|VszB8X1vy2P)!zqD6Pfy|zhH7gd-ANRMFii9?P-t#U_E7>>NLIG>~Ji%hpFfg zl6jDjDns0INB#6Mo+{@b&@C^BPaVaKhzTQRT$klf%f7nqko5fZ?3Cn-ry*Vc^8zb9Qe{6GThqZ zo1Hv@Z(4tmTYR=t##R4frN*vPDZPe;WTCVEDv*LU}Ex23*2 z$=yP{(?Cwa$(KZ`mme(N7}c{50;71t=ni(VYjg)|xTwBU9VBBuCHBbWZa~;Uc+tci z(t01W=SVId2%J*gcmzAQ*N^+_V%h7Sy*}-)jWvg_!CxMlKB1U^CHx?4x~Wd_Yev9> z=DHe5mAf22!(Y2A`aqk7voI6VykT|+W&*=Ba2H7Ys-(^y8I%lwSf8t$pqZFqxHgVw5S$&!qI@YnDjqeZMJmm9SUq;R8- z9xBcF3?gR8P}LQK&B98sVOx)o92>RvF&jT-BzPOP38n@bw85L{rbfa8b~Oqx+|wcc z2EdSD7r+>dH&*7`oig`g;V*y~;*x-2DVJ6&GwJ|0_%K!(@&HjEx65j!d}l4QQP0UR z0(F5F)KdHj|l z%7D#9lo8_QFTp{D&1%hP^I1s!6x{IQ7$4{jTPqzkl6Niv+M#h=Gds%^>LX@L zA2rD2LVW_401t!?0i$P&Sy5-BzQXuMtZzo|Mc?BeD^y@sh;0}|r9vh{a{&*fM`$e! zB1bm9$?#Ai2=Sq4hX4kr9V#D$o}m`;DLCTaKp(7goIXUZ78Nrk^Nr#9tWj-XL8Dq& zC=1uXb0azHUmx;oR_kPk$w!C-KpGlsj`cB#b3a_aPQAM!R!EyOE z5MwdD1GvEvbQlP>?SRb#(T)hHzK3>ZN3=5#?FbI_duT`52Ex6GYdW|dwS+m`s?|(V zY?X6!Ytffhq|JPKpB|#urmScT#KAFD#CK>hhzxr?Wl5T!bPeXQwA`s1lWwQdvd|5R zi0L+5URZ3REpAT-y*xIXp02Dfnbw4a3!#tpPmEf+Z)w1e%bKKQ^pFf>c z7y0xlaD=5 zFVW@V<(bhXYFv1#p92!Alje5XfmiX@4KNrlnCNM(P5DbzfJO^$J-gqYQKz1<+~t{; z!UvSZN2U$I*FLwC4eTTK7-P>=QLRoppn_WK9>{AYKe3OJ6F6be@&jm#LulidW00U>lZ9?CS$ z!aSh|rS=oMc{^iD(?3dPq&d0t z;GWDh15L)>cmoQNJYI8AJq6>g{vMS4k}e*3cc>}0VnCd1Wll;C*e}(CS)02!NkD&o zh;PV*b&3U>tDc}n#e(6t)8_BF>LGhjaK*OH2h^0J!nidKJ{%TvP|ff{d40@0&Pqx) z;W_iWvthKZ`2^ptUh}=N<{wWpg4@ETx;8!49!<<8ca+%XZzdkE^C((F3-d1W_GT`- z-)M*0Ff_HRR9%)6v`VC`wsGE9EZQlD*>~`Q3Few`Tp--f)c349 zl*~f;ZG{kRMBA>U|0AipsL0sV=%o5b=hQ7u3ew6$ZRadiLeF@9CnM0>rO`obREg8C z`L;-|2S42!q8b8uO_$s<3~2CUdH+{io=9Rp4oAHbC*a`n$SG!c0;jl~pTcvR@t%BZ z)k{?BS=RU|{5v8pxX^aZy%!}Rk6C3q$a&1kC1moNCqVeAU!jA3K1HdG)n#jaD}k&D z`Is4MA13MD{=`BsGU%+nBtk)M^+)*HqE8k%8&fHUW)Vho@pP$2R|7H_qQlLsUq@t(THW=V@)@e2tE|p!{O36 zr|8(FL+aF-S44p51T4Ay6~JL1>H(^~Uc+Nl*oM8kRDx*k(NKI;fJX^*fTskqGWS_n zEK?FjZO8wTJlAf;Br!T0T`Fk|F-?l-gfu<55zAABErBRh6p;hAo=IRp1=S1h70Eyd z5*U~AK<;-DuSQ-y`@K<^BOAQb7B7Eqwh86ul~U2Z?zBV z`TI{}-K-8?vD@(X9bqmT?>wXu)zDBt)Y@8Z}rpjyP6BR>YKQ z70!wUDdkh1%g;cr`6f-5}t<+=(Xm5lDax#k*W}6o51kiW@VI9SOPbLbpbJU@DoId1_Aj1H_9O{==i#q|gVm|#J+u8_^Zx$&M$7zKlIPwW zIt7*zXpTq_a?Zgr)ZJ0jx`T);>Aw_WLqCzB<$#8tL9il2^lHUt5m6t?Xp$sIQjKAT zADemOAA3RQ`{8E1ylJZ~|nz%E-N$he)5$Ek=RQ9)sT@hX@W7p{k(G9}wdTn_2@jPuw z=ufaAO>xf^K`7YSQN)tf_2CQi$nex0M!I5QE85dLU3 zMINqbA{$(Jw;!HgYnWxKhE{H3JhQS&cNOH53at+{@hkqWJo@Lv~^ z4Ciq%p$|ROm735JJm~@JNy1nCfzklUIA3d$&)F2Nrb(XRt=pOs-*bvB7JGr3VI`bY z8k6vdmbjAE9vB2`E$0-yco7x9k>>YXIa%V5FEFBf^TSx7Et=^=RaD0DSx9*i?0JD9DN38q$meM(II zl^1D^0Dox&aBIJ(_62IYBWJpU+wOL2Sp;tnkR~@^V9t{&cCAs3dhx|taeN^EAAyGY zuP+Tf^*v&PtI^OiymcC?ao~PiudnvOgS?GI_d1c}lU41)J3}2i&_MVpaMFaTAVg_hq-oar)r=&pYv|QD#p_PPWlc*4 z=;hqgj;SRCU(C!l3ap8HN<;OT-|Y+cWg6;Z^+ejt>jR(p)jl{~e{e1)8}*%{W1LYb zOFs&WsCjRj$FjQnY^CTN%>4&yD6mu5l$XfGoYpHWcIREUL=LM9-)pm8t$NRZQ^4G z0)u4hv}s0Wr|a2SBzox)xJ!8X6dPs4i$PCVjgl*@R*2ScD^;;0ax*m%V_2W??Mhy; z`C@r*z$`8>l~kqTKjVS#TNl5RHRFTt;*TBpjs(~&n^|Y@bgoYr2A|lj5Cs>!mvXne z?P{|QeBWGo+A=KjYJ2k~$*fMY*{ctAFxyr&I-_%awib4Z%~qY{W2Lu>00^kr>LP!u z4NE>$!dmRWcjZ3F%>1U&XIjd$46YA+AO8;7-qE4J>ilpXc*x_p0f20%o?=G@F{KQs z*l=-jT~vLG4ZE|eO8AO~#Mn?@iciL8lgNsQ!Z`Ez~eK6dNu{uGf)8UY+!c z)eG@%clH(-6)pq8VP5mr;%CDp>5R_xnHQIuDdrsv^Ma3RW724hx|s!;3qE<&OaB+=6~DbJ(Kgl#pnOmH2+&xpZ_hI|1Hh= z-%@O;=bsNX|J&5M&Hpx^|84dBZwvFk&G?z(xqwS^{^!m;|Ks1q`B&$Sde|nk08|!` zASIYI__e%PAmz$vOQ}PLF)koT*s50Jfl7l1&Bvmc1-8ub$5I3e4Hk+8&aV2}lq;)O z+7H$ek`hbh?Q*y37rc@TlYR#&Gz8VcC23;kT^Ve^d9iwazzJ0ra6*0;Qem*oFQ5bG zcMuf=I;`ix5)7@ygBG?2LkWi1x;WXbW!QR~?bFP-Q@gNhg@0zO)<=87N%T&VR1heV zqqsPIKor@i_1&>nf-8*{TcE76vZztf4stdjh_qk$Uc{C(&+?dmp9Z(;P z^~1dK6Y6_bjA2sezc)kDem<~iV}4>?#S|G|*jLyR-48E}hIiF}RoS1*l9ZWgDP)9d zm}cxzw}whkmRnvu_J2s6JE!_;a8xmg6uk=57d2hS+;R7oA^RwHXZuI3Gbx&!p3>Zs ztCB4XM~2(IYr>C}+Z}zb0K?FQU!iNu`hY`BjhoBzEyHzT%ydbtY^U`Fd9*FU!g{lg zP7;k-2;X*kHk_8CHf;F9josNhYADjWVw_tF^)TCt@ULYd*e3EYivDK0eE$M(_lWJrj3_RhL5Yetj>zf#8ViHA@0KFOm zHz>Lmv`1^PW~%pvPOw*91!pJ_CNQFCkT9xk?9(DgDDc_LTp&Vqz)&>Ra%q)0lAs!a z+krneW2P1OjQQoV84GjN4IEE9Kbk{QpNcMsGN&~g!&|yteb=a}2Napo9{gfH@d=oE zH6?!46Z_WGa-HadK{>VT598ga!L3AplMqs@;5b3@Q;!=yQrN^o}j#6T?5jy^aaf&s<|LWO|#dhXZ zI`<4Sp~)79;N*xAO$xc;V}=&Pp~Xld#ce;iVG6;o+oXU>3WQNTPbc7n0jHSB^~JhJ z<*HtHA7umK$5h$%Qfw0^9bz4f1&R5L@OQsB&OX985#}DNC%)8! z0r9gwNJ$!vBV&@UCPfaJmVBV=1%1&8p}hJ5qW|Yi+3J}(9fX3?v#Y>F=}bC@XFux) zOE@(vWoxz(VL2-kfvny_R10Q5a9LjX)js*oNnRp?P%yJgq*>u(O1>m1hLM4!@d6j)#1?b zFNr$L2J6>R9hQ&sOQ;TS`ieS?jy+nu{vA+SO5BDzi< zti#hRW|W3zI1{YHZ5}95lC3*f$h3oXcxHU*!D?XKHmri<7U8SOb{kB>EU&cpKA40< zRkcZ&J-DXsYeS4R8%)B%z{GNvx(kbglpVP1cHnNX1H1hhTM~0TLFPcpG2$LzDmdRAvIb<>&$YknMK?fVAQno*tsZ{$5wZ4=#D42$siKbC1 zYnVne8Pj>RK1@omczRvr0|=&3FSg3$wAL^=GHgZwp0+6aiK#MQw@;N{E}JTYUOg$8 z5Y+WJRI45n=3`QC2z~;AWVCEIjg~eU*9rVGS~`m1>}0Qa>=_P&=F}2SFgCS=XrEl$ zv@(}t(;7_yG*9Y&^#Y3ko_?li(!Q}ybSIJv9l-uZ#~Svx8Rg%dDM%(EOWTawJv^7M z&`Ej5_=D-VHbfcj2TL1%a(1HB)~MXAQ8R8bAl*JGc7UuI5rMH&`^b1kY=Ti3f18#r zYam#<*nEXsc3BIn5(q>j0 z&ECKPCLPlh=a{JMx2dcf)2!@mUiNJ|CMIB)nX3SccEX39HT9H*B$(F{lm&y7NvfV2 zbN=Dlc7Hy3Fqtn0@r+DT zgmutb(=yi(bFn)TzN+q4`W0k;XVHQTV*z-x z-p99+Q2P(jk*ln?O4q>-_u;O^v_E_U@1hK);|o{g2^@hzW7(=e0s4^(o-{coMgLP1q8=HU?WDT8l7_q~3#3-ke3m@xevJPxK{Pf8V%^!0og#l2?eZu6QbcU0&%c ztLxUwva1X_a{OzI5?(OzB$nvK+f0J|15}Kzw6d>GlEr=ZaQ$n^ z!N1QnhisnU49wvhZGN?LVTh!9W6^$;6B_P5AxnJM#8zkru|+!wCe?j&f4HlbFNUE7 zE;-UH1rSAvVh%bVwyJX>GUY;Ksv$(CNa{KgBAkp~`!%M-rluM~WU47d^j&U#4ZAWS zGUY3)V<;t zdf;H$Rdh>{qjX+vOyGn#xuU4Fa?|s)8NWm3A%)bDKbs7Vk`;9TPuHXBV*HgNC2*`= zk?c}y+FO;g{hdF>!NEUeNob9-sW`eD;6UP(7bll%pO=><{I#5N89)H~r6a#^ZWuLi zPL=y!_A3ttM;Yzz$u4CtJ7h$%li0wuEZiGi(7RFNwl`P%dy}v6NZnisGPJ*lO6ZeF z$zER^U$ddQe!aI3?L}tPH}7^|&7tYZUr4?tSI+tZn1$8%-i!)o=iAd{pIuBM^jL#| zw3w2a9Z2gN>vw1HJjbC}zXK#@bDcJa46@$h?53SW{bc;&U*tI!0^8HB@h@qz-O2(m zeTtRtr(GQ+7}DFrE_zk0m_DJeK;-Dci1$vTa9+ zPNs?6olL}{>}+k6P2+*Gxf)TnC*e7V$C4=SK-qOT9DoTO)#TERNZH<%^HTO2yRtH6 zYilJys3}`pE4i=LLrXLu@(+}4{ddZ?Wa3aZo&H-i(SV%__<&s)4o3y?i*2I$WnYnw z)U~geXuf<*G|MLE%gIFZ3x79EG(_ybCKCdk-udm;CD{Tl&tmGP^RZY@@HYHr86%M%T(NSesTx z<3TIqYNVBI)CkYD-nu|tp#!br0$*=kFtOgE8&NCsuAEmZTVq#N*2*r>6bO1@iZ0Lq zHr7)@FPXxPqbalgyH>WbUT;+|y&vbmuzHRkKji7m_wiuI=z%u#6jcWkiFWYp$qOYF zoLAc$nC8&-yxQKt?AQ0Sy`k=#6nW+Jv|}`icy1i`vJZ0a=0QH0+|Ofn6x+!qy9%+6 zV>`L}i?U!n=+Sye5KIxagy;-@HCW=wJ5WzIjl2ipyshywv%i8 zJCx&KsGK4Ft%Jl*;<2+TH5{q@^M1Y>>s++?L1ScEvub0<*ke|7J?-P_Ra?R?8ls1L zmn56CjmvAZrNnAw7&GL7DT~awf&rOwwJszZW7x%IW)Ive_y(o~7_|mCeG6BiBQ9*A z(-|zNrX6g2unK8h;LY`6Cbu28vK>-7Ab@(O(_zC-1s1|21Q802mOa(Ka0@PJV$5$L z@Kx!MEe#lzG^|l-vnhpPv+`Hc$v6rhI4Ij0u<2xNy))cY7i4)@scWfBq`X?GYaETY z#;$=`evG8nSFCVXXV#$So@_?p;C(@^TjyvLGdB0BRe)n)2hL_WD40yS2|{=+mjgVU z8GXjKA7PK@K`Y$0k=ALTOiV6KfYREf%c4qA^vngRP6bv=-h*q{k%J7N(&T_Y)kI$C zRRvz?Rgq67Ruyr7<@#*Lunw=Wp}>g--e2QH1M%W{F<~VT7U!Y%c{h2|LzVGNIH63P z3CA}cs+(5EOr`Z^M5}J^LAMHsZQ)5f=RC0CGYCzxFl&EkEi|`^D{dZf;H~1Cn`;iO zdBPXH*@dP~F~HNsF{O3zwKAUvBV|F#RT(n6nk^l1p#7Z9nk5+uWigfU!P2W*(%(+qU0w=F>fwL|mAv)gxQgglwV(p) zxml%eDNFkrERksCk)ICcm&A+M{yrz?Vq zzZW{qNte-hgH36UI!TV27o&t2q^FGu@92AV?*mBNlc_RH<$Q@H>N;}EitNB{x~Bx7 zZ|A3YbM~$N{x*I*Rq)&V!Oi~j7KT2DRqV}~KyF{YWuY7We54HBGllhvZ)Cm z25zBBs$qVY5^#rPze<5SnT0o{<6=)FvEtAqP#w+_z;B6%!+D)*$THc=5>>wkJ7tLq z_ZMlKdRbiL9E-_GMJ|-6%~TxGXbN-;S?MP3lL|b7>Q{~s1(asg7&zhpM znzxg@i4(WPwPx-S{W5i=wYD;+^y}GM9}17&AAaxUmzOv!-kd$CE8JsgbuWpqe>=y- zoSM&2FjPlMbMjDXPqviGc6uw|PzWXPGHzzMzpM~D?Kxvk)>Q)_c4W;A#3T)glnwjK zq?*1#2iO+LQLZ<#YS;Pvi$dWZmj#+=;X~$OkpiVm$bEc-! zb0?Fg295Wj4@_vh^@D#%O1qk1HLBhakN`NCoyLgn5|Uh)DnQN$Pg(_lq+)=wQj{=l z+l2H#lrGQCDo~<$3Pr7)it`9AsqeW`_8y?%$r}Kw6h<=9}s%U3|2_D@413*#e9K0xw z;zfD&!uJb#21Tw!d9bGHcY)1bisf)&VU@0wC~vo545JwQJ3Y~P*Zn^Z**6)dTA+6` zt`%kbNB?Xd!uILR(h+7=GK7E`Bbf>Dfq?cf7W^E_xcc38bSPCNrT%!1l@_TL(FxO` zeJU9NBN#g!dL$22VF9UoxJQeahNl%7~KkDHD9!$~$cb zsn?&Ktv|~&)1%Lzk}F*Wy_}y=iCtaJyzi5isvPu=0ya~(XT4cjK z87O0B_7JsN@P#;_B>Hx(b@d(kV^S@;C6j6t8!SYdG9Lh7=-FeB)Y7nQkt|&iFrW*t z)#7K^u81%$+He9TkkKb-?*TNZhOtr$tvN9&L3LY)kZw!;Q)RU2d+06QTNc22+Ti&P z5;lieAHp9Nm+rcIG4;?0UH8kbVkHhBZD|=OjBQZnk?+WeRsMd68xr=^QArvL^1~FJ z5E2ZnCZG$cw%<{9U6~N}=_!U0R#i&Uz}urbW@uTnQ(j0S%%zrfLg6X_)mV#Wu-zI! z`z8oW?=Mci8pr*$LZdZLuGRayg#Si_mjnNR@czx&TWIoQHbyDI|CBqFKOIV*fl0fw zn4Z+rxFi*+m7ima5>A*==m8yj*JY{Mcy{|EeVhNtePNAqD}a>OXg zcw-?sF&5_pD`=Stmdz>Iyv9+9*rf6CkBC|oWI=OY8KJ~RClHGGqecyu*(><@b*2wp zr?op=8$yjT^+?>L-H!&#_eb@Odg?C;RzI&jvkC^zQ3XWgE7r9C-pn(xVUTojU@SO_ z16ibK%LrRtv49h>WvVKLM1c<&M|BRl!^uuo7X~x$jBbxRLD+qb$s?*s0vxdsU!3b2&Ui8VzS*EB;0FU;eD=F_)&8ajYB0A9?Bv>;zD`lBr zjaGG~?@T3-Sb?4yNmQW5m_$vtjiUutots5zJ*UNoWZr!h%q;bZv1t-B%WG!FNa)(& zKje~X@mjWf%R2I2B#jrdmmx)8E!2)QB z{IXL^5&RgHxHrB)yl{h*647Og4O7i($TkAOjaOq!{bn_ofkqS=su?G5Q(*#mgVa$s z7CXpn)kU{IqHbk_kLJ{drXj;5W&;s9+RvU0`>*J7yea1gFgVeaALAlt%uIQ)X5b1+PV=J+Bn_ zfrb?L0nBd8q`*iN3df@w8fXQ|F&l`fp-*ni^1J4a7x+-kBFBmc`&y6eUCA(UXZbWo zk9>p$!No~Z4oF4J36%eQh}E@9xcof-eFqlqZ4&rLhtMmIaLn^>CkrkMY0`Sh3XoN1 zmbhknksMJOBRz#mnpNW>-epS}d0p;lNDf{NmE*^1Byz-*bX$E~U&j9G<8t3&oaR z>E6A#pz~l=^i3-j%_+LLd!;uWIN)OMWatss3%aJp6I}1+noe+a`AI6z9xi9A&BvDa zq^rb9gB4!1slCWgEbdsTX_zm25D%UcT2pHS#dHKk4OaSW!vHX=gGFH_D}x2s=}I#* z>+P%+UaJh8=#W)Gxo$O3vcjFg>U>UUtzR3oHoP`yZCn*v9EYXn}lOi$dC`}`f{?4c5;l$c{@C|wEenToS>ltaU*<{pX$ZfMEvym`crnAapbP^Rjg%6xxUJdjqyQT^_Vz4WpTM- zk~hsMl`_jr@!wK%h`^H0u_Mci!E?#^c$BiO<*(Ii#M@Mv7Be>y`J{usvFTOM#ExhC zm;Zw$lA<|F6YO-1QbL4~Ap(Yq8SBkd^$K?BiP4y4*^Ea>%bT!=A`%fq`do?F`J5Bd z=_PW;N3=q36UNNu96rH7t7BHLJdFIyF?(uxZqKWX;f(c$g5z*)d(&NJR6sde?V}dk zn#+tmqJispbJbTp^KZjlJ%4&&Q_m=>7vpOaqOa6cNiz(&$KRNAGsK`p9Q^_kB`4 zp5m(dU#ge%K!po3NNDlS&!aTwZDDfuRmFS4BJoVp@aW>Xl`bX64bdssG&noy`^`pP#)$Ggip4h(-4PC;c<|E3e{#T+I8Zg$k&X2X^2t zzw=Z|W#6q+8ry?=ZR6VtXKN-J2nW}&APn&u)WGNa4~3? zf)(Z}-Z8u5YT?+CBV`Y+st@GzChAmM0b78PWD;n*tWwFT zIx^h9{4XO-Qk3H!id+nwkTj{|raWh|m96F`pUo=>!cmfMtEY(q7`#^)$f+8FPrEup z3j$HwVKpS9X<#I zNL}ny3VLcZnWl|O^P>lcJ-TFbj^{bdE*6PnN&;^)%R)eDc)-V-aP{T zK3-MB>eCRvJ&26Z&p^BY#3&RNb8&)zJ6b*Uqs_C!e7`qpLEIj zh~bh>E)bl+slZxWa*DQ&?;@tBdj3HnEFjZ4+luM=eZDPJ%oxsOT zrLc!xc6BLNgjnHt(jU%G24WnPJyZ{D>ul1$t&R;b+kkb}suUq{c1LxB;6%|)=HVLj zix=LIN7$%waX=2uX*6Ufd|N|`wc*6`w~sYc!vsF2vE2&*ty#6AjtV-v83a$gv0XGl ze|WXm#@B3&bECtkLSu89dvSkg`d_yC+@{qlA7n<`I@|q)EN$zc!1|<_qOIUXkX9jb zFcbwfg4K#J?1*NrDmqctT*(t;&29V?Z_aM<_iy9JWzDVr;DG;JM=c#@Mn|82t6dXY z$o}vTDIx~ywHRJ@30P8~xChz7W=+n0!EJl9vNftr^bN%qYiC1JS}rMXs$`)1pc*Wp zIzXN<;G!lT88(77@-h%DLB?4)HZ@sL=Q@rB522i$>d%)68yyeL6#RUv|KEGf`H#m_ zh%-+9GZd7zI+Jqb8%K)trl$Kd#t6X);l`;S60(2{LKY~Z`U75wx5!cx@I{Cpk%cZa zFmqnWV!;eTan<+qWPKlh_4UDbvRL1l$@+xMud;s@78Cln^urV5eGT=Qf1cR9Pf#c1 z52zFpCDMZe1%yZHMu@KxP*u`9Jy;2-uqX=Y)k@&S3}1ue*}CR1U9X}0EEekemVV?5 z2M4zKdgSka9qKciKH$~R9K6EB26#``jRf$Hfbbf?i*96*ma8`R!t2_cf)XQgpD?l1 zAigs-o~)Vp%v-@{!n+41>-)o3U!SQ}4^dIILHxZbc6Pe_70VNM;MY)JzvQ`!D%lk+MqLvDX3A>w(p>89;sU7MP$Yj$qkVEu-T^P7x^oi$0f zyDDeMH=9-W{Fsn=ceQn9UbjCIZg-a66*~c~<>JxZSQ8o~-(wf8|wecfZ%EaQh$48J<<23HMie7}QTc z?4`fPJz6h@Tgzqw(?Z3xI8KyHpXEOWS)}U#L(~M}=nOy48;lhg4aae%LAnZDjh8w= zn}fF-5}`M#KI}nOsWEcep;xx{ONgPAv9NmZUxQ?9jQok97T!*@PyyPgzFujZuvKQ) z^9c`p-IM3~z9kb$HN~Q<+Hymc7VV>o|7#ugofaubNmGnMu>jfisKETNhC;l4zp$&| z)aq@VPp)g_KI#9KmT@6$(IVP1Ym!sz)N-rLZ<2XIeP9qnVkhYZYb`U>wAGKU_oG|) zg9TeE5V8Tu6i}8Vwv;2q5{R1*AzGd1=>5?uWfU5z#h!f`T|739+CAzq>(uKGpjbUU zRM*biF?6L>dsYL;qbUQhTHEQ}A0*dqADRzViIG;AyJeI4>#1P+Zoya(TNR?L&4%p& zQ8#^c1W`6wYG!-qgedDbC9R4OWpO60%+jpcL<91UrCB=UrGR?BAJOqAfzOhNP=`bc$ zN@KIq;;Z^@!A~gq_!_~<0hu*8JBFa$F9e*`dwc>}LSF%(Ys5?$jFwi8mI}s&Dp!Ww zJ?pb+KlwO_1t{3kKLN%b)(WREQ8|l+Lt%9+i{LctY|(oTRJ8IP_CO-6abZ;2xU3R% z?Rnx{G4Ko(vy{G*T(`(Dt`2(vGZbL0)J7nxX#OkuloCnc;k?1<4)+2^K3V?=ms-G# zz?k=BJ1!G1aq}69TxIdQd}DS4RagW!Wk@w`tY?!h66t?8R?YIo}h4e{(wD_;2i{ z@qEQgFP!l%5AR$2w&y#2MEew@|32@iNqXq9AY$=2z{7;n8vG5S3Cjs2iqHhhFq&W| z76?s@uC2I<*z*>x$hhj#_xwdU!_w1wp1x6Flw@L9nz6}I-msSC zw~R)aR-!U3@m@0t*Mv{u8@YBC)~uT65pj^O<)N)W6dBz?5W|~}jFsK$59{061#W)_ zyM0gn>Q`D5D5RdjF^GVA(osEzu%rIu zfoD$=`X*$7MSm);=zyavK-Qyys5D+ISRVn>i}y20oRS(!)nkcdDhA zu<uUPw5kYSWQze-wAIpK^(o>*agyi>*s%Q>*qc|Ca*5+kt#2=IiUUx6lcS)rYT6RV)7T^uqsZmTF zFx<|#*%G8JOy}r>d3DX(uih9uWTs~u< zrWur^gKmEI-CD>;;AD9UW%(WL+{7+bJr7FR@>kvo)-PejQgFqd*Rw)6c_)sb!7*;r zI=~KkSGJ%tV=YqcY1a3vU?!K8H8u47ihWD#3oQB3T;91NNg1M8Y5(sN(#>_VNl@MN zNI;@iB%=HSQ1p6zbFG$3qc7Op#4Sz%WSX9$@&YY7e-NFV@vhIouT-&biW${9)PR z^t&If_Q8?1R~xmC(v!Eg_M-|~%qm(gzA?V+9aKop^itWazX0}&XOo+uVoO2~8L|ML zFK|ctnnlCwm2LAq!Gp+S0e90gxtjPz>xN&L*9Yyud`@G?CY@XZ%*|QHn()3yn2lle zI6vm*d2TlC$s9EBGw7{3TRjDIG(}BMO;J;e2dh#zomw}<24J7kMl^qn9Sxd6!B$O0 z!Bvl!RsJ+0mXE+y^D5ky4?kJ-axOLh~joLBEaQUNN22M<&*w}Qxyqwvp{lEbP!ufOp!t%H3Q zcbLYq{p0^=xp!!8JC^w_ruh~AOSQC>%5KAuuw$c|%t!!>1(%c7N??56sCoj9Yy8N0 zh*kqNN7;D9}aM(vscNL&^zQLJbRUyeat&qMb!1zn=W^BjV(D_>0w*u>WE#KtT zI)a>7jYzpW_f*3iSZEN~W+Gx4<2?V@`;NfNF5?uJ?bi7KR_5h6RWA*~#4NSM_7ofv z7a7V+I;K+3R#F$IH6wb1Ds6i7vT{1>$*PGB8bvgm2PiIq#snQ-1g(m?74*=*F(_$3 zoOfjwf-h18f~^tsR5sqRYGj;{IO8QIpo7(?{_9WuQ3tu-N2qD)5Nv}N^8P=Hm0C|% z*Pedga5T}Ln}(9{E?*!tP=O}<-@Im}@~>Y-tq)~cR;w~CR2c(?Pm=e$JyKhPPH~V; z>0@*vh*;1{1OReg(J!vn22C$m;?JSRUNKhb+Vsy?F;<}`u~~HhOo>hhceLP`vg65s zFf-XxY|yy;Ro-`7WaD~lQ~?T$cfr4v% zQ9#QUaem^Dss1bPS@v+{-WaZ;e%l4%3QbELvtsTUtqS$9dY-zfzo+Y{KZCSu?Z^W^ z{e^b~uv$kxLS2>ZMhPA14}pU%^@^l_s^$C0vG~+6KzW3tezi7WIX9Q*87fni@-fM& zo}kVyK1>2Tp)FZeHBh}{>~I&0%5L1vV~pEb0tHx`n4b@ z7csojj!^?!1bm^%1^0`$RDD9tXQBDm(2_c79j@DRJ%5;231c8;5Y1mE1X!Q!GS#1r z@I=ev)AgXh6Aeo5H7NRL0I`*htk7|k%UT?|xpLLcPtdNL&@Wg(EjCX(uY>l=21 zYEFGhsz=#xL$|z4DptZn?G)ORv8dM$9s&)|3Zi^&?6^t>?_pK1xz_kYtP-=6EI#>} z&%W@?`#$`emDW(n;@OY?>U-{c_B|iJla*C}vwfeGT1*<&xaV3iXgt9nLTyR)vh`2V ziGpeWpP;+jd#Uji9ZjPyY1}e@aV6g=LZV?%zF0mldV8TO415j8VVg$a}3ML@bQMj5+<^$lPbo z+{kCo;)$`PNLqus#Z((x$Bq#lVbEjW5ZC}v%|phlgt2k=Jf1+eA`80-|tp1Gv|-!k)JD{wP2)&$Tp!IFB& zT;beGRuP_5Wck(e`7+zCXo@n$jg^pZH4fE~$3RLWl0gtmze{M1jI(uvuoJuV%Uqb*^J88 z9~dCreEO3RqyF$+b(co5O)1uf`B|F4mtW@ocZhnayIr@cI0%wm<1c+cloi3gRq zfT!9d_%ZK=rb5O__7+rllhf)Mp1UZAH|oV*49u7T1_o!IVhc7>Fz~Z^aKKq%+ND8N zSv?o(2ioM$i8ojc=+y0p%Zx7zp-?7Af!EA!)FR>+V?A;xE$dMI8R9ge8#wycIptH@ zs-8H@9D|U@Bj^PlUggJ*mgXR|=R#)&2wcrh0x^g-eCl{-yug4C=N5o8pBkjzB-OKA z*&k+>VYrIKRUF#nfD9Y$p5q7apj8R_2F}fg4Ohdh}5B^(+uTBT39i3q!1GMRpVr1^l-81OWsZB(EW9 zgoe<1j2Ik*>)gR+k=%G}g+;d?7N+H%PC2c%(qek-Pz6A%o!4$ZI&9~>g-9Il->$oMJQ_W0oLIP z=lIB3dsZf9p#}4e+h~Rov%cDgp9d|4m^*J|uY+wcp(f)u<0J%Awu6S??Bm8i)uA97s3>QVi2PYFv<6e$~Bv9i7J#_kPO~$`y{xI z{eKPP1EpIEPExhUHt=);p!(jiqyM2@*_5wkQG`ep?+73N(&4`}g(#_h{qx^((`=Uq+7`|*@EZj# zQF1t1tHMe_M33&a z##u(!Sw<`0pD}gL5iskw<(cQlb^$49EgQ1;t;}uq5q?yr)q->cIzdSsS0jF7jb6K5 zFSgSjT=1y$2(2*)TzTq~j@zgiHu~!2{ID*r-%c1_eymL7+s}!)$@YWY__txP(koaS z0VoqdB`m0V3XC&l$MDJ=Ae zh>X_kTJ)aYIGbz!*eVDd;~bH8myzE#258urxU)?hFv<+5JRFE>ZLw$tH zrXosV5g&{bB+1*PNBD*@<9c$eyIL-Zo;@*Ps{H5>3>%e;u6PACfJ9S=rR;-kW5lY} zK96l{I-QG13Q(NsU0-&$;}N9)oaaHky5f8WA^nuh!Pl3NoX{C#bJ2y@386C=&)QTh zHXHZ{X-X&~etwgb9&jO&f2x~6{$w)OGD`#-$X~0YK>orXf{2-FY0SbQK~2fe`NL|h zLH_h%ocuE_;+*`$>QJ26ouT|f{!pPBZje9NWQ({4`KL|t50OF64VEwBR9Rfa2?70I z10t#RDRLD0Cxe<}%0l&%1ms{DxPv7Pky-m0JJB2%Z_HF8+YLjv_YCLwHLP{DhSF1b z-O)m~d;kx22Rb30@^JEit&i37G^J~n{dUa&K{28H8Q$0*;XN?sU#8uoiF!TKd_b*Q z$4P|^Y`-qw6yZlO3SNgI!PvN+PslTTB^JRtcr?S zT~yXZEG{doqTsHptfE#$)D;DHePLZzQPFkx;Zb%)S6!6n`}?1JCo|KQx5D#$o@r0c zJ@>qy^FROde>>-vl0B)w<57(KQnKGE@I(|Nzm#m^X9S*#V&s>S-JqDKqZs+6WP8eE z_9~z^>fDXxftwZ38^zpI9@wXV-YDjl^1z)6=#64-FAv-bxwXM+06>v7{$mhCEKUK zO;L>eQnEW0xFw2_UrKh50=Gvo@=M9?Rp72DMt&*Teg!@m#mFxu6R!eRn6{m5yU93F z@Fi1Go0 zWwR6B#Ug6-5@dyTFgzmzG*^gB8pUr(#s@}%dh~S~^yk%MVjJn?Fkog`F$~%<96!x| zcaUMA;&d+DA<76=-*6`T5F~suC#-BuJSp%nrqS_k<7Wx#1S{8JAc%hswD(DRNKTnh z$)Ag0fKfsVqcCCxQ3q*w6v_IMYhk0%po#c)>^JYiK!Q2f1N!2!Ir%9=2LEj&RT*Jd zM%6Hj)FG;-f_qF>lXJ|dBj?yKD#$sivkML#4i9NDZ8HI{wkrcnjhdt}j^0U5zLZo? zl+X^OG>Lfk0ipt)Ctax~OaKuAMenO4o%?uZlmY&11B zK|;liZ6ecoQ-Z^vI;kWaD+84XZ7tGTBMXBWu`;|zk>OYwB6L)c9?XI}WDyu6!+b|8 zN6=2w5~XQEu_6+RH!)Br1k}`8#>SP)ueI6_!n`@4E|Xsa3u;CgP}8;&P>UJ|2Gp1m z4^t&m5WTK}g(L+fqMA%(|3h~k1gj(qk}w3U({SD#);<)Yb{6pih=*8=@`YTt%ZBui z2{$^-(+-K^NQmqZ#9`uP-%vi2h<#>CG-!?T!((C`3W_&;O-~50zILcW4Il*sIzR?D zhvbE(z_19Ra{2(9NYUB60-+e@i3VHpQq@pOL@^SXRwUw0!yoLN1Jmj?`YOj2r?kwJ zrd3rLI@6>ZDw8~^VY`h2s}O)LYlk=js-}OaTB5d5Z6ptlcdaDV#!HmR&-Qt*umi;? zj&nCTJ*zq@owVdoPkdfv4)f{my70_eVgapXoh-!ja?ZwAPwuV@-T0Ba=?jrnIIpET z&OYQj69bHLsVP_$tjgU`uX@Ve|3*i4?TcOq zIX&gHYAutYIEK#F2{TCr(^IroBN>~wDwMHLLV1{Un6bN+KreHT&~QPsCxr(pFjM)u zp+H0ablfd3`+Gk~lpnjZs^G#R8-J?M-7qpRVLB)hxUv&vTmdzY*YmbJWpV;#@@&Go z*@?F5x*0(rM+D|I*+m~(9B%2drp@k!Z)jmn&nKuCKhUM8YiO#=`G4xyP+pT=NovVST(X*ww8TtrLdSYIpD-EeuXIm~@G~WV$Cw zG&iLH(e<`m7#NCVnMR9?jfF&U*40LH)3LT=b2?firSDV!ps7YcD|0$9pNIvW8j)3Wl3k%F1KJD@&=ccpH*M14*zh3RdZ#0_b@qk3vJ?q=>9Ae{%TQY&HB+ z7mK}ucfdvk@Bn0O!*CeILMR>M5q1~9{r_$R#NjBGda1T3W^>n@;Fg!A2tYI{;sklyEkk2?Nr330@Am9KocF3N+PgJ)Fkv*u;Z!xzmW9?gv>+c>Gm}6d-jI&vR+jso zGt2XyFKbUC_xRTjW4>N!Wj8QyDPb~A z$x+h?>$VfXhV4hUI0%l=Re_v+KKdpm%o(%6gJclOgZmQD3}Hg2xS&_gm;Fvc7yhPm zTV&ZofJK<*IF**R$)-24L$Vi6 zy+b?M_Q^dQx;-`-A0wl}E$j6?z>)R#HD5bZHhJhP8C8iNSIOf6Rr+F@+<92Ia(WNZ zi)2uXKnyXJcUj+OD!> zJv)lR-XvCmLX7=Z=W<`T_LbUDeXBeQ1m%H5DR2OdfwEC^irgw`rIrdLrHVv?SvNwsinjDo7RpL^T2}fUsF%>dP?0(>3K^QfEK&v= zC#c~Jm51#DwC4m=XmkVD6F+f}4L2pT^&q@uxeMd?(eo$^z@Cs~CU;$Ah%>=H@>RAb-JZa7IKeJaA}ZE1>1m;tl|($hw2% z)GGP}+`$3>)0qTIH9+?x5R_Om70nN&&u~_?@JM5g61}+k!JKjRd>Z7yR>(qkvK4Tu zldS-T5@6Ljhygf%+T#G*hrRdHf>qT+a*ERJg)tvId5 zTFs?ce*11YGvx@K%7NA*uo0FhKAhymGRk6)l+;oO?&wb;=Jf|Rf{oJij zWq0I$lGWQEf1k$>&RRdJ_t#vJyYH-| zpcdvHmv_IPyYnCMzm#bBtnPrxF~Yge{IYIGj^!4$OIP|l`G&FeBH4)jkMELxLGCl( z!~0;6`{zgS?+%pRa3t%IGE52#I?#b1qZ9wXfnTBcmm7ZBko{a;?g=gNh+ZlW9SCpt z3zkG~oA~;Bserq4t^rn@+9H<*u`_c>nKsOULP1NrJ$Dt_E-w1YK};uX{}yN=D`EYC zfM<>6W{soMvKu*AvYeQ<`{=?npIu3~lqe$HrLq#Y!=_z#{hliUV_LzUFXllcOOQ3a z!bI3u=M)T$wYIg;y6S)6+k3y^@D$i$YQpma49gNiiJ(ht`d51tqFdo=vwEzGszqIW z(AT;dgKZ^ZpQhN?SE3iuRhKEQ;)2A|CX<_jroTQ&L0B`ONv(~2*RqF+&`#z)cI{!Hx#Jlh3HFP%SX-RQ}CMK~bC;4-g$5ajD%oiD;YEr)Ed1&Uyjzm?3 z1?Q-M^GD+nxMtkmx43WJ5cy6T0A(d9GP<}VyPFM&PHUHSQ6r^mR!s99=!-RzvFA=n zxfyv(r$wX5(KNX%Dm5ev0;p1f=YpGD!u@P{rFj&(WfDHNC#=mGElR!o9b^{+}!d{sGfxmAyu2jy`?EBcdQh8W6J?mm+18wh;g zA~y#XlFK9&%eFR8z5qQHau-pD-ouVaQOeUIFYNSAm%B!_=^c*S6e-1MeOR;j!$-T zK?|6D`r|~6$Y@+om_~hfeliRCPN2w!)RIPTk)_S-x(9~RG`tzl7%Yj~Rn3EM zV0tym);uK>dJpY8^e#l>fcvOF6qRhW10tBf*?v^Y2hsv)bo-_-U7(?=arP8ZW>V4s z)&l~t1cgu$t>dr{_JTg|F(ePUSJ#qF6Vp=97>bv`_UZxP+kMvx*%$957o#vb%J*Jq zlow8kTIjCy)vz+@@U(o}Oe$dXvd97$agx@#)lGG&QOcs-S?ReQC_o_#6x0C$gLHA$ z2+ZLgutvZZNdOl$g5n@h)*7Ksg+xkpm;HPYUzP?^U>T}|DzOYfTUZkdSk7hC9EwKB z3ScrCyp3=*Yp8@kiPi29UD_L^`gb*qO{$bi+b@N}xmi&Ohic)qB2=3wp<2->4%J$$ zp<1ad88+~?`%V@`8LA~kglZvagld&p-+XDI;|bwY8ye&`1k3O#&oMqVu`Vr*Q|iJt zn(h!Rnoh(ChG4Ucoy@?u5z|G2CM@+NcbJj;57%Fw<2yI9Z>eEJ4D1|`h_)l`6IPm1 zcI!QV`tT2bJe|Ae0JoHMMP`I(l4P)AS(1sS$>i5u-IO8kzrW!VKb$#n2a4p}`@afB z7V&5%rOK>++?!~siv68J5)Tk+R}h8eSa~vKkkhj z*aGAvB>39h`%XAiiojCryXmjqek@6Jh3mme;@)nWc+J&!u$mINsdgDJ`xL^DTu8L{d02@X!dOTzdjixuMy~Dmm&nohM=c_?RhUnc((b^Zx3$tiEG%d zMYDQhBGmejNf{pk^;ZA-Zyx#Lt+#&e!S`I-@I@6NBPw41UDd=&KPj>5Dqg1uig3w2;xdAo zPfBdODhzl(nSAx>H#CxVb?_!CJ^h9~Mq{sD^d?$-%mEU=_z>?HT=vo0MFgXR+w)12yB9>H*%;Rv<=+oH~HGE_G}cZ@8y0E zI|A0r&DhcK6^+jfH=I;Jy@BfGE6Q=r^h6_ERk0TaS3x;jWpNFqJeyrLKaZ;MT{U6C z-Kbf}d0E~YqhA_3EXGPgZ@wlrp&c<$-7EzIg90G!CEj5Hc-JsbtiXM72)HXYw z?Tj#+0~@?F{z1dt7+GoCG{qa=tz*?aXWC3IV}_}0eh?0<43Y2b-yzrgYk#(FD^%4p zoW^)oQ?{%+;gKC`G~2w!NDbHCP8V9jtfLY{dl(_3^59aL8e&9TkPb4X)1!PbJPpi| zO@|6CX&KZQ&FnL!OHgLX!g~*-4?I#q?w%Ts21RZE)o7EOm?4H+oeq6feuc zwQ?1t>oNRPX*>ZdYp_ncsllF_XuwdTGyYcf?O%i2u^Gu zd=+;AJx~J}+YB=vIY(-P1UTmoUCzuxNwd@FS!TqDo4rOqSVfJ&T0x0>1Z(E5f*v4J zLI`=ZlLF0jIEFFd*GV`{lmo4#2XV4Sz)2t*IEbZY6=POvpy;wxDh{;dXk<&wOzI*N z)X2=ch+`NB=>8Vr%465Z$0JL#XkMlAM&n?{^2 z?qG2igQd-Zxh$sspfQYy6l)-_TDRuKIMER|Hp~Hn_h+tqI;}fS%-_y!ddUF}XCi`O zGt-eX2N8MIlgkjn@rMQRAt^jVLl>0hkQF4@jh@xDW1v){Wec(s+{vA)yD| zx~9#QW&8mx1CGtWO;C?W@d}$}RCp1l^qFZ}900mFBtM1|5|;rT$B0XCreaC~I| z3hj5xnkX&n=+-eO4q|*_di(GEl8hlOdIB`UARFrxC7}r{$4+kwh!FZ-U;0GMkm055 zpjq-Dr-oZ)=9gaN)w68Hkb7qw2F<+TarS}+MT=?!FaSm%0>t>^)vm%InrxCh^u z?7_4{_F$Up0k;yW2h&^+rX8{e^szpi5>9oUnO4ymLN9q|rp2B4O(JHJVak$p$2I~W zDQ6GS45|-=H491CF+69z2XE~uo0bMrJNCXXW!j?DA}=H8;U&vn^bdrF-53B^34%-r z`ZIuq8$)sd5K}Wp5mA*gq>9mhyW9D0cG^(0j`i09%-Z7ZYT2~5zlK|qpzl?h37PeX9N=-9{!Dcr zvaxr_YtF%j*#JX)E>>7wY_Ny-sESMC0|i z@aAkV0cnB>=mho>FvRHa1u3+a5sE3cOgKero{lry013<})$mmkmV#z`4P=36yE<34 zOb+U>IDql8TAFlwXohc|O@Y`6!YLYOWKh)F#8;5C))^&93#gZAZ3wvonX(&bL8b~#P)yH(ID_yLVOzUHYF{LJ;(+gox7PFnbNT6eRk+-~6I@6uM-3l2V+k2_5f3TXVo6+6`+ugs~J7R?;lB z%>AQ70e7b0C7fj|lZfdE4G-2R?mRPh^_b5H>KWujqg6{6L+0FX(&u{sgG8B9Sj@WM z0yC5ZWg+R*dILRg=MS_Sf@O)2Q4R`&h#;p3=uD_sO`|~)nl-U|`jkT{K~PFy_PL;s zssxGZ1hlH61ng;|Dy)QbPLwl!a`2|MvI;aDW$T{!ayT;OD4>qfs0PvEj2hKuuukYA z!h2BU!h6ETUGDR8*do`AvK(yyIa=s*v*bLiy$F-Z5Fk=IzAd4whWTW}qmNCP<~Nwc zd?dH;OjzVjF?d~or~a8DF!uz~5-G3596Vn3 z{3y?FjoyEU=eI@Ah=I|v<@SF|yE7WK)tmxEjc7+0&ZT7TNAoD!Y2Bm&+h#ANiQ8gN z3wXN3o^(`mqdn==!#aI|jm`*qxSW7i@+FMPwy6zqJ6UvU!^A^z8~Domv$nz2r#86y z)P{93967MhaUH79ogG3j>gs!pMdm`g3=jizT|>axaDZstRzs4yCMsNniU$lYfYw$6Hq}-m#?!uLWD>9(s2CJ! z`wYZHvJpVkJ_Gtp(i648_L)HYj1}yIskG0iv#J8*!TQs;H4}8gF3+G!ab!(c-3o=X zQ!9;56NCvWz+7LOOsQ;8i2ALth)E=J;#|_=%gVP7X`dxZHSO~cHHbOinUgr)kQ$J0 z>w{ek(4Ua|XLdHK2oX5i1I21KiYL>8Z?e|dI))b12JMGgE>L6_M0o~-j2csmI9SEh zK+g!j&~AO=jj4y(q`*KIUQws)sVP(Xqlghrhf~DrGq|-{7NUoqE&+>3dJFxTHmOp5 zk!(Qt474vf3Qb3HZ&jIC$)hPEp+FzbKqu))xkye1Qcyog!4P9P#sCNtu}J8vsJ7e_ zYQt@+m9dgRo>^glw~MkD38TY^gs;fn8U&aSX|t5>i0OcY)>zO4cTtxpRwqJruZhqY z}TQzaUMGRTHBIWC0!mwOoTPQPJcmZ;M1*fM_YchVPWEuDj+c z5jB=qBu}99ltRyl^;XwOE?<$Ku5bc*BZM$x2ubZQc3h>+7YTH=R1LCsh_cHlH%f|d zQcYzrb->x!AeIkh*$bHk5v^|3a)NUe?nGjNRlBf?ItKHrWKrzC%VOLOy2o?lG+lvpZ;!yaP*E zRwO4aF!_~kC_ZTc*z8b|s~a{mN6FR68yZ2z!lrVBDtR1g0I~?rS>lhlp5k{%e z2XpZPiC2WR5*xJ=HtIhM{-P^Jr-1N{=gRH(!eI9uJDTc+G#kF0T+KlR*wl}`iTx@I z%cps-3A5y$3=^sObIsMf-6Q3nD;saMTus;`(!O}Enu z+gyU6t)1nwS=mnH^=0j>o=IN~q?6C5oq^d#2lSO@V+IJvE`b4-eFF44S+)80gw%_h zDzc8LtrOh&tb;n&ZnJ!k5;{xYi+pG13j~{~Bgh4SWQha3O-U9Dm?PMs5WtsURFZEp zqK_v_^QK1jPt5?U#w|H*df79<$jqQnl`!2RPdlYH*rt@ssyuC^ZCDRL7?tg1#gJZH1ndqq74bPPol z#o%H>-)LJPg)vZ@C0hg|1bD15UE@sC1)MZJqozY31{BXC(Z+9={h$~)7l0?En|EiS zSms$)bP|1OqLMrG7My1?U0Tl0AJ*;^JAg%Nm>hFAqgisO5J`U#22i#3Un`x_a>SzL z(fH^@RU?a`EVV91Vwh;Fk+IAfodlmia8jouWYx#X=~W+P6G$I%kN()7?ZJ}n_p)D1 zjt%c940ZMQ4(}Q&jOGW2$A`vx`->w3`Q2S(yGIIRqxt?Zd)k>F7%vpA9O)m;kM$1^ z4dn+5#odG5!vnpAq2a;qf#IGVBpxc}dlcO>JVdBxY_NZ5tT5VJ=*y1}jCGBV_HQfn zZ{0RF)<0P2*_Q8D&Bek{Z(+1=e5kjW@9iBe6pQ_X`K<-})76_F%NMSsh@t!d*{Q79 zGul6*D)M7vqy63EV})XOzGuhQQJUV{)iXRWOe@H&B+9XSczkTUyP(I>;obRxvE5xG zh0&hE&={4J-sE==@}?_p04=)GjSNjz{X<2H8!U|F)u5rmt}Yud8;;%mLp=lIy@f6d z6?zAYTZgG3KQ=sC9LtYVXdmq#=pXDKE9M6ZT_dCYJ%!?k^?GDmerRlXuy1sDkmQA) z{*iu~K?%k25o#(FU77T7tY;fdSv+1GUCdDD2Nw6_N4E|y9xZI`FOH4wUR)gQS=_H? zH}_C=q1fC%yr{jeb$M@FTX%Q9by-VGYv1Ccree|d;_%R-UHRhRqL$`m&25&ox3G9{ zxVL$<_;J6%>-IeF^1$<^;4{jF!I80WY&a~AciWtXyZXnrg~L0Uw1MGW+z_w_NIJVL zA){ECCN6X-h3fj2(eXllpjhzY_j{uE;{yX;Zr>Xz?mZ_yTY1d#K*8XwtAD6(*k-Ee z=Bq~#%;=2_?C#DF{o zKR7Z_5ZD;3g`fCy#u?wEP3_waVmH5=y-9gXYq>e zmX;OE+6&9t@w@ZgZFwfEcX@YTUu(;X*7jv9Ruq=>w)eI#9_a5L%`?&Y0p{Q4jCt=L z+RB`H6Nv`z9LoFyjhuQIW%mGs4w8V_#kTf~i~D&NFjLW^)N={tKY^QtTcd8`>%D%l zzafJEuqQt>G&~k|7s9b^h0xZF!w6@(2(5hst-?Ux`XNwEKS5!UzQSl{sAa)uT8g-& zVL*@K&L18sc;35`4YFqU7WWJTz$2gm)^u@k&#uNyEF z6ITZB2VZE&vM)0>U^I?QZpuMN>)=y=s6koY)*3C*XMvkD z4X>?nDDAxB*5^0>3&YAqRO*QKbr#bad6ivo6}@V_FuMDNRCB<3Gf0SwshS2+m$oE} zMUbRhZbIA9Ft{eH9|Gow#`=MK8dBMhsDL#?JI9x_z3dc06$Xs)7DSK`VjMJb#PiO} zHW=}A1o$_mA&%sE2JUcZh@;4_pJ)i}880ObaX)P?ry=6Ky}S=cQ>XTQ(L{2`;0F64 z*oU@;ef@=j-f+v7b@dJ2G~Qo~uXc_P?HB_6l;RhP6c{apdEC&jdtD^mwkY2&eD!V1 z!Z4apaT?Fw@sWZ49)Kb)m3Q|MC)%>Q-ktf;en5zpRn;6tsP4z2y#I->{>9}uBFYOE$PHFH&@tj=%oA&oGR1o@G3yx7L4v)iL7|#^v(^lHPG@L&_Tom?3 zdB^ZIhUID4cf9$H&g$RU-&nlbEMew)3l;Eo zEcHkGb~wqzg@aJiA_}_;W4j84p|Hh>#@3dWs5RlJ+v~#-$L596Zdc-zI^9mQ$faXb zZ)t8_(cDr+BF2k6CNL+H8(jy1E?T^8T7!22?d-z|j-O^OpTPxF8@v=QgUjO1g!URP zg4Me7Lpyrt!SJBi#jQZKFq`;Q8|wb<9+7BUhj*Smyp!ZRhsO$VFC)V+lW@5g@M8Tt>Pxd@J6p4 zUrGT=IZ()ty2p!XmD_`N7m7o}`EL5s5AEM2Ua@OuVXQ=!AvO@gFGBA|?0aD+JXBGP zbu>?gMSDbLO%iXQkiux!aGzt=AY&r}v*?xsl=i?tSNvQY8Xt7bUa{2Weh4Nl(W;%I z3;qJmJ>u}K7Li9v={Oa~>BsMSMhoJFCSMNqjahS5ef&Ho3Yh5`h}z%^Qjr>s-qHN7 zc%n)bAFO4iNbjZwhxhj33%A~luQmDU$o~Sq_|vaN;fL|Xy#Fh{_M3l;!cXBh5$`hctT6+OfNW@} zphaH2vL!x4tffWYC9bzHrq$CkFkCEjMY$+yvrFYfb3D_N!I8=Lt0l4w=|2{H2I#vX+Zk*xx#299m)rkQ zq+>s8cur{nsatR{^(jd}8%`_c#Y(V3^6IA%G6~5`D8V{wW+nBxlsZIl$SuPGc*CRT z509;tlsBded0*bgcEaWPM4cW!g^Z9R5{>?XHl9nF-vi`@T@Njgxk8+iCeJ(T=mvw# z5e7}r8HeA=^J!(_3wahqUIabaC(@QRNuM1p$@}ttEhik&O^%`>VR?K9@spG(_$4BP zByVV68U@Y*VQlJu9YQp31x~A24!wbg*nT`eP+8|n-bXpt6|Rh)E*$IY*n!X);;mSq z5oJX1Ci;Oi?{#`zMi9ruWkr8ZrR;J_wY)DHqXTKv%C?n;`HveaQ z?O@NM)9{`ojn>K2_*x$|$GE(BSQ69N z4x=d8Bu6;J0ZX|%XOip~>ravv`JSG_$k=3fl>Ut)(4KtbdGDqj;?Qo#7f15RD7+z- z^YHEroaR<*X%#MqTa7ytR~~m(6t@O{Elw;#acjR68e8+lF4JI)77(m=4G&!)e*=QR zUHRQ;6%7}pDw6^aP_BN$0)se2Ox`eVjW~3n=gFbU#q2xS+86@2TUHnn zc$-7VOI?mHtd++X_K(AHeC)^Zwl5kDG?`}~c{M(hh6l*}c&C-UKPuNT+Le0T>NJl; zX@7{Xadqvk+~up=Q{U*Y@KKQ;8v?}X;`mj>Yp0Dg&WJ0VK!JzJS6!ye?=N;a5k{f6 zs}F$!oR@1!Nw86Rh~p(th>AIsfFqg&L>=~2CWD9vMIubmG_GMtI=0YejVtGejIt@> z3;y1Kef=%#^d_W(fgm`Yp(x23jZ2k<;G)}Xo~6+ z6Kg}F*>g{lT)C%cj5Iv3s_k&$pJ?knAl-oz7D6?An(FH0lhc{kEF z_3gcpzc2DXf-ji)yD0nxe8JzBBmb+B{|$WY*8hmFF?a-DYxh6!HI~1}KMFq{i>a@0 zW8;iOCIt>LeBDgE*3SpE;OkXjI_1J0azyclQYvU_ZW#zE0x_*wpgbbA)4sz z<_e8KUW@*-Y3(qF-*W>q}=7QRu^EXVPV{iNES@~VpYD#RIaNG>z6%t#r6NM1x_F7 z+U4-hJl+X!3I-PPEL?3s<5o*tw;O_&jSPiZMVE$iDf)@wW! zT=TanK|5D0Xo=rH&U;~g*tk0TyvO< zqfn}b7Zebj6)~6V44bK=i@GGsdLOpyu>cBqAY|of|S)eD9s6@e0+16OZ=;XeJl?N7ov>_hzck}#b zxWgIqo5-)9#{50FmvYSKE;{&_zn6OAKD>|Tn{n#HpO?LVKhJ*=y??R0&@JTGPks9U z?xpP8?+(_tGBLsS;r^kJ-DMc#qu5s0*#r-;2u}~ki(nKC@^Y69V)A)<$Xo9n&5o*j zN!p1xV;|+Mqu+mnn~96V8du>+wPE)M>lbD#S1q^PNLkuRF2Wbp`9WMf z-}`vJ4fi43i=EfMB(Hv&*V}O~$#_MU#1GTvb0{;mB)09KKQezQH)A19Ym3_>a`?g( zFJ|myY*;R@`!MCGEV(;y&)0hBF4~~|?X&or>vHR%IPP)cG!F+@4{hOPtK)8`<7-^w zdY_N=(7Y(`GW=QOjl*$$he7(L`9R^@1AfV5&%H^k&s#b8wgqLE`uCXdGC9rz-9 z{sLblm&(!)br>{#&zLi(mtjh{Enmd=3B($!hIgQ-2#9`CNc@gD9YPUoCH#nah;*TS!saKM2XmCAL<*PluutgI*hquJRF^o zm7z=+Wg=)IY@UF}WesLjHy>ZyMJvAGsWN{URZ>xocP?pPLE7rPpWxjLoY0%LrN6~} z68Cqw!$cE@K5(D|94yBHEaqfUa64_=Mt#TPGPpB`$1&U#m|)w~8@7eryD_X}L*6>J z?PY7zWOKZZ_6Dzqc1R$m`PA>(@KJest*tn`h-c+550}TETotdd;)jO@c5}9A#0*VB z6E9;^Qz%0Bi~4s15w={pmfzgv4Q4bF*Rd)pBj&$9ML6ERKFt}sUx8iU=s#O;4s(RN zv2^1YS8GdjxTJd=qARjj@NS{Cuck$R9|#lX_CEPMH--I5_=>VtgJk-~7zzGVo&9=J zNpCCfp-VfeQ+}0+UzVPZ=6n0EbgHYHIvPxE^&#sm>fg|$=9 z_<*d4g&#)?gIFvg9dWJBhrJlj7GVa5`@+}3=2D7&W%-q$7pv3VaeQ2(7%Hu-I4q`7 zkoK~SfZ0hFbac0wA#FWQpcrHjejsIC(ypr$Z`EbY5Y;Rbp zZLQ7A-N`gFv^CJZWMzYQ8Fg&LEx{RcR61Z8?%KxA9s{fPscvk^9a=(}9p$~4eA=a0 z{sqppK3nebK2Fy$Gp{SW44vBAKNKG&^%kAl;7MtI748UJJTDh+Ufc0G!tqY{d7k66 z*YiA&Go`<0wazVDYzL5~;IluF#s{(8qldpb`fz)5P*hrmU|LSAL@-~Yd-@$_y|Hmh zmF1(XR2B=Hw=HW2O3H?!8t>dmy9%`9N!Fre!DqAiG zV2)FBm1Q2ux)Jf2JK$7Ig%sV1IvM3JkyhKD+?R0{!Ks`3d5*V|uS~vgdw^$+soYm_ zBh+8S?ZoZIU4^?A_jTgp{Qto7H*gQ)UaXwxo8;9`?fe$*rDTFPuC8Q)AENxYkDun* zun&HD8y+V7?Z|CDcjZ|ZbcPq{Qi+Orw?m0=Y~dz%dKxRc0stX)aVX@#%osai5#pR{ z9dx=JL1JMtDKs1_fRrG>d~b7jt~fn3N1PcB&n|H51VLAUqcGeFb0y$JO3W>7m_cVtW81c-hxrK2z9d`zw!WtK`+FjU|-`TG=(3G;g#pZDHuyiA1 zTsvTy?F{`Gmt#o%B4U>;Lkq)Q1&s@m0~)DLjgA_PWQFSp5U0V0xQe2u&=_7^2)EH7 zDraPR)P0S;Np{&a>;?{nbe>74jTVN3c`)==ibDD@h*f1+9M-vhRFomsqSCLZ3moK! z=zA16%0RBZJh+DQ{n6=xC(d%3HIeZWs+7a)KN9{Y+;?!_#cA*90zmq81Bat1P5E`@ z8i!N+heiO$v0->a!IyMe6=!z(Fg1T~LWq&j(J0b-q4-QTuf#+(z_b6qq zEGzS_s`h`QD*Rv+zJR+@SU)4ECbSGB8`Fg&-o~??%=qPj!9j46I}9*FJ=(jqUx@~a z+G7Wdn58jmPTV}=A0xelG;zK&qI~EvjY*lc&RNUM##ebI&ccy}dnqB`OxpLy1rwP&we z|H^aDJ@5Pt8(($7rp*^#bnzvZUY76f!75|xw*Kuq1_pS9W=6YX6XFSZSe9y#%vr|d+(nE8NWWF3^L44oO2(Qay_Lk%PCBBrn}w895K@w-gLe@1B{`DxXut^o9J1a zqRtQ-P2y+LhYHCY5fAfT!n;@)(Pi;E*=oY7Si@52Jx%6A98o(h zv%zt4^YA4#h|AnoxUy8>sl-Xp6v1RK&4r+m2+9;4P)M>;C{^!WLi!U)KdCU9oR1rb zlaOtV_FsuEWlZJ@kP$$re&0?S!S8+e5VlcTP_vzfGs0L&y@!ccKjU;Uuc=7?+ z`g(k)Dspln2Q)Dqg1VM?_4Tf(ymtH*xKnXw;8x?-;2y>4XTUc+5OP*onoOX_sokJa zqs6gi!&>B?{qQXDDCffgG>6Rxi9qbpy&X(;u()R{@0FW2oFB1VYodGF9Mdw{EFc3} zL_XXyzjOYU=2EJ>aYQhQz=1Ao2p62y(bDphi9b7Q_1d*3O{OyzsJgVs68W)w!|5~QNPSFAxyTIZ6*(5X~HcckIQ;} zU~i0cC1u%2#!HZU8uNg8QG!QUhUWM^Le_5hzBs656F-l`FKKPsAEVNnH`v4)qbzbA z<_26~n4;NE0uzJ>qndao;B2?`_iQuKfbrSld#rg9A;4Wl;w9QdRd%x+s9;e?v!#(9 zT^u@Ppc{}DP`AFpx)LVX4#*82$X{sN;bL z^CK>!I%Zan#!~hcbh1)+-}Dqviqk^VO`)bo_#!k35x9QCF>nBIdt#0z(M|t9C;&T6-XW^HZvp?=yOQ=`s z7TtRaPV`0`zJcfVvhW_B7vfesH3_rRXI$b97dqVavbB|2i50iGy>~%-RjO4FdikcU zSI^r=+j?m8zv4{M_##i{S8{UPbvgo|7Z(>;w7LUQ*C=}HE^<=wR;w$w|6{cDH{}Z8 z1E8WLCW~kTL|;gqdJ!o=AhN6^nbK<1&i5##OEG_#qwMJCN_CrQrnc(FCN9ny86V{a zox);A4xk0;>oYxa!^I6|{Vymz1{a4lx|;tuyq9ObDYpM^djHh(;-2E1e@RYBTjKEh zdDfh*M^?p6TDqmr$wJI70Wn_zH7F>%0|X+ulc_C*OboSfE9}q?kRF&E%*AWt{Uc(# zn7pLH+gw)H8+q1xi|f9KXRYfvd@0YG*EoD0&*FRI@R>YIdKQP9c|HmEGR&3$!o&yr z>4TJ`Z^hX-#dmSZN`;-OuTKKvW^du8&Rl8*zS6D67tOvV#`IjL6K?=Es`;>eQ8zY7 zCB=VfQ?ikDmm7!Pn<+>1V|BUlt~CO@vp>8HL+~sBtC7j=|0KZIT857g$+>@-K3qW` zMsdqAOZhu8-g|Ue&I8tLc@E8R9G3oNaamaFKoAng3!|5(S9nfY{0FMy6<$ykuXPuf z_aUCk%fE-Pbc%8O-|{@aDlFa8SZ$k(#S)XJcovNP7H5(UcF2+9 z;@*KlldWn;ZEklhj$VO^@B?2a3x9Mo;A&gMF#zWMeY=eoxA_mZ4G-^#?x%JT5vjZ+^17WemL8-I%c*qK z^B8HQ*A~30o;WO7>T!h2=j6W${|*<=b9BIU>0XNZ^^;e_p9Aab8d(uf^ahn;j!m9%`Xg9(I z(Cu6DV_QN#WuUrs#euyf{TA|z>RFF33Cuct)fvsT*`rk?TULQiwKRXai|thS@9s1NO#64Vk1s! zZl08_JNdh}m%i%P`Rdp*#NFCheb-yK1zxTY-}T1XuPEPD-EOR6-@!D*JnE}XL}T?D zNPhCP7rKGxt~#yBZe0(8S)W*1O%iitntg>`Lf#;;r4BqV+2c;lcM^!}U%)%2-J43; zG5k*BS^Fp-pYuZfUJvdIUthPd?&|RB1q<+BbI?&@8h|G5SfNbq0sT0^L(7#dd@Z2` z)ZDVPWm!vm%kq{E?&5E0ZEbC9UDCR=by;hB>+;r)))j3nZLMu>ZA;pgwk>OGZ(H8h z(Y9hq%aYb5ZA+FcS-ND|lJ+Ibmvk&yv9x7r>(aKROO`HOx@>9t(&bA#mabUVvaEGk z+p;CgmM&YitbN(?WgW{_w70akwzst}XU>QE-ywlktVi;}tnR*0-pmBylR=1oRyN zSLQnMsBhi)+FNDopwBqKOStT2{2oiK-0F8ZIqyjx@uvR&1o#{H+E*UJ*L?j5 zAF%OkxFTR+@j3~eL}hNVb6fvPo%0|Hqa0aFhYK77dy?j73o2E2qeT{9QukJT?Q<*e zC83V%Q3(}TB+4G=-$weGW$6!C@F4G4x^gpV1?R#~3-J#~8wny8^Q9I(?g2+`Xu`Xn ze4;G{Kkc|U4B9iP5}THv@RLC*oenaY+Mq6#4W=d={OQ3FsUxS)@Q(_P4vv{JH+5|0 zcz>S1J-H*eJMoF&zTlzY+rfA0zgzpg;QPT3{Kry14*o6qi{O{xlgZx&e@Og~Uq654 z>E~~F=dHJX@bz!|v-f`JZ$9&;Pt>Gq+fO_FqF+D!?c|JE?aME^_}Y(r{O->!d+dle zzvUgbCZ|lDe#A+wOFP%BUH{7SH}n=R|J0}F%uQ$NvNMiuU(tEzUqABCwafRu>&|rD z%G3M$-}&z8!(Cta<*zR5e(LFGHf?_YUo|T?7QtRZ@=TtkA3F8`)jiGM;+UF z#+p}s_>Kp^xi5Xp?4}b=KjYt?_|-FCc_10S;)D|yEa~W6_sVlOZo2TIOD?UovG$x;ayK-H8{Rb4upqnX^xvJLBlu^QqvhDaWMiYSv}u z*N$gbpMG-9%2Zv=t7`mILn1Ztw(jHBW$GqA{Mx29*}9r3M|RfKwJ%H_J@NOa_HL?Q zS6jDs&75_aO;gsV>n47?w(i)(+3S}lre^ADR;25$Yd#ZC($iN7B;NPC%%1O^ zT>GJayKc!e|Ja(T$;@>(z9qRMH6>A-Zg}^Wvunpro%n5CF*9=1+SkpfpHY8t?J*N? zzV7VA8&^*|YR|^wYicIGdrIo`Mt@{cVs0ss z&pP+Ci7%a6<0mgn%~={;H+5mMxBjBKiH~<2J7r_?cnil*FQJv)__v4ch!Wg1-(vlKg1q55fPW z{uulz@l5T&H9U9efev-8{+Nn`fIX$!L4P1pY@dHq?LImw#o*WERB;-jhK zYph#|Gs0gN8NB!YH?~MkT$D!;`2>o^%LKlU7wnGCN=S+`v3YsVtMU#m(Q5E zH#6~#RNbtViMpDO%-T$S%~{<0?e#||TW?EV_k$DD z^{Ldvha0Z@P1+Ant|9jA$%)S=<|L*~IV28`aJhX*3^abjV1vn^`%$D{)`af>>>l&BOoATr3ADx_~}GlaGbxAy!GTF zXC?@4PWV&&v?@#l53KV1FE@ILxBFW{uckkMW#*IG8v}47Z9gVR`R@y6A2G#0F>_3| zInhGjf?&RXCLCoeYx4De`?QnjXI-L|GSmKPiFqkMb2{H_Tv`jl_q!4rN(ROMfS<@5Wh3kR zGySRQMC!{Kb>?V|Ds!cDe(=9&TMho4;KGdFY}a@YTSzdeDX-QKe#6WI5&mB4OZs8m zf*PBtnjq24fO}~M#J^xBO`(+6)ldOr4z#H%-(z-{rc!$HYo>Xi0na}p`6}Lf&B4(S z(Aa2YGC}&d6HmGuy``5Coftdu Qg`dLx6Ylr8DfHw{^ewx*vcB&{!zl_XtT188AT+1i(d7-!=e}vHTg*C<&uchM)vQ zBtS_N)MDWIYyy;MnzAUH9@83o%sA9o2^mLlI9_IGTUKC4-xpby6wQp+*s^I`iRE~s zGfK>SQR4aiPgULJ^=s@5n0z4!+;{J-d#dWx+3K8ARngt=e|H>3QT$xI@o;kLRHT36 zQ-{-2`mKMtX>j2#=5JF!?KjU`cEerU{oq#=9q#y>qBJE#0S`HT(0%*hgOLO7o^zKz zDCpe)f-A3PD!1-Q@}O(igFs0Bw`4Xw`kn`xcfaGkCzhk8ez%Xj-W>b=TqU z@1D4K`DhgBcFJD9`@IhwEepT@op-+{O2en`IeK#0ecHeK$dMCwJ#hDZ_a3>M?+x4< zd&URveb2q`Y}5D|^oe-hKCbif4oOAARTjue)*2@$2t;;OL2a|IW9$O6JSQ zCyu_8mYlfj{tvw4_|b2RW&~;G=#kgmc;odq)xMbv58rY3@;mRTy=opg`i>90%k`%F zz7HHd@ojg#^Pao!eGl#Zhv_HMsL7usX)?}N^uMHG;1WRFe{r0)W?QXJr#&~B-U zW+RFtKK5|zpW(`Y4AjYiU)>ULFg+~6CvIP@`Yu4zP# zB%)(H*8fetZnooST2MQ2JPn{I8_uREF`b5&X`@Z|$`%V@42g&r2qs84nOa>>8zV8F~o;dpcyMTE7-uJwV(rc>E zPP|K>RUg7-)b`#JJepUHE{&m=#a{9N*>$q(@PKTjS>zbE~4{JZ>K{=MY+BrI^PN#qO&(?n;{TxJg z>e?vJj*pUUQI_PLV_7`-7fG_1B|D?efyQDM7Jy)C8bqes?LsWi@Lutl{8Kz4_9CT8sKU-_Q$bhHt|U z#>a|AK);)T0AAl`EuRe?3Q$XA&I83E zK{#}18(a?BIwPu|w(33JT(vwOzZyAn&d|y)``5$QFIr zR)f}W`%0dTL+PK2tHpn?c>ZMV`6qb3vQ^KNWtvOLoBNRcU_;TrmE~)_pk)X8&EAw@ zU?DVTN3}J(RRmUCNcQ>14mf<^sJuq|(Bgr9+G_@sR_gC3{_*2Q|DGt@4*Vx4_V1}m z8HCqJOs#&#Wk2gQ;%WNPDosB&MydG|tI@P$g{)vhqv@w6(6kX10xFC0r#ww}9cBWC z-QBJl)`CcI?-l~0uey}}&5D%%O~mtMNa^osUXYZ|XM%i2_?mnkAfIO=FQ9upM0Bs) z3xqU5q9P5EDm_LG6@qg@B_1XSV$@eON~tBu8xn?ILrM4a zOgOrCgRyt>$A-z6kT$}Y%BUfqzb|hfrQKjpmdDnKj_1I06lwQ5hKdX7XX|1LH+$`X zaY>cNZr z`26~0_Eh{JCgI|-(KIIEbbdO%Ihx}d?MVjNbe8PFa+#I|*5M%(-lO?3e-l1BjXjd` zRSIz4B9I%-noM^_nXIASl6v`B{c~!sHz{lO+9|tp|AK&>(J=pyk?h4r*4P>KWbkxu zj(S-q|Eu_Y6^I`U5C_6Wqa2EqHezW0izHW(lf#a~^RO@A^Fpv1b80L;W5YF}Z-TsI)SY3fh*g{B z&qo6Ag+vez`|tZxyfDCT&(iCn>$$t(7-O9emQNr@fUs-GIAPKaDM`)!jxM{0EwRyL zn3XocqaOUN=K~LJ0AKkQjh*D3KqFqStFEB!tyCAsy#mL0u zjA$^;ze;KMGfTH8_m9@@O&8FWTn;-@cj$Q=Ee1WKqyQHx&5~hy0^0-3x^PRNr8UKvte_=Tu5Yl{UE2lRNGR5%C(S3K zT$~ap;cX6=Rs5R_aQJsWSKuGWLV44n{9qr!Xf`=828qy7n2wP(4q617u0y79T#gX@1@*y%f$_CxyjA+(xb6V7SEAf?0ve1( zwwajl1mod5;70pP(Xrh3;QOqRe_g2gn?YqkpYJ#1Mbgym{U?MQPx8mFvst?k2wfv+xkq$|0(%css24K@q{CZ%bDLFS=$~iF+DA}GY zps#2Tawg699owEn?jC6%8RzcBAZZ~TFd>BZh`OW^obLPTL&ycweRvGgeDQeTAUAdg z^u=v%>|EcSu)p2G+V9425ncph-*Gs?6-cY$bd5Q6guyk!DF{EOZs|fE#xYHqiBm6W z4WWbb0a?8(7)(tup<)~;Js0E(V$|ApU363^dsj*B_c&A?ktGxurO)pf2x1^A>0;4$ zy=!Hbhh0(0tf!K0j%$U&qLP_FB~g`13K@99wf`X2U)$Id`d>cbxoV83dU^L4>^m@K z>Sf6-(G+Bb5bklo!s>A8$g5RSyvXBpjFFa2<3nQLxnwkr%hq8FP0Nq@QQI{_77O<~ z5PMuCfP2v4FWKF^7v>a+WWUXEp{@ZJc&*2!>)dKB=T?KMBcXa4I_ID4n0S>UG$fne zPMz@Tt}J3Igr0!@?N!qeSLB+b!fonnff?uNkPoXP>_=dqZ_TkK9>t(9c{CFCX=KTx zSo(3+LH-3EWh5uJyQo<$Up$UW@Y8e2;8a7_>ryy*b--=4{iMvnV+spoyj# zwq?%NOj$&?x>+%07i4(0mt;_$kJaFxa*xOPF5>eBz83 zS0LERi8ojrFi}Ng@IMIZt;10ZtXSI3`_S4O>%t|XruS>HtbWkG9YHAGrc6jEiGqA$|R(H3Le18x2 zJ4~dur-z2?^!!cE$k;y|co6+8X4aE9tNSb7@>R(r<5=kQur_=H{zsKqgnzm09|rr` zgzc>()BXGUjm?0C!2Ks*NI)6I_Z4t?T@5;(|zZxLT5SOf39Ka2J1Nt zaz9UysZ`+SOB!FzkFq|5;^t1RY#OQS2x`-CjoxHa!?js!*iU6)pUT!$>}qagRmYpN z!I`D(k>UDm?U~_*Z05{xPG;E{ao6nk!m4&PN>gIa)147kgtM$s>zbcMn;mU-F*nsX z*?Z?A(0-@nQKQBrHEY^vdJNxi3&1=^tBPO&nq=$DYN|4?HKz;pcdgU1#a#D=rxfMGKYq%KY3!Nweu2k!)_BI*x~E05 z?kiLdeioC-9l60(q=rwM@9$$W2vtGlGT~lN6>lsiRYo5OQAQh)5eRQIE&i?2o{UVB zwxJo^2`)0HGQ6;6Wj5dm)fw}iP{kVUY)*DSTl#+o7c7efE_5>EGP@_)$^|=Po=Z=5 z2J;rFS&Vqu8SQL+w&CHu>40DOkBmsSfGj7ot0=T#FgfQ@*e<3Cs!p(SD#xgyRkQTo zTO0@aw9ONr(-yzMRLPUA!^B}{UB6v8)kLY4b>vwrf%svSgJmIEt_%tuBRTFMF^@QJ z4T?QNrBDSFKLtCqpp|JEp?+v8h0D4merIS9CN6|4ED2|3l=%({Qqkyq;)g&F#sKz3Dvk(ZoU=A@9{znQ_$H+@9Wvy5r4TX#tl*w3vst z59f5ZAIxxBMBnppAF{md%u60Fcqt)Z8exV~h33UIk;nmCQJvYr#b_iF;bh#=wXIyH zMI%wRUbFzdF(_S|CAymCENWsX@XQ&Z){_M>(_vrS)oE-RIZBwOF(`zR65<=&!Yu1}a4G#rErrtxtSeLhsnl#&oGtluuX9&mRXtr2& zl5f>>=*V-B72>mt3wvx+*rO>EzG)LEeAJ?eM!wBOJgh5sPU_0rLs!(|Ba=$pQ!R1- zq!M^3OQe7Mq!Op&P^9~t>BS~MRLlqG{Ff*MVCiulONH>x|JXVIEipo=5MhuSi-HKs z)8jL35}Nog!fK847k(D?IyHEfXj@0pE6)G$CwP+bL}6UVbfSDRVQ!8Zh|MaXhW?AN zK5Kv)QXo}8L}OL}Qna8{mAckW!0g0rhTt{j8SAXs-d^C78=0n&wapYxf z%aZNM07+n6SFMWK1{FaXO86j=!6$rN0hkHW59a;pjmgZZwkCg1H9~p|R$iIjvd_45 zDP{6TyM2~RhlctgE@myupO9h)fq0j4dG^MLg~9t; zoPmWs$qQWNFIOA$U~*H{F5r3lppidhc0#(84hKDg9ZCLJLJ&qRx}NE{&GGaulndX< z=1erlqcZQI1`xBr8pL9vXOL0C@!)TWa2N42geb>E=%xpMB|0|jmnk@E(|$gTk89SK zBFz(-MzP`^1~aY0^zD%WkjUvPGzf;K+g534u#J^?f|uL#KZ~TtJm_^IxZBZWRIq>O z1>CTq&#g{aXWdfv=+ihz);&G!E=8K5#dY>o8}sk}5Hy_*K7YQZdi>gW1Y83ZK1=c^ z2)2dZKGCRm)(>O&L?)!~!VYVw@A7yt8y7sjax&KjWpwBElR91>M{H z(hGZ|(`?ONG5|9)84a*bN^_~Qs+^o*PwKf9{|8zW4FS7IT(P zZ?0RDf}RIc@pM%>YG5=C_HuYi{O6|GqM<0LPM@M_;lWh1+Etn$@agKWjXZ|*V4Wj- zAC`DP+MI)MkVirMj4Y!!$zM#51yRE^m}Y)Gb&~rCv=6JuYEB4`U#1g!v6TwF5O}sm8DsM-cuE;LIUJd|akeW@$ToIluEg9aZ>V;0KHBJ2rt#}YBKGr+waP%$ zbaV0eV1rZak2a3wo_8I_A8R;_KiXjEZGuz+_hNqygd#J$a%;>h%X_k5;spjlMQv!> zz6M8=@sVll$sY=?q+aq?Nxl3<6gpD5HKeMPh-7ZI=RWBbR+ePs@ZHCQFDcb=mlbk}acF7yPfB_hS?ccNZ|+Ahezl@3J+n0Z;HZUBeh74g zMoOTyo*p%UNv+35Y1X`>{?@A|s-+IRcE|zIK~dNA9p-#scFe3bhrE$BS}@?yHN-%- zd962OnHeTzY{}tK3WaT>mWy;s2|AI`VlFFUwfN#yr`6x9(CY799<4qSUppsouYu!yeME5 zIrtP}5K7VKUJL?0?PA2%NF3p94Ew=2{i(>Sx;F&1I1N|yl zI7F4{$3*1UAbC$jWbuj$vqR5bF69~}WP}s!n(pl+ag!`Cu0!IZBjK@QlcKht6j}DK z+!iAe83wmW1@8*^W4HAiPMYl=$v2qKSWCz5q)Wsja@7z5OXo#7|mheNTKZ; zZ9q6Y%&d?n%-s9ghNqc<#$cAlo<8Y>-bBa(X8sgxeWE%fhNyKSg&UJ-XBD)b;6hf!m=&^NteBz8L&1Os9w z?_`2%1puC=+S%F*BPh9T=AM=+$rUQ9SZw+8Q3WY?PDF~*>WI&Q81rT_2tDD^FB&^1 zwc&z^tL74uM&lG`(uU};v5;vhA6%3^!x)5$?;lw(jtnHH<%oXpK#4WRBa$R5TGvvL zZeDQ`j*$%YOCSWiJ zSamViqSZ(C!c&gN*K2mf3{Akq>SuXID3slPlV@GukcN*b{q^@IAg%ulg%%!>Ukmfu=6no{s&uhFQr#E9fQ_=IJPpTt zNXy3dbeEW*WnptW2c3f%j54f!uTU_QGv^nT$aIZa=-s8nQ z%C5O=CYcC^!rRkKdO9V1qyhAKDa7;0W^iO^$sSv6tth%3sf27pr^Zs*m={=TrAB>- zzH}be=u_SHgb{6Igj&_`uEKN;7o`$mQKnGD-({b5UFo}5+rQ;q_`U6GBO*raGf8di;9fsPR~0fXfF?^jqhG}4$YwNYy?Bn^ZJmjQ6N^xzUM z9pYkbs;B>-;}<}kG3utOP;f5`vm!-G8_W&VZAqoJ9O7-)b7!Hpvo^>P8)TFVd9#YG z+J}Y#ElX;uzp<=t-`|LbmKcj^Y^y|lVr;62U1~;iqDhZ5T1dJB(UF;4&uetN`A4-@ z3$`M(HHs|N;j=0at`kgdKfr-eHz`rw`(o`i0@kF>Y%aSEkr>V+3)Zi^Qp)Wb*99B{ynhZOa zwRBGY8P<$~;?yBobCiagqcm&|(Uh`InJ8HPbzC>qz4moBp($U=8f?u>e0E$pA4zzn zb=RQkE?EknipfVoNWSl zn!g&KHjF=+BiKSW>y-2uz1m81s9B0^Mh+>aA>!{eo0a9GMfmi2+pz*2_N}Qf#@q-` z$d?M^A{FLFTV50CqLW?TU`_3ndUtJsfYdUFSfP|g3>%2%M(!6Rx70amv^0$1Pi%w* z$=*shn6+HKMkDtNl8cfoNN&)nW5Wg=D8;!F#Tll!(rwdUnmS=DlhZAw(Q-<*CHb9z zHmAwOeP2pe=r|@v(s5j*&~ZGNq~lO-5~PfERmUm+nr|%!#pyUp z^_d&ZjO#d%8YFOLOK-h`^H?+u7qD1rIlrts^2SmYg{=xa7K@UVW!)7lTCReeTo8@J z-g&g5WsR?@6_wNUa`1P4rJ@jVs$Y)3^H*P1*)+|FT$&i$y^`=!H0E!sDq)9`CM19H=h?x+Di`4~*dTPKZx^ zlhvn^!%ZltXAAvoljyK;11WvKnz?Byk$~S+ZLQjXr9hGQtyrc(f)4(v;LR+)F4B6K z_S*D@yi>mwj@GwUmK?uQaPLv4Wjvo8ZuZxZqqD}}ul3iazpnGwIe%U6uN(Yzqs@?a zM)zWwM8gy-nL{T)B`h7CsVVH z*+y42K|0fQV5S-c{HDF>Nj|VKHC34Lghl*G_L?)<4!IieGCYb$!^7L0d1M_VHQ2Hy zcAm+;(UnWS&Ue1tfR$Z_T$NKcMRwhpY?p^;X;m`OPO=2fcTwg3MCGnOlfBNvQ%KRn zTbp^5sNC}^w{RxA*25#X8Oouc%6flAA?O>jF^Hy!_r&6Cl>%+8vFA5Dkp`kJmH8iZRq5=Ch zP=n$;UJ0(x_IflZnNf4C3qnHyIiO*^b!rR^`#c)RsauJLy$U@zH28834g2b7SYM)H zy-@9CREdT!3JtcXNYv$9P(y>C1!$)fbM6N;>?+YPm)+>maQ(%gp@1CFV5`eQBLX$- z@n|p)^Egx7XmJ&xXXwj0H0-IPVXj2OoKWpWdWnYL6dD?$22s}}G_0#q1D^bV2IV4q zYFL-u;L&i?#h{^p9MG`NVz){`CLBF19xo8FSR$gCEg+h%^~lIC1{nqPfQ+UKT!4(>mL+m4oC|3N zQ+CFxMtILKiKp^x%OoEpFM|sS-t>{yx?$+QtGbYCY&;_uQicm@k; z+gPP0^W-dB3b1A>=nPX!!G%Peome9-Bz`E^*v?6W8@}GVkldywv2!8C-i5U2Tu6&D zj%zJx%X$~(If@fV+*7!a_`#kj!G&Z%4HmAUwgopaGx5v}XZd>#e_z4hA%92w-NxTn z@%PpI-Ok_F(#yx?fuNUuO`qBS>CVU!@6WjtP&M5?sOnRuV);BI-j@T>mxbOB7P^OA z3hL&lrTssS#WCE7i^v5au5|-66!1{ zmLp#m-OKGCN5#s&ZL0AId0s%fXZR}J-8X!NH3MR95iWfd0W7+t&OeLn9U6{QHKl4%nWj z>Q@hEm0qj5v*rm{!x33n-fr-NH3SYaiJU2dorp?qhuVEZ!#jKfPp26_A~yxW*rr#k zg0AdcG=<@;Rn~0H<@(9hYP@Z9&6c4y8#Dq`jDK30&11+7<|$QI%+o0ubv)Xn71zjh zpF8a8I!IkH^fpaXw+@@e9G*T`P`?$TaBUN#K=ZM}C!w`q!N`W@qC$TA5yb)fTveh01H`pEodKEIp$MA42BGbk-0wSE$8SxFM4BL0)JXCF;Z!GAO zHI$N7fj*Vv8HTAq!(&2&+1Fb9K2b1GmN78GS*2Om7<-{a>G(a+W=%FY!teum4bFMV z2!-*80?i06>4;aforbfDblWZH7{0~dHWGK1EG5Qh5=q$EH zFrkk62D zH&isCmu*!9p_jc{*$usHq+oR~n^!2Wm%XC8<%&!0vn^V-yDeIJn}l`waZ=eY7TS=% z!d4-ljz_r`pZ1iCW*HYGP$*X-SMou*flId4A*_-mJmi@Vy3%f~RB(5oWWGcR%RExW zl>>swC_wO6wsi`dV<3mLYT2aeTOE=QG0rhU1w-StqK{k)s_iD!=9p4R8Rw!aqge#T zY9tS%N$+?`i29M<36ju;xdTlh4Uu8Z49O@nq$8==LMrM;0z`ae`+(sf47vqrD1y~$ ze!Vv$S1yg&NaglPYr_T>Tb;nO4TQ+O%025iq>;TG_ER#7yxk#dze5%)=G_n}KfgX& zq*G;Kv}8#e9q{kh$9D}_7BMh){swb$iV(iR5yDDc?X?GtSSUYKp^)_w*AR>ljpsP0 z+ESkJhlL{^9gBFk{*62O=l2*Lv9rUTGG~Hh$zH1k_daG8$}#_}NE_Zd{_7loHqG3-{X}-n2}%ul;NF>B=oecz z^$SrWIl`JxZM8(|RCVj7n&1-c;DM60&!Vnjt|;dsK~gTa5-_!~VWUae*!z$t+3Qhh zF7(C|lK5htbZmn$yw>gP^_IHBP77=bMSe7wt&)Mt4au5=*DKdR#WM|J* zqo6a{j52)?Gg-F9l52#{Ey8hw2Zr1x*fC>~ZaJg|%F3ognA0up51S$=1!$yw637cO zq!uqcQr$a;)bbrj)dFIW+BBq+7M-B_It4P}KsObxr3(3GZlPzDR3Xg6eLN;<08w1HFnc|5%NV(?Ia4tQ8&y&A*AE{}&blkjkz<(Qi5%9nF^*j2~Fni3Cd zgliu(D)I2J)~cE#Qt}65}sN#Vn;Q|kLmUtLsJ3Su$*2UnV03Gl!aGA4p7v48| zJh0$*B|Yr42#Mjrmvead#yTF@#53^4K)6-_2uZ-oFO1Ib6%N*l7DQVYfMz zAuCKi1@E6sJomzOWRg6Q?1dlQ`ghmxC4C9o>UH{q@$j2;#nrl`LO#4#j=;xN`$pBS z_5I}t$YEk|Mw_c6;5}K21t|vY8FI5n|HRpz2U>9{jKK})-|RNIsH5Lf%4z*;)EWd2 z*;VSD77n9E_{}>j!@Jk;AluzbY@{3$cQnkp*3bT zD8Z?GSGO8kvKm_1wNh}`nu2TMcFh)OO0j#*x&yfWD=of(Ti2Jl1H?uuZ*Jt)y;*;N zh;8M~UT)o+4F`y>Ro>jht$VZa0O7~Vn_IYbZ)!G((TRm$bpsQzDG67;^MYTCb|T%q;uwlLUF))(pzVTyje_Awwl>5v-50NOp}1`(mOu z06z)f6<;hh_(IGWS92IwN$T)?%|Lf$gm#t4X5%CtusUcgoWN#L1#3jc8e%=SPS^cX zt$dI_rCxVGdjW~ZPH<2W03bYA&wtO^H!iE0 zGZ&i7Fq%f)MPjq`8WeA)Cex`rW(P$hQu3O;g444)i&-vZHEoJHl;5aLzF=b(txB|A zOl<*8nMvKDLa#{6nx@zi@jv>VcFZUI-DdhGB5haMAXmEQ0_EIJL8OM5c5!te0DRc2 zmU*398dXt*nUl++asfKGK63upNQ+T(aphJen=(ThwPcg=r~0q%`6InGPeQdd!{)|( z?F^XWu`@U}$bfmJVkz3=9EEpXbj>ZXt@@!N$*t7FGbtzgQF4{yywZ%8t@<)nzAD?- z5?fKY*Tr-47O)GlypAom2lNJCpEI>J^&Y&zn#@8-1b3$NY|EB&W1wD>>de|xez=5~ zB>#wz?-acO_@5jAW=bA_=IR>J5(X2smcf{^@KwXZz>`yCcC+%=h3jN^IQqj=W%Sps z(w}^JpqY1TR&0XRP%O?CZHsK%ZhRftPC+YBs!qSDEFVupQ*G#gY2;^W&!2pPEM_!q zBOV|d@wxqY%;ZX?u{+R<%S)$(?>a5Sdn{lFSm5DgO5iLMsjZHdFxduZ@QE#CzQFQX zR}<@L>XOPADRvw?IUNOH%U0(Q7P(kDwh6atkVuj5Zd<_sG+5i$4+$i+Nk_+!Wba0O z#4r@zb+K{v9>UjF14;xFFwaW@CDokzrSgFBKJjfz(q^YmxhL$Ys!AGacRRFOqRZUC zZDn9e`Y_3|eJ%k~O#J7`$c2h&uOns_;0Adp4lrsg7Dd}`Jv`M`!x|3d+p~)#D;w3% zDxKj6r?!@(dU`MOIh0;vE!>LIGOs-|K?)(6pK@@yzQ^h*zK>Q}lYX<^6aLlJT{6`Xy~Nw2DE~NC0as3qlPr|%qo-g08Cd$#)=XUi$g*c0&w()5 zTC$+JP2xo?n)<#ZZcIAiDlse9#A9JxoZtGzmwYj&d{P>j^sutpO+2o?KO|)7aeqPO zFUyR68KC6rAG$b{TtNBDLdhRoU1m&;8S^h`p`vy;#Ytb#Lz@4}rLSMSe85+b6+d^i zC!)VoS?lvVNI54~uyMVKF)minFiWNQLr!U*-;2x*`utxUe^1NGaLe*N~Oeg*qbSan@mjp%;s<>UWo z9G_{~cFn8o*35!~{6C=gxZZZ|HD(6s9NRV5AYB(M(&SLU%9&bnXz@?wz`|8{O4KS9Zpe~IMv+pe5<=(_^)Jjx5r{+GhTlX zz2<0tK|kYw#mFbrl&iZv7K@U$x?5O87b(n>T9~I;-CbZ$^XRI|wb(!g7&oQ;uVZ!h zmn+Km%a^Boueu@e2bI43!R7Vk*Izz{M3X=YE7jdX^(PgeXxaqG9r}P@B7YcH1lPBm z+l(+cVWoNnjtiyK;9MCa;xTzhu5>Wvl3{uy;$`Dh@`F})Dm^E=>vEk+mkjy8rJ3yW z6m9o{fL}clkj=yJH3#M}8dRdGOw2blN0 z5NCc!OCVQfNS}EL=DL>-^W`_BxF3?ptPeRFKI2>#9D%9;S)6}Pu6r3I=QchZ5DjS! zh#%4t$dwt=$6taWy>ysubK;$b;9wtQVHP{=(B`_JPWa?A4hu}Qunmhi~+m#pgiOSQFQ zL%9!f&&1VC7#IH}?^j-b$q3|I09iouu+7(0Su*2#d`6*8d6UgH!j37}F2ST0-j2#TV> zBpFZ~K{2-!4c8%Vly0RXD0=+0V<_nGX}q6K=8@Co6aFCjOeu5T8*N*{*R$u;v+|F) zWVj*=uzmta4OVdoh1>JK$oPbqyqL{DNXN$xp+L&ERn?~YAr!6R$OBueVsh^eG1Wr# z2#N=NmMEf-{H9Sy1}_Yn=>~rJBLQB z%iNh19gYnkVU#t)a3e_8C%ecSzm>z1|MLnDYm- z^|duVhhI3Lw!fivAERgGA@UOWq>k|q%XySQ&oVe9jXO!%ekv$nXK61W|8$VD=rFYL zZTw^tlYkC?Vl~@pEJa-%tXa>-bHl>6F}wg-tj>}Otek&A+a{iXF_VP@BqpAKK^kR{ z#g-82R@$Yu)0YxLn=TPlv=6CJh4MpZ3UaW0s3wxbw4>dE6k?auFcFo?N-5CdaC8B9 zW#fC{mCNBeDrdAhEA-kxFC5E%Tubk469o-gd1%1GWD>J|#wOA&)K<_f1WPvYnt~R0 zkag=wQfr#laq5S5aR^;=xzWXl7YtzQm=^jScYMbANOHJNCdE2;vZQt|s2-oeO1ZLY zhbDGShLO@~{qY&Lg%&l_+cIA8r4)gbz>EFrEFYPuje>*qdM$lS-?&e9;%+Y z0XIp%OLlYUubsNlD?7z5FD)hRPCRu3QBps3L$bwA-O%FHf*oSa zhr1;M*u(-dD4KkDZ?XeuG70B&tg<5fRk154SDz@H+BN%hVsab>&qiIXpeGG{plZU=ivFnPSs%jZBYs5%TAQRCT;0- zS@7`0f(0j5wgw2qr%_sWAxCqpyOg6jIAx=LG{=CXaX&_lY_Pq4G>0qAI4L6?^IWOu zl1s9XFZE~+4vk=s4M~17hzzjVz^fh2QCJ$K0ZdNnd5`8OKC2kO#nFCK6OIu~CLJSatCOn72r^A7j}f%D ze)$R2QkNYg$aTUof_5N_vx$a?7!-i$ICaU8zn5rlLw_)Zv#8DXU@jTC1JD*^Qx|#G ztb_n74ujwjiMM@}+EI*AlE^gmSSIh1lFav`l}i+4j-=(Oj0WDX=G8|4si8NarKk|~ zlN0{zFri_?Mv&Sw##OBt>hM2zbi_m)Yls?4(bDwbpV(TZ`6Z&#(uC=N#Bfe>(NbTxzn8Z%aF+K%D1PD3<00)l4QDv0jS3&nPpCQURHn?iKhi)z>{ zvoquTU$fDoSS`(GwB)Oj;0jj95Yzxc`G-D)ITp@+4{ONGR)QmvuyVLir;QP)jp`dNWSZ z7=YC^pv(YvhiP5xWeV<1wz@;Rr|4)lO-aoPFdKUJsHwxCtDdH&R*tRY&mh2b%&Ze&W(Z%5@M>0t*C9|F zdS@+^7-I>R7h~)l#Bs>A0v9UL=n*nuNz1|vzjBjXa<&G^|CVH9mc#-2UR-9CmG|~8K z_A&VjCYH4?*cyv9hH?}_m*-nzz?=%x$hNzX%(8{iPhE1{TXZ^g{xic2G4l>h6Y&$+ z3@xM6;z($SwNYzBLC&W>Y{}i)o}PX;NGFs=cE7;TCwOfO;4NAc=d60RgAl=lepUCN zzW~_cc?VmZRfnBA*q}dku#x%|J*Qz2?RB`|0uET#RL?68vp1wd^u!iTYshV*EC$ex zT#X!x5qh~$?kE2DvlmIZwJ)wX)>SdHt#BLF3?6#ax`bn{F)8{ID z>Vo&2NMje!u0in;?GnnBiD-Z3CD?P~(qVehdesT^ixmR>;^h(OlP@ndLC!=HnU=`E z^fAPe%jTV|Bz{!|v`fkbDT#AKuB(VTU^)3A=&Q5V^7FTR4_5V>`alMWBM*8aSY@R)fx#cQt5l)mjabLso<7DL==z?F>w#cbtAN6g#e8^`V;+ zgmX*kY<@Vd+-X2i?xy(9{l&{i<=cwhH2;+BD=ig1zp*;$iz}}3UxreMD5rJ=`Js}) zCrhEfuL4d?@xl2_RY{@MA=jl)9r9I_LeE@^6j~HNU!e54xTyqL&Fv`Gf2JrT2!0=W z=KAJUrW5~0*GH-j|0<5uRi9GKD!9V_AKwMSXD>*;O#0%A%a^NevHeEH zV&eq7%h@~NzpB+&ewK0BtFH<;S7uuA$(LYSap^GqwBm{6O71mt37#z5ddCc_-^7`P zJblY~99a`SxZBJ@nfBtb$ z=1ij%lY_tFohWQbZ`927OwCkK@p{`=J6^vTkX z-F0;S5!p%_fb-M&q%W>GonLkSZ#umEY_RjskC#bbTyeZyb(7}TD<;jaU!F;Gm6wQ^ z2}-E%VJKflYki5xlX`q<%Z@J}@L1&Fa<;O&>ICzJ3c-Bg@(AXt3x$>w3SX2_Aoth# zg~FsSuDDQmrkgZRHIzzIW~c9~2E^_3$Rd+Q4lcK+r^{yXjzgQedv_eMz?(*C{#()U znQI$NxX<-pGgdZmnvagpbdxCj7u&XH9kt?1N&X>AImX>+`9g$oZM8_MNu##bW$p(%ZgFRp3k+t4DLDGIMp4xK%Py=ezpxyEB#ewr#3tt z-A0CQ9WEqJ*t<@b87uLFp}ZooQ|tk!mgl{H*oF>#4XuEtCudSxA+WG~>fn>-j? zGQ&|rm{#tL;hHG39jZ5kj)_pGY(A~5Lw$xnbqq~Dw@rAgoO);_d9-PWKh$9 z%Q0`bED1yL+Z0M)3_I*`{AVyIo^y=TuD6lBwDWX@)W}6%auOD!bwgZJ^xOoj6*9a zqb8nR?4gJs&<)VCki5y|22?UIl)YBTAQ;o&cGLuED}S$>bX-Q>3q|UZ&ml@|)SS4O zaGbIe%;8@R@b>epAc`CmEetv(ieI^Q$dZHD@7%2&YB*VkBmg)GLaf&#yAg?D2l$#; z?l=8n5!(vd7R3amzs z_70Dx_of_9lyN!aXq5CHz`6A{hssLZ)wf?T8aPxmh+2$uVW;b&o4C8BI11Q&(7Roq z_rZ!Z@mA*|SV+D#I;_tH| zh7!YpqBbhGyYWT&YA6@YObOusy2}2|as=;mW#1}A?db@r;|InUrxwm58>`W{BsncwcNtmv*^};Y0}Rq=vVc39_r5Ck8Op$ihIW#n}`R&8*QmnZ~4=LzAw1ZL>wKPy4_E-nI zdTo-X)^c0ow%?iAw>!P~CZ`t{`z`7<8asz-$Jzpv7lWRbWQSFC`;>B+lZ?wG-5zk( zTVe^Vt)o?s>YCTa0nM9&&hQ7msGRiVjluWDI!igO z5B}Ip(yQR6PBUlB##FGYffL?~@mDd2#lJQ-{xd}*i?L61>Q=d^RAfA4PJ2SNt#m!1N_}|q z(oG&1fPbk0=*S3Y^w;TF`c>d!3Y?cD*%?4eGgJ}A*jM4k*hc+Js70%c16;gOMZb)LzCs48%f)N4^$tVfWNhwLJucbAotZs&|P z>GnA;$ZUx{l(k>nPNCi!;ix2CI$`U5Cz&jfkGxcbT``BTj{xIw0d~x0gjWIYtp~UI zo#rKn)UU(5`Ap=^2YbhsEM`6|FolLB7Lrm(&`R}2xTH6`xzL+ku9DAJDk&7op}om| zeI#1jYaak_zrKNNlKdjSLAa$-uQVz;uqUDEz+li8qG(U_P7}JaC7hwQ5WTZFw(;;D z*`gVigW60lcU25vhnLXg^bkZ+&|9$>7NHo1w>G$?&WS5#M>)PuTdGaY4EadH0+-sl ztuaG{d^`*ZmdQz;s7n(d(aa?0Ol zZzbc3U%|n&A>hflWyGnYAwM^9qS#Ha7e}o+P?I+BUJGF5W)hgszR#hh);}94RltI& z=4MC6+gX<7q--!ku8Zyfr@tH(6GT)L?icO6#BtKjA_?;dCgOe0m7W>SW}V?c%sVzz z0$M-9w%P@2cE_JnCJ`~P1Ds}cfYWe&F%B}D^RGd}VH1?E1@o?sT8GYa_hY{-tD+y) zE5-_5Nnq7K+=wk=j$yoq z6}xPThjNBYXKT;k;~Q?0eu(RwRkQVIp!0-GnSJe6P@88e07A~(68$@|;9s)0f0*cT zM(fSd*TkS~A@PE)^Lx{;>dGN-FUH=FGL^Myd5c!BVX|8qaGrTO1)WLAVMk&dWHT*5FOqI51b&nwWy8?&9eX6T13Er9h!_N zuuY{4RVW-^Jw{8abDZ@nE0sglW&4-_N%j<2#1xj?;Y4}ys~sfH}h8p{?CC zhVIZ0wRE&;Z+cpSO*XJ?Tw`CivQ6HFHc3bA7dEQ0-HXtsF~NAdwWFYnXwz%^{Y)DO zUM!jRpWLl;%eR#n8n5Xb7&{MWFXNn@_|^1S5LeFW_otBF&gjpP!>G@h(0TRph17NP zPg2*z zBm5>VNdMcpFp`Lg94m)^fg7L_py9uhSv!clgIlx(*sn-Y^!FrR(skXQ<<%RIMv871t+Yv!&5s-sC<5NPC%wi-vk!prJ4#l8=u!G(Y+9Y%)6@(({&4Vj4-a zD#lUt^;!L6!MJief@G0DZiZ6KQ-s2m8wA#m3HA_+@E%4B9jeYuy#3@y+3!i`q>_d3 z)tHmaEQo?uO(o@2vqfgLO6HcNx8v|C_l_lB|=9PLb%9mj^#uKPPiT^l>G zTrip68k~EWzs3G**G1QJcSB+6o5tDYW~Muw3vz+95O#Z9&Qe5*8nJt5+d(>p9*2&} z7`kYB9ba}lFui`Rijdm2bz$+X6s&4$hbJ0)Z=MKo>@sU+wcF3{hGWA)sv)&M(3j4VY!oY6xC145E7%#SD>n6WuyIBPfPSvXS;uTyVGbn2 zf*-+dY1dM@ebZ$GXBB#&XKv_%n5UH*th_Kvg%-bI;{yEdyI>z`)O28OQaLcU(OXyS zALb@`0Q+HCxNaxE$-q`X@$hA?tTybzq?%Kig!*A01iOf-5A$>BA$FS-PuQ4;4>Lj` zNEh3j(v7|D^wc@rC($xQ9;zi=Tqo;QsoSPf^cap6qkIQhw@KuD;N`Huellv(EiF}h*Coq?-J z3~~-R1RrW7cjI`+EV7NSZ5$YlD_%qBpy}ud4Cgr$fnXcyh_#GjktxMY*MhQ)GUrwo zc8Zs8g?|*sp1D*QuH_S+78w|gCC9w`v23_FE}B6G`5Z2~BB3yqL^%0nYy3^Er*UVx$4?KNcyLd8}gQRSh{VO?uLgp{xs+p5_z>FBUE zX^SsqlQUH(HKVF3s=;|`Z8H}^a@mIVaID2xDXHK0X2H>OB_JKb(Z%3lv+>MA7xW}{ zn!{v-B&e1{%g?XDg2=_Fk``i&N~&aJYqB+9=Gy(!{mC1hYxh}pRi5G8_8GGVG-NJc z&AK;(Z1&YLcr$pTVelC^+l{5iUPq|rY3zN70ySJiW@AjC`Pt%tN+`tuIJDg_5Nnna z`Ht5()mrr(3$yR@K4SKK^eKJyh;s3D;Uk7bY=g*>HY6F;YDag&OmOd^YHu8G@z=Hf z8k~D`{@#0Ga6(FYog8lP*Ny%foW+}rfpZz# zB(!Wx3cZzo;B=Wc(~fDTo%fp2Jslr&yvlseSMBCg(1=H)%j(R&X>WRx4>+b!5toRW z0Z$%}xh|Z^cE~lzX0DIIO&;Es%p>a{tne_;vz=$MZ*=97uk)QRw>I-lR=F1i@47SD zE)P#`KwoZM=DVnJf1+~NpUGb5;mNP>%gr$XeMrbxx#v|bK9g#f1KYP64 zOt#y@)9lg1Tc3H93!cp;Z#4fE$aQ0>fL)L+vnl^R9S9g=7&`9o>jS< z&SW=xc+ZsO<}*($D)$MMyX8!FtB3cb?w6J#{w8nP0^arA6HLAves=qWPrtnlJA4iA z9%Y;#b<^|Yq-O93aq}60cDnPn) z;>;{(?H=XjW2T_AH3M)=?{`Lz#ltsBZ$26qo0-Gmnwm!+MIb#Tiecu)A)yKf{wQ%i zYOQW8l~l?5jf#9s$4S~~w%VPkX&k$roSgytB8J#c1`F1i*Pw*9knU*yNNdQZFx!E= zmB0{sUdf~0l-=Tacaz(hZX9C*FBC zAxK`!=I|CXlJz{4>&kA*Zrzid7CFF`-_B*zp5$bZCGwAZDk{}QXz-D>IvQ^FXdoiF5)C(5EZxxH%Q-aMTt~xviH3Qh z+B02=hF=sKdOpD*P-cx9HdfKVWGtXzp+v*RY_CUy0%EfH$M|P5H58Bo8aBEFfjSz9 z%NsRpoP>tGHp@3O_;L;n`|4=eSfXL0=*P>b5)EGz8oEM*#Q`T!!-gsvm}CSrSj^Ok zgALh@9u0oG#tTD30Xd*ygL7Tf(Xhv(VZ$Ue+-M$YLxV5p(6FbDh7BbeHVD;Tq?c&; zO`)M7G*~=#0vgs=(Xg*XgM!*#Dz49N@MyT{VyK~j9MG`dWzp8rK&pdL!}>{RxWRlm zh6Z2Gp<#C&4eLuZtQV@QK_e~8$iH032DzG~H5hIMfGR?=T}8y=@q!)}OGLCYP3g9I zWaJlvi~@QwhGHaN{1f8|2F%M_Gg}K#IanGXOOV^!V#;n}&ygAV@ z^xqW@I?U4=8_#M3#39+8i&XwR%K@gSeMRY?GNnA3;p?>=h_*YoQ_I<9Ev?BxV=roF(rCCSqrBFVDa-kkeQJy+*i2!_CFKWR zt*)Pg7*K{-{kyo!gk@QhZ}^C_bqJ`Y(O^vMrIPyX7TY|{$lVj##ht975von33Z zf@?b)ZAdPy&*9M6<0;Jr;-opq^y>Oi&v{IHZno$@Yl&-8MpQsq))}m*CC(E@$gE8I#^f%5hecOwJ-RQ|T+PHb zHC41%r?;MHtf~*`90A^>=5pYb8i>PE&F$;%$cP?-HN{ocz_GzH#8yn9)tWe6L|{8v z-~0~pIh}w&!w|p+lTln5CJfB;Hvfnt72o{(hOe>agYC^=`!%GZKyks}b!|X&XocVh zYX}_38X~ySmLTPJIMi|}hIjY|o=!7Xn0I$F#8&dYBj1A zdW~@E@}X#!@zoKu1s%U<_zK5*K{hzT@B`T)#3mW>3RtpRN7I4A4^lD?*R~fsuLNzk0 z7$p<&<~>N|XFvkswMGV<4lXH*b+hgAB9g+jC&{>sbaY-fyGH4V-Rw1TGIz6U(Q{}VsFZPQ(RBe^PrM8`_N4Z?QU2TJCeqMVw zo#pcL`e9b-YaGHVf!h(!e58_gm+M(T$$W{Dc~wrvcJ2|3j~WF3bq%9iD%10Whss(= z?sQ0gt3&c3WKdJ|9}izE`XD!xBsblJ+8k5L&3rDpGMcrxgwt%}B#*+8-Z7*A=zfp`)!?K8hx$`&3;ct(>!4bkrU2QyZgaM)jh4wIG>LsorXh4nUIH$^| zvf?2_$AGS2-(oy2IArA* z*3s)BEj#jvC)w-m*MdIZhHr<99Ys3DvaPH+IBw4|;&qh+ZQFeuMJ0knEI4u3%uHPI z>GpJCFG8`Y8ApdB^(4NUvQDN${RYiq9!ye1;AQ|aPngmi#4)KG7&zK(C!jgw&{a4T zKQuBXJ=PgDxWz!JWwL9mViT<%30eDq<#YJ6Hj5F^fq}NXSVzn9yL{mf8)*Zz>Cjer zw@qoOjPUVM3t3_q**an&VO-*d**a@8Ad{g6$4)C9y3HODwFU1`f zt)m1^Pw;2TsE((K9yOg*eV`daNQ zqS$_!pheRYn_v+-`_ZIWCHE9Rzk_<-cypwjht$VZS0O7~Vn_IYbZ)!G((TRvj7+E%lXxcp!sApwucmE(s zVwb7Ac+4LghGk_5LT-Z^xunFgm24B@{F;TrDbWEaCvpm2IU>j^o`!4_pYLakE?+1Z z1m_NeYHPWSmu7Lsl_e6XOtM3kxb;UnbodeTodC z55O|GsbiT3{ zD~;cVLojZgI)XKpj0VqzVwuS`OgN|&Oq5XN+KiUuZ|^XF(KxB_u;rsH?z}h!}ysD|;F1eg_^aHXE6y zO^|9}#xmzRO+f_{YB|EY)fI**jyE~NXR>MB0N^;Ta}smc0IkFLd&|8%EWK0pbf-*s zlo2@N404&f@nC#Z+L9jU84(e3z^=pe#f?rKM|fVP^`~uD1{NpLs4)tt)c5)c^__Qo z>h)=ByD%n0k!^v(Vpql(|Fhw`^wTOk7av!fglrknj48P}od=vrD6i(%Wa5P+@H<^L z_FLU-?~v@*${F3NGyw1^vb$I^NFmZ`8Ib(fOOG>InR14bx67bVdEtIaokc{>udi7- zzxZHW&9}Om_mSNynkoCCM$1=Ma3PgyNf=0QiPN6zgmb?#TC;V{j-gH{i0BhjdslgF z*i9pvtoF=di_GjPN1r<>7Q{szxgbXw(L`b#KaW?YCVDqTP3$6<;Wd5eMCH5}l|0{` zY~u!%1c#6g8#F#bzajnNA2}_K4M1^;59t@NlzPlc8G%EPkk-5E7t$~FFI3(VL%&#P z>LQhQOo=dD6(v&A;Y20E_)k5lmdxwE8Ca58r3I0QY(b|t zmg%k{aGqE3nbh!^IDKs>t{D8=g1#=XlX`q6&X$o$lT93Qn& z%56m|*kW~XZPsQIFmwt9Ns0(-_%DL;J zsas-x8ARD)sl~F>20vFV&MSGzVo>Fiy-6bmjev_IxmGc@Ef+jD)#Wq)6JISjMz3Sf zVQTOLa!Ki4TIdRq?5HWXMS_-ab3*vh+%)1vXq2aGR_p`8aI-{2e2Z@21E1X6P_N>u zBC$w?GbLONrc9h_*D>A#KQ&5Bdmv?;Qh6NXhRUkc zMn3Y@a(FhzQbi#7wv+-Yb+BAKED$Ht>{N7?I?@}tGq?qQ+X%?>bPk`JJylf>C(Yc? z0~;KPMK5x9uCy{GWYS43v(pI@1X(G|%Mp-%X7nKyeKag>g&BkV$SEHoDr683cq77= zS&enqF>6ix1E1wD?m>#C2S8MO+XMNquEegP03bFe;{b+y;OQ&18TM7c`ioZRHKG4R_>vHE+EVhc(RXrFo7FTcD=}x-GKVcbV6k6cL?*ArwXs!)U0lGdN?9F;m<4J>a>CJ7s9;`3EO_4 z%y(9H`Xtv@$kXby>W-4;c3C7n2@sYIw^*ds_M6Frg0bHlp-NXVVSykm(pA_hh=(>a z(w53*(?Szkz_&fUeK^a8WQ+x?aVLGO@{7m$-rOzwM`nL4vSEl6_U$qYwJN{66m^N? zjhWbCV@?bJIVgv{RM;ilP&E@9+{#RxhAzOL+m&;r?OwAz3u{pa*s1?(MpIR5(ZM{} zpZ4J{SB!p4#9_w<-KfIhac~GTYbt-?LuY-&UsA+1PN8-oBrg`>QNJt~@PuWp*#9bs z#AiMUk)1I_iqBSoPz;41%4XK952M?2WpD@@vZYF)2ePiV6AZS+cK6U!9WF0?d*209 zAcyc$lKHkev&wH+EZX$jYq9`Na~Tvxl$qJY{x;gSt7B@-3>UpJdB)-)r#aZLs9#j8 zgv?GhD{(~FUt*=BxJ!qNEni{AEeIX4`;2(XFdO6+Lq6r~N(H55eL5EO5e|x*x7h7m zm(nB+7y$nr!PX^j1T*{R_7c2aLF zs>(Rs7)gS%4a@aWq-~Uw{Ffr_xEyv<)=((sji-n74m-R1;jSX!j>;lz!Qkenq(+**kA2a{U@1}^37$QI{jUVUVqmOj- z3J&#h+Qd(rY@vzRa2JDu%AQimbnsm72bJ$C!Vg_zc8h(0I1L96+*HnP6{II&B zwr8=a5w_Bem88mCr=h3(=&+S;V^J;RM)oQd5B{w(NN8)8;Pu~JZoaD-=L>OnBvpnO zt{J3?T$2P@JVuk)ydhFZ-=-Yy7e!3Vbbmgs9s#E|!UH31u$MCtGEJAq%OmClG$j4z zE&Ph}#<#FTN#0zRmqKDYyCYARhcq;6H1G^!m^PP{_QrV7N$tSb!F>niv;M^laG)h* zBn&iCQm9PB8b6Z#K$+rJ8J-G~;Y8N!sSwU0n|3WnNY#gVn&=gZY zb7YI2Y(kthJUw+_i8w#?{`{2>U{NsdHAY~tt6UJ*xWKslLP;lu3(PF^bI%$V{Bp^} zCM=E86OP6HX5)jT#s~Fwiyr$c3QI#h0sSjG6Auv}ZV-&A>z%0$LdnUY2O5l3nlCsP+UjMQ!b_7F>10U z)Y9zRw#>|w>sPzI{tP|~igcD56j_Szq|jgS-|UCnmdhrv4h5(sGUuykW2amd99$0CI#T3J-l*Q= z&DCz>YFlVh1L!)?@5o)m4R2PqYiqS#yTTyvu0FjrJk`h+1hK6Kt#8S8RPt;bO0#yo zQv3&t=d3}mJpTmGSGMYzN}0ilqGKxy)|yX~*lAWXa~iS`+OeZr-EI{zlWU)U?0~}n zj=XC`4-v9TPB}pimzDalaNT3_()_1SR2sdIJUOvrPgTkw&_mzq1mOu7he1iekByOK zPAZnY4Q(n2*wKAf@SG9wQxgc-C1Hsl;-%#JATaE?xNyjVI%5!)N?Li=gkgF4^stb*-5KOV{_sc7D!1ZC((Y#xXVc@&As_`;N+2UW<8S4|M7{}O z?DXIc21i1*afhDsv-d#$e0;(JqTIC}$lv%rzT!bYPnh4QmdH_mLu|)=SQNDfYahtl z@5^5>V0kLvfTxZQo&k-{L1t_S#KF6D*CAGC{ge~PZS{UC+jBJk9k}@o-HkPW9xuc+|=J7N%#J$OyOT;6F-D`~*E|60IGPhZ*f5 zDBsLjW3jL|{xJaOXQ_>~cKMIT$F|4OUVF{%qCcZ|>~8fOSBl5a#CzkP)w36gJ#^GM zNK|awAN-q`fBxkEXYc)kn11-EI5^n~*V>qscw_v*T64=vmbIZ1daX_J`JQv{eXr*Se$X__-U?Bi*YCdf?vHcNJwLwp z+opBpWzj{13#kSwcQ3s}&a$Hai>%pc3IkH;|I5&@VTQ%T=2 zyG2NoRru?KN}g0sw6j$X6qPY+RElpjPih}RB7KVf@c&Wcq#eUr_jz{^8&FtQc2!xFLZ*jAx9fO#W^DhSAWGNfg?{?0W z|7Z2Zp!`E_4rSR1KJU<2W{bGAMzdvO#2E5C`jpDTa0>gi>eGJt->1TC6GgU!m^k;V z>mSSZ6fikkbm1^~KekB)Eip67WvJje%45u^l{0+8vdMpO{cnBcXP)_|zxpq&c0I;I zZ%YxOjTC{@Z)i1-iomDUER^QSG|9bw-W~8Mc7lj$gjBKeO;3-V)3lm?k#LmDVOCFh z0u$i|JWL7U4{61@(iSl(W?TF0^5Mqcz~H*hvY;hk4fbFjlJsSgt~L}gJEgU~OdI)U zbDF@Aw2&7`l1tv{n1qTeTYPA^XW3x2wN5K5SsfNr zI`$);X6DbuooiB7gkIs8hRmccHNu$c!XF>6D6Byo&7NA?>X{Li6>J})vwm2MGvvZj zls*@Trq~AFQA8E<_V#J!idl4-S4j&*YpWS5rY--IzprgA>QyTWXDQ8fQU1vjd0ztC zM2?2it|OAbnO#OCF(YwA+FJPAssNE@eF<-(^>0+|i`1HpWketrr-(rFP9WInh6M7) z5#LJNgv2}9q30S!N{}Iv`L%ZLPbn{Y)quO9ynul;_O{B4>2u{DRO5V5Ua#bZIt6*b z#pOk-CNFyLT3+BU(Cw`#FFIBADM<2yi^~gUnctnfh({3yd7;rcDKEmXzkPWTgvyQO z#ZT-kFRr}{c>yg5FEDu#cM>P*Ch}tD_T+^r&m=E|YXRLRuDziMpkh%1uy#)~HcMgo zjOI()e+&D2HKR<7qB2o!jRbVkZ(9)ds_1BFc;+68W-f*K`xBpf(v7q^{pDit9-!uPHY39 z?+|#NVFPikS^#Tc#WW7(_RxgHc(#~H_Xt!>7otwXbMTBY!aUty<(_CcEY`R}+6;+T zFeEOj0cN7~&zGw|Jm$W9Q3kq!@nop2O?Z--oES%Ah1y~%%cp6WPs3+SI(V)K?g&7NG2hZc zoH;}yhww?c{@5sAs&;_wUGKGJkB` zbz74-Yv^qq<}VV)2c5AuvEgkl2>6?QDu_NCvRbcGie(fdMky<@o_Uas4)EX-4>Yrg zVcpP!jvX@J2_Uf7gFgH;dDFFzbD;+x<3jIar7$S4`uxMAY?j3o>1z;anpP4LZ!xnb z9~H^s#wF<}E=GsmAn-*i>_bDQWh`lyC*BiTBJ=W;@=_q~`gyzO%c3P^H?0Ni3=#&K zrpOuB8i3P>vX7j|L{mG|b=-9C6?G#H0eGGk{l`GkPiYWN2Yv*-!bz1Hy6 z{R+mKwryLdB_2|xrVsIo?cmDGkIB|nc<(3C1kNqfBA$O)`=)t?Z?0l!szmk}`thIH z%*tOE5!5%m;TQFYVS!|rF27FFAbxCpG)t;P*&H2bw4<5%%Vc@lTHM^^CvwW*=OIjj zyc~oft;O^jYyKG~C3~leN;-)Uh}wQ$JV6c=!N~t4m$x@Ju`3=!ejy(}MZ&ka1>NOc znR_~N5SkqqZqXwNat{9$P+tg<^;&exo~8vcEib^fi=UxJY?eLC_Nhc$s2A2Keaxoq z&_JdZPb2-H5T4}N2DH6kBRW2xDJ>QOo?o2CQ4=MI{kynajy@qrJ`bicuJ#wbShszUynx=A6Xe9VpgRuFr=gAVZ5L9d{)plWro>xp68!I$q0!*1QS)?C|}#lUZ4jkfS@j|av~@GWjPaK>`t#lsp!#*&(Q zYrRl5B|zg z9zr0AbB!gnC+5Og$hSlvaN}i_6ejL(I9z!buB#%eBNq@_eWT%I5mE}ajblg%moG6J zXf$PY;Yp+VRiohZf$aTNE+|ycLLKXYh%J`BCQ8aE}tX4QcvHPUy! zCf2`{z<81;hcO9Li#e=PwzLXM9lV=(B=;^QO+A<$;e!Wa1ol*UUkboheHfTj#RMGD z{9$|;7Xe(QLO7grM;UD2A?m6ZAK&rCG!kpOT}9?oFSRySFMofo?J?yjqW#!4vd%0- zgnx~f*1lZKT9CNKkJEdiAjUDebw=}ivZdC?%^>O+^nK*x82Y1!rLT`7+PR#@=;low zj7K2;@Hf%r4A+`Kr#aOJ3KPYCb~i(mnvqa8*29xfkU4vPooE(Z5ct~O51w7!FvCXW z*E3_2E`2hTnehEErp$!$n}3I)`+fW#o*RA%x7Mu$$REtX8R_c2>}od;t$gJi@2zQ6 zWTU~+;hB;lM$Ju7*0C+&TLcuqAoEDaEVtiM2 zBK|b(kZjoEgFVUeRtxy43RgZYJt>OBROv<|?1hiIn)JmWBmEJDMC zzRsf%>C@;!(D+cQnV8svSkKl}8R6wMYpYtX#^QcYbGGb6V<|t`-)bz))OVa0x23Tc zYi)&vC)%opTuDvBqz_FJ=1QGc1L#V%HT6Lk*bwMQBX!ixAv5#;PKz}=&OI8M%L3e{0z~`7x z)gw4J`~s=fd6MIfeCCFX(vB8F`t~Tp-!;P(K{ideIk_Fhz5RlOtvqP%PmZQ_IfhW= z^5|GmoBRMp2z?2o30K1fl%IozAabdg@@N06&8*zR?}O*$Av4WmvvivJ2y%nOL(O#& zmMl-jlB`uH$3~K)s5v>r`}iDjN3UmE&CLh;G}G!M_5)NEkf1&}k#-IAXC@{2Lc>`t zaH4(E3wvy4++kq$;KKPSHWZUuw|+x`xFBHHKna_Mq#b1EOnc#Oyehjii+V{6f)1uv z84#KjFo04pCLFrKJ|C@8jvENmNkMV8u*Tb=Nl;RTB8gffz>V>$i9)4lZ5It=Vk8^0 z8myp5sA!m)k-<3EJ~K?sUI#PaE3cZ(anaj82(8=WAT$qM3|AWy2E-9SptL0em>XLG zHbExhutXt^2>`ZQj0qn*z^0Lv!XkHJf6Y#9V|&fFYJtb&`JFx!y@{_pGr7hiUniQB zMX(l4diM*(-HIj!<(r*twG^Wh|HB%Xk@Ta6Y241JJ4vwc2U8~Ie6$>O@&u$WZ=@}6 zFsl#c2))y2a(;D$q}i_}A#C>Ruwa}S;Y~u<{T2CI3A5=rLV(={pUgsf^ogMVq=_^id`bTs8}#UHW5T z0etdw4sOZyQjSH%^?QxcO32CwPO0si7ggm24vVto{krXFvr7#C9EZDpU@%=x0cj!0 zxC`HRG*^Y`HIKwvkgMBeg`iUNC1XeWsj1zjxe$bcAHXy%r;uS)cWL6d%Q?n^0-AVb zjnH)Hdq>ed&*~YgtK79E>4u&Jg9@eqL*6w}uNLscMQ2kvG$9^Tlcz+UBL?FE-W##M zW)ci@ns(9TI8waDMf{}}w^+j@5I$e`Jg;6Q4XgXJ9MPFQDL-TgHVv-#iG)&8Zihiu07Cq7B>UNM0NYtPpIH0HU#FN3{P52;0{s}Yj!!P1>F4TlMa6r0jS z+p~fkisSiZU3urLy1x1o!lJK)q)XxY4xjK4v3ERwhNJTMP45g}$Qjm%ix(Rs(Aq=! zOSbUddv2(17W<%-d08x3zcE#SB8e+DEvi;Lx?E)sH9W@H7Z8aFepC` zj(czc!_|)b?Ulcz1!G7tx`+V_L!7QlG)9d?8PG%vHet{h%hFRd8CFcY3@hf&jaeQi zB%u;bM4gz}f<=%BTf|eh=$|K3E@J+ye2XD7Jt0wpD8+N&)Lku;DgPhd$v#7j)I4rz z76WRoutZ3*3k5o!uMvO=h^D$)y!6>Iba_!X*vijaq8()hUUEEtPWJ#T;t$=6FT}%Q zhJy2|z6b9K8PiHkF-CbAuk3)-36PBDL#;o?4TW?y=S3u$3w`((7GKgk{8MpBz5icM@90c9_+{!Po3#)lz(wYcs3sl3(_@yq|;8D+aHE6+!jah6(FEEf-m#? z-HhM^Ve~dMa)%5Sb&6~qW&|d?<}zLLqGC2Rr!ZfWDB{jWQ5)Qhw?ncQ?slnPvj&Jv ztc!cov$zx?c11h$H=D4!Bz~hmy z^P7^4O;ct(wYJjYak7faXGz;b=JlZ>S#gm*L4aSC=tJE-rzOJ(RU2s_*_iM@HNQ|2fkY4h0VYV zFX~z_YIWtE=XG^yel;YCh4e`5!>`RI()>C9%@8)8Ao+T(%Dpx_R%TCu=?mZ<%`MAbUW@D~4)g8Y*E7hABw6nug4SF#Q!Wf9_ zUn_Tw-ArK`fmt$n0HnY}spGOkfM?qM5F%(7;uB(W1+zj3#hXg)^Wdy@C&x~gJRu@l zxsbc(t7;*(>{0cueyz)U-ugNTkkRVmwV+YMKURIO3W_kLDED+MOWkJam9s^$;0k4K zzRF3~`WZP6Ibn@*CoN#U5sdq$(tzR^)eDsor&V<0{n5@xIW5a(q{$1#ehq0c20iE_ z+N`*{QCAH4W$#zF;+EZ1TGq>W&K6#=tVYT64zyl?ZI~kz_e|QTUGX#rl5h0f+>+}p zs0*1PQ@^Xx%V7o%3xO1iZSeBDm}}tFY2bIsnDXMi8?NU3!@fB4$O0!C_Bh(`sOLzz z=If^%qhK*1MJ1H0ecIhH|6e-9p(cK{=%avInEyotfgHgO%}x~ zwX|nRGwo4JLx+r+#4Xu&x?Z8HROmA0ShNI!P4*&8rWZB3TuontYnTLB!-j+=3I@wW zwxQuOQ7^yFU_xQ5ZBkGtc@ydytwMo8>_DoN09u2Jt|hFWFBZ~Mjo(4KL*(kr3bzDo zv^z5~lns9n1Dll~ac&CA?<{OBSPG_5sl6B>nFtab5HQukq(3QWf{>*f4W=zp3UY^c z&?qTI6_m@NVr4R*5-=GQ70}V02n71-dRv3M;{>XjZ~G4!FNIt>8gq3LTDJ^8%P?n7 zQ8`N#u&R@n7-#Q=8DbWrnId)Do&2w%m}S53Y>Z&86 z?L)!zh!2IcVI-U(M;i#(x?2W<3`GXQq=o9@4s%K34y9r!xc5I+a*(1>oT7~{&-#2P z#1_eI%({>>#=4wK$}w&`GMbmTU^HuQD~x9CZDlgIBfntPxy*!I#d`7)_`jibXx5`Q zDTM06xng3QCFn>xM_GEKVze_>*(p{%RF-Kn`{Dh=Ut|}IUTfF0O|^?I;G0yWV%TYg z6hffWjf!kA<4ci_b$IN4r&tKc2P`W88%=7aN(E)yrSuk^&ZScXsP7UYQzCc=tnVGn zEd%q~G8<%jy#+G~uhGD^K6(eq`X+|5=1F8lNR>!$F}`_q79(1}qnJmUa4brY9i;@l z1UQ0h9L1rL%SPaJQe*HNJ{j*)qy*x4Ps%~!9+c1=&3!Rd9Vkarjlxz$ZwM?KJl7m|EqvCTMn>i$;j_H?TyrFT3Y_sO?+Wez zhOSfPb24bn9##=%;9C5wp-0XF3nuKv0gBU`7i-+3-+N4|jz6H^`-&B%e^9@DC^W}w za?CW1gg}7$CRPvnFNDE8{tH3+0sn>7`a%0uaQqPqGSGH?4jpL4)qg_Xrp-(ei`%pv zUb)67_DuwK3?it29X0=e0q=rE`@RkoS||g-@%*UF31DSUy_0u6!^n^<_Amy;xaGf# z4-af(@LL(8wo9fBQ5Y`{n8=Vf7%+vQR)IgokqA2}n3)k_=6{By;Y0*rg@<+47JVAX zurs|FJ3j)#jl}wq8D6)U_eh{3W9_P?RrD1UPVEf>S7&aUblEMcxz?Y2?0qDQCt<5Q z^cR+wPGe+RYMC#I5HI(s=fODn`0PxMxM1AHnL;Aj6PsV){ z=YmPP^7>C~X5|U`^|zbn%4eV9=578Ae~PdU#AI0gw0-6Wr=k4=fN3=ULiv%;u#*Cz zE*$8_*lnSs6#c^ z6y}ef{ZrHd7ZFJ6R_b739UhxfBZCxqi^<4H7R^Go6z!c7uxqQ`wG-VG)xzu-`{e4R zN`9SEpq>3f3ZArPBJKcMn3?O0?!G-L`&3wuk60$j`ItyZK&2V#Ia&Y>xXv6{8#I7b z7{ci^o!dcYC=f>2WNW-f)=@P9w&Y7U3xWJ>k({g+^HrZg+pWgAmT*neUvghDS<=!~ zWbt&Mj7`SEL99zt1yGcfJp4m^Qyn+N>@wFYIisKJGr57o^~{(*R(NU{e2gSwicvFs z9^trGO-rB=#0g{`;mDG~ldsLNI zOqCnuP?z9gJfnK{>~gNH>fhUnj0vp+`jrRFAL}pGiS0ZE-x8}UXJx#1%u#bTFhy1> zDINm%wF=5Z^jW&L;L!0<;=^AqU*b{qDaPV8BZ0uyCP;G|CE65q3RY$@#X#FWnmLuM z6ep$(5dsS&iul8FLUmuSk@>Yi=2vtrn7PrFcV5=j1 zi<1Q8SlDkPVZSWbqV<4((-rosn8>`se(_mRmcubsa`d;i1NuwaaKz%6(d-tGMdu9J ztPblMfV2%}VN45Vv0x30hedy>&qnv)4-O@%Q+FzkzV6h?f=TCPh%MVF<9I)rK-kEv86pT@f~bgaIne$M-l4jIcm~N*Y|R zUe-L&SjNQbwX|1A!yqbOtECA?z*s6@t)&S?Fw>xxh9pPxW873}s>U@cB&np$M`Yf~ z!V&gmRuBQOPxvE~9%(!Z=A)zfCBS;vA<`#LQphi>V1_MV>cv6`M)ngWC(&8!x0wzG$^aCmA zijbx05K>;RrChhK&^hTH>aN*Q)gkJr=1IYM+#jObW$XrhDH&rhdA;=(j##IUO}y19 z=&O%EtF<>02DTZ+d!_y1XPbJIqA|6Ewuz>u^tBjjXLEokG-Q=3G&wibQkwP}$T%h= zZCheXorp7P2kC@R@VO}pX6*UolmrLjsiTmeDH8=oVMK87_vuOt4O3=@^KgU_Oi)G_hW_mGG=K{teuff6JJ2XhWXOn-gImRMl%KW z4D&_y7#R>8QA%h6kay|^Dm_9<-9SZ}lTsO|HVjGGW~4sbOrxwUe0UM!*@WYa1Daw9 zx!XS1DyxOjQk!cfe92vCDN$Bm*u7c4Pz`eRNKtcwe85c}PYXO|Up=72u<#GQS#`3SK zZjh0`kQ8Eu(P364GSbrwPL8rXFuG}dBc{X81}%$}WW{h(R)#QJr{bJ~Fl#;&y=4fq z4JSjGO;#JiY(m-)W{Zn3ggJABnU;49{Nsms+96-fJXtF6c1Vhj9w@MUsw$|_P~h0% zHP#GpevB5n$%l(!rlOGIR0)}QI#nko2y*4C zb*VX%8VY3Nr%X7D9F(C*?B?*Va}U1ru3Eme(CyWF|7a82TT$uOTmH{Ge*rdn#T;V5 z*jk&W#Q@9cd$&7x))wKAYez$fC8`Xe|9_)bmt!JzP+C#`L#TJL(QD)1V-nALuAZI6 z2UhvvLH+sKB)S>q9aQ&{vCWyFA?S2wyWfiW7+WXE@7LE^d>S=yGxNVO=han8#GLWo9@zW_0Ew8SG3Hx~}}~zY9?cUXMgEy7raP+qswW zR_?`oH}`Vh%)OvDa!gg;yPkWk-eD51QFLS*5fI{IEcYoURsv-Z(%*{14PH*gQ*TNp2tVYnjal@U(J9rvQeM+uD8yQ_wwFeAnA{0OI%^6A+sjz ze%R+?3-9-m%m)A3j!6HCy+^VP;Z{DaNfSHv$P=~g?Vs40rmfO8gVCm_dI9%&uRIga zXHF{)cA zmpCw(O;V`zxH)7g*^%t&)+p3Ive@libLEr;VNB2bGrOLVA<*N$6Dtg zQ#x$;M_Ugyo`^M3BM_aePHnc@Q`77nKhvKZ%nnJu(dRs6=(b?-J%ye5yT{K3+@s@% zpLi%6kd6yAEcR?H$d27p&Z#EU$7|9*p!^}uXg}n74fA(M*AHbcHm!Gy;gM`zYHPn| zu;05F6Q6OA2<8*xX?nbtPMWeP!wJPW?P2?=uC|}*#uJKD?qTbxPJfRkCb0A2bsS|d zG~wf_Q~5>XjAb9UquiIHkM2-0C&hz2hQ<0Jz13#{6OTT^N^x-@W$Jv`puVct!nQ=q z_PR~BG>7{Y3Uitdoh!HJU35pw3OQtlWk%Uy+MQ^iGS7?$>e6N-YtoOy@@0mpu?X3| z9L`FnO518o80;`q;XpCGH~R#)zf&CyzoKfLVeC@GS=PdF_bBVKR9D)!L}Uc}n)mn4 z5QWsaP^>;R8cmjI4sB^O z48JpHY-uwUR6_#lM1>~oiZBT z$piSBC0}e(0lzH3xGZsivsamYTNy3JEy{{J>)VqpbL-oa1-cbIFY1x;o%>lzzTmY` z^hJlfdfI|%OIHIB#_FtAdTZIpuN~}yw)%>T8dQ#C2C)rfx4?{G4~^-Epf5{MMK%ob zVvyv8UbGMN;Q(1NNHS9tNb(_XW*|VJ5s|OU>tDorXbr#8=woTdGUAx2dMOpqqJU++ zDfe5F@(VtcRn)N7%G8Wm&fHy{k<8L7^DvlZ2DXsuMm(Z<4bel*Q|ZI1o?%GNqi4$D zg{O%6fD03AGA)Y;8~4(1tk(&uEhE0X7iZv%SsP%BNHYeQc1MdnoJjSCNR^9JHh^{! zwALNeReRY*dTy=foYf3ggd%6z^2TZ%|GQXoPO@rV|gfMmZC>>&iFm-rF<^V!Z2;m*5Ax1^5Ct&buL%Csb*GIEQ zX~OR!{qHJQKP&r;T_Lqa>ah5}uNArWd3#y`J43Gx`yB*IJ){dcszfC z3riM0&4qoWKgDIF4OLmmpv_l@+E?yuG2CEQJpQmhaXavZ)=l-VBz3 z#v&3$hJb^1`=rx{3J_DOO|Xrz##LQ{u{QJZeKygzU*q4>_ZOtFqQXr#%V{{2;v1GP z;++Iu{ON`?$=8g2{{YNWgEjFF^|_Y25`8I$cesBsXJ3s4$&<$DL*i8CrKZ^!i<`R` znQ~2>e>K}Tp&ckViQR^CN(M|V3o03aVSBtze=!Jv(TdA4Y1*M;6Us2yz1}}-_5Qg~ zZ`JQ=sPA*3zRyx$Z_f;(YQ=x19pwha2T4<ET=YPHMLP4ZXjuEZHF25@*oa^xIhUSc%pYA=94#x z#NXi~BXd>lsO@I-HNx!Uj8bzIPTP@>-^Xq6nvt2ZHDq%v!&C!I=tZi4-I2628ZihA z?UJEo10&78bV1g;VVa^(q9%5T67qbz7&#Ep9MvV8ed!3i8j(|&b}2rDK$0l?kb>%i z5=)$zRm11bvcX=;_NspB?cT>R5JG#%^@H5S<}iFFMB08ic`N16MA`mgMQ-4J38^8M zRry`}-AnXA2XPg7gWt!#b4*ui=j^5hphJw>m|Eogk}h_D2s_k%gMzS)!#&(IBOxmyTqGYBJ?w zlI2k$i@JwvFo*lK`XFwn9O=%PRCd5r^k-9E$)81oPBdXjlhkIVxj!4&O$?;1l#>d# zu}9Kg5LfeG^9ld8B_X@y9>a%=CCzbdb1Yjjt7SGV5%N1~dy@~3#lTAnd#4&Gb-w-T z_D}sYb4czjmhR2&2FI@xAb4+WHPF4f6Q44JnD-r>a#K4(LLO&0UJ48ERNH5CW%e zE!BqBQ8b&Cn%GpthDFf@eX(p})n!;!EE=fwFcBxQ2aIr+5kR2}Fh%Hs|I(WEQ*Mgb z&|sm5bpb0WtPd{Bzs;vDvpTcAra6+gzgD4a?{FG+fznw0WO zMelfil1CULM~fweY^`y}K3CY350cx}JlK>p_i8n=dGZz!CrdH`lZ~@fEFIz{S&)Qr zTJV|KI8$yx263iN#el@cn&NvnaMR?zD5ljBpfq%AL)}V$%dn$Mk|a!q9X`#H;!4ZF zc1}EYyx^<9xIO?4!du1WY!~bqAO^4@;KXH#F4*Z=+bCo_&~PZj zk=<+gLt|ti`Hbtq&GQHH`m&DS%1RZ7tEBgqZ*beJDvtjtcBO3 zX1}bG=H*4bcurbzO7_TXut%nfS=l4D*As45(YH4|xX*b-?16HBpX`xU{y99Ig+i(CJDBRoC}f;ZM8`p6YJPx@On(i=FrYR zJjq(QFtyY4CY~CLcWv37+aCmDCHn*QuTKvY?R%L&YnQ)~JQ#!vFP_5Wp!{`4EO#G6 zq;ok*e#^*PnHvCR1OQ$r`cFmokwnIeZLn(Qjy|X=rHJ$hQIfIj!Qg!ek_B`oaTEa9 zkO!d8&XxNZb*L(LYE0ggWtcP7+Cp%P`uQ7QGMwdG7NlFRmD69V@A?LTsZD0iXr~&N zxRfMo5zossAh&zbXGSv28vHRgYalwyHPQIxj~k*AZ4uisVN0FjkRY!bY-nfvk~F`w zQDc)1@)wi5g1Z8#wy*%TmA*FPh76q(Dye2)MQ{R}1Tz06(*ANXZj1%ioyw=21x^Oz z1^_azU{n=fp{Tc&5k0jVuV|%0u>GRXss66pfZ{)rcEr3q+uAh4Bqwq(jCGK$%MDcs ztd{Hj+Y~sE+%2MveuW5wYDPvnkn6`3jL3mkB z>Pe{1sZ|#^w05*2jb$xh1c$D8c)u(xPnFHtE>=F8eGDr8Lm;=6VDPkM&OFL9_Q^QQ zh1upalLk*)w$N!FVGEIo7CFLLWFUj*<7Af%9-4c#2BIm#A4Ukq3bRVJMJ&kzQeP-P-wbxvdkn3R{-3v|JfW07?<}!B+Y>;@2v9`YF(x z*x_4%n^_r3gJ3Al76Tbdvlv@3I`j=6i%{mo|e3-BQCOV zP(!z1DDh^>W*cw=*gb8b30el2V=P?-ycu9D4Wg<>3=9Hz(|2R3zoW5K18@A3?eGne zCBOy|zDc_y%=t0u<+K?(Tl@A(x>;>rz|vLPqEXZ`*m3tyYKcDFH$NWF6zTmsw_)$ zP^4V!SQ9ETnA%|O_5rbBurR2M0VZ7MN6RuNisiZ~(c)Iqu|0-}Nq%h+y`5eWE+Lzm zs%%N9kkrK%vj8EVa#f6zaF<@NCj2$8{8oZ>WCB+tdtjsW2@sNj{L_CaU}HMWw#C{p ze(m9}=%JnJw7`tCMC)#J6AE-Qx(TiY(%CJGMEcNY?CM$d+2{d2q+4*HAw>gomP=+C zD#xSeiu)D3GuUVr4-{(OemUxEJksRs{oju;f;p=>t$|eJV`OP6)lM@y%N^g)^x}Sw zEc$+w>tJI_8gyV2N;dff8(fKc(@1y;<{N0vC8^1QR@q!J2OBl1#kM{f(swl(29C&u znnc;8k(4wL&{&^LD}^iuDA`(szt31nf}O3Lr`h=Dlt?4S=1?U4f^S)3E4gnKOCOEx zaNh8l$iwyy1CI7~Rb&r?DpD3(Szm=fv!h&~nF<1aS&NEB#b$rWHmc?)!BJ~jc0Buv z_0}n74M?Mpc;_oQN344-ukiB-Kk>no9TiyH4*Bz`MvVbMHg4hBz?MJF{Y0l4tyK_x zAqqi6tzct*&uOe$U;({PZgX^&5cCF~Co#TF8%T`HdAhmV%$q5jZQ1|~*R?@6Xo5vr zx>(Z$*soTTu4{ts?wX+B)$JOfCk@bx8X)D8GyogF0X$7=fyFIaAXnCs{y}V6fT7a% zj(g?!{OnAloBp$i56QS`**uGmmp-6Po_2!p#qf)jGT^OB8BnT!y;v*?pa^gU&G z7-NY_9Hsi)9YemT6yzYNw-+8|eNSe5=c&;ks5NXHePkNI@|Z_kDF4wyzK%38deOF; zXGvg$sRPb&jp`tmWSmf+#Bv1fLf$oXkZTf=q^{^CZ`IX-=LxAIUG23AlGV`jKCJ?I zjK$MV(I*ZpJW8l^gtQ7SH!2Akrs%^?rL{RZ(crjqW ziEqcMq z;IE5zm(o_!)22j_(u>SWZI{x!ak34uij!?z+@w1bD-iZ6Q(USI?ub%%(ZJ{=cEufl z(R4!qqpe3TDd>STKxi98fY9VM(Lr5V@4aBXcZ;5^_pUmK0Fi?8lJS?NE46p9VsS;9 z_fKB0h2e%M7LZp7+HLY$f);4+7UVT=?k=y1`f+)E0C{~K%Y7bsJzonfCVppKH96q& z`oJ#ox&k`&%kQc*rEph}+4d0QN%%9BlO#Ic$AnOtcO#F$x!_K^{6ZLh!62EwiaAN0 zLwYx)=ftY$(MQG$K1I7=wrdPAPOl|oOs|Ld-utvA+36JczCCYbbVqo@yoDI!9C(Wz z_Vt#Zp6=((ty?gH+%J7H?+O(s2y#eB zxkO-LikFf4#9o$&@*wb7;2nV-oG>Z=KN2Ps8Z$FBj9DUY=mo+B@8`^B(kkxFG~;|L zgu2xRCa#RlvFi*)W;3JF27iu0gJ@Vo12bneb1XB>Ma&3H--aWG0#72gAEkkL!sydF z&cA5Z*nwycaWzUjGM?H`CJ~lJCt7I0mIg=AhuT<7iZLd=rW)NrmsJ=?u+#vAP54nB z4U6+ZdUaCZEmXk{yjUzCF46x6iCux!ayj$M%&_=W%q z3u?BSE8J=ascwCN>l7&vC72hf%p@A4z*0e0v-|Bkv~&=z!l9k6S1$!zM3voDc-rU0 zzHcdZFj;Jr$O?$56$>*TdqD?WGyZqeR#t#1J{PL4p|tOZn2!fxgjW@>!j;kNv0jlO zYW{&3u3w2B(>Ku_fgx({h%>rgz$Mu!fH{=1l{rFT4};U~RG2qti@XXflD=?2%4EbN zelpK|3HDxw?jdRdf)bN^zdj@;w<9fkEF7wRmXhaXdp^T!ib%e!D?2kht?ONOy6(KD zT0X}uz{f={cPegqzL-_q^1NV>$0zOEdBrk+l1Il+Fi|tF<7v(o^PFDUJk1@4W8d*L zkCc8A;#npcxwGrxhI zd=4b=>41AE!NRjX!9^KQ4mFXdr;Sh^+-Aj)f(~#iW}`7WCf}>B7lO{P*@k+$RO!5y z*_JPA%uMMVb!zza&?&Dd+Gn5`&=p3RPZo5g*L2(;d{H*!#_H4#JqsyjD#0Kz%da%d zJaK0cHf%@(1Q(G(kgVF|gssN7>9C#z1w$n#;--@hq_RXw8wU|3%?i*Na=%|^jvtdk zT)>^Nj!ZEgnuzegQ%z3Q-lR>7{6D4Sd7UTA-)|)}&pPfKpm}F_>h`0R0T-NsMp%yv zk`M#8AL#P*wL6UAd%=3IX>WQ)t08&{PXY>~8JL0MsWX}@uUE^ej{%tpg0S-ejiuh> z{5cfH5C@h1fRhiSE3WQB!J8e5>4)JQ8-6-8-1^P<0z(f`H!;d z*mbM}lp>VE$bx%_bDrVQgFttQL-Shx?J_I+`{A;Jv*Rp+7_-J1Y)%nFLENVvt(db| z3?Hx)PSQrT_adV*`Sx+Ne3;EDrYyXAmK5i3EQkt;K2R*!$?FKF4vQ%AJ|o>`u$*tj zE7#vQ%o2>&Fm~Kq3$RJft64Sm87w)k3aGg`X33i=n{AjS%TA_k25W_G(hSyHtgW8I z51xx=9(KoEF!Wa34_?{D4`z;|{!gE6$1p9J$|i`#04c}h@uJBl3_RQS(r7|Yx3D%&D;pu?8N`NSZkWTd4$6a=d{-49SfhGbNhZpo2{*} zMQL1Ai!N?ye9Q?W8uhrIA|lr*bJz})o-5zrkW#aK`1XxxaAOLDJXedkdx?3R0~dgL?Cwp_&8=_4L`Q|3Ft%czXCPp!s!%?1kG6(dyhflKQ+{DS~!cU zgu2evP**ElanTg6xM&JjTr?M6i-$(y&!x#WKENPt>%)20Kq^ygH#H3R zWMMRLi=X&}nvLJ$RzPw?j?tF>jdl(B)$AIZfh4Iro^`}R89ahD#!jgZWj{)V%O67s zGv#0~jedft2pn4HEMu{s+rn02$@xNT=%<`7IDAAy}# zBO}8L9%D}{j*2D3OM}QuI8Hc%i$$M-178)hw6l%NI6zMT?+~eUp_qLNy^J%v8z*z9 zt`{AKk)n5RXAD75A49W6Z4AxU$I!cBtJq5q(~dA==gQYvZ4$a1V+)e}KKo%^puu#( zKNX$;d9Js-&wo$0H}|i%AWRqjV;8!hq?j~&is%um`6;2cVdxt-xFAW~KcUc!JzX)PU)Pn9a*PWD0#nozq#K z9Hxe?0}RhHo-o6@;zn)|>gq8ML_(hOJ6g_ak!v|<(-6DRnPEC1>4Rh|LfJV$DB?6J z^9?)X)FOB0%I~HHKoIs8B&$iZUB;4j8BWVi9ZxZ_~{0c0=9#g+`V|F9=A(Z8?l;2Na8roEzA{* zJAFVom{y2mw|ULjohx5uz*K?u(CphrpWoK7VF<*R#hI^#ar3P(ZeC^F_|TI<$O~7R zu8xT&qa9h!wN>oED zk|G0~DYOpDY}IS5=aeVFIbmT=g%QlP%xs~Hv9mOhh0G~V_=@|#6Rf#*!v9aSKC zv?sp+Q(hbechaM`+1i32Nkx%QPMZj#3W2Z3ET%Q#=z~7fA7%#YJK}~l?U83W+{sZK z7%XNY5@-2*g#QRis$ytE+_-|A2p?Y~@+kz;u51|C8{Pyl;$an$Mb8o%dI|?Kca<6- z+5jO^6Lz%d?^Bhwhln4dl>3$6DFlSF9rRIVf*WwOUl=WW$ygb*zCE(J z0TBq$^r@}GUIp7%-FEBsDIInvUJp|``2AM9RXOEL8*Iw;03Syfm?oN+fHxyUkK4Vn zHw5jDI+I{D{@{d(Dp**sv_6H&x9!}K?`J3OAQy=H+Q+QLKv@g8sL&NU!T<|M0$_nw zA2i4jtuFXr3l(Eb1GTJ$vA3)Sj3koh;jCJefnslE1`Ei@wXer6T!?R?e{~*gb?*zf^^ zlC|hzXBm(P9N53l88s0HoM3&&0VC^=9uN-59KIWk zoyDgsf*k~v?F#EKh()!Z;nA@ZIf3um8-k|j5D6mK6~pV+A&t8hK~Z&%>_YwmFsArB zi?zOXv-mqv59<)ts&|lO(` zqTaDELiW~9z@w4tc@HBDT@C(bgYZ;+5W>WP>&8;Q(>1|016M{XXUs~t~1)?1ZOFw99Us(SXAi;L|Yc)uahM)%l8u=s*!$>F@ zZMk+2Fsn53u_y6p%Z38Wh~ymrJeI^dfCsGU03OqkGPq*UAsY(6Zvfuxd=MioDWo2(_8!E{NlYvE2+~tayRiQ`G zZ-^n+eS6Kt@P~BXXSFabg&El3n-X5vjh30WhE;E}&BD%icH*oXXXKLt7i-xtc&EIm z!&X%75lESx;fcs5;Dm!x)<+LAN%KHdKpVE1+gtPIt)Q)Fe^SzdOC?#J-DxjQ+SArA)HE_u|Nh?fPb{^qlMAOQZ$Yo};*b)cAjcT@;);*YQW*NZp!8X(W zY08qm*}`WLRHURDsHipjEzE?fJaO5UJrF`+A!{PYLc>2~4TozIDy+; zGzOx_74&O{q}0NcaF9RLq`5-=?Zr&H9qrlyp~A5a^}bXmQc|s3S;47IiCFAljFJkh zj2+c1vpQFSx-dfGcXrB}TH2E6P#rAHo-a0Bh{ zV|!p=Q(*+!hsiELFAZ?*gEkU1({Fp1NgP`YF~wqtV`^wz3}FXGGdImb31j^o)$Fas z4%g^t?Fk{ttFAH`Mp_@pMHZX&Cw5a(D#>EQ#;XsbpANg1qcn^yv`k~FwoJpC7M5w) z>D9JOgI@?(EudgRV#+p-#k4!0WSlMzE(i(=gY~wJFqM0`_&V<}`WcURc9$tDF@GTA_ljhY7 zt+C@&wX6hQ3(HEJIYg?f@0*3^kui>`oxU-qCfn>t_E&Df#N*A~O*|xeW#Y-aYhm7L zo2c71?_&d3#m$=vHZ ztv2wsB8P@+S4w_Lhu~5`-!Tz4hf*#nme1JLEb&6wVmXOj*Aqxr880z&q)kWuk4b{j zawH9tMG3x}s`jBGv)WqqSWzFdR;-n$<%+y{+Re8!DZtgoCyN+qq#JN)5&VuBcfDfu zj4g}P3?x1{!}bw@5Z21Uv}J5o9p9K#8~(={GV4HTIkU>K!tpc7Z%!{av`toS4i|kY?)2;fpMX&0A+V z=Bu%7-?bukR}u&In47pX_yPL`>t)7%VO8)1@;Fugo|$Z?;<8cWkm3QY8HP-UauCT! z`Grw+nhU*LGmPowCrGpnZMPW4I$(C4=3yEnJNRmxb+KU$+Q)NPW6}=xO~wc!+1(Ca zKaU*@9ewnLnQgjXKq;8Z`>{(UqsYf0CdSzt+aWR_j%1&>1v`W{ceg{>mc;Flg#a&g zX=>Lo5!)838)g|7Tm~#`gO_Y-tl+he++-uDltZ#L5G@lfemAa62~biF;Brh^AB7eH zwrsJkhe1i=ec%ZeDHoqe9=6ySg*KXtw4^QZ3_r(J*N+u9M! zUQ1D5BFkFn9!g(Rl?(vHN1f7MO(e#(At9H=qI(Ei;eO@xu`$y|l#ATnC*{AT;ZiNN z36sg9gEu4`w;Pc^fz-s_*eoDB1cKygDvasz8pMK84uu{;pY*=QP?bgTdif&uZl zrTjS6Mn;C&dCNpNh)SY`+W|hLm9f520tcTOrQ?fGZ_LTn!!0yc^t@A9_yq{zmo|Ne zZzBmd4|MvNl@!Uph4^7%sNqi3MwUtYznY#G!oznOsbZuy%PunyMEBtiE+ ztlMK?F~zZ`XJDSVgA0@s9)g5w(fs(k$8(#M;FM0}fx`Rm>{T zYPJ^Mx~NyRsQ{JGCbQff1LjaE^qepVc>u^Z+eXW}Rfjhey{DL}_lOWCru3mC2$mSv zd1Cfd#;9W(3oOVnCctAth-zJ}f{NqHez))^1Snhn21X*!8aQnm3y{HlAwCE{Nn^UL#ZRARUxQGDXmtg=)+E_H8L^M>`ZqB^O|-G zbnk%JS*X?|(IM70qHDip5gw#&)(4YOoehw?D!(BLJN~zAa{)px6t_65%>}w)a{;!T z(&hrQl3GXEa%xU4hGH~)gW1_?a{;PS$3SN-s&RG#1D)l-`+$MI*&x0eZ`T|G+m(h@ zGCsc4bZkG!lZHwX+z5Vl!xFu#%>}Fs5`&C0|Hev6GLAs$9X1!(jiYU-C64Y$gWRl3 zW$73@*yaL#c%mD&3%l(5u?h%ZD4+3NRwEw1P<}N$4IdZF9yhlTwsB3!`2zc~E|gc< zk97fk%@$*Ql$q>{@N{Q z3f|mZQ=kf6Q)uS*63}1|Ezyfo8ZFUtTdn9g7k4JKM2uMDrM)*X%+vQtKOk);#2X=? zLA;Tj8DAm54pt3%hzBvQiMf7T7Z7Yi1>aNeLh-)M;YW3*bdh!*(Bu)RW^e0(PsGWx z=xI0`EP52~qv^6M%_Zq0P1FOe*x=06VnKT2CQWVm>3wWuB!g|Djc~aFJ1Iph)|WPB zsl>VAUxU&uO*0pLRXoULYKUD#i3g=f{B0dtntN09YSk3quWI;18Z3QvU>|vcb>#ag z^$+F6i6*_xN5h!EG-0g{lV#gbnyUCW z`-nlt_3g$st=QWbit081XvQ~bhGMtWL1f|2Sa{yV=bS!h!W?f;7 zt6pe2c_UG1Bu$6b>3GG1relQk9?b3`?L#pRs8=4URtDZL@*W%kHugPOhrpvR0zh_xFJBg8dzSgD0Jz4gH_(F$?i|zSawV39?AZbTaewnxx4IUK6BcRK-IL4wxQ`D zz&e-^;_&~7U#~PI4m;&*rjIplA@3?Bbb$OpxlY27jyfhId{)%e7JeR zs!LmGN$QKWci^w#Qzi#gQI$#m#v){8xpt_d4k08o!Dglw$!Km5M{%GDu1HIb8Mf*eu&yr&d#Wnk0byZZDjpQGyu-Y9B zRvSlxSfecigRx-{k$t3H!n|%HAJSg%bSnXtg(TIobH{Qtb+#h_iBf#B9SN9RLXmPy zmLBtE6P=NQ?#rNf13+d=CTxRQin-ASvlf+a-FZ+^)75T7w!_iAE+g zcgdon{XK!q^-hzRsK;(EdF-|_G`_10(^!#j<^)*X4_Hlr)#yRXva);HLWkR$Yn0hz zZnt;@Cd0-#iSLRav4w>8Nc*lLSOd=wK3+Vy(faEsR3@J8d!hXNBcFMSMKN)U3{9D) z(UD9dYPqcKN>;fr9mTOY3g{VfVGfLt7zK7^0zTTd_e8t=u2oIy+$#1d+j>Gjn`gC= zEWeoC*OVYKs9nAT)5dRV&H0p?^CV9=-FZuUl(E7Cws5$pOf`>kp_(d(YNmZ;RciKw z3OeJLQBU)iKcc=kBk^p@xOnA9w2Q1&@ks>%;hAX;)Aqz)0|jwOkR~7bFcHtjCTtlv zPn*bcHbw~O31mggRNcL-QK)j=Oi&$AwsP{^s_q|Zu8tlw{^#d#e0*a{W)Q#EFfV!O zpwK>7l9>7UVX|=+Tv%3fRN4Uj__ki>gaFjPj2#JTgU2}{Q++9vT-sQ|hCHL$lJZSv z%Z~Xrs(kt0!0lBo=uXzq%lfTK@qod)5_Tl zK-4|*)29V6r3AAHnceV&jd``ivUoORVK4B7Gxf#-L7SO0hP|Yt2(c{P?J@&1+Q^8W zo4kP>y2%^Jpqspb48O@6aNJGazzM&}8(5q-c>~|`CT}1cZ}JA#)=l1EVBh48*m=A5 zi){VPwg%4L@+X_;#yzh8pc(DKy~SQmuWdfmc&1tK`$)zCoE$r~RP4o3YBJ17da21s z;{I9_gL3bo=G7(xY;SoT-*18I%guCzr5$eBAnkwSnSmc>bgB>vc&Ncz|GhxUSo<%z z*Rr?#Ab?GHfum*2RG74^?E`|8~AOO2xNpmvHPa4fi%w)`|En*MDvoa z2ao69qu^qEJby=5+Hvwk{)YW5|A+RuF&S;@MXs-e>$N7$d*>%N)fDa1aEPmVJujd6 zsm+Ww&37^qi{Xzp@SKA^02P7ZLP3fta{AC31vu$#wD%W(SDlh3uRbJ#;QsNb^ z8^SV%C-TcmYZ7kS;9A&rboS0Oy1)F(qT6NtvG%M?7!^(Kyo!{Av~CWhd_O_Te#LgFZW2Pc8H^U4nWK$ufSh zI*#Wri()W^Q4ppu3c?hkpqS!$U118UVSV_Vu8clWUZmoH-9%y5D84HS6Jxa#g_WDL zzOP1=Wo zBN8b-UQ0~e;O-tBioP;-!aMpJ$)NZ1|t*uG20u zwq2xs=a{6DmRz-D%m#sOvn6|tt(I4ier&$_yDAMNDhA_F&aLG8(H*lLwW;0p?EH8I zC8M2v#@%9d_`l}G3KNJ}CM#?C(x@frWD<(oA#Udv1cGQHZpC+z_Z?5jsqo{FH~bSle@JJ7%u8ogcLQu}@ z{t8v4KxU=?Gs}DgwN+xlrj|b^s&)+SwO72@^ljq@!?$_;Tk?`nB3?b@^7C(J4^j64 zJ!SKf5JIPczz(euIIg_1Tz8rU{9n|8oPN-$=*Twy673}RM@vR&<9M6O#k7da<;gQ!hSKar`9?-KvR-4&6#aNY|r2iQ^n z-0**5U_e@J((fhG7tX48tMb$2Pa*j}(89fkhx@&)kH)~eEvD+VF%@(JYF@`*mUo~b8pU%dTm z6PsawQ}u0Kf;#9T3ha-TnBxr{&< zev_mgQNXO;S*pf7iwzFtFuCIN`+7Yxd1+%narz`4s2Ib7^bt>H@|BGlkwRx8m zot~cLLoD6$i+_7FEB{z|vsCnpvJ=P-h<~R19)_rNw<=)f3v-%g(u^C?sF9g|;Y9N? z_J*vPOPb&`li*2&)c`>y;|PDrGL2d3O>AiJk{K#J{CQ$qY0>9pNn8&TlTy8=j)%W! z*4Fhrn!T8XEXBTH;Ynn^mcN~kWjpZet=x?Vi40AAVnv7~HRHj>i9fTxsy$oXVpx#j zcT=fvsnpdc%9fkqBsd zX5d>h3(ZB=?EC;t*meQTngq%r=M&-S74u$3MnB{*PH==1m$Sf;(Za(6mhxPztz z&xQqE117C6m_5;@DK-hc^Dtdu^WY>_z0krVKbXzU4F7L5OsR&wqaWX)zEH4LKJ(N3 zc#}Uy*+19Bd-c5|9`I8lo<;YZeh-M(r&}~s8~7?S|F{*|P-boJd?-ga^p=DJuS&*Q zcOqpQh}v`yg44hpNcVJngWgZ~$fE|lmF^Mp4Fr+jOJwHa70bdQ_*^2)vWWNgNrLDx zkU*ElEy4A<*#20NN4AI2UnmDM9f)l@S7zm}XEH;}W9P=kfv^?6Jj3*F!Av~+m8OQ2 zHR;y{1Q@l&&}7Z<$N#680wzX#SSmw6+9S}0_q+u>J4HrslC1)6^NogfiONgV$)n0i zGeyU9YQ;|s80{{_Pi;A6_0*u`7b@X$b3h$cBUM_1h7h{R%E+)EAaj~$jr;%NA69I&fjb_8lOk7 z4bP98m0-&ea5SrZezu)Avt|RMia;!l@9E*SCh{h8BvlPYA>+izd~1}?=#?(7Xgw$l z(!{?vEJ6X)%8e+Zzo{L^Bt~zq z+OPi2cT?>*(pT?Ywg1D!HwYqzh%q4~?bGQ$sWH1!{-Q4GvHrR8ntpG_gr$)1O(oD# zyfOT{P25CD6tc@^miZ&LHjd^GEI<5(=FDH-p;RyPjjxi`eECPZOk0lSclbU0xruCd zt~JGbCeP^WLHW0J=@wFr<@5Uevi_hs%dhLlxBPC0TF;8fO++-14>LdZVxHge`IZa^ zMKU*NSwr&0nkli0Tx^&lkq0?z2?*7u?p>%#z8Z_Cd*paiayvdp1T`hs+B-Cic=rbENDoNjkLJ0^dux?1YT{+ItQNG-kEer(*mZL)368D* z%GqL>a>fTWB|Uzj7;g-JX#e<5g(c1Pnyp^eYtQtidc9twho!{15?buSWsTZ!IWV%s zRVD;L8J0$DE23DXrY;A@%%IDR4D<8SfFu`;Etii?5?JIN?quLvK$Kalaw#gKX2FKK zw!k5S%L3A7^Y#=IjMEbF%kHg67);Zed`Y^7pg6Gm`HHmDPmX*z#2M;BcOgy_O# z-BPii8bA8e8vY>@*}OBxfiK@qb0@Yw?FnYfst(htzfXf^nqIa;DW!|mYQ5ZCm2aYP zAp`Uv=ti?M8tXC~-A&faAB{CHzbfSLPl&Ih-lKbX0RBtaI;(QLqz7H$zx-vcC}n^5 ziRMM}9xDcD?#y$$b$WiJtyXZMg!XZ8f|yrQrqTe{H$ff zd&os({K!5IMagBP3AKBIOf~-Eb4Ep$oxmVBH+PC*VfV@jrNu>-H61eKmphc&48R5z zIzg^%_K_2rs(es+VoRI5MMtSeU~1buY1{-{<>xgh0f!F%prLM%k9(~VkQ(u>R;cio zz}Zwid}~FXGMmH8kByDR*ElOEayje3?Hj(VeZ%`Fnpd?*o)X7|kpB#l?AKM9t0JsC zTwAR^mXH5+l8Csmo@bLK?%41|bBE)e@gkqe#ebPBwUC{CHa7Wr(QD5!2Ls#gRGyw? z!EW8@GZwvHqbPlI`UE-nPvHJdRRHVklU&~3l$v{t9iY(8Y!Fp`o7=D2yJ9A72MW!Y z8o-_6DWYolud2x=qaj#sm~6@~@Z0eDyu#;c0r)&&slvhe`AP#GaGBwKf{m%}@)tCU z(({3=0pV^?;41ZN0kRp&0olF5a%g?&|CDU7NJxF~7!=b(?;>=8$}ro|Nit>tST9NZ zTFstsjQ8T}VfOXsTUjxFVKj`K@>n?~1Dfi85?j=`gujgaT8Yia6b9P8DY~}3fo~s!j>J0m|2F|TYPQSm84>au`%xX@)W|V z)`YsuZU{o(bcayCWFaAprSck%j72@|TJnH;-GGsI4^2L}7a+p^W28?_!SPDSN zrCzxRaG(M&q7}%z;OsYDM@TXYI`&nXan*LFl{psu)f@g>3M@Oydtp6BleY5Zu@J3E z=TV9+)8W0x!&|h{cFb)DQimWm*O+E6Dm?FTbtT}TL|TaBlb~qEGo2%lrc(!+t>o9$xgv?iFwx+tJ`r< z6gMCGBdi+nJRcsQAG{Ae;1cP)y@_SB=f<0U2?!g05e^)iqK@ya)F!8te<4JzE^HO8fCDwHG(7$tD?_p5IxQl zU;*i9FP~*ah?ZRk1W(w$1AXfQLX#21A?WoR_Lro#e6rZZKaGoaFB=z-*(23>JMI1Z zG0%RT{>3>C+5c6&`|nrpKIZQ}s&Lc5N6?wyQaX`hA`UALST!7Jgq0y0L4`!)SuZGh2?ZmU#PN`oeVgA95aUn3373nCX_#|?8-m-JB*AqelJ zGL|_vT~$c7GHYHBH4DWKQon&p;b0vPo*FnU24=eC1$Sh z7vej7{0wx$04%R|4&ti}aBF-$A*>;vSa-Fl_CW`zNw@`puK(!IqnT3^HOs_@q=HVk*#>EKHG9d|~8Jew<^Mg>N z%;9K#?_5eF*1QpN6l{>-O5tN2#g&quip3Ww!mF2@a{Pk-BIWu8K9kn$8b)PnToIPI zYM4nzXnyq5+nf=TSt>uOL8EvLg-EfhKHhYASpu^wmxI4_AVWh^IQW1U$CL`6u(z<< z(|5m+Ec5?p)swMiQ=G#2lE9tFEtn%M0syEMhA7h)_`!f>CCjc zGRU_D(TaHg;-E-oQTi;PHj?QKj%fpMt(GzrW1So~1Hb`Mg=7$2;=T_T zM=~T?mxN>N6UabvW;h1CGw$&K>9XSJgS<2wDycA-i4BBAW(pIIanf-Nx$I|aIK_|} zkD3J+?U2MWtrMWpQyWa(;A(Hk#@@7P9P#k#6NKI%6#F*E&8#DgG*xCyy#25=LtlTE z#xv)O{NLe;ObedOP*`z(JcDd(7A+xTt)h9pT>W8+n^E*un;L4O8SsHdf?kuqevuh- zHo6d%gX%%1BI#96uy(GRf$TpaFoyZ+DwIX@*?|h^30@B&UUZGJQ#UC)Yzax=ke&K1 zWrwM0O}5EQ;pHJa>)x21kWc7_aAXS1BHh?R1qg_ySftBT(DFWyg_JP2c&satTS94k z>{Cbmc40Op5k9tU`ecx^cWR}#kg@^RK`q+Gk76!cDpE(71WdtLsnTpt9AP9)UpQW* ziC(&m0xD36dPKZvNiD__bG*oeBK8_@!)8DGL%c||mTMWhyur*O;=z;2j6VW|Fec8#taH5{$L_H*4zE0{+ zI8jeHQU6ba6QP%H6({1=O86K~q>{JbL!E?&P0 zRAlcyI>Px0tYlD;*?Kji)zG3qCQOPOqDA#St=5jutUtgBs|I=*U$rxK~S-WBI@T97E&?ziWU| zZwp|gC9J_7Fu}TttL#@Z2^p6WO;eThyw!^J;02$-0VE~e3IP4 zS4bq@D?%(XVt`h<=8tLZC2QmCrlrZb3;ZTT@^iYtKCKH5`mqqZkh_)t0K3Ls)(62^ z(>glg6t3D=I3m*G5QF`D*x+$_N~1?AP}Qm zdt%Jw-9&IHew%_z=|sx}r^=kfMRTmUp^75}38ZL_T21%!7)ID__-xteZj45B@M84% zibXkonS%qFa3$KMH$X#y&2$5hqnY&Rk`WJ~hau7s?@8`edI*5wfdGgY`GwSl)lW?F znZsr>fK9htwA-EBGr4aFR*xzLX11u(V$R{MIiX8kL{KP$Gr(=VB}lh4E8*i<2ZG37pJLfNiYXSi!LBV>V_fhj}RIhdsbi>j3(ZtVt~O8 zZ3*Hf{=#7FS}~_p41N!XlzWcQ%);`GngZW;Drm+BfqcdHje^k4k+2#8LBNEB5s|~v z5+^)Q>qr=QJ`T#XxyQP`oV@mFATS^?AQxd{0A(8f90|6UxA;oE0RqN1g34ZLh-TMw z$HOu%B(ie}$e6e;deerTX>|l0qL2GJ6vrZM>VTQy;#T^Is5F7wbx!>d#$yPowiZykD1l9@*!6p% zNeIp|bXB5&(tALOxX9XO1{>@%ib}|GZL90qbJ23)fJ2gDVxKQ;148Iej z1rsPw6zpv=@?4mH`Gsdw9qAZKrsBs8pP+7sRuJ$Fa)uyW_Rmw3?fCKqWihagCPhi zWqw96LT1)~D6j27xorYbakK|P>YDyTx%m&}4gVoELlL736uxWHVx4pIoubg@7nd8+ zvM;M4;V8)Fl}MJg$VPtjAIi;ts4xGaToh;`L!$hLAW}wNatsBQ>C9|GL-7n2o^``* zLb|o-dO-bnJe{m+t%{wZ7+DpzH5fkQG+%Zf>>KwVvRn5bVhdXSLwV&tl)L{>9{q56bXckB2$v)tIR^m!U+tFgb`DlXpvVz{l@UnD*Ti z2);r>mIw9GJrl_wElY;A=vE*~z9W>gSHP44oDQSuGMrWrjc-+1q|Q4uad$IMT#kyV zw~!xc6lWpoI$F2NMxwud);eXrNnf_szIC=WY^I!=*EjhMG8iFfhh@0umBo5eXx|ta z7vgKPL3bM|<&Z4Rd1wJLnXzlDl;bnAgQywnZWx3tk34m+G-rjJ^f8~jTt~K>9a(~Q zn;ThzBAgwlmp4z-(2^mDL_iv&)eF{?zbq?IUsfPyc|G|qZ7FNRLu*Xz<(sUJ=qN%h zH^I%F*G5mj^_BPZtw^exS2={)W=n+qB4Rr)bhJmcK(rYg7Mz)di1>OJmJ)$pLwZXb z5~6uEB1|cTJWUXRhh@ksmuT8||3s+2GpML|x=ZGPqn*nLZp<-O2ie~o+@h0J=ict% zK8bVO^vL3gN^(eus~O{0V|76#hrX;OIK!4g5R2dOz$ACPR!{ zSmJisR|DI(lNVZzik?A_$fhxDdVn|Bizf!g$cweX(7`0(ZyxN%7U=A>PDL==ZUTau}fow zcccE<81eF@lcPRxl$(}~>=OWCq8-FyQO+0 zZwT5wq6rJjT}j+qC27lDM=mkcI4G}yI0z-}2P-U(ZE5sE2pfHrD}B7u{~H4qRf$0Y zh_TdGcO<_v=>O)^q8^wo2C&RmC#q;$om(ykhCt3W_XY?tQcH7ZvjN8zpCjHLL=5oR zi0)nF9LH@1ExcCIhv=jK1si3~Rh#e*{OkDjS=4ri`x?J~(SFrReDYYW#2eJjw?(=< zux_KY1N8#}^d3R|x&ZY(qH6)_I&S>SrkHP4%X>SjTv{H}(?Ql&Fpq`SNgYG0 z5&@_baz)~z$z~0cheg543I@D1?e8jmpf=G>hgestBOQoP|;3oCvuG^!sd6 zr_7xd669`QH1mdi?DWMa2Q!?7)}-VtUn}G`81ME7E&b^K`2i|6q-3jSGH{ zG%aa?4$g&xk6gTMYUm8uNlRnol87KJ2(Ah)GH~&>CM_B3#*BisdmPKUc8|j??f{nO z$_i*Bk5)jyc0pD^tb6j2Lzs)sas1+CF#hSAfeuC!Ub0{-zo+Oe_ejdSM_V(of#>Z( zCF(4ckJy7EN-hu|dk}q7spFhIXc+j;*n=(3axX>tp^?3myIBv>W4szHTORPE^_@&K z&lMq&=QcLBZX+&`GZHqk7#ApK@Ovl0vghY(@VTZ^#XKUg3t{(&z-71Wagk-uPJWnR z$%e#;Q1Cbzzk$aOL(uriMCx(Zq5->-1(*9z*P3yIhbB&hq#uD8L>|_QeJR^CxiJ zO?WIxB;a7U>rx#xv-W2q{w%V=BmUZ=r>ZAf>=2)u7Q41t?Ai^Bo$9BEiEPoFa;-4cm`#kOYgJji~^`%wi|H2`!9XT-U`>28$hqWU(_W;cqSVTa`%t zRm5K&taf&klz69OgBk9aBH7`Uyi5^)1NY<_u<8J*j$yK00om<5sCXT}5thPa=yp4d za2D}5+CAcrqS1KA;by^jHy!a8YH3FNQM9(;EsE)?aR=NXMi&kNC?> zos%1vFW#w$KMu~3?P=r@ekx6a_{6S%?q| zBD!%=e8>3`)s{~|oMP;Te8N%1b;KX=I_dK(H!gl1V}3DfwoqFs`?pm#M*Q*iE-yRZ zjZ6BPE5PLZQp8^cBlF=xQ<1&h(9j!;o?&JaPgyHakL;6 z!K*~{+{m|Vg?f!dQ2B6K6;{)f50`g#;1Pco5u-30c-N}2hw{u%VeAtFaburl6&%#Y zK0Aas)nS1fKgoHxEG)j|&hRW>^dfM=3lY+FJEpQMVxUO?spouH+H-Hmm z53>atf2^L!7HB*=K9MZrwm=g`-pku)3p8N_TVOlb0ws(*6>NdJM{1BQ&?FT823ufL zT5wxnkQV0I0!?zM9k}=zY=PX>5{labT};{D7I>Z80;2@ERVu(1Xk)|{NL|quXrmV3xa zHU)?x*Vldqrj6idz{-Oopp6`pYAwpo{TYNlzhjn?P+!+1=;a#kOyMwfBh0yL9LubT z>H*z0J*9e}!7iiLR1ZKa9#pCq?mG7BUV1AV^lGhDbcq;}lCUX7gDZkz=Jlj*eW$54+(JU+Xoh#a>>|o#Sl!-J-`-W<^DuC?GMY|iRz_^fJ<%_@ zby+pgemQpXL9B!~sCBr2iV~UL-SeaKww*|GnN|lZ{NSe2j9E6M(Z4ja zex0P5w(uNPrfpYBnSTTj;*{%bm1>~FI|zO*(?ni(6(e77XtK|7Bh@%=8Nq= zop^+rDpaC!!yW(Rbh+r+#&c5qg>2)Y#Uejde#u7Tc^V6f%zPWNjpw9!Z+uI^Mz(Qk z@oeLg{h6xc*>?cFy;xJQG(Ts45Bf1yXd_1ode}F_B-1ninstdg5`)YtAcishPcI8n zhE)@T!SR*^xl2n#i)vNzoyu3oiIZm^XLcm7ldX@*;nR@eSZT(42tEH;1$q=93F}M& zHUuf~BPu|EwCr3n1#&C!Q5BFpcVtTeHV~=dXH`I&8m{*6X1X$)Uxfd#e0bzaV%8 z1fd8{Va;y?f^=&H(YMgI27*vajUaYV9CAUh1ZbfxH&I1D%z^=!hJcBpEg)oj?5rB# zg+ogVj1h%3J11&$eo1+Mc5)Z@ibH%I%qj_>N>dQVI{}8!@qbALu~y8|mtMJ~F9!NcHBuEN^2z^COLx zk()?m3jIX{QKjZGVc~-a`pd`$PV%b7Mj$Pi`SV%{N^p<(F}oBNti=DM68J)t5bxO% zVt<43w^bsjPqQT!t;FxC#2)-9*g$G7crvc={R?_~9WAi+HT}JC4+3ja3fQ9z_^9e+ zLpjAC&vS0WgqV{%P=hb<6N-cHOSv|yK~i3;FWzVg@JUEP`678!vN7r2ny%6U)C$LV zQ7eM4J!>-(fK=y_qOcm3n$dzjv>HwP+p8lg!fKQTY4L17Mh=!AnF*uT}5 zZ$}3`v~|z}sgFFS%{JgHSrqQ!Mca}j3D5O~s7p9VpmD-P-Egs`VU<_LT_fpi8XgNY zm@#Qj5dpO&?cNET9LP4ZV_K*by~lh}xVg77;h5hbE8f7U!m?!GZAKI2Z~y3Kf-=ny zlESu0Uj%IywD(hBO7^e<~s9`$xd0D_*;O(aS4hhEUSM~YTkoa)u`JLK6B z@@XSZVL`JT=vo7h9;(4)v}V`_7reg>H< zXx=6!b3i($idzhYBx`wG(0-J>Eh9-3%Ke}Tm&pe!WL~w6e)A?KW9%a-dx%%hBV#9j z49KqeW6-0AP#a!fOwia-V_L4pU_*+EMEMNQq{g7ySI?f~nRaARIpQ-Z8rs9#WZE`R zJ?><~!eP|93>bm)Up9bDMq8a!6i!lEIJRVBsbWVEJ?mHz>8)A^`V)dhY)iQ#f9SA2 zY+1e?<=^FTQIL~{)~r2?M3c-ZoQRk#Rk%UIGNJ0~Fo&`Sh7)gR3bJk@ux{}8 z8Q+_>4NW0V9y5$gN0V@Ni4?xLH@)mC5{669MvG!~h0!FdN-u&no^4$0!C&RkB!5f1 z{ce`yYtbZMfzc$hv!mT;0wZ>e^pS9Ub)!lC_yfq5i?2nKurKmzM3V$?f9SPn5^Pb} zvtIpZk|%xwgx`P}yy9pQb}^8BSfNwf88Mn<`L$>g3;kXG>k&<|9CnbGgWj3XM3Wr! z?U?mOG|AmDn&h5JgWnQO!Umi4k$SH&Iv(6UM6IYdyc85#M~D#Ly6zHu9U}6U7^)CM zL@Z{+_e`a3B!|8XAtDG5-rajD1zeUHDJiy>GzgE~QiAgVoxaf6yfwYYvY+A?&yCWx7@M)!6nRc;53}pQd3gZCx8aWnNJcwL=@Emr}i2+)r?b%4>Rxu9- z5yE(eh8x^7l#Beh2j(!G6gQ}iLMk^elJOgO!LBo{-cYIB151A~kU~-Qf=RiTR+y-} zxuA02f-}A@}rimO$OTwE3#`(vA)k_|pW~nES*zzQKFKo#ksU?XJ9wNcxHS&^Grc+UkFr zN33x(m2_=Zl=PD?wFacX0Q495J5Z_7UsRW;!9@Q>t*MiUA?TLiHVX3+xou zCH#3XUD)j-eE*EPV1C+!37FT=T}9V3D|F3I8-F4qm~|=(8(5}MN1uM}*4W7`nQ4gz zMRcBUGRroZ6)5$j*;*LRx{N8&zUUJpUjkq-$4`6J{j|wPzd=4GQL$ASMs2bjYO;qK zIQa`LjG)v9_<%j2mrRcrQ5$A)b(n~HYi`Zy*LwC)IvLB>QtQGu#!&`cSo1Gx9H$<8 zRHMoK?lAMfR`3okS(*hw_h~&+6886MDzvc7vZQ-ZLpi40)5)MBm#pUSnYViQ=WC2} zM|t=LU1QoJWN&l<$Z&~jv7|-3FgFYHU#gy9)})NHl8AG1p;O0&Cj@%28Vyl|dK$}5 z>ygstH^y?FXFSDl>SJM0{De=`E^-H#f#>on6FV;*j}dLsFPlMQl`Bvn zt&{dWmHCNZxROD^#vF$+PN4EXLb8p%6=QpZI!`G5;9<(UC4}4@p(^s1^|hVZ!#`qdiEOpJGThwc z7v5RQl9c7#6DCp(p4QY;d+f(r#JhXm5?Ko6QQvEL)bo)%hk>@-uNjTG(pTT&WzCb@ z#&%TY{Fa7nKVM???08c>mVemV{YCQbF%EflW{=2HPpi(xp%JcU_f_!V)lubNgaR1O zifi}GqcH59_cpToe6vma==t4}_+n>?J)kng->SMeI0NreKh7k(K^CoV4&?xaPyx2R z6)J$Uib4gxPN4!}26EvI;zT3MhwO-dk-T*{D)xB`@{_^&m}Xi^{V;=0F>rtu8i51- zfx4l%GqzB?FarUVI@MU!xP8+Bm6rQ6_>;=FcpJFOnp45h z0ot4dV+=kCeoJ2D=}8E1Z+lJD51stm0*$-(8+Ex$vvMeThtrEYnVfyM4_A=^_L(NCjBrg? zeIV{@`nT=tu%ab`O|NKp05EA_koi*E)9R=tqlqfF4_L@EfduDeC`?jsc_4B5bSjd?EYLgtmu$WZwj(WQM?wS@qPede~j1?$xfTj{ne z#0BDF7hPlKz`^elxc+-PRLZdEUI)`XV`x{zUS+HS6OsxOD(VsrMwN$|(QHlW{qGL= zsyq$2Q*h{RnD5M7EQ)I!KY|yA#cwb9K!hVr4A=ak14_QJ@Dp7MNG_NCV`P5atU=2S z9h8-Z-v>zmz-66TSc2dECXv7t3S^QZ*B2c{m|U;0lMxptcEH8rLO26l*m}LWLI_^V zVvWlPC*q8@b7c-@Yt9a@N6VX7$^d(%eP0G}eLWVXZ^suf*pbX~B4-*~Ou%%06eK|o)X;)(#?cwq7>VtXt>rAX_@?lifcJrHH(_lBYOiyI-H z{bF3)7$75MSVlI)ew%GY@k|o5X{=xBKANWjear%ZlS_Og3j{~66tX@X1r022!(vEr z8VMsb`$M5~QYdtvb%h(mqtNs~UNh8wkOph*pFpIL|8>o+Gy_-mvlGRd0BbHL%=MbU zK9FCJ#?AxkPGTd72BDF{o+{MfhK8LF-zJKS+7pi})VEd(X(MYw%l+O~3~7qZ#kRK@ zPiP988x9kp2b%nW#jOm2@+AbOw;JZXA&pD36XpQqBMop|^9%)RLI-`@*HGM9zcD7B zGIdj_S$KP}0>nUQ#d5~69;`K*W|MlW@V42DZ;HXxMBC2wsPU&A6#(0n8g($+h6v4#tN}U zi4d?{uj(d4;jaf6I6Tea|6(S9KAO@u6QHeck8=RemV~bqYvg=z^I*@+gK)hCxv9OB zqp@8`VyYHmrseqaQcji=UZDHAlRCY&^IH;yHIj5CIIN>sXn=(BLMpjAGFfyRljIS+ zzivqmbAb-(X!?XDQ2zN3ZORX}Gx`?@*L=_@u4T_7=JHT-Sgv_uC&GqAS&ZChgqO}n zc7#z0;SwD1`17r&4ke6)SMoJ|%dMpHvZg_CHBFR*@`xap=Q>es$`>$Kbp|*~Eh5i( zZ>Tix6}%YTKhG$z+Rx1~uz>1<0QNK&T{cLNZd)UlgJB@bWlA6T%m^*43J2ySi18R+ zq^Ov6)8 z8ErE2)YF}N>d~2Fq($XaIv~5C$L^!oaH~`04jw@t*E*QUi89-S5SQ`{Z>wM!d7W+IYG(MVKo`eLti_X#0$l{(3UynKx}JTA zKo_<tpS5}m?8x>cq-DHfBA*7x6%I*7)LzQ( zs{rEW=&|NoEdn#IVd_0pd7IjV22eW3x9JGprsf+}Bb9lZX7V=8g14!q*5wO%oA%{x zN|rCl!K8++a5B}MOvi{Re42q+5{12+?LZ4tpSp$$UePk&?+(!jl=u$H{lUZb$k9~4d+D6Bdh zg{?MoHdQZ$!ctHw?9_VI;)L26W(8-{*cWp)4LH~!IA5F|S#&n7Dr>9?_16a`iiExd z_aTxRCat6nu#txdQALbIe&GJ|=IND^p9aU=hWz}yA7mz4 zP?x#1=kt2YA$M@2=>mT>LEYd;JJv=*_P;%Nt)*>x`ZLj zDG?Zcfp^mKu$r-PO9YyN6`OKk?sN$`u*3GE2QJxCE{9k-k+9hnYNBt3-WK)B06 zITlL}{EV=+%^?{-e|6=U!1^PRY07~M<);9#34*S6NDhR`OXPvsRqVk9!HX>uxMn0laWtu}hc!{z zsq#Nc6#P1VI3inZ6KOyVT|?Xl=E}P|YB}m37sVu@a~IJ?l#p#bLl;3Ca*0rIu_~*+ zsi?th!MLH!soTbJP_seE8}P5x)=Rl$dGu5Ub4&6n;okrESpcO2TCTDV@->8ezxv~V z^bO4aUlHyJgKXtS?37AXbMGB+4<(aBP_*vir@~9*$qE@4DIh|aJ0WZ#-*G?@nz0Ai zLkN2wNRNZPT2c)3E}vQq^z^6Ulhb8aG0-%~2~GdN zDp$I4wMce{^7FQIEC$+&c(c{F76Yvp3X)gH>|6b2j~sWFP>aVvW9kR0T?a%5Kv;k? zGLSS8`&9)v%P*{kBcXeoAa9OtGCX9*Jis{-4F!%}h@QYHz|nI6r-#@dEazqfoc$2s z3~U{<-#`-n#9Yr-G1a{fo9_cs@KEGsewO;gQ_xfIG#p6%h$?HaIpgg*iT&ei?Z77yl`A^F}KFE25jS<6IHlBB@-Gs`|NQI&Pq4JU?G z(kikK1Hh-o)V8DCN7420)skF)StO97KxFHIpf%QkybtvVTSmPOuGoV4*GqaZ4!Tux zy$~eVZ3SCqOtR}oB)jhC$HkV}F^wf(j_@jOy_@h#ADu>c(F;xC^^zAt_^J|KVYvOV z$SfEe5_`!W@3d)8$r0dk(ly~Zk|+^wv)LoOhwx&Vp@QYXB8(S6rRq2AZ~@TzZ)bR~ zE0?|b6 z8&)dDkhTn2Yzbyu`%Aig=|fCXd-PLzf5l`66EnI+I{J9t|8LXuK{z>CZ7ev{y~FYX zZ#r4RkxlS2C?EdeO{gyMopPzea#;?f5$e2#b=a_S#>xt*)0adGMyEzUEbeQW0si+i z&DFrj8%WJdO}xMPui$YjxK(Atv`o#BEiE5}BZtiRgO#RG>_Cc4bz@((>D4X{kyT!lP2;AxQ=rEq>@4yX>+2LM37(h73SVa*Z|( z0upM32a@G*U}Q=)FTr9j36ST0C&o5MC2|Cu>5C?7TDTWc+cXFHU`_KTgK z0v=xv9*a6BWp;o08JMpoqs)cV|Mp91_Vo|8zdI9}ZE}R^(t%|3B?W31Q1#Krb$3u` zV|P!;i&sGv2k0c1^^r`at#?BT9@OtAvdN959i+5WKB8?vCOgdgQu(kwU`6}RGx;Ly z?wrMfzmSa&s)pyY@#}QGkl~z3jQDfe_#5^6*$hs}^%=`2<=H7}!W-+7E6fFE;wN=R z@mjH@o%W^j!!*1kHxx}CglS0?-+goT5G}K3t%^7D2fUs8`nVJFw6GKQlmx<YJ|s5PbNHMpp(}JI%aL1!?tjg7n|0RBNa$!H#>N9{)B)`x5w8q z2lAx94jObFqZ>1XQZQ$;w>3F1ZfkS6J7#H`kLr1*Yn7s_ICI>R?B@!dStC;!YjBl| z>^?kX{mHq&(m!h)#VS5PTJ2{g>yLG|f$TP2=Am0>EMJFa(A&o%r``G4cQ&?!Hc#Z6YCZr+sqyX@BV z{@5Fh6`FW@X*tVV?ao4Xv4?x?(((u&+?~GXt+1H692G!lzy&j1mrLhO>HW7RL+)(i zM#ophC`aY8xZ3P<1a3u#yxD<$ZS}JqosO&eJ}mT5eRwHC%s@?7EKQ%YUX=1oeqfASwp|xo zz2x{(npwYnXgh=(1UT5?eZAmw{IGu`KQh}j%tzm-O|+v}SEH|S(YCY9vfwPO>Ta71 zH5*xyK^Qq@18mjg3Jzp6t^H_uckDEOSh=j*uoYRJqquDYLUA`JJ|Uy#QHU>>Ge&VT zi3HSmJ(aI#XDT!jx{#ktN67K~T!xz$*R#fB<2Rs~eG}IU)(janb8?0A{I)Th$?V~c zQ(aDs*$if|RGW@DR%hI1)7TFW3?F%IM<>g%x*pX*tTpQbgt>M5(#Ct;VA+-%D6hul z|7pv++5Cwy{uFASYSbC##+t7_T?)<5%&-Pfe%}Y6v-#+08(_0b;p^ox>yPEHj$JDD z4-aLV_kAQ?W_S#ft#j^eGL^K zIBT+oKK6bZYO5hU;kR20TH+Byub0F(y)fV*36Hce{C3X5;2T>D0WfzANd(aV4BigQ z!JrgD@JaPdCo48axCNn?XjejGKTITnx)55jPg#{1rgb zR%Jv2y^IK2Ms_?oA1n4ecD(rDS;fNvJ^p)uaF8&}J2+9E%};W{ zJ@W(?(ly##Q55(eZyTKnqV8vvVxYOIw}!8&D80^dX~!c1R9>ceS}zK+U^X@$%mGHiS?h5B~iGu|84 zy-~E6Qm17X(~3Tx%|bbi6JoijobNU|{(@>XMHaR}Wf{@K00mbls6RMiG`h_|g`6T+ zwl0oADfz|nP=>>)euz;>VWDiJ>0^P)jtPMCl`nRVcgb65%RH;hbJyszm6eTqs72Bs z6kzx5%)GI>w?zmS9{LECwiHde;B(H#2ypRq5vDet75Ids;QoL zW!Go^$9rg;t>YG*X-OhKP_&L~S~pQX_VXz4LNUASL8p&0A;T9F{G}DTvydIj#R?Z1 ztPmFXzvyh^VhBFbk*wzpz4&{V0ULj&ks!CeArSnb1lMhEj<>nPY)y-5!JIRv%px0 z^jj=Rh^sZdw@mM!tjGXWti0_8YFH>+-+senrCfU_0@FhIdq4YyZ+sidsYYJxWtJG= zq6V0P+H3EW1*@;JgQE4yg#jLU9c@B$~Ka=-H)HTm~LZpXh$%0quGUYvMdV z@wHyDAh)p;xe2el)Qu4~I^d*hL8sQVWiyqCVpwGcS;3UX$7yckNG8h~5Qqg3Yue(*l<>|J z?8ZAn5-}blgiIF9q^!BZxFdl{!%7(z;YviE0NrKH>weh}mhFfSF1D*+ImhUg@(9{C zz!dGl_q;`QTtR&4e-thBk-gjL++5gglYjHqCxT_8ww z6IRO9E}cKZ2&UlVqCO-Au!ZIo#EpkuDl3MKhF%IMY2RSiH5;C`;r0V3E^EMv%c}fE zz;kXTqC&C2V>cPSo!%Wt`|5nxUc35Qiaa zhES*2#IP6OXfg8}W2m2!@5%HEX-J=2v<<-P6Sw!<#6z?AAYI}B5ru9LL z-i@n=6S<^FFGfYWs;g3@k;SG))QgH;X;Q{G$Oni!RBwu&k!Um_HoM}I>Uxjsn?QX9$?Ep$yp6N}p&_>hlGG{e2}tm(c8>U?{))}`a8{+U@G z<^=185Jl_rQI-I8aE7^cgUb8JU@7ZkNb6{+iwcC}n9;iHAm26}z@aM)YWr4cPLaaK zhjhNV22ZOkS_E;Wh*^u6FfAN2>ZyDLKZak39Www$(ys7DOMDsF*c<}vMkKA0&Lhwe zh>k!vGmB9xrMiYz3K?YP6s#=G)MqYerm?b~6+x_>p1p9A5QFRLQJyxkmzIBXe1 z2%GzsVg)hHgztbh%$z20+0iCWV8py)nH~#q<3uhqk&@-NY0jqJ>;}`AGuvuF*3c@| zMYNI1-?mmk+zMf7)vQDTT6YkU6lcHy_Yx9qm;w|g#`zcgJ(T=qT95Qh=2P&p76Z+p zJuwNl4~NBGCP7qQt@Vn%wUw{IKH4|Ze)!?(Dp+OEz^dAPU>2w<<|j1=;xBq63548+JS(QA@tg&37VpQ8;I)K zYd}rcZqF~T_Bb|)Ng&R2EcwjZ1@VLRsx6)kX%GW7`fj_VL&S2FeR!$~4I%Qe5p22_ z0cMW2xkol=j?}PtQxfgVO1(!oMVM8=iK_!HSUKY43mliNcaos|%Jj}iTjd`majMc6 zx9XkZ@{rm~&^swv)w5Oaydg>pgCH#|A}uUNUM=?E+_@O|V&GU3Cc#YQ+H0BjPoIpp z7~ZEf(5kjdUSKs%ahk=FFP=v~lHchCu2I>H@`IYO#GTIcqhY=!V>_?*VIMW6yv)bF zhYnaaNDRAeXEVbE=9i2fXgXY%U^a+JDN_Xc|nD$004 zbZa?CB72*#5Np}3BSsLy@VD;>Jy1ueZcaz4c|kmKK?NznI@FhFR8Nlfavap07Kw4? zyByq{ZzFKWErNQ0)m&D_sMwU%6W0=5!*sx;v07xo0*;7KLs{wRhV1jp)1uF^bc5ld z#LyXpjJgd~H4M3evYD-UyhvpYqdeTz|IH;R3h{w*&!4<1mjX^)8$QYzmVINt`o@#HEJGW0~6I?U9%O1_hW)sItCP z8v{C=@(|D7G>x{0g{bv1G8}EW@G-aF)GP4Xa%!%J+3ttM5V~)u$YL-+Y9XlmY=~5g zf$r}WzV*ty>iUxsESF`_H|juZJ0PMQO4Tt~85Bz9eMXfE!GLQpIafrkk^qGI^rj~w zvK@GQtm5#Ck;5CWwR2G`9;`I^F09B_4u_|{xl{u2TZ_}E7F5E=cC~5`YqF(Kf^7#l zXZ{7nZQ%iy1&o)Wj&ob5Bq+W^f?|w8f{J@199m@(l%bnRQ2aIts>WKcPZDiFTO=~- zL!za=Ako_LK%%vJOroV8lW4I-wGlyF%#d8hcIPe05qfyD_BmXls6m!zVm}`64u+0 zcud@qya?h*2D>N(G7=22qk7qp!g`O+5WOIqSxz2`Y_QYiGT8ehG$My(<2|ta#qga} zeJVu`qmj0APM5>#8r_A$YxJGYLuy?H5Yks1Ws^F3QUs5TDC{jXxF>J~V^1&TX_B-2 zmFpAuVg#}(deQx0i8s;xfHoTL2eHz&b|HBc-48-ddsWd1h%A?5>^pK{Gc1nMS{bg` zzyW}WV^gxw^U$S+7s5=>3~~;es$MZ4>i{V`Okgs&P}eSS>EH&zJa}#4FhVx<3@{ZF zrjkl{V4}kW8j*15g;BPB%piv#5O$BpJ?n%qU|8P`-#BLmORO=m5$VI$QiRD7$ZLL=WkC zh=AB{>{^xo*l<|PNCG1JF4{dGuS@7^PAC10vM0?nY-Dj&%y@2ig?CV)>|b&^z!M_~ zi+!2Y0>A>=LpGR!dgMzE;-`7~62Y5VnPI7fESWSM7FD_iOG#Mm{pR zj7exn>pgi5@Mx~vg%5MvMHoekuvCnO%wPEd7^xjZ<=!mT`HxA&G;bCoe1Qs0Ed|72UK{*`luG*uh+X2!pRl__)Ahc!>1g#wr&nc-6 zA0~u2v#q=6b~iJzUhI9$+-<^sv4?Rxk&Cd_;ASzY68(oE*L{kaM@ET)*ySU zx!VkmFIvW`S{$TTO>vOZA`u5|0<@zT%yrOH7YDJZtW@IQw7ZQk6>(5LGkjmW+c2LI z2Ou@9O!DYC^>mjJtlrTY2RV?-NFP2Rt9BP086LNv??N>^K1Abmq% zT9(GcqqzdpE+`$cgCYwE85(Fie*sB)lyv3-lggL1z=Y)ZYP$crBp$_TSl<+PzY5;7 zz1O^FU-O-W^dX^A`dr+;%eH+Y_Fr`wlGr-s+}Y1v2UD?e!b$Ao1##xS;E7Dm$8^3D;6Tf z-Z~UmqToa84Z%kZ6Z*)*DDs3_h;7+GUSC&(w@r}jP0>%UmxeGia0y!t0cX1DV8riB zIf$FN#rh|)tkWhgN@OgOi;_7(Hn-$t8kEJQT?`*9){o09chjyJaK&?)BHwOuM| z7+wT8C^!#SFi1A`=e%Y-k%PG<76f_|#x|OPF+B`G(I7&-zSk3)wt~j&+tP`5-lBO(3U>LuQOTPTH-CaF=TiT}iZM zg}|y2VA29LD?G1E0Vr;54f2~&_!r85ot%1ek{mz$LGFJoIrUB46H9XTc=v8AkX^NwM&oJ7qHn#@2(4rCJM{BEBpHFe) z1$j1~pdUhw2MU~-eJx0-W=$XOi?uG4&!Z3LBRqou#q%NJQ#yZ_ceR#FETHV`=xQq%G(GP#x9icE^a z?M`kfS=F=EY2>;{Zk4B1QNAhU76+z^+@`^SrRC(dHBD{{UaxF%5Sfn5tiG(s?5sLv zKJ)I<$}Cf*Ehjf-na>c97JUO^sD*Cp-gguHwbP()kZ1iG@K4Ww7r5%wJ^1usCq4K+{vQsS<){fSmuiH&lGGZ3Yc|Ni@L&_t@tOr zIh1_MCEy<=t9rKL-?gvdp8}HR;NS3T5C4vxc8&&S9oq%}gg1wh@)Gcmk~`qvH4*=m zTJvGVO+PO%2)cZi-hLFxTmDA zZj|dvr-5)O$#+Atbc-!|(g8gi6FoRNz0^+^tN+*$7z!%G1qoGM7o5LdkuZnnIJ%j5 zP`+q14od>1UaS%*@YBD>M?gN%-NsQ@Llr%OEJ7!a(tUm@NL#G{D{VDd<7+{PBmD9H zqWy06QNw_2%zTTiXm#vEbX5K0Jqj{&crmtyBYSGYdMnOP(fOND*xCKMaLytmjJlg* zqXb+Ytq5L7e8HdH>jYF0u2yUcWDTG81x6*qxyvS!8wH<+=m?a)nP>H(N(Lo)iPQ8E zhZ0VH4x0HeSFDmr0RiTFkmt-Bdm7*t;4}^JLhklhR@gpi0(}9XtNBF%7{)5$5b1A9 z=)yBu?%Q3tZ*y#y`O|WaoFp!j){Y_*Ey+2Xf+)3e&c;{FOqz&b%=wvM(!{NVH*(JA z%trTU4w4mNQyw>qbGBk3-QTJ2d@(EvjU2uR;#8}o;)_h5BXe|UVIr&z{=VFh?JPix zxL^3~8R0JpAuR^Zx?zkz*%p~?mDR{>OJkQAt+0WePVN=Y#@??Tt>-2?Y65 zYb7{1*`(qcZU};7ldU5hn`WirzC3P*!Q+PYEsq=A&$MxZATI)goFHMw0jGvB5hKXG z8bSj}XDX_Fau=#CYI`Vo+a*wKO71|l3Ae0WZdzXx`z8C_%zHW6Mqb-52}x33+b=uO{hd2PR>$foiL8QaUmi=E-JR}{Slsysq$#)yL>8C7a?GhNE7 zuwSzL*LA<7b}j*guVowgs>wET#Re2|C|0u2ox8|Fl3@-d-*E}D5G8kzh48v@S!fwK zNLD;)v3-QUzMHNsP@F({v*;|l7Q4KI7E94@*<#U~-Z-ghX=t(28f@RS7_xpuh0ixY za3qp#lf!tpzIn1>+88!gi{Y=dur7&Q$6=4b1F-rcYx(F~l%7E63b~{3u*EJ16`ioO zh^Xel%>u=Rat)tXU?DNJAEPkLDo5fQ%KL56-=MtI20oQm@{*;Z=$rZ2@~ctdOL8BZ zaZy$>9ox&{{TV_F!qyGrl)IUffY5ccYaSho*2%ZB1JRGWOB#cW3_dH2xUKCQ9&Uux zXrYe1s^aaq(Q!G6*A*{;7REE)?){B7_6HW!(f*9>!m}#H~{Zs_>p4t(?;3xg? zJ%U{9H#(f)R#x7rbuq$@^y8$@z%eEsg?qdCWnQ8gT~pbxMkp9ek5=a83)^MRI$?jP zE&Fk3dIz*XBbCi!yQQH$lM2TjS*O;Coi^(0#Bb-U6Kc1m(U1&>Q%geciMBCNMcV|U zSBy0mvq;dzil$8I{N}T%8FI+8!n)GS>q)>0&&6ML0yrw2!6{p4bd(^ANq3P=Wp~-}-{kQ6)wNg8F7RA~7v9D4u6fwj-30NlL&<-03A~V!JMcpG>zo(9wwpDD z;OX&|uf5%b3k?Lkdlv*0;v7o;?j;}~C3iqTOSAh_7SiA%jGb@C6u4n?4cP=2JQKz$ z7yY;(pumcuQvU}to#W; zw4dv<m)J^ z*%H5KWW`Kd*~Qx1Y4vLV8{&jX$}C2ynrZ&v_-%>tVf$Sm~kBwIH8dV5H(OA5T){3e`X zyQ4BkF4XNku_^X=PFF&2AIS(3$nO{`5$k!*d`h_@ z!8d#R5{KqJ(mI~wx59k?EyJTvalXL*IN9stjhW34>qtPEMn7mz$x`W#lBLocB}?6q zBw$F(U+RsuX13>%Ry`qS%X=p2t;y%r#ot93z@Z|Hj|7>|^0XM-lHel17R623)4CE< z{FJVM{1Mg>+azwbF)tTp>|EtFPP7N_5Ku#CF9Zo(Xd+GAbz@$pJJf$g``b}j3v zFJOsw=UzbrzpMuGZ5s%KjYMKb@+ER2t0aE_-jMt)9|4cF4>?60n2ZT~o7((}3;XnB zYU{Wn60>?#=u9LM-*Cx9;thww-eMpStl(`4gd}VJ$=eV)>L@@%yQW;Cj#9DLN=G54 zE|Y0N#0bl3uJjG&&4dGVF2^9b1+gS9fl(QAxso*@Hm#lTE5~>E?CX8uMh7SOmW>g; zKGr_F(wwiH6elsQ$_j$NSJ;i+su%i+)<{#wk2XjxYR*{0Wwt9_@ypmz1Arh1I1CP% z;-pE`EIJ*C2?;5-P^818^zc4$d~k-B}nI#+(9~LdB3I}&UH51`?aSYayq;#LZH@tyC9$t=TP#lOF%$M z?tp-3W1aFPq~jFTko43o%=95g^WDmXyo$|~%ZNqJWiak$5}~>6qE)agI0TcG!tec% z0xoOtrGOBv6r8{)9~V^DD=pDpt;y7`k-i4-Z9h<~ODMzR8pTON-c{0n8}-Zso## zpdPq#=jIQ{U^bHRxKo}BhYeC#5*NnN_~5v43QM;8-bSw7v*s&AlgC$aB~O$@$|_a9 zcxv_C5vvP#U&{jxhu@_HI?*mAP#bqCfpK(~5-|8(O2B(}DFF-Jr38l9T}q(7?@|IS zc9#+`-(5<8n!A($zjiL6rFJnFBCVEx!Z`yAT)#J03Ny|t(t%KKO1>w*HGMv-4u`_= zo8zk3$I0QZoELRAXF2lwT#nYf$^qHgc%4d~A(ecW>qB{U62ZF8DBzp&f99P9!BmaV zz^y4N-YULmu<3Ag!79nriec3ke7FwM4NS!}pa6-(T##4`_3cf3ers}w;pU^?q_6}siu0!A$MF4% z-Il+qQ?hRYx4qy?;e(4A{nVL^G^J^~fnh!WPc{>Jx6(=AQaYP3(OeiSx|ZkVl1xTR zo|}KExHg=xxuksf*ZL^{fpyq>xs^_HV;pmlY&0uj(d^L>m8@c@D^KL$}jXYu^B=ubm1Q- z+^HEImZ$vqdb$KEW-T7*m++YLH?|%xu#ij;%;DIDa|(HqNjhw&Z^HEjh~ZUDV4q z?$Wz%=kaJvBRZ20M^qX{YT%vYC|W5nP{a0)JB3z-cg!)XjUkuM(&O@GdiuX{T;W4H zV)O<6jD9G`YZ#Jj#})FIqYJC!5;-jJA(-dgzz;lpz_IIoE@0t(lm#45FswL@k86k= zrz?al3yfa6Qbvedp8GigTDYr6o8hX(!IQ^Z0GKnq>`+4fK7nHNP=-8XAmev+qO34K zd)!Wx_1Oe^hQK;P@ov1}dk#cS|47Td0wKNz5riPZdUlV_rm(wvt7Y!(f=Zexe=lIy z?{!Ftj(1fBhk>D>D?C~%&$F;t$rV8v^9w03tcut33t=?;vSoX(Sv{``@Z<|t0Z*g} z{ND|DpdQG_u&|@FBJ>Oe4SG`uNU4V?6~KoLH=-HSOVit<;XWs7()itEEq zKZ!CNpd+byN$1)Kzd7q78GS*AA<%LnIljedAL9i`7suVC6xBk2DQntv41H1zIfh;j zi9%(SGl!=z#)GH7Du#_W%@45(veECW1(r?oi0MnH_m=t9c1J&;Y?FYVg{jzI zWN#uUXvNx?3>iijo1iaHUJZg%gI$}9ui8=M%Jy4D^cJa{i0W8r~opqQ+=w=LcBJn&SA06hI3e`yE{pQ2*53@ zLxOA|+He5IZP@cXN?1)3gf_MaC?1bW5hXJ!_qeGNOR`$dd8-ptAw}i$KMtNeE5wA} zzh4Urf;7=@c)yWeweQEUiUvNz({^Lc!>5s6cq6v`6!&a?yHE}}Sx|HYL1lKS z^2yElh{qhI`mt`fsstYJ$PH8t(XAm1U=*G=- zr~Hja8QvS!JY&769~Ti!j5CzyA=_|`CCM1&bNca_Plb2=2mFL%bX`wn1Y&{ChV`1B zm4r!<(JLe$cK+T}KY6!m+zQ4pBH^m+?LH*TdLZh7r2naKNHs)YmzH4y z*5KT>2V?Cx9#s>FF@8p{nUs+=5A$%H023~@EHuIP?uaA{%>f5bH#(dbRfie7CP2N_ zGU=}}kS1V80H*)>ENeZOez#MyoY~76rkWf5A!p;UxkK7SHhwS~7=7k;H0jiaSS4$}$8cPW{wNT(gZm6T6?O!ABRZEY)w0dsqG+kAd* zoBve`k<}`nq{b2^x?gDnOOb~R)YP!~(bbs?{ST&TTSsmCGR=5P34H?g>kEORWqY42 zHh=|o+M=B#Vd)@-u|5YVmbP9yd~WNt6VaasZKfqKG_qMvQbN(p&oeIBBJKakw*3I8 zp&v>rk!jI0WmP}&seY`D*_7780J*#;EQ3Z*s$S=u7PxDtUZ^{zMJV!xpw7j>lG@q> zqI63uOiG5jr5#yZEuFFe9)1t#7ME2!zK9#KO$SJuUUn)MuT0>{1fDH5&ZSgZRgp?s zwKdUUE!I>ruc)L}Pym8aq1_T^%BVEHeRb3i$1S3P^ zc7Qb|Og;}H#l;_Up(2r6hh0}6Kj7QC-$qUZR-hZ{P$1Dxg+!u7C?+C)6^XWY6^V{n zzX1r8Yb%M~3MwNcf4H12Ic=7L+y*anklO@Y7IAJnapnNH)p0HaF(l#V2>JPaK+DeruI8n38(S@)GQ`z~`$<|N9C#TE&Z45?pkfV{S$#H10 zz(V#t8clBMxE1kct8de958r0ZZ>cLo+rwpreyf&`y_noe-+Pk!I~7BWkgczQu}vh_ z9B=)j$;v13iR%8H8PG*05OnWloOk zRYAs5Z<-S&awr@HFrGvEaegU-G7WA{tClVxBjX_Cp zaJStO+W$|(tT%_b<0o~c%zcs0KyZ7P!rYaC1SG1Md+!x6cLH?&+Aw!Js`_%6`|y(- zO1m3#ulc5NU%Y`UuD(!lb-A`}$JJZ115R;u7dOQI8rHx|seLPN_sWG;@KI#|rc%py zPTh!tE-DUXamSoXzSRsJ`_n3TgGR{4NC|J2KSBs9$Yn z7ijj5%x*A`*_ny4Qw**$vjgJOvP6XVD`j?6Jk9K4#oIDFlD{-WsKqH}*A=ttHkqAe zXK4vzM)D{RvJj^x8MEuoV|JV+xdXG~?U#eu(V=N(XXAbqn4QgJlMh+LJ25+(qAg$S z$n5xJn%OzHBeVPUJZ(({oS5NfsfD)GLIjc7MY~;aa|sV_TELIVpG&H!AKTNBS!;QU zKSLR;wd+}dlFqXO6Eny_M*KASvUOVYq(wbu7LJ=m+HDvkq{$MJniTrL!4z=4mfm055+ufZ-vKLYs37eVgZIZh1oe2$|@vBnC` zG1^0%V+qK7Sf~m!v+cj^DvasSLB%eMq1Tuq9zx}7b2=}q0`4ATyKucP`DbGW)mbD{WLc$YZ>7>Z`D%nek zW}U`B8gaD)rZ8va+B<`vf;RBzl%_C1oaGS-#mF&B$S8V(kwRjLP)X)&e!GU{?`&(R z@s5c@F%j0ajIz+mAfm;HZ`a<5tzXqJL2Q^5ZSQp%OzPc8-*76R(=0h8^+qRrTD=oA z1Pu(f?*7whwflg1wYfBDs(pH?o8|nM^mVWlYOW z6&X+jVq>eP{5?Hs>!W1)Bee3C*-K@kN@?$pR5Bl(ODP8@&K+c~u3qhEgq}K8F-l`ThF2 zqMuq9+lux=|1|xDRb&v+RKwA@t zx?r!4afdQbh4-;gNmxrU3r^AAJa@7$zn3eHDQr_+J}|cQV@pqGJN7EVZz~9DnC=dY zFT5^Wdocg*Oq*gC$*0149eqjmYq@NUKCU~aKJ~i;Ac^0R?r#DalI_(jOsk`7gq81x z5I?BLFQk*TGIPa3u#rPtn6zBe!GmgA*?F_MyH}{d5qUSN0*=VLR@aAhXcf;nljR2e zKAVkk4^;{hErnd?6Iorc@=zD6J(uTX`I8^rgwXK=4{A9_=7cf|6*t{SNwieeKY_#B zJ5}$~sp{XzpGm#Fr_w(5W?lr!Nn=KOBLTo!GYk_<%Vmy=J@Jhi#u{+m+QHw6of`35 zb}P)alOOvhnAhNkqg4mq6DhmbCg&Ldty2c&r_%9?N<*)`w zUjB;a2N1{3G{M5$m7n`(fTf@d5iAB-0BXrytT8fKSYsR)W{tfV8Y7M4UX>$_BiNy- z?nC{>->|q`T@l~U;%2mh|qZ8R*Mc)i3fE08aUy2U%>^Yj<$UU zCU6^9*85TTCYK{zaJiHIh7i!B0&PsSsKG1&9jMG?fpqcNF_{{Q+v!;E`1=6ora&rp zegGAx&#x*NPk+aZjoDDV45Rx1?Ts`OjXK^R>j>#=DNa}6pEB-hOQ2BOrHVbk0H~PE zuQBavqUQ7r8}dwm`64Vs0p=l{ZOhE-qyJjQiFIZ&29`Tocy5qZ`6Q^kpvZAbod{)M zqT%DcMN8)^w;HFgb0VIf!cHF$ob*elu&WWx-#AfRrls@ND5SbtHrv&bl%35naXL9h z5yCqO>r(yW>$79IlIQ4b@~IR$iH%CxY~!ihp3Qa!ZZKwRkvh9TyFBagQ!E^h76mTW zLWsrnI_qqxP4 z$TlcyOQ%Lr2}!%nQ#Hqyqm~g7ix5Wyuh6Dlob?actiMIz{Z>nyV-t1Er(CBv0@R}t z`+L5jQw^Q?1r41sSD@?J23?4IZ%&e$M6QA`5!|yMPYNz;xN>sAVIxo;evEAC;WWb8 zkn~ezjX$Ia{!J3pi^B$F*7RBxR+A#AO#Q-%C{W#wb|LUTa6c%LTB(<+uKY!D!Pjx$ zGA1|>o$7$Hfi>CbuN`E%>Nm60sl_|$w3q`ElVSB%avk%xI#t(pzutLsj>~jjtlb3DalU={ zX7~^VJ){7q={$rKJgHj`DIhKYb@is~GrF$als&F1=?Oli>vcC}kLpTVf}hqE1M+!Y zZzR8huGij#D8iMUSzLVc;s*0q%(X>(R=<~sG|)9Kzl5J7c=42eaor48Tn&xUL&RVF z#HNOZV_|U(S2;`5bKDF+jGG~#Sm`FbNJigddzmiV7??~v;!^~Z3?N9jQAf_}N=JS| zS32^DAVJeF(ByFz?ir#9E~t6Aq3c~?xfiSqxfx*oKetKoXToQj;rawuUS5!6!qZmF z<^pL-Zs>YtDZR@VEb+Cdhjr{i7Un`N6I1s>T6v>0_vcc)4|jG)r_@7~x*d&<+lNyG zcGq%EN-4H?NT)Q04OS61(Mn*V3?>Cxr+6GqIHnnDVf?fP2~rpgK?;K*NFf*sDL$+# zNI^FYDIU@lV3}aa^}ZU!$gNifVFaLg5Y~)2gb^O&3enWxI|sn2i4^F7?&+W051yH? zdQyA(r$r{9DoVQvP>G0It_E@L@aGEemw=^QZN2m|zpf>fSNJwqk$^`HZ5KVy8=jzK z1u~MCkJuB0;_8Xyb<+Ui6A9aj0-(ODj=O5(%5b+G0o=YH9%cZ><*g2-02bgbQKu1i zqa-|yyH>zJ9pB5KQcsLbhbyzjK(o0pQPuPzxy!Os8(fM#`i_i$m1%Zn2Gy^|6iVs` z6v*2nTi_3+)Q4osD9)u4c6kSJnxjBm2x=GV{G7L_HqvQ8!TsAgNA(@+ z+KJZ&-{RR#djY+kN~2>pYOb8RFZ?W45{3KFxLJj!shPgd>7cusJE&B(LdRg}VuaBf z+$jI7H~9aRXSr{zKZ9~2^#mv=oCz}#fc9hAk|aYP`Bh-J`989@{*&HB0?=S}o5Izie=c>gO+!*V%^)&-!OmQv6 zR>`4Gi&T;VasX|WU0%Y9_pDGXf>?OSq<)-*Z;GnY~W-L ze3v_q%>T%S1IGG(v=sVr{;eKb>CvBw zw_il(C?DVDK{GfI&wwn+MaQLjC*{-0;M%tA_6Feo?R&pnkXEZ(^J!c|^ zexUJck7BG7tnl1#fp6v_Ow2=YEE23y-B-s$gEhCK$x;n#JgnU}7-dzetN8}!<-b?| z$u%t>bbaC<$bhM6ivOUuDATk&T|l0OW+@21!5%0y7X^x!2@*0c^DH|)M739{e)p$+D!6uc+9IvyA zN&p_Mw!jtZrH+~|BbCcShS%GFI)m5x)Tu;vx?FU;&dSAz*P+D%wfxsL^LUIS4xs~< ziwLgGZv&OcYAT^`DcGPA)Z$bEFiTDqUbiH>M7-9I=;-g^dq_X4MHZ!|0ri0Z9AY7< zX`Ku2k8pYX*CaJ5GLK8)mo=mx?E&7D9aMXgVFdcoqq#&Uq;AD6Apz)iG_lL7*hQPS zNQXhg%M39j;XXwh#5-oVSw7mIQul(m?d0(cA{WFjg_jsx|UYK zv`ds$fskE{}-%nNpcgokhA*A&+wai3^&U5DNXlOeR-^}HK)Gv#pl29a~;)%x$Bf~x*KnI zGR>@Z!GfzG1pgnesT!iA#(<$M%<{ZIr0E5Bh5E)HH$h$L@@f)t3U#uGG=3&UTl@6mUpe&A+^#a<+lc)Kcy)pBn#~{#2FH+Uc?*{zZdj2mYld$Du{snV{PpV_x>& z+pIn`=A{=BajOsY+eBQR@G>&5Ac`Tqe*}Bum8sRlNl&ZQij$7=LjRZBF#`N+S#cic zE+a`0&qX@1;@0yhD_dm}ExYT?xiw?o1BvEhR}?WKrxB^BNZm@54z3 z#MDDWOm3oJ1y59^wu>!yF!ETSNi*B3ceM(NLL$bUO!ha4d9>P+#j!YTA=9d1!dF#e zvTf)gA_oj~eq-JiUEJChq&qeuvC%x(FxihjpSckq527{gVCEKjC8~`;6QY34rkA0I z(HRJ_h9vpoN-6Q;EbcBE?gn$j@4kk+5@L78-S)P)YvHF6cg;X<^wiJ^j$NUXOb3om za+sTsP62n_KFF8gsrkT2$eqPx#9hZ^+;>F?2k$Hgr^gDqx2CTQleIw13)l$l)@J3L zF$nDuP5qUN)Zbg#*uF*yvIr>{RN8K)X(J|X1am|*bApD(J(+2#L{~x1`;9E?;_>c` zA()g~Zc>svGn+|W*n~Fn#*#F(xr9ZW%V5%y`d z1pR@UY&DO2qNA;`oSsc9k-KTphvXIVH!ga92am8IXXUvwWar(3vdCAOG4 zl)}ZL_H7PC`eMhx2!r%=AwGTq2vCu9)^A$lZVn4={wq274C$M zA&?+={DvXsOaTCH1QN(NVUE;1-rpG10fUwT3E?+K@Vtc?$jj*|j@38YrU3m)%yaT{S*vIa8I={2(H``C4-(fx& zVSqp`#gh4`$CVmqisRDs$o`_p0N9PTIv32x-qx#)O6!%T7Cg*{B`0~y-1#xlI5r4@ ztm&{YV(Ut)R=@LwQNLquv|q`>z(t+}D@GBtzswCeit7cU^*j1Rs^<=9ZiJ{YI-oqD zS3o-~nPGapRy5B@)mXOrqD9(Yh6KEOIPVyj0sJ2e$u~(url=>KE z#nv&_9fU;wQ})0kU6%w0c9dC@i_aS@s-GkPTFVTP2cn)|<%rTO%L^DyANG2kDh zxAaG@_$_^g;bELu+sNX7X^zp$@0x(T?`HCD)-HYTZ8yj?kujAbb-Zi6$2v3mo1(E9 zb!o@_ed*uS}aCX6Nyr=l#DSY`Q!&x`(O91qqcY129@CJ9{7jT+pU+hlwG8!cVz&*-|q^7jiKj zB7*%TkhgsDQ=8fV`Ki4B(RLO20=~`0iZuC(^@urL8l;(pqIDO0{edQwNsQqgzp09s z%ja~FE=YLC1?~y&uv4WQB`>PTXsYCy$GoJ@a%z-(n8$>Sd_))VYwA27N|KzrS@Lle z8O|+fr*O!r-@{NotCGv*)4IqXk@ObN>i&8C2_63;_oMThtjG2KAqhp4dYFe~OEj`#j&<%bB{33?3z_gutQ37!qrkY~!@(*%b z3;QC$*20dA1bPN!&n)AbZGI>x7$Y}Zi_A7=Yx(lJ->B05%S}`4*P??BtW3T&+DCL9 zbVea1jXZugeTrQLUG$fmMgc7xX(!P^AsWK90$zQ0k8X5O=*}S?ANmBuqgy#B;8}6y z4hpOyj9qEX%4LB?Ks>#a!^kCbA+w!VgPqYIShg@d_=Fy`^#B5|2S29=3wpp}(t}UO z5}G@0R@Gz&;ZEKnVdW{!51nW@u3^p9)@o9*1Sta`DyajYt5AI?ut;itX;w;$+keGYN{H#`w^A{mDGNI~ zo9vR>tAgswawDprL-kp0SSoDMiN)aVRhdK)m3RxEw9JR86?Jny<1?y1r>%ttUR&^NGCXV=-Jd0g;vKq6KHxrM{V+F`A98bnW z^mF{(5=p8CG!ABOjR!iP9s3qlD@axmF34X@jpk*Q3kkBc<9Y-#LItdxR2-Y$^AHck z++$>6+d8)s0q|_iWauK#S2!&|n1+2Mgv1j5MjF=`65H~lIz<~$a4P34`AAvxy|>_X zSyboy)dB&JVtI<{Y+Jx9SnAQ84>w*5`|=T%J()M#b$lb#@a3D*Hcm5h_V#tBtA@vzdl$`{wzR%9&_YX`2e*0fyUCYbto^{a_6vN?25` z$-GK$B8xle?#99z@nju~s&tdzg|(aogPfi51YXC4bW zPemA)i!0dlRgrooe9M9t-&3hh2XYxb1m%Gz*gohAZl;cg)NhGFL0b#T1KW->GXL*E zKb6-WY|<+6VRq#8Q@ZkdQ&%fWTn30Lle=5~dxqtolz+nFu_*NN77gCDlLFy$P;YESAYD<^D5B4Zg*CXcc* zU|dyL3gE1`OM#_{(HbJK+%<;HU}+(*4$DANX-MHrGJ+bOS0=g$>lysi`zC_wW1*=+ zp|UcBLd6*tWiZIM~9t#BkV2+(|UPe~VVilvGnQ5hU!_J9l$GF*i-9)9r`HX)VB ztaA@|_*cAT$&u9g-=JbuF3Fo zZpOVyjNCY09%+&`28_@?qVO;mT8K9pO1u%HMgd<(BR>N~jEIOaycZ!C69kFZpa}2t zopbGd_TF_)RdshzP|_oH_K&sKk2&X>zt&uH*}DFaj=95Ts2vs-63Gq=8D-2&duDF> zA(TYrg#}$~xd1@(415B>rzMa3MAiyOqP#mGjwzy8`9OHh8-fsizbd3JAr!>l>^(eu zfAx)I4T}>%w-n#3>XB6hkAOIlW{brw1^G?N{L6idhCQA06A2*PT7rL_wQMJi{TG{Obb*yTgmHK#FGS)JrVSK}?x9b2Pe+lrk{uvm6w zu{`===0+F3P@ajR^ZtcekbDsRitn3PfI_f{b*i2+%(1dmIaLqA5l+>!_%vm_fd=S$ z9_paK+Du*&hHYV6_M{y5wUzvqkL%kr$!~c>tBhGd=P4xAv|lWT){({KWUj}5aVu)~dTFntn=TAA z&fj=<7zW9tYWXyoNi9Vz#QAGgM8J6d0;f9U($F0?bM-IqG_?jqF2t)*lz-v(e&bh2 zsoJR*;ed_SfRKea|5a5w6tD=0EWI*Zc2vZ=_BIviTf5R!ZI$$^OQfOVM^}m9U@9(x28I!l|tB+C%9A;uAwrG#>U~ohe_1R9{nJ&@-DV zOxp>=6`0Kr;d9Dn*zot?ta5P)1}$p)>{xGbpegY7R16Lq%`7&__7jZ0lGDJ+rMt>) z`7|8UH&L3`3jrFgE6vt0lyGYHrpj9aivFK=NP%4#DQ#Dcqzg-7cBNmsuq*wHkBd?l zj_q+UQnZc2(8cGpk|lL zLwHP{FXOG3=1^6z$U@?Jv1J=$?M;z()@eWfFJb;uPYS^P6|4gY8e81#64ji z0><02lY(01CR34OZL9*75BELl272rI;WCG6WYiek{`G@1Qe{i*wBFjmHqG8zj5nQ@ z+B4}b^jn9s=+j)vQ)uW+4bpIg&iWN^!(Vk$8~*6q%r$bps2imELgh`af1*o}crmp? zaMY$#V2b^3nG53lr)~#tsZXtXEX?UmEz5xr5>060+d+JiqQ})xOLR(vl5!w`gd*Pr zm*uHe(ws4nZ4t)|P5ky+$i)!7RaIaF%{YfoHaB)c8SGKpwSS7aJ*vC*XMbvDDDxC1 z1jDK?oNl=28i3)u_O-pf{_Sbx_9(4(j3xO{&x_Cs%XkmwLH?J&WSI7N4?TEH50Vh? zp$DJWgCgET55A-a14{I%weEzdZ>6s(&o;q>y4@EoS5Ftw77Z!SS~C|3R8GYsTnj+@ ziCBJyUG0=9s}?<9?oO%=Hi$jN;t^AXZ`2ONGA_p#<#}ju@S3@#kO9mk<8rmF^tA)A z8Vv_?snW2THNG-s0-Y&eQCcYsg9={>xh()eU1l2y;48Ik7-lp~zNqsR$3?Ig-Zpqz zMfTAOUjeO8pU6I;-2!zJKnq8awoc54trPRwIwA5;Vt3`4r2N9~Ld}yi_3Rj(WrAx= zoXE7GNl^pqnt_YyQ_=&> zsZhw^qsj%Mnje~8bH$)H>YZp9Q-pA>=GRd(^^)Q2*K7K*=@nIVwo&h)^}@YcFRc9T zYJC@5=FX~*q*34H>+1{l0TSj-8h*djgf_tM!{(=$stUb)iwIV;n<1FAf;G+0@%vcC zNzxeJ6|;wDI_29nLYW*FO+7VH@h3A>$SXIlnJQUaY~VtAn-(5tRC!dJyt=GQPE||) ztGc?d6=b~LnwW}=TV#H1WxAPSy2*57fK#xcb?F%cWGQ^w01=E5Q?@FHm_q0@o=nv{ zPuM<|DV*?31;js@;`yHb(<&f7DT86|8(`BNpC%ws3)jhmUy^q7&o2*VT25yw4*vM( zjcE@XOxv04DanEfkG)GUo8QW`e(rSp4Qtb~Wo|)+ZopzUf!V1^q+)c&VrK$P-0;*S zlR0io^Z2bTL+xphOdIgR`_vDj4A&Xyrz4q);ThOITGR}+P2sYqCYfqA2ZUq|D)t_q zx_D~v>Me3_;=$ZpY3i}xGTi$gwpY0K9D~`4c|XN%U>iE({6@Ft|0KaMtZ(AjO16uT}guxhRRcVA*MS zPhAhkDzYf(8LH6~y`J@mfR9h8zY{%t1AKgRwjTaMw5qKjM9t1X$Y<0K4G#}&-K}qC z%c(K*VtB^wKC7DL+dXLMHbrRel0F?iTB~^zT%Q^rt<^je*{8)xYgIo{02=$S#{4g4 zt*c0|U&)6!u{)=!*sNLwLi!s6^HwJITW8x49Gb8-N>aNsC~1?aedlZ&;=~jiq8Ol& z(pNM_e404K*l52n;m|gYBDOIz5IiTg3Wc^?(X!+=D zv=GR;HMFSR(?iQAXAkhf4F+gvDS1azpV0v~mTG?%S{|8Fb>Z{C3oh7gi8p>>HtZhX zD(uwm>A~))*|7WK^Z_;$E0pTS6STU*YAn{D>7@N9^LM>3o)vP0v>w{hS_H7- z{A&t2Qa5c zPkiVPfBJpzeDm*oCVI(i^p!xUqwn}VbbXT`w^K*ouT8S`%&?0Kb{&GA$f$c{adB>b zzMIas+VgRg%#*bTY`t6k6V(~+?)i;yw=iFa=7Pv{*Z{HNPFr#EhgHjxh@@Np&O+T5 zRpbd3*`^}X0_NBl8RvJZh=8)q7?EokqexuOh~R8?(#sV1pE(?38%Zz*#N(btKc9R!)()o{b2dUV_V6J=+}K@%gBVGvj`d^xoLe~SS!AJU zlsx}I)xHS}*>J3Xz42Jlk<&QxS#|t9v?aOhD&7f!*~D~XU=!9j!PzW2t5&o?K7|lH{1y&I!NMEn!(I&u$a z$Fpr8j%{JycPneJrXI3?t=O&XK?LPyZDn3k#5*W@(!v?tkIkm#N^Hee>a`$(b=8hi zw)M!5O(LnnF(Nl)#gA=gUy^ex|Mj1N$SiPxv9Ay@K-bueDzZpzSE##~ssaR({C#T2R^x0CRH{MPScW*;UsHJR;~YPBamXAd77-wR z$ecxFaX^hCvIuEaRI|k_YlDzQHK*GDqc5yg6%;Hi`oa33JX$k=fs#X;3dfo;G(gcD znprFOv8VO5t4+@qcdNcy1U8*i04f7e1oot_#@|@qnbB~zzF{b~ju*k${n)2Yo$E4K zR4LVhMz#1!$OPe8W)5I`8fAuXI#)Zdu<^xk-4`ma4MPwYGlKcrE9R?Z z4-VM{v<=VaD`4lM+=f@}E*m&(zCNY-+VT0?TR&ensdxQ+Rkfo5y@MlZ^G+9v9xtI4 zkddP6n}pbOQfw09vUVsf6d+23o0Qoow6xZRp2lp%h{j5~z&@i+$VR~}WFj^NfirBq zCOiQ+*|04sB`Dyj_VREj2r&*F&qlGyr(?~g`lqUg){f+MC@l@5!Gtr+LW`V4kpICk z0P2U*S`lxy{5G6_Mk2oIx71ZR|BPBfHVWG-*~))ib*AjuLFcQ78!tICV75rw*S4S8 z@u;@9#^`TIG6XF^XkslH{i(cd*%1~BMi+xRa)2xVbptrfRRPXz061U<;CgKUSGPhI zP}-aZ@J&87fY(1&JqB<~)JikB4Z{KO09-8!;2#oj<}KN!6$t<@zBPdBg#gY&M#Hxy zz>8V}z!yZm+C_T2Ju_yl5JA&^UE(5M`-*34cjlB`zX)q<=bu(zS7wA+R2cir&B60x zmdzjwc&2D|zTB>YK^G0q7VCq>Yr9G#tnEp4gY-fSwxMWAj){pC@hMfk$(Wdhrvyf2 zOiay4YFUWIQ>s`y1J|i|R&ixnw^4BjYnxf|Ykrc7C8gJ?hE{PkIJi+W3(TVXnKi#w zHERW&K&QG|xo{SPsz#JGY7QG$sx|Knz-Z@hP_^H&6--ydgM~QIWywH5wKlGRLG4U3 z8EzYtrl4BQo*t?nt86c64DX8dfGdW#6KJ;A?u#p*cv4314H&UEpid8Ou|k zH~G}~TK!Ywtl3;RD_#K-IxAk4k3x&t+~NE;1qDAV-ijO^o2shGMwVG`^+;~)P4C6t z$|`hk*^PJt(UkH;RIbE-%0F$XdrhY#rGI(qz+M*wzGIhNy@=4vGqJ3Wp}{?pKv}FT z(0S{c(KeDB0H*Vki-2*^(5ZOO;qf8>MPpqIf?7Qr53Sb@w7gV zwr_>8Rs%>IjP#sE)jFhFB~f2^u?Sk`ngS`8p= zRDJhmRsW@`#vGm{NGmadjjB&>R&^<(*M|&mlO&y8^@CHYUM?~IxVpS0rRia7!nYkZ zF#c(p*pe(&yQhco$7T=kkqrj86^vIyHyddA;$~GJy9w|G)oGeEO=fC)M?IZhO?N8L zQWw-?&)Ft&e;PzvB3bh zg7JH2SAF+pRo@}-DcjTxWqEehCpWA5odq$ipW_RffNyw*nMp_?7q5H*s0wau-il;-ki?nG~^#GHHVga$BF@NJX;jY1E-l?_3>*iPl1_v_#*VcvG8m zoXEX^@wcenEvfadwQ%SIL+*;zqnb|n=rAPIiqbB zry(JElhXhmRtxY#l}TQR&22m(6u0q&$lJyf{CRLRvRj(fIbY$n3M@xlSm7R&NEo2B#^9C z$lX2A`d^D5TQnbd63Bs;to4Ofy1K}pSq*38D=)lI-muD>7i!81=O&R3o38ox)RSHn zvc0Ug;hJwxxR~+9v^C$JulZVdz|$G3@ii^|hHO1rFP(V&&M;Kti}g^A>N**w70$&F zxbb6SaG$q{NvR}&uv4>={NZW{#GVn>EXTx?r&;xsG-LP}FT*01xv_~SXnCm|)v z^1iOZ3!r;@n)-yZn137D4X>w4OY*bX$j+ZRvIAQjnOZ%ikx5v@%+OgQJ2-n}2CrK* zIHeTz<6%T21%)UAnRt&`HD9{EX4?c|F#9=GyI4}g3>ws8!l$f-sYLiPfM#B(O^DFq zg{)a0P1&r`{B$DJ(qTdS4Jv&37ICF!XW*(43l%`>xYD}e3^Kf8JxFQ9qHv&bj>%AT zlmhe!^JwSMCAvlSH3}dq8c*Q*l~3rl&aGli@6=h>raZkRp8ih}$HTbgX?ps??|$|q zBpXuyo;qOGhw~_^Z(8`Bc)IiQ$TyQaFHfA8Czhg9Q!`8Q6L-?3A|h|uIr-38D~Ebk z=jl13sk0lL{48}RG1xF z&v~fX*a$c|FY1cb6pUr^WIbc~)(;S5lus{XxmAoMYU@ryRvRL@N2 zGdPR3^?fu{%%U$T!Njks%+V&))QYD}DC2_$wa@$R9M@VO)l~2S;zV$UNhSg_gWl8>%;$)U0w(lq8 zaZK?tF~$50$H54esOgK3^sAl$7y>0kNzv@?^Z6(Q{8Axt}vx-APX$u~Kk2EWW zkIbleKOOJVaUV$$p&r?B-x;vdwgy2_o|OLowg-8rDGDgWAK?w$N1+Q+f&;Pi$89jc#U3WMpYPoAyw#QB z>6I6xM-}}*YvVM3?VG^s@2MZ0iAP6n&@0Ps)XHz;3CX4`(y7G&a6GhfB6P+*BA0aB ztu=ou%`4WDGjLCEdC>dKAr%Yq1kYLYnt;>Gy5(n_&UT!J^bN<|-5M?r+HumY99R;r zn?DJzbwqk=jbokn^57%f9#dJgzKkDe!$$H5+)8j9{yixa!a0HlJc7RFU$7A6u(WHq z-f@+wk4G1;;*i07IAZa3mBz=h&K%_O&0>88+=Pt8&-)!GD!}a4ZYqBt<(BN5&-Nu( zC`OER1a$(=;sEoF4NRRDKEVQpD!l@<@JFg7f9>ouh1feVQ_e}eAiaVYIJ+3>YVwM) zbTM2@gKe!STexG?EofsU@5sGKnLP}vWjtFZSf#Nv(_wniC|ToJ`aBx-LcC#ddM96@ zw2kM7uP5Uas33^1107r#y-@M~=O>pca_<62vBMzjaC;r9mNI@W zm+v(-he~_+!(6T=mrok)tQm-k_a9+Ayf3<>btt%6dx+&hU&-g9BZQbp;EEHV_m39V z;{Hf+L(p0QjbR-c8q>BBu@ihb8VC^tpvD3-y*L-poD66+n9pT{I>1N1_8n+17HH3lA|gpk5@d?2j{NgC!d^SWH(KDz z>ImZ4mz+!cniztv5&mJ@ZV<@r!-oGrY`&JZez>aU3bBe+CY!8g(cN6O04LJm=JMB9 zXAYgwJGitWUzyQq1T)Y)p_2zh$>@85Z5Z)henE1sLG4`Yak}63yLs88{Bj5$_bFB)x=`dLdfi{k#lUszM1+lSJrUrr9!wtk1rA8N%fZaTSM2pEoy}&1Cn{bJ&x!R7ZM&WRXUo|GI#E=!I+j|U&+_8LiF!BTPFxk4L*{U&eg=h_f zMD8+vS9Xv++NSLSm@B*s0TNwiDadg3Wr|cg8pbEpA-~%Os3B{Fic%&Dyf#Fd*BBX^ zj}djwde9u>!O9R19VsN~Dr!bC5cH1%TV2b$p;fX%XSiF*(fivX?LY@qW)2L0Deb>) zXEN}U%4%xgJZEQnKj2jJXQ1}YJCOGfNM3XW1W8~32FONw)<$aIe5v;7)HtbqietS6m`+K1Md(c-^IwQtx|`w;J? z+Bdwz#kOYBDX4uM-8Sm+e==R|TPW2&wwN^4KDLJhwXYjgzBY`>Qcjx6H|HuJ0&Epc zAnUGaZSf@kAH80?vST(x)c;A=?F$;;Ts9XpKHIozyX-5qNRP8xP#h@AG%63lMB`M; zg`9OSI`Wswv*&ZiS-aGDF_&LKl>{)6N(w`1kUa?WbJO`%=crmj}iPLuu#I z`{rElqg+Mr3#YIJz0b7vw&{I-sT0|*7=y|E$S!_N?`xZmF(^=~R(+FQVj?YSyo>>!1^w+rQbb0it)O1uR1Fm}q4&LEn}Z@clN zmblU5z{j(Bc0nB<2ZaGB2%8do>_@qh_8hv^KrU*ZlVL#a(y3wALZvF0MaL+h-xEgh z*n_1m?HAL`^vi;*(J$#?MZc^Qwef6vSW>c%4tLe73r!=|n2eGP7|n!i1c5E3(^B}{VuHel93~+f@>{YDxqnQ(e zH|IqM9RW-TrIJXQ44dIgYK9IiEKrP2$|uiPWtU9m+og`*=Xv#qz^}Z5Ui}ZM?Ef+; z`!X;4(h)TWI)bXWmKULbn1GYY?N!3aJY)FA97YD?u3TbiK75s8C92p|m)*OFx+*=J zpH-0W%4^WaxXGa36jp%@(A1C_&!0m_O5Hedjw3t6s<4{&>I-!?&7z=CbcDh^+TACQ zOh-qZ1)cb=UpyJ*V`_Dsc)p<%&o^{p+v--)iRYyrNGDeR=GDr8A7*WrAA<#sBUg`Vmv^Bddo-1X=g;lwfsFV5fmGbi0R z$Zrc*?Lr}vv=TMUO}I4ot#J>+<)UjE52-X-s4UX@FN|adK}{GzBHaW0K*;-fi0qPq zHQXWHY7YxzQnB1KxIBu(Oyb!P!b`LaKkAB7Cm(*$yofrq*OUp(B&)(|vW0uiB<+m} zL-w#Gb7D$=wiqi_m;aZyFq6)rYJA&Rm+aoF*?LHS-Iu1Gxt--G4C*yQ-Iu~QZ6;yB zY9`UJW)j?5T!p0>n@RHJ0+~6G0Y93vj%iQ`4^47_uSuTfXKA-^nt#>ItBk7$*jxLc z@nSM^pPxLBqVmGYQK+koD=?Ga5+BySV)%!=&-tpvMJnTK?F7QXm^d4EqQh(49nHkk zQ`wm;nCS;cSAOEYlQe?^M-Q&#hw5I*4-bDdOV{}33V%nOkczM<#RbN*P;5^Wb(Jzs zVOiKbhhj?N=~j+|iY zaz!ao6qzhwTQUVll!Pozz2stm=fH^pqIiMQ&MG_)@nBagfmD>V7rOIrTgA6>RfKP! zPeDQO+KaDVXj$eY&50O7RbvIg)%#rBWl6}jv1rLQyr0A3D{s_IDT%sLeZ=(Z=AFERKH(%HuQKu+LY*VB{HZTGz1H^rd){Mkh5nNQ!Fa z2VT=@bwzaIeYGyJFy&neojuJib)^te6J2`#!kmI9{l#2xoz@GWyEy@85Z6bz&$&9bUfaT0_ z(xY)NT5X;HsKq3Wp~5Eh;w>_=88XY9)-73R-Yut8@tD5ZG7Y>AUuL;dvtkO z5scr7+>Cq{`80q0_f9Ha;;m`_eXS&Qr_Ce9f`_>20LB7;M0*oN+QGDLnWQ;ai#Eyd zRz$)+jDU_0S@Pgq^jPb^Srl1Ez7vFrxN_TFkMy5>B^RWucZtod;>^+qa7%n1;(we2 zmS^tK;e8$TWR-F11KVm|M>!$hn7yf1beVgUqrOB44yHM-IsvtT%Zu zVmo4r3JO*CK#8ppkv)qf3y;$vNfxwCAiw zCtCAWst;Q@6CL5lG63_OG!$*&A0g_lK2i zqm`>DDMJR&6VaxW1sHEV8;t&XHP8UYI0h|<* zMbVkbe$ya~sL&wRk_*uHD*8&$33#*{nz~ek=4uQ1S5O~e|KmiY1)~b2RGk zRRq3TA+7yk0fp{+Kg^Tg->m_}dGE#aA4WEO!tAhU_;}Lq|F2}JHH1Qk@-@Tau9X9Z z=>;0ntH#N0c$vOTa@wPs?>hW~-Av?Y_*aU^%Rh7DeNp~B`SD}-MZ;sPD&!});=zN( zgZ}3_ap(GiqRO_+y9)`>8p5i2gOgK7Z<0tn+2hw2WL-^&*C+uE$qpt)fTkD#3G`^1o)kjX=eV!e#fpv!VOO z!NVwCeHG*C8`O-?Sbs$7wp=TSOs&tsVGh0qBv`ckYHdg_SkM9@q%4(&(SytD@@ow? zNW1hZ=m~nTNyW?bvfX5x8&L}C&E%lM^&vb!*x{w6;3=ko2xc-74qrynWuFE;<^Z+~ zwNL~4&F0f!^AgkH3sgl!uq080jov{ix)cwOGGkm(zyIAfm+6&5LldZVM7%OptO<7% z9sZgk*7|=CdvQVdzwjQPsC;!|0M$$&EKm5?(yRB3OprdD`EJ#z1tZ%|<(#oa`tJ2H`9bOUo4 zvG(3=$=R+RNvxs&r#JPCNRm*_uY;%GMZUZ#8}2N=jbSmgPr3@j7ge=^En&!0?BP>y(Z5cZB5 z#T9bj^dT;#N8kkz{G=wq=*xanYpiZAK+WYtw*L{3{vaJ8OZamlLU8g2xLJ*&^SRN= zB!5bHN}-a7$}~=8O5>+B+L0?9i<((6Oz?kF;d`h9SV_`#^Lxt*^BCC78SjfOUFc4F zAtRj%B-D}g*$!O3Os1tt0UBD?dOJ$kXt@|kUphcv?cFySKtF$Py*&lHuuN2IuUEDw z%_3XQdTKANwU>Dq@t)CHc_@y1r(@d)^AAtPH^_gVn|)DqK_qJLAQUuAQFy1(YCr&^ zL^34VS#WY%MT^MsW=LVie<9t}Hl&dk67O-iRKTiD$aenFdBR+Ie~mHn@S^hB!NWx}L`axSw{}_D(R?r;f~|%vd8K>HXW8N0b|omGo4h+} zk_RhvAL3xLu|ZSQaI&h68am{bU`Y9=C@T`@PU;_VSKDA8dk>GcqbUYUq(lQ>_B7G* z{XWB#Y%R@iWgeK{LkhLLDwv*<>Ps&J;YUpZbS_&f-RubvMWgF!7EW=Y^L`_=nG6TNQBj>Y;M#|)wBH|OuR~5 zjoX6-w?VBSmPxz{XUbtdkf)k&S!*Eb5Uo*~#{R?Oo$^-=kIDi7f~sJAc3?~N*s8!j z3**dBOoM}5MGPBoh#q`U5Jxdm1}&(_48i@jQ~V(++==sI*ZwbCU{zcR1l!k;u@{pE zObj6D2{_QI$a(uJAOcvJ^P0YLe`bRb>YdiySgi*yE7^Qu=qV8#hTcW|WU}P!{Xu^2 z{R1KNfIrylKP>ihF{I=B>Bzi1EXNasq&e8-g$FL<6_Fq16a>2q$pJtCyglt^y9947 z@6e$D?7Zd)ST-JN-z z^fGjReqKKAIMSFoO?>Um7R8KH{+PgtxHsbHmiN-N5kF>>h=PX{a5>1a`xuFl}qUL(`VW5dx1X}S5kfC2JT29?{$qivCRGz<^0;q(4k1|b-m{@WQ zQy=}6H<*Tt^aEm>RO=i;`ZYgiHJq($Sj}3{Jbt+-zu$*-@DS=Ok`9;Ciu}<&Ol{^UgUP=nL3|f#x=z)N;-n~WZ7qhfm z)Vo?OF=R=Wua>P_5?P}dZXwe^b+)Ke(}L+2CIkdDiq$c9!C2b^Ydhtua;9r#$a}mp zqJ!$24A-LN{@-#G(?m6wYsqFG6SXUq?YyWZAaDz=JPUlM%mRX7$?k>2=kbXI(oD zINArgupKF>IA|gciYyifoiEfe2FQcqcwqu?3@!1|B%4=HiC7RYy7}Yq5#ytt@=0I$ zH#$y73g?q5pt%I2{Y@rgr2uLv1)eHufGpU`SS>&R1_h1+4(G(xchEfVZW5?8nGe`@ z#Yq9NYJd&AG(uz5=F?S#jN*(-LIDEe)daR*0TmRyx=o}zq=m#z#H*7kujY#~RZQDA zCAS3?Obr=SqP>oIb-UbvB^y(`dPc+9`iAjrBoZq#zR<*KbQQWv>^zhip8$^LC-Az& z!tG{!a{0PX^nu68h^bA8!|2i^WuSMR)}x2`#R_`&dPqkrL}Ml3Js#V{wJfkQD_lQ zasE~z#m_;pA}EdmMe(f(LA{U=x4K7ISusek6oT?JjfM^bad{6#stXB*rsSav+Y+wr0r(Z%(miiRv8SGjz+Ogq= ze`hf=%j5op^%4@zTo}ND9lH1`M!)%gyiq` zblw;RUTv$iAz4J~rSxF0Bb!v~(u1`-&{9ed69wiLn=U;rU&n8>$!DhYup?B+PO9y@ z*p8AOEa-_XavX%D$6P5rOct!plm$~*qsfAeq{lR7x{35?exk8GV!LamFgsr!5+^_a zluQ)VI}>$L5R?mzxytw?3KY=DpNc5JJ5-8-g;EqOl%k*`nwas$5Z4)WW=5EQp%%>R zo@qUitrbP4CMF}oU|#}tVtUa5Btt=+zN#8Bt$FS%tI{&9ExVMmPlC0FlxnH&?l_`a zE(X+SmPuID^pt9Si<5Zrea5JWlXz=VSR2^8@cq&SmK@6W@;!d9R6Ha9iayzEeq?aL z{8`D8LO&n!#9UvAyT0tbR`O50-(6q!V6T6-2dz#jpa_uH?hNylw9SH+V<3A(HqsR9ulEkGnz zq<8WsvYdS+ANpT z)QxB7_kWnK{;VBhq2_5MIO*HsejPdKD+?mQN#CZKKE6?yfjYX3(T4r6;}^_nLgRM) z4xS%(v7ximAFb<30m>sdt{H$jW)R6UbZ^rfjFLAp0@;Ph87$*Dje`!W*I34Wj-D)O zgM@}T=YwYEx?xRALLU}#JOA6?FV|VH=oO}yXpLBskQ%tN+Obk;HlbNog#{g|HD4QZ zyY4p15aAX#7-i-tp_50TmqJw|q6lN&x3516a7E*-HCsk&iNWj?$^&4vs+b_r76`$mj zuCO^mt*Ter@9LL)swIO1-WAPbn{-Kj%zBK!YAwCMhVWN>kf|8mk-e?1%JP=wmarUC z3`C20On;so;EI!LDgz;2HVnk#TBH7t)}Th^jKZoEZshs7=c57~AQa$WC;8*tI>c6~ z9_a8)9m1VcX$X_B4l#30DGUo3;hM6!eVmvmpW9cI-6*4eSe+1GhsK4&Wq$6YxVn;h zSJM0m>k7&v@KjfHrB%ySXfKsj`dUqIlLnuQiBLtq8@d;ht`0^?VpDkXS0iXGCQ&RY z%S4Vx3DY*t)z48&`xsbnW1jml!z_46pz#e(FaDq|>wA{?ec4W*iYwp=x^y8ac|G^V z0;MWs?#E*E^i;#usLda5cc>YR1nDS^%4QMVDri(TLOD8$X%`!By<#hneBcZq`CD;G z-SU^gYSe2O1-MFJSz^d-M_D_+IZ#jAQPvJ9Ln&~S2|n7pVu5{=&u%Y2V>Me2DaSO+ zf+BqKfSY5gsDuaFnS+dz7hX)}K}#M}IuUI`jFL^afBLIHkdvj85rIIz%U zKV)wJ>q;~$#1I~|4l+M9E+%FE1xS&(3X*ghvds_8Jxva=6R5s2IoSVkbE*KDvc4}i z>-+0duMc~otncQJX{uEECvJ0!{bNgES>K&cLw#DPhI;Wb7!NdhcIFHP38)X1jevCl zRVBUC(qPsB6*)v9y_yDIEYPz1Pn9(Xbe#q`h~O#fyYs;_2e0|8!pPtAG}LES4B(x} z6;YyOUufj9vXKDZ2@p;Lyk-Gy)ZFnuEMW9>G-sAln0)UnYYy1_Qb{LUo_uCUh5GJq z*7rB3UZ40pGdzEQy7KM1UO~icLsP7(4R70#EL@+y+T_H@zUZ3w7VCNrbKu@TG8Jq* z7@;VRo7}e-J3&? zxL(mUH6G)7m1{b|)xn#oeCdvHFW>p9^*uq4#}J+Jg8cJK+3?ufo@q^EzOgWLctdFQ zwg!s%0u&`!>9Y+3z{~~<`z>dH1=D&OW){4it-@=@z!!naEKn}Z0wrtJav*F7t!-O_ z*7nnb){dFb!ud80T05T(+B$m{K+f8Tw#?nKePd|t+8VUTxa-sG)M#t>OlT1(HVs!)dqGhrT9M{2tC#l&f+7JtRC+xhJUgUheTBWHK7t9TCJ zy%y76@L*G2(<{flBV#I5*fZt_>>FO1=GPHX%})x0%-Sy?c1au^ZXV}|1gS_C2F_1@ zYtbr97PczO9k!anLRs=lUR7g*gdS^AGO=KV#U^WtdBNM*-csrsyuqDUUA?{-ESJ#F zYbe`V|2jdAb#NxkBPoDQPil3Nw$OfLt)++aW9qN~W4FM~9++T=Vfi*5d(G&O9eD!8 zS+P6}*!$MCIR9#V)%u~aFK$0E~V9x)H*-uZcX?`bW}L z%;QXlZ!bG6_28cJj!xwFmv@q{4;6Q`Hqd#x(8vONW~>?WImK){5%o!OAJM)B992kJ z1$LzQ_uFEaFEs!{ZPvAiYBtgO16oM=kRF-?O#1kH{sDK50Nl<2a(r0yiI+%&CbnUC z3$7|OBkkZMbe{EDxns;tKH#T&SJt{qxv_A0k8k z03&MP^D^&~?P?G=QhBMIe0~uEn|q;c7de?;pHxQ4@ixitR^0+DZj z0GyQ@=5A;utye?05n*NcSmXxLl~VO+6MQ6xT>f3>C%44>4iA&-ECJ5h4}$@sHUJho zvcCMTPu};|x4!p*pSxaLvm%2bk3asIU;fk+cYN@t{zv4GiGt?i^~DbzvB%Bg1k2MC zsw84BlH~haPFz$TqeZXCSTm@F+nC8=Cm&jfNS{b*S>zSkXfH%}c$R&xU4VZzfCc$oF4;Ve}(#3i@NcKAe9S+-Ufg zbfgEiy_`UU+f&bafT4ubDLJHnvZA_UHhj9LyoDXaka)<3r^BleYuNdUgc4f#Rpj@% zn#=C1?2fCIS6zMenDf}J7Oa`9Gh+UXIyr>pymn6YwM-7nxu*cb1T)8-d)gojxTZSx z(gkY5si%-iXq3eYBT=y(sMqW+Mt1Ju{O7}5!kfhe$&Z5{n>Gi1}x!ZWf46&ge++t5<9>u zy-It0xsVJuqZHpYWS->LUF8w)09hDPydS^A@VjEa?Zf=XYC}ppe5CA*7_@Vjm`c%+ z)SAmv1TUevyiX5_?O>PsCtZEQQcMU_4#XqdIUyoFb%b_|Yc>;HFzR&}5_{`8FO|MO#)d^OZ5!#|prNIC+Ew7{e7?%m-wq?F+=w3MudRLzx34eTH zGDQ;BG{vsNlXq2*a|pr_+t+e_)#IERjlamru<#KqujKiY{X3LfxcerUu zh-0`THy~b$MInp`1c-qJE=6wVsp^=sI!0QHi}T-cXA3)nemh)kchYG7%@Rz4Irf+? zb|U4fXtP(4*mzX^e4Zaj1HTGg$XQX4GXpM>q&wwnLRiM%#*BLU3(4SfrQ9y~4sF zn!y~tmyE62sfs~gJsd1F086yCzL(3Lg%|g4&LYmgzT&G!RPgw}HITV^}7J3GSUSjal zN~vN<1X;kH-i1>sYX_as)5B(q!~tbzuN}B4+qrfj{-m?Bm9_8TcO}~;|5A3&+L*gt z+3vMH{GOBTS=-6eXRHmm+gZ4w__lDU*k!PWkLmM?&AO}NKUyjMM`xS==-362N7oo; z*9O#TVsb85PO~KMHD4Px7v>;Vy`FErHazlL7Dz&5ipZo=xnYpkgf{Vd(0pyUz&Qlj)PWyw!QXq ziYoYb9B@{mRQ_+0d9b1|JFu|Q982J7x$-q8`L5<`$3m2!W3SI?zIH4``EGmdTR19^ za4bam9(%o~`L$yq%AaAcpV55nSm3-?d;J~F*N%lKf2O_mgWf7_I~F3afdBEE0}E^f zYaJPpIuSIWwy^bb+`f!_J#oLUt>#zY^LpqX5%1=^K`i;*4Kl%9I^~b*wH|00z2L&i zY|-L@2`+-Ww7?J}^T>UG%O#S2g|;$TyXW@WOOREFTaqhK^?!ExCkK(qKfXr#wKQL+ zNIy(mLq+9PA^ossiF}cyQP61P`$GE3Nmdk^DgESUD+A%5i!0JEzm`e#WQju{?01esK#ehR>}v&zEsAj7AA}P4>c44d z6=#~GP^6|cCLC3&Mr&tn^CfT-&Ik%t>O*Wcx1}6ox^`eCVC8pEr0(&X59TzVwQerxx zE-X<;=S2&|1vA`6E6(Y*QO8*qFKnm8R1%f?iNelAA1o_9D{9zWg_v9ktEynGfVujG z;x*B#c2=~iouyW_)3mDRMzS2So_0<&wqiw4DqEqa5jyz&6vccNYO(F;S0-Z(9)VB5 z%urTxdDP9eW2cO^XG>;gv@kVD5;Iy_i$*&O`jU;nYJpZ;ZEe@kj~j*!;2b&uVE9R7 zqlj$8gv@dl7#H&I7q2tU)XNs=K*vlE)y&hxGH8%j0CRxvu{lRA>M#blEmTB7qq7}> zkV2Kc{Cb%lZ2vvXcRTdMwsdPCR%SE|QhfKW=!#&QnS%de~uuSn<%ygWuHwzH?=I~7rruo z?p1f8iXR)XzujiBRf_+pOd-}+a%RxN;cgMyeTPLETI*y>WLgA1DLa3x`HZ7^6)nWl zvgD0y<@}+qz|D>#kpw+qr$CwiW=j}>y>5gN7`56RbMN4him*~6`CjCleCR1TUwI(s z>wpJu<^{(&E#Eny6fhPBI2J# z!DP|}oHC8w?kCPuOEZ|7>Q#Y15DG-1OM=yjyWZi&p4%F(fon`)XIHd9fP4O^VE7t| z`H~>;O&dYLGK*(&f4BOB9WpKHOEMU8MSHhOo(Kcf#cD?>UEq{{C((jx!GfCJshynZ zkl$b4B{`8q#T~Val1ZPG<8jX)tvpZlobzw+p5#wfo@-rA$RHI(e(dYTSlB(T=b(mV z_x#q%bNIPg|8x0VetY@6Ay$)8tOA4b9ZMY;ocMYV7q5loA^xE}(LCpB0FkrT!(DIl zMpz&`<{u~*)TwVsP&@M>@)&F{vr`f3%kqpZ0y%f%4;${Ad2`?VUaJVJ#^EC8syT?G zaRkG`zXFkbfQ1&kOK(lpnEW_88)D!d8h82N+amPEipkFvLSKA?66B9VL(@!q@R